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

* Re: [PATCH testsuite] travis: fix `make conf` invocation
  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
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stephen Smalley @ 2020-06-26 12:49 UTC (permalink / raw)
  To: Ondrej Mosnacek; +Cc: SElinux list

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.

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

* Re: [PATCH testsuite] travis: fix `make conf` invocation
  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
  2 siblings, 0 replies; 5+ messages in thread
From: Ondrej Mosnacek @ 2020-06-29  8:31 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: SElinux list

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
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.


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

* Re: [PATCH testsuite] travis: fix `make conf` invocation
  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
  2 siblings, 0 replies; 5+ messages in thread
From: Ondrej Mosnacek @ 2020-06-29 12:37 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: SElinux list

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
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.


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

* Re: [PATCH testsuite] travis: fix `make conf` invocation
  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
  2 siblings, 0 replies; 5+ messages in thread
From: Ondrej Mosnacek @ 2020-06-29 19:13 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: SElinux list

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

-- 
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.


^ 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