SELinux Security Module development
 help / color / mirror / Atom feed
From: Petr Lautrbach <plautrba@redhat.com>
To: "Christian Göttsche" <cgzones@googlemail.com>, selinux@vger.kernel.org
Subject: Re: [PATCH 1/2] secilc: consider DESTDIR in tests
Date: Fri, 02 Jun 2023 16:28:57 +0200	[thread overview]
Message-ID: <87bkhyj5ue.fsf@redhat.com> (raw)
In-Reply-To: <20230602130646.24835-1-cgzones@googlemail.com>

Christian Göttsche <cgzones@googlemail.com> writes:

> Use the script `env_use_destdir` to preload libsepol from the DESTDIR
> location to support development changes like policy version bumps.
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
>

It would not work when run from secilc-...tar.gz sources. In such case I
would expect that the environment is already prepared from outside.


> ---
>  secilc/Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/secilc/Makefile b/secilc/Makefile
> index 94be0481..5a85df67 100644
> --- a/secilc/Makefile
> +++ b/secilc/Makefile
> @@ -34,9 +34,9 @@ $(SECILC): $(SECILC_OBJS)
>  	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
>  
>  test: $(SECILC)
> -	./$(SECILC) test/policy.cil
> -	./$(SECILC) -c $(POL_VERS) -O -M 1 -f /dev/null -o opt-actual.bin test/opt-input.cil
> -	$(CHECKPOLICY) -b -C -M -o opt-actual.cil opt-actual.bin >/dev/null
> +	../scripts/env_use_destdir ./$(SECILC) test/policy.cil
> +	../scripts/env_use_destdir ./$(SECILC) -c $(POL_VERS) -O -M 1 -f /dev/null -o opt-actual.bin test/opt-input.cil
> +	../scripts/env_use_destdir $(CHECKPOLICY) -b -C -M -o opt-actual.cil opt-actual.bin >/dev/null
>  	$(DIFF) test/opt-expected.cil opt-actual.cil
>  
>  $(SECIL2CONF): $(SECIL2CONF_OBJS)
> -- 
> 2.40.1


      parent reply	other threads:[~2023-06-02 14:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02 13:06 [PATCH 1/2] secilc: consider DESTDIR in tests Christian Göttsche
2023-06-02 13:06 ` [PATCH 2/2] libsemanage/tests: consider DESTDIR Christian Göttsche
2023-06-02 14:28 ` Petr Lautrbach [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=87bkhyj5ue.fsf@redhat.com \
    --to=plautrba@redhat.com \
    --cc=cgzones@googlemail.com \
    --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