selinux-refpolicy/.travis.yml

61 lines
2.4 KiB
YAML
Executable File

# Derived from Nicolas Iooss: https://github.com/fishilico/selinux-refpolicy-patched/blob/travis-upstream/.travis.yml
language: python
python:
- "2.7"
env:
- TYPE=standard DISTRO=redhat DIRECT_INITRC=y MONOLITHIC=y
- TYPE=standard DISTRO=redhat DIRECT_INITRC=y MONOLITHIC=n
- TYPE=standard DISTRO=debian DIRECT_INITRC=y MONOLITHIC=y
- TYPE=standard DISTRO=debian DIRECT_INITRC=y MONOLITHIC=n
- TYPE=standard DISTRO=gentoo DIRECT_INITRC=y MONOLITHIC=y
- TYPE=standard DISTRO=gentoo DIRECT_INITRC=y MONOLITHIC=n
- TYPE=mcs DISTRO=redhat DIRECT_INITRC=y MONOLITHIC=y
- TYPE=mcs DISTRO=redhat DIRECT_INITRC=y MONOLITHIC=n
- TYPE=mcs DISTRO=debian DIRECT_INITRC=y MONOLITHIC=y
- TYPE=mcs DISTRO=debian DIRECT_INITRC=y MONOLITHIC=n
- TYPE=mcs DISTRO=gentoo DIRECT_INITRC=y MONOLITHIC=y
- TYPE=mcs DISTRO=gentoo DIRECT_INITRC=y MONOLITHIC=n
- TYPE=mls DISTRO=redhat DIRECT_INITRC=y MONOLITHIC=y
- TYPE=mls DISTRO=redhat DIRECT_INITRC=y MONOLITHIC=n
- TYPE=mls DISTRO=debian DIRECT_INITRC=y MONOLITHIC=y
- TYPE=mls DISTRO=debian DIRECT_INITRC=y MONOLITHIC=n
- TYPE=mls DISTRO=gentoo DIRECT_INITRC=y MONOLITHIC=y
- TYPE=mls DISTRO=gentoo DIRECT_INITRC=y MONOLITHIC=n
before_install:
- lsb_release -a
- bison -V
- flex -V
- sudo apt-get update -qq
# Install SELinux userspace utilities dependencies
- sudo apt-get install -qq libaudit-dev libcap-ng-dev libustr-dev libpcre3-dev swig
# Download current SELinux userspace tools and libraries
- curl -sS -L https://github.com/SELinuxProject/selinux/archive/20150202.tar.gz | tar xz
- 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
# 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
# Drop build.conf settings to listen to env vars
- sed -r -i -e '/(DIRECT_INITRC|MONOLITHIC|TYPE|DISTRO)/d' build.conf
script:
- echo $TYPE $DISTRO $DIRECT_INITRC $MONOLITHIC
- make bare
- make conf
- make
- make validate