Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: /
Date: Mon, 23 Jan 2017 15:44:26
Message-Id: 1485176923.2d45843fd36d1f3b6e0536f9de017a3f59ef2074.perfinion@gentoo
1 commit: 2d45843fd36d1f3b6e0536f9de017a3f59ef2074
2 Author: cgzones <cgzones <AT> googlemail <DOT> com>
3 AuthorDate: Fri Jan 6 18:45:09 2017 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 23 13:08:43 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=2d45843f
7
8 use travis cache
9
10 cache SELinux userspace build
11
12 .travis.yml | 48 +++++++++++++++++++++++++++++-------------------
13 1 file changed, 29 insertions(+), 19 deletions(-)
14
15 diff --git a/.travis.yml b/.travis.yml
16 index 58533e6..4848b29 100644
17 --- a/.travis.yml
18 +++ b/.travis.yml
19 @@ -41,6 +41,10 @@ sudo: false
20 #sudo: required
21 #dist: trusty
22
23 +cache:
24 + directories:
25 + - ${TRAVIS_BUILD_DIR}/selinux
26 +
27 addons:
28 apt:
29 packages:
30 @@ -62,33 +66,39 @@ before_install:
31 - python -V
32
33 install:
34 - # Download current SELinux userspace tools and libraries
35 - - curl -sS -L https://github.com/SELinuxProject/selinux/archive/20161014.tar.gz | tar xz
36 - - mv selinux-20161014 selinux-src
37 + - SELINUX_USERSPACE_VERSION=20161014
38 +
39 + - |
40 + if [[ "${SELINUX_USERSPACE_VERSION}" != "$(cat ${TRAVIS_BUILD_DIR}/selinux/travis.version)" ]]; then
41 + # Download current SELinux userspace tools and libraries
42 + curl -sS -L "https://github.com/SELinuxProject/selinux/archive/${SELINUX_USERSPACE_VERSION}.tar.gz" | tar xz
43 + mv "selinux-${SELINUX_USERSPACE_VERSION}" selinux-src
44
45 - # Ubuntu 12.04 coreutils is too old to provide "ln --relative" :(
46 - - sed 's/ln -sf --relative /ln -sf /' -i selinux-src/libsepol/src/Makefile
47 - - sed 's/ln -sf --relative /ln -sf /' -i selinux-src/libselinux/src/Makefile
48 + # Ubuntu 12.04 coreutils is too old to provide "ln --relative" :(
49 + sed 's/ln -sf --relative /ln -sf /' -i selinux-src/libsepol/src/Makefile
50 + sed 's/ln -sf --relative /ln -sf /' -i selinux-src/libselinux/src/Makefile
51
52 - # Drop secilc to break xmlto dependence (secilc isn't used here anyway)
53 - - sed -i -e 's/secilc//' selinux-src/Makefile
54 + # Drop secilc to break xmlto dependence (secilc isn't used here anyway)
55 + sed -i -e 's/secilc//' selinux-src/Makefile
56
57 - # Drop sepolicy to break setools dependence (sepolicy isn't used anyway)
58 - - sed -i -e 's/sepolicy//' selinux-src/policycoreutils/Makefile
59 + # Drop sepolicy to break setools dependence (sepolicy isn't used anyway)
60 + sed -i -e 's/sepolicy//' selinux-src/policycoreutils/Makefile
61
62 - # Drop restorecond to break glib dependence
63 - - sed -i -e 's/ restorecond//' selinux-src/policycoreutils/Makefile
64 + # Drop restorecond to break glib dependence
65 + sed -i -e 's/ restorecond//' selinux-src/policycoreutils/Makefile
66
67 - # Drop sandbox to break libcap-ng dependence
68 - - sed -i -e 's/ sandbox//' selinux-src/policycoreutils/Makefile
69 + # Drop sandbox to break libcap-ng dependence
70 + sed -i -e 's/ sandbox//' selinux-src/policycoreutils/Makefile
71
72 - # Compile and install SELinux toolchain into ~/selinux
73 - # On Ubuntu 12.04, default CFLAGS make the build fail in libsepol/cil with:
74 - # error: declaration of 'index' shadows a global declarationo
75 - - make "DESTDIR=$TRAVIS_BUILD_DIR/selinux" CFLAGS="-O2 -Wall" -C selinux-src install
76 + # Compile and install SELinux toolchain into ~/selinux
77 + # On Ubuntu 12.04, default CFLAGS make the build fail in libsepol/cil with:
78 + # error: declaration of 'index' shadows a global declarationo
79 + make "DESTDIR=${TRAVIS_BUILD_DIR}/selinux" CFLAGS="-O2 -Wall" -C selinux-src install
80 + echo "${SELINUX_USERSPACE_VERSION}" > "${TRAVIS_BUILD_DIR}/selinux/travis.version"
81 + fi
82
83 # Use TEST_TOOLCHAIN variable to tell refpolicy Makefile about the installed location
84 - - export TEST_TOOLCHAIN="$TRAVIS_BUILD_DIR/selinux"
85 + - export TEST_TOOLCHAIN="${TRAVIS_BUILD_DIR}/selinux"
86
87 # Drop build.conf settings to listen to env vars
88 - sed -r -i -e '/(DIRECT_INITRC|MONOLITHIC|TYPE|DISTRO|SYSTEMD)/d' build.conf