2015-02-04 15:56:07 +00:00
|
|
|
# SELinux userspace portions originally by Nicolas Iooss
|
|
|
|
# from: https://github.com/fishilico/selinux-refpolicy-patched/blob/travis-upstream/.travis.yml
|
2015-02-05 16:10:19 +00:00
|
|
|
---
|
2015-02-04 15:56:07 +00:00
|
|
|
|
2015-02-04 15:33:12 +00:00
|
|
|
language: python
|
|
|
|
|
2015-05-10 16:15:16 +00:00
|
|
|
env:
|
|
|
|
- TOX_ENV=py27
|
|
|
|
- TOX_ENV=py33
|
|
|
|
- TOX_ENV=py34
|
2016-05-06 12:39:44 +00:00
|
|
|
- TOX_ENV=py35
|
2015-05-10 16:15:16 +00:00
|
|
|
- TOX_ENV=pep8
|
|
|
|
- TOX_ENV=coverage
|
|
|
|
- TOX_ENV=lint
|
2015-05-08 19:21:00 +00:00
|
|
|
|
2015-05-10 16:15:16 +00:00
|
|
|
matrix:
|
2015-05-08 19:21:00 +00:00
|
|
|
allow_failures:
|
2015-05-10 16:15:16 +00:00
|
|
|
- env: TOX_ENV=coverage
|
2015-02-05 16:10:19 +00:00
|
|
|
|
2015-02-04 15:56:07 +00:00
|
|
|
before_install:
|
|
|
|
- lsb_release -a
|
2015-02-05 14:59:07 +00:00
|
|
|
- bison -V
|
|
|
|
- flex -V
|
2015-02-04 15:56:07 +00:00
|
|
|
- sudo apt-get update -qq
|
|
|
|
|
2015-02-05 16:10:19 +00:00
|
|
|
# Install SELinux userspace utilities dependencies
|
|
|
|
- sudo apt-get install -qq libaudit-dev libcap-ng-dev libustr-dev libpcre3-dev
|
2015-02-05 14:59:07 +00:00
|
|
|
|
2015-02-05 16:10:19 +00:00
|
|
|
# Install newer swig
|
2016-05-06 13:27:56 +00:00
|
|
|
- curl -sS -L http://prdownloads.sourceforge.net/swig/swig-3.0.8.tar.gz | tar xz
|
|
|
|
- cd swig-3.0.8
|
2015-02-05 14:59:07 +00:00
|
|
|
- ./configure
|
|
|
|
- make
|
|
|
|
- sudo make install
|
|
|
|
- cd ..
|
2015-02-04 15:56:07 +00:00
|
|
|
|
|
|
|
# Download current SELinux userspace tools and libraries
|
2017-01-19 00:43:44 +00:00
|
|
|
#- git clone https://github.com/SELinuxProject/selinux.git selinux-src -b libsepol-2.7
|
|
|
|
- git clone https://github.com/SELinuxProject/selinux.git selinux-src
|
2015-02-04 15:56:07 +00:00
|
|
|
|
|
|
|
# Ubuntu 12.04 coreutils is too old to provide "ln --relative" :(
|
2017-01-19 00:43:44 +00:00
|
|
|
- sed -i -e '/$(LN) -sf/s/--relative//' selinux-src/libsepol/src/Makefile
|
|
|
|
- sed -i -e '/ln -sf/s/--relative//' selinux-src/libselinux/src/Makefile
|
2015-02-04 15:56:07 +00:00
|
|
|
|
2017-01-19 00:43:44 +00:00
|
|
|
# Only portions of the toolchain are necessary
|
|
|
|
- sed -i -e 's/^SUBDIRS=.*/SUBDIRS=libsepol libselinux checkpolicy/' selinux-src/Makefile
|
2015-02-04 15:56:07 +00:00
|
|
|
|
2015-03-05 20:03:31 +00:00
|
|
|
# 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
|
2015-02-04 15:33:12 +00:00
|
|
|
|
2015-03-05 20:03:31 +00:00
|
|
|
# Ubuntu 12.04's flex generates a redundant decl in libqpol
|
2015-02-05 15:52:42 +00:00
|
|
|
- sed -i -e "/Wwrite-strings/s/,/, '-Wno-redundant-decls',/" setup.py
|
|
|
|
|
2015-02-05 16:10:19 +00:00
|
|
|
install:
|
|
|
|
- pip install tox
|
|
|
|
|
|
|
|
script:
|
2015-02-16 10:13:25 +00:00
|
|
|
- tox --version
|
2015-02-05 16:10:19 +00:00
|
|
|
- tox -e $TOX_ENV
|