2015-02-13 18:29:12 +00:00
|
|
|
# Derived from Nicolas Iooss: https://github.com/fishilico/selinux-refpolicy-patched/blob/travis-upstream/.travis.yml
|
|
|
|
|
|
|
|
language: python
|
|
|
|
python:
|
|
|
|
- "2.7"
|
|
|
|
|
|
|
|
env:
|
2015-05-22 18:29:46 +00:00
|
|
|
- TYPE=standard DISTRO=redhat MONOLITHIC=y
|
|
|
|
- TYPE=standard DISTRO=redhat MONOLITHIC=n
|
|
|
|
- TYPE=standard DISTRO=debian MONOLITHIC=y
|
|
|
|
- TYPE=standard DISTRO=debian MONOLITHIC=n
|
|
|
|
- TYPE=standard DISTRO=gentoo MONOLITHIC=y
|
|
|
|
- TYPE=standard DISTRO=gentoo MONOLITHIC=n
|
|
|
|
- TYPE=mcs DISTRO=redhat MONOLITHIC=y
|
|
|
|
- TYPE=mcs DISTRO=redhat MONOLITHIC=n
|
|
|
|
- TYPE=mcs DISTRO=debian MONOLITHIC=y
|
|
|
|
- TYPE=mcs DISTRO=debian MONOLITHIC=n
|
|
|
|
- TYPE=mcs DISTRO=gentoo MONOLITHIC=y
|
|
|
|
- TYPE=mcs DISTRO=gentoo MONOLITHIC=n
|
|
|
|
- TYPE=mls DISTRO=redhat MONOLITHIC=y
|
|
|
|
- TYPE=mls DISTRO=redhat MONOLITHIC=n
|
|
|
|
- TYPE=mls DISTRO=debian MONOLITHIC=y
|
|
|
|
- TYPE=mls DISTRO=debian MONOLITHIC=n
|
|
|
|
- TYPE=mls DISTRO=gentoo MONOLITHIC=y
|
|
|
|
- TYPE=mls DISTRO=gentoo MONOLITHIC=n
|
2015-02-13 18:29:12 +00:00
|
|
|
|
|
|
|
before_install:
|
|
|
|
- lsb_release -a
|
2015-03-05 20:41:30 +00:00
|
|
|
- bison -V
|
|
|
|
- flex -V
|
2015-02-13 18:29:12 +00:00
|
|
|
- sudo apt-get update -qq
|
|
|
|
|
2015-03-05 20:41:30 +00:00
|
|
|
# Install SELinux userspace utilities dependencies
|
|
|
|
- sudo apt-get install -qq libaudit-dev libcap-ng-dev libustr-dev libpcre3-dev swig
|
2015-02-13 18:29:12 +00:00
|
|
|
|
2015-03-05 20:41:30 +00:00
|
|
|
# Download current SELinux userspace tools and libraries
|
|
|
|
- curl -sS -L https://github.com/SELinuxProject/selinux/archive/20150202.tar.gz | tar xz
|
2015-02-13 18:29:12 +00:00
|
|
|
- mv selinux-20150202 selinux-src
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# Drop sepolicy to break setools dependence (sepolicy isn't used anyway)
|
|
|
|
- sed -i -e 's/sepolicy//' selinux-src/policycoreutils/Makefile
|
|
|
|
|
|
|
|
# Compile and install SELinux toolchain
|
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
|
|
|
|
- sudo make CFLAGS="-O2 -pipe -fPIC -Wall" -C selinux-src install
|
2015-02-13 18:29:12 +00:00
|
|
|
|
|
|
|
# Drop build.conf settings to listen to env vars
|
2015-05-22 18:29:46 +00:00
|
|
|
- sed -r -i -e '/(MONOLITHIC|TYPE|DISTRO)/d' build.conf
|
2015-02-13 18:29:12 +00:00
|
|
|
|
|
|
|
script:
|
2015-05-22 18:29:46 +00:00
|
|
|
- echo $TYPE $DISTRO $MONOLITHIC
|
2015-02-13 18:29:12 +00:00
|
|
|
- make bare
|
|
|
|
- make conf
|
2015-02-09 04:15:29 +00:00
|
|
|
- make
|
|
|
|
- make validate
|