From: Nicolas Iooss <nicolas.iooss@m4x.org>
To: selinux@vger.kernel.org
Subject: [PATCH 1/5] Travis-CI: download refpolicy and install headers
Date: Sat, 5 Jan 2019 20:37:55 +0100 [thread overview]
Message-ID: <20190105193759.3333-2-nicolas.iooss@m4x.org> (raw)
In-Reply-To: <20190105193759.3333-1-nicolas.iooss@m4x.org>
This is needed in order to run sepolgen-ifgen in audit2allow testsuite.
Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
.travis.yml | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 00d0c54a68d7..08a29b2f5adc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -64,14 +64,16 @@ addons:
- xmlto
install:
- # Download refpolicy Makefile for sepolgen tests
- - sudo mkdir -p /usr/share/selinux/default
- - sudo curl --retry 10 -o /usr/share/selinux/default/Makefile 'https://raw.githubusercontent.com/SELinuxProject/refpolicy/RELEASE_2_20180114/support/Makefile.devel'
- - sudo sed "s,^PREFIX :=.*,PREFIX := $TRAVIS_BUILD_DIR/installdir/usr," -i /usr/share/selinux/default/Makefile
- - sudo mkdir -p /usr/share/selinux/refpolicy/include
- - sudo curl --retry 10 -o /usr/share/selinux/refpolicy/include/build.conf 'https://raw.githubusercontent.com/SELinuxProject/refpolicy/RELEASE_2_20180114/build.conf'
+ # Download and install refpolicy headers for sepolgen tests
+ - curl --location --retry 10 -o "$TRAVIS_BUILD_DIR/refpolicy.tar.bz2" https://github.com/SELinuxProject/refpolicy/releases/download/RELEASE_2_20180701/refpolicy-2.20180701.tar.bz2
+ - tar -C "$TRAVIS_BUILD_DIR" -xvjf "$TRAVIS_BUILD_DIR/refpolicy.tar.bz2"
+ # Make refpolicy Makefile use the new toolchain when building modules
+ - sed -e "s,^PREFIX :=.*,PREFIX := \$(DESTDIR)/usr," -i "$TRAVIS_BUILD_DIR/refpolicy/support/Makefile.devel"
+ - sudo make -C "$TRAVIS_BUILD_DIR/refpolicy" install-headers
+ - sudo rm -rf "$TRAVIS_BUILD_DIR/refpolicy.tar.bz2" "$TRAVIS_BUILD_DIR/refpolicy"
- sudo mkdir -p /etc/selinux
- echo 'SELINUXTYPE=refpolicy' | sudo tee /etc/selinux/config
+ - echo 'SELINUX_DEVEL_PATH = /usr/share/selinux/refpolicy' | sudo tee /etc/selinux/sepolgen.conf
# Make sepolgen tests work without really installing anything in the real root (doing this would conflict with Ubuntu packages)
- sed -e "s,\"\(/usr/bin/[cs]\),\"$TRAVIS_BUILD_DIR/installdir\1," -i python/sepolgen/src/sepolgen/module.py
--
2.20.1
next prev parent reply other threads:[~2019-01-05 19:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-05 19:37 [PATCH 0/5] Run tests in python/ with "make test" Nicolas Iooss
2019-01-05 19:37 ` Nicolas Iooss [this message]
2019-01-05 19:37 ` [PATCH 2/5] python/audit2allow: make the tests useful again Nicolas Iooss
2019-01-05 19:37 ` [PATCH 3/5] python/audit2allow: use local sepolgen-ifgen-attr-helper for tests Nicolas Iooss
2019-01-05 19:37 ` [PATCH 4/5] python/sepolgen: refpolicy installs its Makefile in include/Makefile Nicolas Iooss
2019-01-05 19:37 ` [PATCH 5/5] python: run all the tests with "make test" Nicolas Iooss
2019-01-08 11:04 ` Petr Lautrbach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190105193759.3333-2-nicolas.iooss@m4x.org \
--to=nicolas.iooss@m4x.org \
--cc=selinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).