Skip to contentSkip to conversation

travis: fix `make conf` invocation

PATCH In review Ondrej Mosnacek 2 participants 5 messages Jun 26, 2020 – Jun 29, 2020 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 travis: fix `make conf` invocation

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.

---
 travis-ci/setup-policy-fedora.sh    | 2 --
 travis-ci/setup-policy-refpolicy.sh | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
travis-ci/setup-policy-fedora.sh +0 -2
index bce8698..a07c990 100644
@@ -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
 
travis-ci/setup-policy-refpolicy.sh +1 -1
index 3010467..d63e7e4 100644
@@ -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
Signature · 1 line
2.26.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Ondrej Mosnacek

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.

Feel free to apply whenever; I will not be around next week to do so.

#2 lore raw
Quoted 10 lines · Stephen Smalley
Quoted 9 lines · Ondrej Mosnacek

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.

Quoted 6 lines
Quoted 2 lines

Feel free to apply whenever; I will not be around next week to do so.

(Third time's the charm, hopefully... vger.kernel.org seems to be working again.)

Thanks, it is applied now and the Travis build passed:
https://travis-ci.org/github/SELinuxProject/selinux-testsuite/builds/703080617

Signature · 3 lines
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.
#3 lore raw
In reply to Stephen Smalley
Quoted 10 lines · Stephen Smalley
Quoted 9 lines · Ondrej Mosnacek

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.

Quoted 6 lines
Quoted 2 lines

Feel free to apply whenever; I will not be around next week to do so.

(Take 2, since the vger server seems to have been down when I sent the reply...)

Thanks, it is applied now and the Travis build passed:
https://travis-ci.org/github/SELinuxProject/selinux-testsuite/builds/703080617

Signature · 3 lines
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.
#4 lore raw
In reply to Stephen Smalley
Quoted 10 lines · Stephen Smalley
Quoted 9 lines · Ondrej Mosnacek

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.

Quoted 6 lines
Quoted 2 lines

Feel free to apply whenever; I will not be around next week to do so.

Thanks, it is applied now and the Travis build passed:
https://travis-ci.org/github/SELinuxProject/selinux-testsuite/builds/703080617

Signature · 3 lines
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.