SELinux Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH testsuite] travis: fix `make conf` invocation
@ 2020-06-26 11:43 Ondrej Mosnacek
  2020-06-26 12:49 ` Stephen Smalley
  0 siblings, 1 reply; 5+ messages in thread
From: Ondrej Mosnacek @ 2020-06-26 11:43 UTC (permalink / raw)
  To: selinux; +Cc: Stephen Smalley

In refpolicy when a module is added/removed, the policy build config
may need to be rebuilt. Currently we run `make conf` just once and then
reuse it via cache. Instead, we need to run it unconditionally, since
the other targets won't trigger that implictly.

In Fedora policy the default module config is included and maintained in
git, so we don't need to (and must not) call make conf at all.

Reported-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
---
 travis-ci/setup-policy-fedora.sh    | 2 --
 travis-ci/setup-policy-refpolicy.sh | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/travis-ci/setup-policy-fedora.sh b/travis-ci/setup-policy-fedora.sh
index bce8698..a07c990 100644
--- a/travis-ci/setup-policy-fedora.sh
+++ b/travis-ci/setup-policy-fedora.sh
@@ -26,8 +26,6 @@ cd selinux-policy
 
 grep -q refpolicy build.conf && sed -i 's/refpolicy/targeted/' build.conf
 
-[ -f policy/modules.conf ] || make conf
-
 make -j`nproc --all` BINDIR=/usr/local/bin SBINDIR=/usr/local/sbin
 sudo make install install-headers
 
diff --git a/travis-ci/setup-policy-refpolicy.sh b/travis-ci/setup-policy-refpolicy.sh
index 3010467..d63e7e4 100644
--- a/travis-ci/setup-policy-refpolicy.sh
+++ b/travis-ci/setup-policy-refpolicy.sh
@@ -12,7 +12,7 @@ cd refpolicy
 
 git checkout origin/master
 
-[ -f policy/modules.conf ] || make conf
+make conf
 
 make -j`nproc --all` BINDIR=/usr/local/bin SBINDIR=/usr/local/sbin
 sudo make install install-headers
-- 
2.26.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26 11:43 [PATCH testsuite] travis: fix `make conf` invocation Ondrej Mosnacek
2020-06-26 12:49 ` Stephen Smalley
2020-06-29  8:31   ` Ondrej Mosnacek
2020-06-29 12:37   ` Ondrej Mosnacek
2020-06-29 19:13   ` Ondrej Mosnacek

SELinux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux/0 selinux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux selinux/ https://lore.kernel.org/selinux \
		selinux@vger.kernel.org
	public-inbox-index selinux

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git