2015-02-13 18:29:12 +00:00
|
|
|
# Derived from Nicolas Iooss: https://github.com/fishilico/selinux-refpolicy-patched/blob/travis-upstream/.travis.yml
|
|
|
|
|
2019-10-03 21:27:42 +00:00
|
|
|
language: python
|
|
|
|
python: 3.5
|
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:
|
2017-02-18 15:20:20 +00:00
|
|
|
- TYPE=standard DISTRO=redhat MONOLITHIC=y SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=standard DISTRO=redhat MONOLITHIC=n SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=standard DISTRO=debian MONOLITHIC=y SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=standard DISTRO=debian MONOLITHIC=n SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=standard DISTRO=gentoo MONOLITHIC=y SYSTEMD=n WERROR=y
|
|
|
|
- TYPE=standard DISTRO=gentoo MONOLITHIC=n SYSTEMD=n WERROR=y
|
|
|
|
- TYPE=mcs DISTRO=redhat MONOLITHIC=y SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=mcs DISTRO=redhat MONOLITHIC=n SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=mcs DISTRO=debian MONOLITHIC=y SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=mcs DISTRO=debian MONOLITHIC=n SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=mcs DISTRO=gentoo MONOLITHIC=y SYSTEMD=n WERROR=y
|
|
|
|
- TYPE=mcs DISTRO=gentoo MONOLITHIC=n SYSTEMD=n WERROR=y
|
|
|
|
- TYPE=mls DISTRO=redhat MONOLITHIC=y SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=mls DISTRO=redhat MONOLITHIC=n SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=mls DISTRO=debian MONOLITHIC=y SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=mls DISTRO=debian MONOLITHIC=n SYSTEMD=y WERROR=y
|
|
|
|
- TYPE=mls DISTRO=gentoo MONOLITHIC=y SYSTEMD=n WERROR=y
|
|
|
|
- TYPE=mls DISTRO=gentoo MONOLITHIC=n SYSTEMD=n WERROR=y
|
2015-02-13 18:29:12 +00:00
|
|
|
|
2019-10-03 23:11:22 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- python: 3.7
|
|
|
|
env: LINT=true TYPE=standard
|
|
|
|
|
2017-09-03 16:54:08 +00:00
|
|
|
sudo: false
|
2019-09-19 21:10:36 +00:00
|
|
|
dist: bionic
|
2016-08-27 15:08:57 +00:00
|
|
|
|
2017-01-06 18:45:09 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- ${TRAVIS_BUILD_DIR}/selinux
|
|
|
|
|
2016-08-27 15:08:57 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
# Install SELinux userspace utilities dependencies
|
|
|
|
- bison
|
|
|
|
- flex
|
|
|
|
- gettext
|
|
|
|
- libaudit-dev
|
|
|
|
- libbz2-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
|
2019-10-03 21:27:42 +00:00
|
|
|
- python3 -V
|
2015-02-13 18:29:12 +00:00
|
|
|
|
2016-11-29 14:43:22 +00:00
|
|
|
install:
|
2018-03-21 18:15:53 +00:00
|
|
|
- SELINUX_USERSPACE_VERSION=master
|
2017-01-06 18:45:09 +00:00
|
|
|
|
2017-08-05 14:42:34 +00:00
|
|
|
- export DESTDIR="${TRAVIS_BUILD_DIR}/selinux"
|
2017-01-06 18:45:09 +00:00
|
|
|
- |
|
|
|
|
if [[ "${SELINUX_USERSPACE_VERSION}" != "$(cat ${TRAVIS_BUILD_DIR}/selinux/travis.version)" ]]; then
|
2017-08-06 22:48:45 +00:00
|
|
|
rm -fR selinux-src
|
|
|
|
|
2017-01-06 18:45:09 +00:00
|
|
|
# Download current SELinux userspace tools and libraries
|
2017-08-06 22:48:45 +00:00
|
|
|
git clone https://github.com/SELinuxProject/selinux.git selinux-src -b ${SELINUX_USERSPACE_VERSION}
|
2017-01-06 18:45:09 +00:00
|
|
|
mv "selinux-${SELINUX_USERSPACE_VERSION}" selinux-src
|
2015-02-13 18:29:12 +00:00
|
|
|
|
2017-01-06 18:45:09 +00:00
|
|
|
# Drop secilc to break xmlto dependence (secilc isn't used here anyway)
|
|
|
|
sed -i -e 's/secilc//' selinux-src/Makefile
|
2016-03-25 14:07:37 +00:00
|
|
|
|
2017-01-06 18:45:09 +00:00
|
|
|
# Drop sepolicy to break setools dependence (sepolicy isn't used anyway)
|
|
|
|
sed -i -e 's/sepolicy//' selinux-src/policycoreutils/Makefile
|
2015-02-13 18:29:12 +00:00
|
|
|
|
2017-01-06 18:45:09 +00:00
|
|
|
# Drop restorecond to break glib dependence
|
|
|
|
sed -i -e 's/ restorecond//' selinux-src/policycoreutils/Makefile
|
2016-08-27 15:08:57 +00:00
|
|
|
|
2017-01-06 18:45:09 +00:00
|
|
|
# Drop sandbox to break libcap-ng dependence
|
|
|
|
sed -i -e 's/ sandbox//' selinux-src/policycoreutils/Makefile
|
2016-08-27 15:08:57 +00:00
|
|
|
|
2017-01-06 18:45:09 +00:00
|
|
|
# Compile and install SELinux toolchain into ~/selinux
|
2017-09-03 16:54:08 +00:00
|
|
|
make OPT_SUBDIRS=semodule-utils -C selinux-src install
|
2017-01-06 18:45:09 +00:00
|
|
|
echo "${SELINUX_USERSPACE_VERSION}" > "${TRAVIS_BUILD_DIR}/selinux/travis.version"
|
|
|
|
fi
|
2016-08-27 15:08:57 +00:00
|
|
|
|
|
|
|
# Use TEST_TOOLCHAIN variable to tell refpolicy Makefile about the installed location
|
2017-01-06 18:45:09 +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
|
2017-02-18 15:25:48 +00:00
|
|
|
- sed -r -i -e '/(MONOLITHIC|TYPE|DISTRO|SYSTEMD|WERROR)/d' build.conf
|
2015-02-13 18:29:12 +00:00
|
|
|
|
|
|
|
script:
|
2017-02-18 15:25:48 +00:00
|
|
|
- echo $TYPE $DISTRO $MONOLITHIC $SYSTEMD $WERROR
|
2017-02-18 15:37:35 +00:00
|
|
|
- set -e
|
2019-10-03 23:11:22 +00:00
|
|
|
- if [ -n "$LINT" ] ; then python3 -t -t -E -W error testing/check_fc_files.py ; fi
|
2015-02-13 18:29:12 +00:00
|
|
|
- make bare
|
|
|
|
- make conf
|
2015-02-09 04:15:29 +00:00
|
|
|
- make
|
|
|
|
- make validate
|
2017-03-18 13:32:24 +00:00
|
|
|
- make xml
|
|
|
|
- make html
|
|
|
|
- make DESTDIR=${HOME}/tmp install
|
|
|
|
- make DESTDIR=${HOME}/tmp install-headers
|
|
|
|
- make DESTDIR=${HOME}/tmp install-src
|
2017-03-18 17:38:20 +00:00
|
|
|
- make DESTDIR=${HOME}/tmp install-docs
|
2017-03-18 13:32:24 +00:00
|
|
|
- make DESTDIR=${HOME}/tmp install-appconfig
|