894a1f104d
Also eliminate unnecessary heartbeat function.
71 lines
2.4 KiB
YAML
Executable File
71 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:
|
|
global:
|
|
- TYPE=standard MONILITHIC=y DIRECT_INITRC=y
|
|
- TYPE=standard MONILITHIC=n DIRECT_INITRC=y
|
|
- TYPE=mcs MONILITHIC=y DIRECT_INITRC=y
|
|
- TYPE=mcs MONILITHIC=n DIRECT_INITRC=y
|
|
- TYPE=mls MONILITHIC=y DIRECT_INITRC=y
|
|
- TYPE=mls MONILITHIC=n DIRECT_INITRC=y
|
|
matrix:
|
|
- DISTRO=redhat
|
|
- DISTRO=debian
|
|
- DISTRO=gentoo
|
|
|
|
# Install SELinux userspace utilities dependencies
|
|
before_install:
|
|
# Show OS version information
|
|
- lsb_release -a
|
|
- sudo apt-get update -qq
|
|
- sudo apt-get install -qq libaudit-dev libcap-ng-dev libustr-dev libustr-dev libpcre3-dev swig
|
|
|
|
# Compile and install a newer version of SELinux userspace utilities
|
|
install:
|
|
# Setup the directory where SELinux utilities will be installed
|
|
- export DESTDIR="$HOME/selinux-project"
|
|
- mkdir "$DESTDIR"
|
|
- export PATH="$DESTDIR/usr/bin:$DESTDIR/usr/sbin:$DESTDIR/bin:$DESTDIR/sbin:$PATH"
|
|
- export LD_LIBRARY_PATH="$DESTDIR/usr/lib:$DESTDIR/lib:$LD_LIBRARY_PATH"
|
|
|
|
# On Ubuntu 12.04, default CFLAGS make the build fail in libsepol/cil with:
|
|
# error: declaration of 'index' shadows a global declarationo
|
|
# So define our own CFLAGS
|
|
- export CFLAGS="-O2 -pipe -fPIC -Wall"
|
|
|
|
# Download SELinux userspace tools and libraries
|
|
- wget https://github.com/SELinuxProject/selinux/archive/20150202.tar.gz
|
|
- tar -xzf 20150202.tar.gz
|
|
- 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
|
|
- export LIBDIR="$DESTDIR/usr/lib"
|
|
- export LIBEXECDIR="$DESTDIR/usr/lib"
|
|
- export SHLIBDIR="$DESTDIR/usr/lib"
|
|
- export SEMODULE_PATH="$DESTDIR/usr/bin"
|
|
- make -C selinux-src install
|
|
|
|
# Use the newly-built toolchain
|
|
- export TEST_TOOLCHAIN="$DESTDIR"
|
|
|
|
# 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
|