selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Ondrej Mosnacek <omosnace@redhat.com>,
	SElinux list <selinux@vger.kernel.org>
Subject: Re: [PATCH testsuite] policy: do not rebuild policy package if already built
Date: Tue, 24 Sep 2019 13:24:28 -0400	[thread overview]
Message-ID: <CAHC9VhQM6D-TJpHGdEk8pTZyaSRQhL-z-bq1VEiB2KPe+LC-Lg@mail.gmail.com> (raw)
In-Reply-To: <e2bf659c-53a7-7c20-0c7b-3a102b05513a@tycho.nsa.gov>

On Tue, Sep 24, 2019 at 9:58 AM Stephen Smalley <sds@tycho.nsa.gov> wrote:
> On 9/24/19 6:51 AM, Ondrej Mosnacek wrote:
> > On Mon, Sep 23, 2019 at 4:11 PM Stephen Smalley <sds@tycho.nsa.gov> wrote:
> >> On 9/23/19 5:58 AM, Ondrej Mosnacek wrote:
> >>> Right now, test_policy.pp is rebuilt on every make invocation. Tweak the
> >>> Makefile so that it is only build when it hasn't been built, it has been
> >>> cleaned, or the source files changed.
> >>
> >> It also needs to be rebuilt if anything under
> >> /usr/share/selinux/devel/include has changed e.g. upon an update of
> >> selinux-policy-devel.
> >
> > I am now testing a version that always executes the `$(MAKE) -C
> > test_policy -f $(POLDEV)/Makefile test_policy.pp` step, relying on the
> > system Makefile to rebuild the pp as needed (there already are proper
> > dependencies on the include files). However, the package manager on
> > Fedora preserves the timestamps of the installed files (from package
> > build time), which means that make doesn't always detect that the
> > files are newer than the already built policy package.
> >
> > So it looks like we don't have any other choice than to always rebuild
> > if we really need to auto-react to changing system files.
>
> I'd rather err on the side of rebuilding too often than using stale policy.

That would be my preference as well.  In fact, I actually recommend
doing a 'make clean' before building and running the tests simply to
make sure everything in the dependency list and toolchain is still
working properly with the bits in the test suite.

-- 
paul moore
www.paul-moore.com

      reply	other threads:[~2019-09-24 17:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23  9:58 [PATCH testsuite] policy: do not rebuild policy package if already built Ondrej Mosnacek
2019-09-23 10:01 ` Ondrej Mosnacek
2019-09-23 14:11 ` Stephen Smalley
2019-09-24 10:51   ` Ondrej Mosnacek
2019-09-24 13:58     ` Stephen Smalley
2019-09-24 17:24       ` Paul Moore [this message]

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=CAHC9VhQM6D-TJpHGdEk8pTZyaSRQhL-z-bq1VEiB2KPe+LC-Lg@mail.gmail.com \
    --to=paul@paul-moore.com \
    --cc=omosnace@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --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).