2015-02-13 18:29:12 +00:00
|
|
|
# Derived from Nicolas Iooss: https://github.com/fishilico/selinux-refpolicy-patched/blob/travis-upstream/.travis.yml
|
|
|
|
|
2016-08-27 15:08:57 +00:00
|
|
|
language: generic
|
2015-02-13 18:29:12 +00:00
|
|
|
|
2016-11-29 14:43:22 +00:00
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
|
2015-02-13 18:29:12 +00:00
|
|
|
env:
|
2015-10-20 19:01:23 +00:00
|
|
|
- TYPE=standard DISTRO=redhat MONOLITHIC=y SYSTEMD=y
|
|
|
|
- TYPE=standard DISTRO=redhat MONOLITHIC=n SYSTEMD=y
|
|
|
|
- TYPE=standard DISTRO=debian MONOLITHIC=y SYSTEMD=y
|
|
|
|
- TYPE=standard DISTRO=debian MONOLITHIC=n SYSTEMD=y
|
|
|
|
- TYPE=standard DISTRO=gentoo MONOLITHIC=y SYSTEMD=n
|
|
|
|
- TYPE=standard DISTRO=gentoo MONOLITHIC=n SYSTEMD=n
|
|
|
|
- TYPE=mcs DISTRO=redhat MONOLITHIC=y SYSTEMD=y
|
|
|
|
- TYPE=mcs DISTRO=redhat MONOLITHIC=n SYSTEMD=y
|
|
|
|
- TYPE=mcs DISTRO=debian MONOLITHIC=y SYSTEMD=y
|
|
|
|
- TYPE=mcs DISTRO=debian MONOLITHIC=n SYSTEMD=y
|
|
|
|
- TYPE=mcs DISTRO=gentoo MONOLITHIC=y SYSTEMD=n
|
|
|
|
- TYPE=mcs DISTRO=gentoo MONOLITHIC=n SYSTEMD=n
|
|
|
|
- TYPE=mls DISTRO=redhat MONOLITHIC=y SYSTEMD=y
|
|
|
|
- TYPE=mls DISTRO=redhat MONOLITHIC=n SYSTEMD=y
|
|
|
|
- TYPE=mls DISTRO=debian MONOLITHIC=y SYSTEMD=y
|
|
|
|
- TYPE=mls DISTRO=debian MONOLITHIC=n SYSTEMD=y
|
|
|
|
- TYPE=mls DISTRO=gentoo MONOLITHIC=y SYSTEMD=n
|
|
|
|
- TYPE=mls DISTRO=gentoo MONOLITHIC=n SYSTEMD=n
|
2015-02-13 18:29:12 +00:00
|
|
|
|
2016-08-27 15:08:57 +00:00
|
|
|
# Uncomment to use Travis-CI container infrastructure (https://docs.travis-ci.com/user/ci-environment/)
|
2016-11-29 14:43:22 +00:00
|
|
|
sudo: false
|
|
|
|
#dist: trusty # libustr-dev not whitelisted for trusty
|
2016-08-27 15:08:57 +00:00
|
|
|
|
|
|
|
# Uncomment these two lines to use Travis-CI Trusty Beta environment
|
|
|
|
#sudo: required
|
|
|
|
#dist: trusty
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
# Install SELinux userspace utilities dependencies
|
|
|
|
- bison
|
|
|
|
- flex
|
|
|
|
- gettext
|
|
|
|
- libaudit-dev
|
|
|
|
- libbz2-dev
|
|
|
|
- libustr-dev
|
|
|
|
- libpcre3-dev
|
|
|
|
- swig
|
|
|
|
|
2016-11-29 14:43:22 +00:00
|
|
|
before_install:
|
2015-02-13 18:29:12 +00:00
|
|
|
- lsb_release -a
|
2015-03-05 20:41:30 +00:00
|
|
|
- bison -V
|
|
|
|
- flex -V
|
2016-11-29 14:43:22 +00:00
|
|
|
- swig -version
|
|
|
|
- python -V
|
2015-02-13 18:29:12 +00:00
|
|
|
|
2016-11-29 14:43:22 +00:00
|
|
|
install:
|
2015-03-05 20:41:30 +00:00
|
|
|
# Download current SELinux userspace tools and libraries
|
2016-11-29 14:43:22 +00:00
|
|
|
- curl -sS -L https://github.com/SELinuxProject/selinux/archive/20161014.tar.gz | tar xz
|
|
|
|
- mv selinux-20161014 selinux-src
|
2015-02-13 18:29:12 +00:00
|
|
|
|
|
|
|
# Ubuntu 12.04 coreutils is too old to provide "ln --relative" :(
|
|
|
|
- sed 's/ln -sf --relative /ln -sf /' -i selinux-src/libsepol/src/Makefile
|
|
|
|
- sed 's/ln -sf --relative /ln -sf /' -i selinux-src/libselinux/src/Makefile
|
|
|
|
|
2016-03-25 14:07:37 +00:00
|
|
|
# Drop secilc to break xmlto dependence (secilc isn't used here anyway)
|
|
|
|
- sed -i -e 's/secilc//' selinux-src/Makefile
|
|
|
|
|
2015-02-13 18:29:12 +00:00
|
|
|
# Drop sepolicy to break setools dependence (sepolicy isn't used anyway)
|
|
|
|
- sed -i -e 's/sepolicy//' selinux-src/policycoreutils/Makefile
|
|
|
|
|
2016-08-27 15:08:57 +00:00
|
|
|
# Drop restorecond to break glib dependence
|
|
|
|
- sed -i -e 's/ restorecond//' selinux-src/policycoreutils/Makefile
|
|
|
|
|
|
|
|
# Drop sandbox to break libcap-ng dependence
|
|
|
|
- sed -i -e 's/ sandbox//' selinux-src/policycoreutils/Makefile
|
|
|
|
|
|
|
|
# Compile and install SELinux toolchain into ~/selinux
|
2015-03-05 20:41:30 +00:00
|
|
|
# On Ubuntu 12.04, default CFLAGS make the build fail in libsepol/cil with:
|
|
|
|
# error: declaration of 'index' shadows a global declarationo
|
2016-11-29 14:43:22 +00:00
|
|
|
- make "DESTDIR=$TRAVIS_BUILD_DIR/selinux" CFLAGS="-O2 -Wall" -C selinux-src install
|
2016-08-27 15:08:57 +00:00
|
|
|
|
|
|
|
# Use TEST_TOOLCHAIN variable to tell refpolicy Makefile about the installed location
|
2016-11-29 14:43:22 +00:00
|
|
|
- export TEST_TOOLCHAIN="$TRAVIS_BUILD_DIR/selinux"
|
2015-02-13 18:29:12 +00:00
|
|
|
|
|
|
|
# Drop build.conf settings to listen to env vars
|
2015-10-20 19:01:23 +00:00
|
|
|
- sed -r -i -e '/(MONOLITHIC|TYPE|DISTRO|SYSTEMD)/d' build.conf
|
2015-02-13 18:29:12 +00:00
|
|
|
|
|
|
|
script:
|
2016-11-29 14:43:22 +00:00
|
|
|
- echo $TYPE $DISTRO $MONOLITHIC $SYSTEMD
|
2015-02-13 18:29:12 +00:00
|
|
|
- make bare
|
|
|
|
- make conf
|
2015-02-09 04:15:29 +00:00
|
|
|
- make
|
|
|
|
- make validate
|