diff mbox series

[testsuite] travis: fix `make conf` invocation

Message ID 20200626114359.80134-1-omosnace@redhat.com (mailing list archive)
State Accepted
Delegated to: Ondrej Mosnáček
Headers show
Series [testsuite] travis: fix `make conf` invocation | expand

Commit Message

Ondrej Mosnacek June 26, 2020, 11:43 a.m. UTC
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(-)

Comments

Stephen Smalley June 26, 2020, 12:49 p.m. UTC | #1
On Fri, Jun 26, 2020 at 7:44 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
>
> 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>

Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>

Feel free to apply whenever; I will not be around next week to do so.
Ondrej Mosnacek June 29, 2020, 8:31 a.m. UTC | #2
On Fri, Jun 26, 2020 at 2:49 PM Stephen Smalley
<stephen.smalley.work@gmail.com> wrote:
> On Fri, Jun 26, 2020 at 7:44 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> >
> > 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>
>
> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
>
> 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
Ondrej Mosnacek June 29, 2020, 12:37 p.m. UTC | #3
On Fri, Jun 26, 2020 at 2:49 PM Stephen Smalley
<stephen.smalley.work@gmail.com> wrote:
> On Fri, Jun 26, 2020 at 7:44 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> >
> > 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>
>
> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
>
> 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
Ondrej Mosnacek June 29, 2020, 7:13 p.m. UTC | #4
On Fri, Jun 26, 2020 at 2:49 PM Stephen Smalley
<stephen.smalley.work@gmail.com> wrote:
> On Fri, Jun 26, 2020 at 7:44 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> >
> > 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>
>
> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
>
> 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
diff mbox series

Patch

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