From patchwork Fri Jun 2 13:06:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 13265304 X-Patchwork-Delegate: plautrba@redhat.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC668C7EE24 for ; Fri, 2 Jun 2023 13:06:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235883AbjFBNGz (ORCPT ); Fri, 2 Jun 2023 09:06:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235882AbjFBNGz (ORCPT ); Fri, 2 Jun 2023 09:06:55 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9732E1B3 for ; Fri, 2 Jun 2023 06:06:52 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-96f50e26b8bso310193266b.2 for ; Fri, 02 Jun 2023 06:06:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20221208; t=1685711211; x=1688303211; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=MG+ffzPl84exiJcw9X4L8znDUy91yk3c2UfIzQJ7opU=; b=AyqN+uvnCWN9462X/gwF24jBYaL4bmFxeKOb2FcmuwXp3+d+4rrhTNMph8lpqL+O6V FgGDZXH8I3PwVO3URY2eCoQXBD47ucOySB3/LY01ba1H0mkyVSGoosR1KlGKnJjKmQqx C278vCYkSSvIVETRwmrAVmYaBPFz0r9+uBsHyD3hVzgTnsPCeTVqm1x7+2ZdaQmLweWk VaKjFfWgvHgviHgBV4Mn8cp7QvmsJjQaCrgpBIA246YLRai6nu4BpmKQ+HJ0aP+si/57 nUeYpMeAe3SGq5P0omQ5d2ar9G0vm8moSnMkD0beo4kAeD80oeYkT0xVo8HMPEoVwkSA FcaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685711211; x=1688303211; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MG+ffzPl84exiJcw9X4L8znDUy91yk3c2UfIzQJ7opU=; b=C2oX5Y9aCUgp0dVt+BtpaADJc5tElfFZGeVLFATHXZ3fVR2JLty4l9LG77Mn7XcwNb Fa37KjZN7fv70tUsCYDyjKCz7lP2xwUw1KI0Ip6/HROrZK0PsVm268exmeRWXpAL3aYp JHzhVlRGmdZX0cPxgo4Ts20Z1zGYRIaaXgmNXJLOnpX9J1qssEbc3aGp4f5UwbvUrPUS 7SjrCOTOCVoizTC0YR4iprX2ViU4bNRQicpkYdMmtIjTN6JWnCo3c0eWL3Xy0dXqSnhX TvgatGxCQSSfjHb8N3K2mp94jBe4t/r6d7XOwCirDfhARHOa19mavAz2yomlvjvDL4F7 GKrg== X-Gm-Message-State: AC+VfDymX1Cyd2QcoVljM5/n1tUuyyn6fYCTrF3XT5YRiXPmd+jQG2iR 5NQIJkCd3vlE99+gO8qEMo87cFdVmq+HTA== X-Google-Smtp-Source: ACHHUZ44U+e5Yt13il03phfw790AfUcLapJET/OJ0vsvmQyxWXAUNRkpVFFUjri3N1nvdcLnUPDMUQ== X-Received: by 2002:a17:906:6a08:b0:96a:6e42:7123 with SMTP id qw8-20020a1709066a0800b0096a6e427123mr7549999ejc.36.1685711210819; Fri, 02 Jun 2023 06:06:50 -0700 (PDT) Received: from debian_development.DebianHome (dynamic-095-112-062-107.95.112.pool.telefonica.de. [95.112.62.107]) by smtp.gmail.com with ESMTPSA id gs20-20020a170906f19400b0096b3f72b1a0sm749546ejb.107.2023.06.02.06.06.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 06:06:50 -0700 (PDT) From: =?utf-8?q?Christian_G=C3=B6ttsche?= To: selinux@vger.kernel.org Subject: [PATCH 1/2] secilc: consider DESTDIR in tests Date: Fri, 2 Jun 2023 15:06:45 +0200 Message-Id: <20230602130646.24835-1-cgzones@googlemail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org 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 --- 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) From patchwork Fri Jun 2 13:06:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 13265305 X-Patchwork-Delegate: plautrba@redhat.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 378BCC77B7A for ; Fri, 2 Jun 2023 13:06:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235595AbjFBNG4 (ORCPT ); Fri, 2 Jun 2023 09:06:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235879AbjFBNGz (ORCPT ); Fri, 2 Jun 2023 09:06:55 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 733F41B5 for ; Fri, 2 Jun 2023 06:06:53 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-9707313e32eso308667566b.2 for ; Fri, 02 Jun 2023 06:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20221208; t=1685711212; x=1688303212; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=i2eARRnyZV76Uy8yX5RYFo2vMk0XePRi3nwsBg0QgTI=; b=RAvrHNawb9cLEhBZUYXUi5wy8kF6TlpEuS12+eEsmX8YgrcvwPL91AeYbfocQv6oT5 UZym27yEbgFA//sAifvBFEYhxrLr0CGbfwnFzHGU9paRMC8IH1uet2kMETfn1reE43qD 4+eYIYvp/g2qILjOkZt1ceuunLZO9hFtxViwd1MZln/IFrCbRLSsvd76IAQWAy+5dRiH NPOi/uJ6FS0+XlQf5RAFOVhFm48E3GuFl7g85lBLcQiN1vveH+U+1qr4kCyXpMDcEhYx PzfUF/SraUvbnf6KnM7P3ePOJGFZb1KB3woaxtnIK8nOY7MD3bRndX5dfOetISqLUGkM ErBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685711212; x=1688303212; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i2eARRnyZV76Uy8yX5RYFo2vMk0XePRi3nwsBg0QgTI=; b=QqGro7ZBhoErY1JXe7f2/b1+EhgUgLUYm4kNpeVAD6MH/gOGm92tYSuEV57TnzSQyi IAeLbirfp5hMsY93K21vKCE46UZSAscICNaR2/d3vAalbu4uaRvdLvHl2lmbwuXM26z1 n98yXNLLiAjfQ9c5F0OWYR+2Cma04BTRdi9VoA3jLsLRxserlfmT0fYFPRZflrvYY9Fl pbiN7zMs3DKkzD2NwrjOTnMjs9uBrS5VDxTvog/WQPdc4mlEvR6Hc3dbdtNlnw/PLL4f 2OYXj8ZFVddgmVbUIRA4gxp+F/u45rGokFBbgHOzPhjv82xS5wtL8JF7AoO+5OOGi9eQ 2Vbw== X-Gm-Message-State: AC+VfDzwkHeLi7L57vNhqffDkL7pEptVJEjv33Lkpsq36Sw2fwhoKAj2 O9janowhXXlwcZ5N+5A9pnP90m65W/iStA== X-Google-Smtp-Source: ACHHUZ7EIsiQbVlU/NigF6HqNut5rF4t0F6rMYfWgAEBh0v+wSiQNs/swmjSXgT+a3il8sb33Y2iSg== X-Received: by 2002:a17:907:9305:b0:974:1c90:b3d3 with SMTP id bu5-20020a170907930500b009741c90b3d3mr10872634ejc.12.1685711211724; Fri, 02 Jun 2023 06:06:51 -0700 (PDT) Received: from debian_development.DebianHome (dynamic-095-112-062-107.95.112.pool.telefonica.de. [95.112.62.107]) by smtp.gmail.com with ESMTPSA id gs20-20020a170906f19400b0096b3f72b1a0sm749546ejb.107.2023.06.02.06.06.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 06:06:51 -0700 (PDT) From: =?utf-8?q?Christian_G=C3=B6ttsche?= To: selinux@vger.kernel.org Subject: [PATCH 2/2] libsemanage/tests: consider DESTDIR Date: Fri, 2 Jun 2023 15:06:46 +0200 Message-Id: <20230602130646.24835-2-cgzones@googlemail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230602130646.24835-1-cgzones@googlemail.com> References: <20230602130646.24835-1-cgzones@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Use the script `env_use_destdir` to preload libsepol and libsemanage from the DESTDIR location to support development changes like policy version bumps. Signed-off-by: Christian Göttsche --- libsemanage/tests/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsemanage/tests/Makefile b/libsemanage/tests/Makefile index 69f49a36..00f2fcf8 100644 --- a/libsemanage/tests/Makefile +++ b/libsemanage/tests/Makefile @@ -18,11 +18,11 @@ $(EXECUTABLE): $(OBJECTS) ../src/libsemanage.a $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) %.policy: %.cil - ../../secilc/secilc $*.cil -o $*.policy -f /dev/null + ../../scripts/env_use_destdir ../../secilc/secilc $*.cil -o $*.policy -f /dev/null clean distclean: rm -rf $(OBJECTS) $(POLICIES) $(EXECUTABLE) test: all - ./$(EXECUTABLE) + ../../scripts/env_use_destdir ./$(EXECUTABLE)