GNU bug report logs - #59336
[PATCH 0/6] gnu: Add apparmor.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Hilton Chain <hako@HIDDEN>; Keywords: patch; Done: Ludovic Courtès <ludo@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 59336-done <at> debbugs.gnu.org:


Received: (at 59336-done) by debbugs.gnu.org; 4 Dec 2022 21:16:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 04 16:16:39 2022
Received: from localhost ([127.0.0.1]:59783 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p1wLn-0000UQ-4h
	for submit <at> debbugs.gnu.org; Sun, 04 Dec 2022 16:16:39 -0500
Received: from eggs.gnu.org ([209.51.188.92]:47854)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1p1wLk-0000UK-Qz
 for 59336-done <at> debbugs.gnu.org; Sun, 04 Dec 2022 16:16:38 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1p1wLf-0003XJ-C1; Sun, 04 Dec 2022 16:16:31 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=PTQtgMO5Rin9eTsYNe69kan7mvNM88BeUFY3Vs/Kw9w=; b=es/z0yq0wmbm8ekbKH7I
 BjURlbSMRZe8DJcOYp6UPCevBnR8VUQRqLYf5N7l+PwnMK4iajzpZ5xysX7tStMzXNBgIvUaH0Jfk
 +bH1d+mfYKR1D8cqHmJFYMCrGflUiv0WMDql9SltmpuDqOOO8jzSAsIRc8QOpq0S4qbeiUdDmNCIH
 6z5J7id6d3ASQqk9xErJP7XyaWu6Cd5QANmWQ3e80XrfFQ72IW+22kZGcY42Z3NeYDAJ7PHpB2LhN
 U3a03SXxDWBPcfpfl6xHn7mYB2FMBTjq34NoSH3GxODRvrn1ZechPoW5HNd1ygeV+kddndY/WAiRw
 bZLM+lFdtKv0tw==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1p1wLe-0000vI-UH; Sun, 04 Dec 2022 16:16:31 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Hilton Chain <hako@HIDDEN>
Subject: Re: bug#59336: [PATCH 0/6] gnu: Add apparmor.
References: <y76k03tpmvo.wl-hako@HIDDEN>
 <y767czsq42m.wl-hako@HIDDEN>
 <y765yfcq40r.wl-hako@HIDDEN>
 <y764juwq3zd.wl-hako@HIDDEN>
 <y7635agq3yd.wl-hako@HIDDEN>
Date: Sun, 04 Dec 2022 22:16:28 +0100
In-Reply-To: <y7635agq3yd.wl-hako@HIDDEN> (Hilton Chain's message of
 "Fri, 18 Nov 2022 12:30:50 +0800")
Message-ID: <87y1rmlvir.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59336-done
Cc: 59336-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi,

Hilton Chain <hako@HIDDEN> skribis:

> * gnu/packages/apparmor.scm (pam-apparmor): New variable.

I had to make the following change to get =E2=80=98pam-apparmor=E2=80=99 to=
 build.

Applied all of v2 with these changes.  I followed up with a patch to
restrict libapparmor to *-linux systems.

Thanks!

Ludo=E2=80=99.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline

diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
index 3136091747..ddbd9eb7a9 100644
@@ -188,9 +191,12 @@ (define-public pam-apparmor
         (substitute-keyword-arguments (package-arguments base)
           ((#:phases phases)
            #~(modify-phases #$phases
+               (delete 'chdir-parser)
+               (delete 'chdir-utils)
+               (delete 'chdir-profiles)
                (replace 'change-directory
                  (lambda _
                    (chdir "changehat/pam_apparmor"))))))))
-      (native-inputs (list pkg-config which))
+      (native-inputs (list pkg-config perl which))
       (inputs (list libapparmor linux-pam))
       (license license:bsd-3))))

--=-=-=--




Notification sent to Hilton Chain <hako@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Ludovic Courtès <ludo@HIDDEN>:
You have taken responsibility. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Nov 2022 04:31:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 23:31:25 2022
Received: from localhost ([127.0.0.1]:34876 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovt2D-0007QO-38
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 23:31:25 -0500
Received: from lists.gnu.org ([209.51.188.17]:45550)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1ovt2C-0007QH-Gd
 for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 23:31:24 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1ovt2B-00010p-Dh
 for guix-patches@HIDDEN; Thu, 17 Nov 2022 23:31:24 -0500
Received: from mail.boiledscript.com ([144.168.59.46])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1ovt29-0004Wz-Vg
 for guix-patches@HIDDEN; Thu, 17 Nov 2022 23:31:23 -0500
Date: Fri, 18 Nov 2022 12:30:50 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1668745880;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=kvmh7ooj7q6cd3K5jvawjJTPBzaDDpdOqqiPbJf2hYc=;
 b=K81ZCIWg9blFQcETwXfTNcNa7sY5hOpw3clDNOFUqDGPPe7934CNCzrOeTF7bIxZ0zfZ4D
 M9dEnr4SgE2vtUit0UCFOtd1C/xL0S3Uq+wzUvG/NQqbpGIW1QF6LK3f93QGRQxuJtXmLI
 C+JO2M/uwDjEbR3dTII+vqL+6gPSoSk0u+8L8ePVntw1TyMahmTZM4o1btgC76upd6uLr4
 IhQtzWAvTNL6tsLKs+BLGdEIxKqc+BlH+EkphEMaaKbTBArWSwELJyhYQxFXdk8ANEy2V6
 /SiHpbIJ0Y4yoc35fuyUqtxDIaGfo4ypm5Z85mySrQDaj925PBr/1RYv1NelqQ==
Message-ID: <y7635agq3yd.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH v2 3/3] gnu: Add pam-apparmor.
In-Reply-To: <y764juwq3zd.wl-hako@HIDDEN>
References: <y76k03tpmvo.wl-hako@HIDDEN>
 <y767czsq42m.wl-hako@HIDDEN>
 <y765yfcq40r.wl-hako@HIDDEN>
 <y764juwq3zd.wl-hako@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
X-Spamd-Bar: /
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@HIDDEN;
 helo=mail.boiledscript.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

* gnu/packages/apparmor.scm (pam-apparmor): New variable.
---
 gnu/packages/apparmor.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
index 82c00ebb0e..3136091747 100644
--- a/gnu/packages/apparmor.scm
+++ b/gnu/packages/apparmor.scm
@@ -176,3 +176,21 @@ (define-public apparmor
       (native-inputs
        (list bison flex gettext-minimal perl python which))
       (license license:gpl2))))
+
+(define-public pam-apparmor
+  (let ((base apparmor))
+    (package
+      (inherit base)
+      (name "pam-apparmor")
+      (arguments
+       (append
+        (list #:tests? #f)              ;no tests
+        (substitute-keyword-arguments (package-arguments base)
+          ((#:phases phases)
+           #~(modify-phases #$phases
+               (replace 'change-directory
+                 (lambda _
+                   (chdir "changehat/pam_apparmor"))))))))
+      (native-inputs (list pkg-config which))
+      (inputs (list libapparmor linux-pam))
+      (license license:bsd-3))))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#59336; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Nov 2022 04:30:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 23:30:51 2022
Received: from localhost ([127.0.0.1]:34872 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovt1e-0007PC-Ma
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 23:30:50 -0500
Received: from lists.gnu.org ([209.51.188.17]:51390)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1ovt1d-0007P5-8P
 for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 23:30:49 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1ovt1c-0000se-D5
 for guix-patches@HIDDEN; Thu, 17 Nov 2022 23:30:49 -0500
Received: from mail.boiledscript.com ([144.168.59.46])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1ovt1a-0004On-Ee
 for guix-patches@HIDDEN; Thu, 17 Nov 2022 23:30:47 -0500
Date: Fri, 18 Nov 2022 12:30:14 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1668745844;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=71lS6wljEtVrsGAwrEx5Y8zMtTKBYvbwiIm7lw3j24o=;
 b=NCeAh+GPcSxnhtyJwKWsG3I+nyhtnSP+Swiu1xNnB8slq4rk9hsNYIseEO75qCaxYZ/86C
 UUZCVxZTIhyqw7Wfu3CYEY1qX/5666mMeO2VkewdCZgMb+nUmBRxs3bkcmfZRxTjTNqNth
 TuWseeAA7zJY0jRAklxDUzIx+gDkH4Ij3s4X6gwem8JR2Fo5T1MH+1cRcST0wX49b0vt+f
 iV7bXptn2LwszbslrQw8C6jVCmYalgqaqvyRgvWKx+LiWFjWvZf72n7jY8EWYU4cBNzdB3
 /mBPPVb+t3cZxc7z59eTLdMTk81+t7DbDGHRR/G9XMjp1XBSeu3urlYZ65YDzg==
Message-ID: <y764juwq3zd.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH v2 2/3] gnu: Add apparmor.
In-Reply-To: <y765yfcq40r.wl-hako@HIDDEN>
References: <y76k03tpmvo.wl-hako@HIDDEN>
 <y767czsq42m.wl-hako@HIDDEN>
 <y765yfcq40r.wl-hako@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
X-Spamd-Bar: /
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@HIDDEN;
 helo=mail.boiledscript.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

* gnu/packages/apparmor.scm (apparmor): New variable.
---
 gnu/packages/apparmor.scm | 66 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
index ac97580640..82c00ebb0e 100644
--- a/gnu/packages/apparmor.scm
+++ b/gnu/packages/apparmor.scm
@@ -110,3 +110,69 @@ (define-public libapparmor
 the mainline Linux kernel since version 2.6.36 and its development has been
 supported by Canonical since 2009.")
     (license license:lgpl2.1)))
+
+(define-public apparmor
+  (let ((base libapparmor))
+    (package
+      (inherit base)
+      (name "apparmor")
+      (arguments
+       (append
+        (list #:make-flags
+              #~(list (string-append "CC=" #$(cc-for-target))
+                      (string-append "DESTDIR=" #$output)
+                      "USE_SYSTEM=1"
+                      ;; No need to run the linter
+                      "PYFLAKES=true"))
+        (substitute-keyword-arguments (package-arguments base)
+          ((#:phases phases)
+           #~(modify-phases #$phases
+               (delete 'configure)
+               ;; apparmor-binutils
+               (replace 'change-directory
+                 (lambda _
+                   (chdir "binutils")))
+
+               ;; apparmor-parser
+               (add-after 'install 'chdir-parser
+                 (lambda _
+                   (chdir "../parser")))
+               (add-after 'chdir-parser 'patch-source-shebangs-parser
+                 (assoc-ref %standard-phases 'patch-source-shebangs))
+               (add-after 'patch-source-shebangs-parser 'build-parser
+                 (assoc-ref %standard-phases 'build))
+               (add-after 'build-parser 'check-parser
+                 (assoc-ref %standard-phases 'check))
+               (add-after 'check-parser 'install-parser
+                 (assoc-ref %standard-phases 'install))
+
+               ;; apparmor-utils
+               ;; FIXME: Tests required Python library from this package
+               ;; (itself).
+               (add-after 'install-parser 'chdir-utils
+                 (lambda _
+                   (chdir "../utils")
+                   ;; Fix paths to installed policygroups and templates for
+                   ;; easyprof.
+                   (substitute* "easyprof/easyprof.conf"
+                     (("/usr") #$output))))
+               (add-after 'chdir-utils 'build-utils
+                 (assoc-ref %standard-phases 'build))
+               (add-after 'build-utils 'install-utils
+                 (assoc-ref %standard-phases 'install))
+
+               ;; apparmor-profiles
+               ;; FIXME: Tests need an AppArmor-enabled system.
+               (add-after 'install-utils 'chdir-profiles
+                 (lambda _
+                   (chdir "../profiles")))
+               (add-after 'chdir-profiles 'build-profiles
+                 (assoc-ref %standard-phases 'build))
+               (add-after 'check-build 'install-profiles
+                 (assoc-ref %standard-phases 'install)))))))
+      (propagated-inputs
+       (list libapparmor))
+      ;; Python module `readline' needed
+      (native-inputs
+       (list bison flex gettext-minimal perl python which))
+      (license license:gpl2))))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#59336; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Nov 2022 04:30:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 23:30:00 2022
Received: from localhost ([127.0.0.1]:34864 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovt0p-0007Ln-Qx
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 23:30:00 -0500
Received: from lists.gnu.org ([209.51.188.17]:42464)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1ovt0o-0007Lf-7T
 for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 23:29:59 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1ovt0o-0000bH-2j
 for guix-patches@HIDDEN; Thu, 17 Nov 2022 23:29:58 -0500
Received: from mail.boiledscript.com ([144.168.59.46])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1ovt0l-00046E-T2
 for guix-patches@HIDDEN; Thu, 17 Nov 2022 23:29:57 -0500
Date: Fri, 18 Nov 2022 12:29:24 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1668745794;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=knP6EeGe8589/kWnFKcFq+RLUoRFSRrhIl1zgQoj/XU=;
 b=F4e06UC7OgpeQeeeDXt370snGH5avo/nQMs7dCCc6JDqJjyVuNCRka3/8BvIIOZrPf13WN
 9yu1oqXIk24aFOvqTU07m4Us+AlS52MTPrXhA9otcmFMVZ7oe43tAPDvcekIpqepkCFMQd
 nIiRadoraVzffNC+bUS0vSBMLB8BufHmt+14GbifC+AxMjtaLXG1ZXbq87TSmly4esRHHr
 t31rXzJnwXwQtrcPhmQ03UDlMCWcmTLVGjPTLLFd7G6K6GFcL3KI3lU14stfpnGDJ8HOmJ
 mJ2gafq3+HFPpKcjFVCJ1LPzQ4uNu7GA7kQU90LZk4STZdHTR09Zxb7ZYKz5Eg==
Message-ID: <y765yfcq40r.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH v2 1/3] gnu: Add libapparmor.
In-Reply-To: <y767czsq42m.wl-hako@HIDDEN>
References: <y76k03tpmvo.wl-hako@HIDDEN>
 <y767czsq42m.wl-hako@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spamd-Bar: /
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@HIDDEN;
 helo=mail.boiledscript.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

* gnu/packages/apparmor.scm: New file.
(libapparmor): New variable.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add the file.
---
 gnu/local.mk              |   1 +
 gnu/packages/apparmor.scm | 112 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 113 insertions(+)
 create mode 100644 gnu/packages/apparmor.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index b154caaaaa..8907ca625b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -115,6 +115,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/anthy.scm			\
   %D%/packages/antivirus.scm			\
   %D%/packages/apl.scm				\
+  %D%/packages/apparmor.scm			\
   %D%/packages/apr.scm				\
   %D%/packages/arcan.scm			\
   %D%/packages/aspell.scm			\
diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
new file mode 100644
index 0000000000..ac97580640
--- /dev/null
+++ b/gnu/packages/apparmor.scm
@@ -0,0 +1,112 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Hilton Chain <hako@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages apparmor)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages dejagnu)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages gawk)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages swig)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix gexp)
+  #:use-module (guix git-download)
+  #:use-module (guix packages)
+  #:use-module (guix utils))
+
+(define-public libapparmor
+  (package
+    (name "libapparmor")
+    (version "3.1.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/apparmor/apparmor")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1h77a7ww0rxfv5nsi1iy4fffklxdr2vq6r7kdsqm15yysglhbjyi"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:configure-flags
+           #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
+                   "--with-perl" "--with-python" "--with-ruby")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-paths
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (for-each patch-shebang
+                             '("common/list_af_names.sh"
+                               "common/list_capabilities.sh"))
+                   (for-each (lambda (file)
+                               (substitute* file
+                                 (("/usr") "")
+                                 (("/bin/\\<(pod2man|pod2html|podchecker|prove)\\>" path)
+                                  (search-input-file inputs path))
+                                 (("/include/linux/capability.h" path)
+                                  (search-input-file inputs path))))
+                             '("common/Make-po.rules"
+                               "common/Make.rules"
+                               "binutils/Makefile"
+                               "parser/Makefile"
+                               "parser/tst/Makefile"
+                               "profiles/Makefile"
+                               "utils/Makefile"
+                               "utils/python-tools-setup.py"
+                               "utils/vim/Makefile"))))
+               (add-after 'fix-paths 'change-directory
+                 (lambda _
+                   (chdir "libraries/libapparmor"))))))
+    (native-inputs
+     (list autoconf
+           automake
+           bison
+           dejagnu
+           flex
+           libtool
+           perl
+           python-minimal
+           ruby
+           swig
+           which))
+    (home-page "https://apparmor.net")
+    (synopsis "Linux kernel security module")
+    (description
+     "AppArmor is an effective and easy-to-use Linux application security
+system.
+
+AppArmor proactively protects the operating system and applications from
+external or internal threats, even zero-day attacks, by enforcing good
+behavior and preventing both known and unknown application flaws from being
+exploited.
+
+AppArmor supplements the traditional Unix discretionary access control (DAC)
+model by providing mandatory access control (MAC).  It has been included in
+the mainline Linux kernel since version 2.6.36 and its development has been
+supported by Canonical since 2009.")
+    (license license:lgpl2.1)))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#59336; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Nov 2022 04:29:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 23:29:09 2022
Received: from localhost ([127.0.0.1]:34861 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovt01-0007Kj-3A
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 23:29:09 -0500
Received: from lists.gnu.org ([209.51.188.17]:37278)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1ovszw-0007KU-VG
 for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 23:29:07 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1ovszw-0000YC-PB
 for guix-patches@HIDDEN; Thu, 17 Nov 2022 23:29:04 -0500
Received: from mail.boiledscript.com ([144.168.59.46])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1ovszu-00042p-LM
 for guix-patches@HIDDEN; Thu, 17 Nov 2022 23:29:04 -0500
Date: Fri, 18 Nov 2022 12:28:17 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1668745737;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=ZeL7eyjOHPFmZqoAvaH715IMMD2j2PmWR4nRzCN4Uy4=;
 b=G8DzoxiAKEnsp5iRlxIiA0XS1n94Vz44jkqBNoh8En74dZvXDoOBtX+eQtmHpLN4uazulf
 jtgv7x2hRRYfFmWhmTdlyAVtPzY+lsEQZ7wjwWFYCwzf0lqMkz7P0ZKj/M5W/nFWD5igyr
 natX/yjAmx8/co926PG5DHX40iwrlwnFa1t2XDd0jtvPrn8OLLPLewhpvzgLHbLMeCYYOm
 JaENwleNzRqiivf0GUTVMdOBQDnZF3jnim895zQ8hVZgybHrzuLuA280CLaNwpk5jtN2RU
 bO1iouwBuVErnFhUssMjTv/TvnPtTfD6/mQ659BVDa5nQ5XTazxdHs5ErEj+Lw==
Message-ID: <y767czsq42m.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH v2 0/3] gnu: Add apparmor.
In-Reply-To: <y76k03tpmvo.wl-hako@HIDDEN>
References: <y76k03tpmvo.wl-hako@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
X-Spamd-Bar: /
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@HIDDEN;
 helo=mail.boiledscript.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

v1 -> v2:
1. Build Ruby bindings for libapparmor.
2. Build the original apparmor, apparmor-parser, apparmor-utils,
apparmor-profiles into a single package, apparmor.
3. Fix paths in aa-easyprof's config file.

Hilton Chain (3):
  gnu: Add libapparmor.
  gnu: Add apparmor.
  gnu: Add pam-apparmor.

 gnu/local.mk              |   1 +
 gnu/packages/apparmor.scm | 196 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 197 insertions(+)
 create mode 100644 gnu/packages/apparmor.scm

The following is the diff range from v1 to v2:
diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
index 85f3e9c6ae..3136091747 100644
--- a/gnu/packages/apparmor.scm
+++ b/gnu/packages/apparmor.scm
@@ -55,10 +55,31 @@ (define-public libapparmor
     (arguments
      (list #:configure-flags
            #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
-                   "--with-perl" "--with-python")
+                   "--with-perl" "--with-python" "--with-ruby")
            #:phases
            #~(modify-phases %standard-phases
-               (add-after 'unpack 'change-directory
+               (add-after 'unpack 'fix-paths
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (for-each patch-shebang
+                             '("common/list_af_names.sh"
+                               "common/list_capabilities.sh"))
+                   (for-each (lambda (file)
+                               (substitute* file
+                                 (("/usr") "")
+                                 (("/bin/\\<(pod2man|pod2html|podchecker|prove)\\>" path)
+                                  (search-input-file inputs path))
+                                 (("/include/linux/capability.h" path)
+                                  (search-input-file inputs path))))
+                             '("common/Make-po.rules"
+                               "common/Make.rules"
+                               "binutils/Makefile"
+                               "parser/Makefile"
+                               "parser/tst/Makefile"
+                               "profiles/Makefile"
+                               "utils/Makefile"
+                               "utils/python-tools-setup.py"
+                               "utils/vim/Makefile"))))
+               (add-after 'fix-paths 'change-directory
                  (lambda _
                    (chdir "libraries/libapparmor"))))))
     (native-inputs
@@ -70,6 +91,7 @@ (define-public libapparmor
            libtool
            perl
            python-minimal
+           ruby
            swig
            which))
     (home-page "https://apparmor.net")
@@ -90,112 +112,67 @@ (define-public libapparmor
     (license license:lgpl2.1)))

 (define-public apparmor
-  (package
-    (inherit libapparmor)
-    (name "apparmor")
-    (arguments
-     (list #:make-flags
-           #~(list (string-append "CC=" #$(cc-for-target))
-                   (string-append "DESTDIR=" #$output)
-                   "USE_SYSTEM=1")
-           #:phases
-           #~(modify-phases %standard-phases
+  (let ((base libapparmor))
+    (package
+      (inherit base)
+      (name "apparmor")
+      (arguments
+       (append
+        (list #:make-flags
+              #~(list (string-append "CC=" #$(cc-for-target))
+                      (string-append "DESTDIR=" #$output)
+                      "USE_SYSTEM=1"
+                      ;; No need to run the linter
+                      "PYFLAKES=true"))
+        (substitute-keyword-arguments (package-arguments base)
+          ((#:phases phases)
+           #~(modify-phases #$phases
                (delete 'configure)
-               (add-after 'unpack 'fix-makefile-paths
-                 (lambda _
-                   (for-each patch-shebang
-                             '("common/list_af_names.sh"
-                               "common/list_capabilities.sh"))
-                   (for-each (lambda (file)
-                               (substitute* file
-                                 (("/usr/bin/\\<(pod2man|pod2html|prove)\\>" all cmd) cmd)
-                                 (("/usr") "")))
-                             '("common/Make-po.rules"
-                               "common/Make.rules"
-                               "binutils/Makefile"
-                               "parser/Makefile"
-                               "parser/tst/Makefile"
-                               "profiles/Makefile"
-                               "utils/Makefile"
-                               "utils/python-tools-setup.py"
-                               "utils/vim/Makefile"))))
-               (add-after 'fix-makefile-paths 'change-directory
+               ;; apparmor-binutils
+               (replace 'change-directory
                  (lambda _
-                   (chdir "binutils"))))))
-    (native-inputs (list gettext-minimal perl which))
-    (inputs (list libapparmor))
-    (license license:gpl2)))
+                   (chdir "binutils")))

-(define-public apparmor-parser
-  (let ((base apparmor))
-    (package
-      (inherit base)
-      (name "apparmor-parser")
-      (arguments
-       (substitute-keyword-arguments (package-arguments base)
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (replace 'change-directory
-                (lambda _
-                  (chdir "parser")))
-              (add-after 'change-directory 'fix-kernel-header-path
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (substitute* "Makefile"
-                    (("/include/linux/capability.h" path)
-                     (search-input-file inputs path)))))))))
-      (native-inputs
-       (modify-inputs (package-native-inputs base)
-         (append bison flex python-minimal))))))
+               ;; apparmor-parser
+               (add-after 'install 'chdir-parser
+                 (lambda _
+                   (chdir "../parser")))
+               (add-after 'chdir-parser 'patch-source-shebangs-parser
+                 (assoc-ref %standard-phases 'patch-source-shebangs))
+               (add-after 'patch-source-shebangs-parser 'build-parser
+                 (assoc-ref %standard-phases 'build))
+               (add-after 'build-parser 'check-parser
+                 (assoc-ref %standard-phases 'check))
+               (add-after 'check-parser 'install-parser
+                 (assoc-ref %standard-phases 'install))

-(define-public apparmor-utils
-  (let ((base apparmor))
-    (package
-      (inherit base)
-      (name "apparmor-utils")
-      (arguments
-       (append
-        ;; FIXME: Tests required Python library from this package (itself).
-        (list #:tests? #f)
-        (substitute-keyword-arguments (package-arguments base)
-          ((#:phases phases)
-           #~(modify-phases #$phases
-               (replace 'change-directory
+               ;; apparmor-utils
+               ;; FIXME: Tests required Python library from this package
+               ;; (itself).
+               (add-after 'install-parser 'chdir-utils
                  (lambda _
-                   (chdir "utils")))
-               (add-after 'change-directory 'fix-paths
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   ;; Fix kernel header path
-                   (substitute* "Makefile"
-                     (("/include/linux/capability.h" path)
-                      (search-input-file inputs path)))
-                   ;; Fix apparmor_parser path
-                   (for-each (lambda (file)
-                               (substitute* file
-                                 (("/sbin/apparmor_parser" path)
-                                  (search-input-file inputs path))))
-                             '("apparmor/aa.py"
-                               "apparmor/easyprof.py"
-                               "logprof.conf")))))))))
-      (native-inputs
-       (modify-inputs (package-native-inputs base)
-         (append python-minimal)))
-      (inputs
-       (modify-inputs (package-inputs base)
-         (append apparmor-parser))))))
+                   (chdir "../utils")
+                   ;; Fix paths to installed policygroups and templates for
+                   ;; easyprof.
+                   (substitute* "easyprof/easyprof.conf"
+                     (("/usr") #$output))))
+               (add-after 'chdir-utils 'build-utils
+                 (assoc-ref %standard-phases 'build))
+               (add-after 'build-utils 'install-utils
+                 (assoc-ref %standard-phases 'install))

-(define-public apparmor-profiles
-  (let ((base apparmor))
-    (package
-      (inherit base)
-      (name "apparmor-profiles")
-      (arguments
-       (append
-        (list #:tests? #f)              ;Needs an AppArmor-enabled system.
-        (substitute-keyword-arguments (package-arguments base)
-          ((#:phases phases)
-           #~(modify-phases #$phases
-               (replace 'change-directory
+               ;; apparmor-profiles
+               ;; FIXME: Tests need an AppArmor-enabled system.
+               (add-after 'install-utils 'chdir-profiles
                  (lambda _
-                   (chdir "profiles"))))))))
-      (native-inputs (list which))
-      (inputs '()))))
+                   (chdir "../profiles")))
+               (add-after 'chdir-profiles 'build-profiles
+                 (assoc-ref %standard-phases 'build))
+               (add-after 'check-build 'install-profiles
+                 (assoc-ref %standard-phases 'install)))))))
+      (propagated-inputs
+       (list libapparmor))
+      ;; Python module `readline' needed
+      (native-inputs
+       (list bison flex gettext-minimal perl python which))
+      (license license:gpl2))))

 (define-public pam-apparmor
   (let ((base apparmor))

base-commit: 8e42bfaffa3ecee4c3f0ee6ff257f4fcd90d4677
--
2.38.1




Information forwarded to guix-patches@HIDDEN:
bug#59336; Package guix-patches. Full text available.

Message received at 59336 <at> debbugs.gnu.org:


Received: (at 59336) by debbugs.gnu.org; 17 Nov 2022 16:33:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 11:33:47 2022
Received: from localhost ([127.0.0.1]:34136 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovhpj-0003lB-Bp
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:33:47 -0500
Received: from mail.boiledscript.com ([144.168.59.46]:34020)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1ovhph-0003kz-G7
 for 59336 <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:33:45 -0500
Date: Fri, 18 Nov 2022 00:33:10 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1668702819;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=dzaqkRYYko+O8MggJcmVKPCmqA2powTt8OF9yTTK0nA=;
 b=YEyVvBX0DIeSXwoCTTNXtEQz98tS53trY057enJptG8lmZdcHjP0zXF5gCbyWkLUDsv+1T
 mCbxUztnSrfQ5J+B7vY9baOzNw2KNk9EjI/FF+rKSYNxCwRh1sdCpwa0B8JhQHZr5lTYCr
 NfgEUylpI6D76R+wekZ/sJ7//LQds486G62vdS7F5ul5hN34KjyC1CenTL3rnwYSFu6Gn3
 SZoRrJPo99hzHvzQ6+Tg7Yae3fj46Zzvs9DMkHbtFywRbwdpZYpl1xJjESNl4dQ4oY/Pw6
 7JfQihglHZ14BWGh52z9XNCSsAXuOQZGhTN05mvqkE4xYf/8oezXx6r4L2i7tA==
Message-ID: <y76bkp5pmm1.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: 59336 <at> debbugs.gnu.org
Subject: [PATCH 6/6] gnu: Add pam-apparmor.
In-Reply-To: <y76cz9lpmmw.wl-hako@HIDDEN>
References: <y76k03tpmvo.wl-hako@HIDDEN>
 <handler.59336.B.166870251813777.ack <at> debbugs.gnu.org>
 <y76iljdpmr9.wl-hako@HIDDEN>
 <y76h6yxpmpz.wl-hako@HIDDEN>
 <y76fsehpmox.wl-hako@HIDDEN>
 <y76edu1pmnz.wl-hako@HIDDEN>
 <y76cz9lpmmw.wl-hako@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
X-Spamd-Bar: /
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59336
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/apparmor.scm (pam-apparmor): New variable.
---
 gnu/packages/apparmor.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
index 573666c27f..85f3e9c6ae 100644
--- a/gnu/packages/apparmor.scm
+++ b/gnu/packages/apparmor.scm
@@ -199,3 +199,21 @@ (define-public apparmor-profiles
                    (chdir "profiles"))))))))
       (native-inputs (list which))
       (inputs '()))))
+
+(define-public pam-apparmor
+  (let ((base apparmor))
+    (package
+      (inherit base)
+      (name "pam-apparmor")
+      (arguments
+       (append
+        (list #:tests? #f)              ;no tests
+        (substitute-keyword-arguments (package-arguments base)
+          ((#:phases phases)
+           #~(modify-phases #$phases
+               (replace 'change-directory
+                 (lambda _
+                   (chdir "changehat/pam_apparmor"))))))))
+      (native-inputs (list pkg-config which))
+      (inputs (list libapparmor linux-pam))
+      (license license:bsd-3))))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#59336; Package guix-patches. Full text available.

Message received at 59336 <at> debbugs.gnu.org:


Received: (at 59336) by debbugs.gnu.org; 17 Nov 2022 16:33:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 11:33:16 2022
Received: from localhost ([127.0.0.1]:34133 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovhpE-0003kR-1a
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:33:16 -0500
Received: from mail.boiledscript.com ([144.168.59.46]:60084)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1ovhpC-0003kC-5Y
 for 59336 <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:33:14 -0500
Date: Fri, 18 Nov 2022 00:32:39 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1668702788;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=uUA4fMqwcQxkTaNDuLIstdPOC6kIYKMGKXdPko/1ywI=;
 b=P1KD9Z7apKay/NZoeBFrUaRvQCyUslHdzV/ecDDH1qI0h+GcF2GgbvUZytd20VGNaaqqqp
 9RmXdHIRnsb5DnwG+AbMY1LMXXdfopxZ6CS7oFAL7MGfGX+QkW7TN6mugvcBNfZooQ5uTT
 cGGKbYNOhTny80klbUYjPowDhXabqj5gGbO5VBdEFHtSkhquH6ytxul56gym+b6CoYikUz
 BJtSGQsl1QgoEgXs1juM7Pozu4mT3fSmpwUXPN4rPzQmmAmpZSGBBTcBlJvDsfrmSc5L+e
 gZH3H5huWwhrFdtEI59z6iZ6MYZ774PGd/bOy1C5zcRIcpnxbDdo9vBQ7eso/g==
Message-ID: <y76cz9lpmmw.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: 59336 <at> debbugs.gnu.org
Subject: [PATCH 5/6] gnu: Add apparmor-profiles.
In-Reply-To: <y76edu1pmnz.wl-hako@HIDDEN>
References: <y76k03tpmvo.wl-hako@HIDDEN>
 <handler.59336.B.166870251813777.ack <at> debbugs.gnu.org>
 <y76iljdpmr9.wl-hako@HIDDEN>
 <y76h6yxpmpz.wl-hako@HIDDEN>
 <y76fsehpmox.wl-hako@HIDDEN>
 <y76edu1pmnz.wl-hako@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
X-Spamd-Bar: /
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59336
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/apparmor.scm (apparmor-profiles): New variable.
---
 gnu/packages/apparmor.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
index b753ffc88a..573666c27f 100644
--- a/gnu/packages/apparmor.scm
+++ b/gnu/packages/apparmor.scm
@@ -182,3 +182,20 @@ (define-public apparmor-utils
       (inputs
        (modify-inputs (package-inputs base)
          (append apparmor-parser))))))
+
+(define-public apparmor-profiles
+  (let ((base apparmor))
+    (package
+      (inherit base)
+      (name "apparmor-profiles")
+      (arguments
+       (append
+        (list #:tests? #f)              ;Needs an AppArmor-enabled system.
+        (substitute-keyword-arguments (package-arguments base)
+          ((#:phases phases)
+           #~(modify-phases #$phases
+               (replace 'change-directory
+                 (lambda _
+                   (chdir "profiles"))))))))
+      (native-inputs (list which))
+      (inputs '()))))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#59336; Package guix-patches. Full text available.

Message received at 59336 <at> debbugs.gnu.org:


Received: (at 59336) by debbugs.gnu.org; 17 Nov 2022 16:32:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 11:32:37 2022
Received: from localhost ([127.0.0.1]:34126 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovhoa-0003ie-JN
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:32:36 -0500
Received: from mail.boiledscript.com ([144.168.59.46]:39030)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1ovhoZ-0003iR-Gr
 for 59336 <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:32:36 -0500
Date: Fri, 18 Nov 2022 00:32:00 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1668702750;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=Vj01kv1PlND74VSI2N2aHXAOVDgYEHCPvkCRastChow=;
 b=a0EsuFeQqiWnANxYySdscTIECkFlfwfA23mVCAUgM/zv5XMAfqAr89/T+T2n1L5Vjkx4ST
 f0lC6MY3YVxYk51kw5WvOxBoAvaT5tg8nbcgK8984vurfypd+v7Xkqdci1a3wT7s1BFsFo
 bFw6PQpbbxaBpRqCbr2hbIHgXJho/e4N8tLBC6ki0zjaNGb9hckIinad1BXJJccNVvM7d1
 ygv/ivUrT2m18T4arPNajpiT5++DifRkVBh8018c4RAwIPpdz+uvmxDrAghntQAIeB8Tg+
 +TVU2Je9gGosESgezbmX8uls5pCBRpPmATPRj4zLlQBqE766FP4mFF9N0TAcAw==
Message-ID: <y76edu1pmnz.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: 59336 <at> debbugs.gnu.org
Subject: [PATCH 4/6] gnu: Add apparmor-utils.
In-Reply-To: <y76fsehpmox.wl-hako@HIDDEN>
References: <y76k03tpmvo.wl-hako@HIDDEN>
 <handler.59336.B.166870251813777.ack <at> debbugs.gnu.org>
 <y76iljdpmr9.wl-hako@HIDDEN>
 <y76h6yxpmpz.wl-hako@HIDDEN>
 <y76fsehpmox.wl-hako@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
X-Spamd-Bar: /
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59336
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/apparmor.scm (apparmor-utils): New variable.
---
 gnu/packages/apparmor.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
index 8648a2213f..b753ffc88a 100644
--- a/gnu/packages/apparmor.scm
+++ b/gnu/packages/apparmor.scm
@@ -146,3 +146,39 @@ (define-public apparmor-parser
       (native-inputs
        (modify-inputs (package-native-inputs base)
          (append bison flex python-minimal))))))
+
+(define-public apparmor-utils
+  (let ((base apparmor))
+    (package
+      (inherit base)
+      (name "apparmor-utils")
+      (arguments
+       (append
+        ;; FIXME: Tests required Python library from this package (itself).
+        (list #:tests? #f)
+        (substitute-keyword-arguments (package-arguments base)
+          ((#:phases phases)
+           #~(modify-phases #$phases
+               (replace 'change-directory
+                 (lambda _
+                   (chdir "utils")))
+               (add-after 'change-directory 'fix-paths
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   ;; Fix kernel header path
+                   (substitute* "Makefile"
+                     (("/include/linux/capability.h" path)
+                      (search-input-file inputs path)))
+                   ;; Fix apparmor_parser path
+                   (for-each (lambda (file)
+                               (substitute* file
+                                 (("/sbin/apparmor_parser" path)
+                                  (search-input-file inputs path))))
+                             '("apparmor/aa.py"
+                               "apparmor/easyprof.py"
+                               "logprof.conf")))))))))
+      (native-inputs
+       (modify-inputs (package-native-inputs base)
+         (append python-minimal)))
+      (inputs
+       (modify-inputs (package-inputs base)
+         (append apparmor-parser))))))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#59336; Package guix-patches. Full text available.

Message received at 59336 <at> debbugs.gnu.org:


Received: (at 59336) by debbugs.gnu.org; 17 Nov 2022 16:32:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 11:32:03 2022
Received: from localhost ([127.0.0.1]:34120 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovho3-0003hg-Eh
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:32:03 -0500
Received: from mail.boiledscript.com ([144.168.59.46]:54398)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1ovho1-0003h5-MW
 for 59336 <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:32:02 -0500
Date: Fri, 18 Nov 2022 00:31:26 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1668702716;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=V+M/WId5bnTq4tuM6k7nQKdQd2Vw7107CanPJ7yRTi4=;
 b=qCVDwXCF1iQkOxeDnXM+b21Limo8TUxEQc76WQxQZfuiX80AWB8mYxaFaT/Zl+xpWLhNJh
 lLGCTexXkSI7sdPXx6KEOSZfqczoQ9R9YU0ZgkErDqj/wKqzCwO+FEJ9q55PfuRma+UgcW
 ZwRjVG+Aq+TY7uisUm/T2S07682L9kmCpGdqBtjeXu17ZNT6eKbgsWViBnATdnHNsxfJ0u
 2ZUpPHMqAOSCq2xLyqhJDJw3Ip+nOUTZIFTDLxGEzJOahk4KEeQhVRW1glzOJJRtisutr5
 eBfWMrtiTAjti0Neaimf1jrXTGNs4kHm1vQIR7JKKdravBbxtCFr+DBR4Gt16g==
Message-ID: <y76fsehpmox.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: 59336 <at> debbugs.gnu.org
Subject: [PATCH 3/6] gnu: Add apparmor-parser.
In-Reply-To: <y76h6yxpmpz.wl-hako@HIDDEN>
References: <y76k03tpmvo.wl-hako@HIDDEN>
 <handler.59336.B.166870251813777.ack <at> debbugs.gnu.org>
 <y76iljdpmr9.wl-hako@HIDDEN>
 <y76h6yxpmpz.wl-hako@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
X-Spamd-Bar: /
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59336
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/apparmor.scm (apparmor-parser): New variable.
---
 gnu/packages/apparmor.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
index 742414e18b..8648a2213f 100644
--- a/gnu/packages/apparmor.scm
+++ b/gnu/packages/apparmor.scm
@@ -125,3 +125,24 @@ (define-public apparmor
     (native-inputs (list gettext-minimal perl which))
     (inputs (list libapparmor))
     (license license:gpl2)))
+
+(define-public apparmor-parser
+  (let ((base apparmor))
+    (package
+      (inherit base)
+      (name "apparmor-parser")
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (replace 'change-directory
+                (lambda _
+                  (chdir "parser")))
+              (add-after 'change-directory 'fix-kernel-header-path
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (substitute* "Makefile"
+                    (("/include/linux/capability.h" path)
+                     (search-input-file inputs path)))))))))
+      (native-inputs
+       (modify-inputs (package-native-inputs base)
+         (append bison flex python-minimal))))))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#59336; Package guix-patches. Full text available.

Message received at 59336 <at> debbugs.gnu.org:


Received: (at 59336) by debbugs.gnu.org; 17 Nov 2022 16:31:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 11:31:25 2022
Received: from localhost ([127.0.0.1]:34116 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovhnQ-0003gQ-Vg
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:31:25 -0500
Received: from mail.boiledscript.com ([144.168.59.46]:56414)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1ovhnP-0003gE-Om
 for 59336 <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:31:24 -0500
Date: Fri, 18 Nov 2022 00:30:48 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1668702678;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=gszaZmmBEUArVXGIjagIh9mJqQGqecSnWkXC4+lm5Pc=;
 b=rkaayiTDuUyZvMkpZXqnfHNU5wChhMkSXdRCtPajWjP5C6jwkYEubOj3/l5/CmtdWiCsgz
 urD9Flb1wTq1t61mGLy9LvzxDxbLkDTJvG63dwnyxi9dmP957vWapoXHK3bFcp8i/FFsmO
 XlZQX9S36LbVkgNTUrR3DCE6CAoXNisw15h3wZ4qEHFBzfVaBu56/nKt8Z02hWAvPN1OHP
 q+6CUR6tGAa/6ZKESB3srmUSP2PQFhI5jH8ydic9ONST7Zab6iik38PATTSKyPW494/Kuc
 gwbEYUMbI6vCMGywmxDiHj1d0zNQ5TFCrG0OdBKp84XIuqCeDSNWS74FYFE82Q==
Message-ID: <y76h6yxpmpz.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: 59336 <at> debbugs.gnu.org
Subject: [PATCH 2/6] gnu: Add apparmor.
In-Reply-To: <y76iljdpmr9.wl-hako@HIDDEN>
References: <y76k03tpmvo.wl-hako@HIDDEN>
 <handler.59336.B.166870251813777.ack <at> debbugs.gnu.org>
 <y76iljdpmr9.wl-hako@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
X-Spamd-Bar: /
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59336
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/apparmor.scm (apparmor): New variable.
---
 gnu/packages/apparmor.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
index 8cb4c7e94d..742414e18b 100644
--- a/gnu/packages/apparmor.scm
+++ b/gnu/packages/apparmor.scm
@@ -88,3 +88,40 @@ (define-public libapparmor
 the mainline Linux kernel since version 2.6.36 and its development has been
 supported by Canonical since 2009.")
     (license license:lgpl2.1)))
+
+(define-public apparmor
+  (package
+    (inherit libapparmor)
+    (name "apparmor")
+    (arguments
+     (list #:make-flags
+           #~(list (string-append "CC=" #$(cc-for-target))
+                   (string-append "DESTDIR=" #$output)
+                   "USE_SYSTEM=1")
+           #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure)
+               (add-after 'unpack 'fix-makefile-paths
+                 (lambda _
+                   (for-each patch-shebang
+                             '("common/list_af_names.sh"
+                               "common/list_capabilities.sh"))
+                   (for-each (lambda (file)
+                               (substitute* file
+                                 (("/usr/bin/\\<(pod2man|pod2html|prove)\\>" all cmd) cmd)
+                                 (("/usr") "")))
+                             '("common/Make-po.rules"
+                               "common/Make.rules"
+                               "binutils/Makefile"
+                               "parser/Makefile"
+                               "parser/tst/Makefile"
+                               "profiles/Makefile"
+                               "utils/Makefile"
+                               "utils/python-tools-setup.py"
+                               "utils/vim/Makefile"))))
+               (add-after 'fix-makefile-paths 'change-directory
+                 (lambda _
+                   (chdir "binutils"))))))
+    (native-inputs (list gettext-minimal perl which))
+    (inputs (list libapparmor))
+    (license license:gpl2)))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#59336; Package guix-patches. Full text available.

Message received at 59336 <at> debbugs.gnu.org:


Received: (at 59336) by debbugs.gnu.org; 17 Nov 2022 16:30:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 11:30:41 2022
Received: from localhost ([127.0.0.1]:34112 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovhmj-0003f6-CT
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:30:41 -0500
Received: from mail.boiledscript.com ([144.168.59.46]:50884)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1ovhmg-0003et-C5
 for 59336 <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:30:40 -0500
Date: Fri, 18 Nov 2022 00:30:02 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1668702632;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=ftv+eeURXUBnv9G64zqBS6RGajoQ7Ibj7g9dTfnopDk=;
 b=tNL8WZRNrWvAHB57+7/5Z/4h5LKO1fxQhhW1GWxVc8AU3m6ubiKU5rkw38bcfgCF39z3a8
 59DyCxSVgn2M9t5c2tEo1AN4ueNCeIPI34ZN/xhyhLv884kE1FRlNjxnW8CPQf5ZzVNwuB
 n2wJhQZ4koIIbpJyQJ2MUcEDCMdnQiKU5j3GVr/JaAMY3MVHgjFA1Na0KL2cq9bFt4LYfr
 Eq73FMQ4UBoOOaRU59fKYT+/hUkutaCTEbvncoYV+BGLJU9UkU28DVmJk+dPiBVHyRjLGj
 W/pp7/83+FWiMgJ3Fjeqdnd/rX+DjqVowrsBSGxyoTEv1JWhWteli/jXYfaiEA==
Message-ID: <y76iljdpmr9.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: 59336 <at> debbugs.gnu.org
Subject: [PATCH 1/6] gnu: Add libapparmor.
In-Reply-To: <handler.59336.B.166870251813777.ack <at> debbugs.gnu.org>
References: <y76k03tpmvo.wl-hako@HIDDEN>
 <handler.59336.B.166870251813777.ack <at> debbugs.gnu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spamd-Bar: /
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59336
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/apparmor.scm: New file.
(libapparmor): New variable.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add the file.
---
 gnu/local.mk              |  1 +
 gnu/packages/apparmor.scm | 90 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+)
 create mode 100644 gnu/packages/apparmor.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index b154caaaaa..8907ca625b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -115,6 +115,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/anthy.scm			\
   %D%/packages/antivirus.scm			\
   %D%/packages/apl.scm				\
+  %D%/packages/apparmor.scm			\
   %D%/packages/apr.scm				\
   %D%/packages/arcan.scm			\
   %D%/packages/aspell.scm			\
diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
new file mode 100644
index 0000000000..8cb4c7e94d
--- /dev/null
+++ b/gnu/packages/apparmor.scm
@@ -0,0 +1,90 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Hilton Chain <hako@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages apparmor)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages dejagnu)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages gawk)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages swig)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix gexp)
+  #:use-module (guix git-download)
+  #:use-module (guix packages)
+  #:use-module (guix utils))
+
+(define-public libapparmor
+  (package
+    (name "libapparmor")
+    (version "3.1.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/apparmor/apparmor")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1h77a7ww0rxfv5nsi1iy4fffklxdr2vq6r7kdsqm15yysglhbjyi"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:configure-flags
+           #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
+                   "--with-perl" "--with-python")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'change-directory
+                 (lambda _
+                   (chdir "libraries/libapparmor"))))))
+    (native-inputs
+     (list autoconf
+           automake
+           bison
+           dejagnu
+           flex
+           libtool
+           perl
+           python-minimal
+           swig
+           which))
+    (home-page "https://apparmor.net")
+    (synopsis "Linux kernel security module")
+    (description
+     "AppArmor is an effective and easy-to-use Linux application security
+system.
+
+AppArmor proactively protects the operating system and applications from
+external or internal threats, even zero-day attacks, by enforcing good
+behavior and preventing both known and unknown application flaws from being
+exploited.
+
+AppArmor supplements the traditional Unix discretionary access control (DAC)
+model by providing mandatory access control (MAC).  It has been included in
+the mainline Linux kernel since version 2.6.36 and its development has been
+supported by Canonical since 2009.")
+    (license license:lgpl2.1)))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#59336; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Nov 2022 16:28:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 11:28:38 2022
Received: from localhost ([127.0.0.1]:34107 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovhkj-0003a8-So
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:28:38 -0500
Received: from lists.gnu.org ([209.51.188.17]:60848)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hako@HIDDEN>) id 1ovhkg-0003Zz-3k
 for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 11:28:36 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1ovhke-0002G1-EU
 for guix-patches@HIDDEN; Thu, 17 Nov 2022 11:28:33 -0500
Received: from mail.boiledscript.com ([144.168.59.46])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1ovhkN-000224-Uk
 for guix-patches@HIDDEN; Thu, 17 Nov 2022 11:28:17 -0500
Date: Fri, 18 Nov 2022 00:27:23 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=dkim; t=1668702491;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding;
 bh=AByJ4fpiuwzLZUpZlqHlaIylOzc28HmuDtmlU4pn5pU=;
 b=vrKCIjCtpQPOWuy2G81Vx4/G+88bBWPU84GoWBvM4GI2Ebfr2yRxxWUYiHXEnW4uAHluCB
 UDJhvOF0NKpAtnAg6kX4V8uUDFkUd9N5PSOh2OZruV9n/VaO2l8Kd15N7rq+g9Y79xcXsX
 oUQ1eKlKArF9c23d1FGLo76oS3jJFQ44RZbhp5Q/xPO5Oli5mhNcPxC8Lw0pmpB528JuVb
 cQeq7HvXDXWRBfzRE0xYEg3JcTF+5SF+HiJJ5w3a68HS3cQ/tRaVU1xDQlR64PmqbhkZLh
 cphgIDQb0SL5/Ht7Y4o9dem0tpkqtMwAoRik5Uo0ggLiPFt7O941oJJty5SlQw==
Message-ID: <y76k03tpmvo.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/6] gnu: Add apparmor.
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
X-Spamd-Bar: /
Authentication-Results: mail.boiledscript.com;
 auth=pass smtp.mailfrom=hako@HIDDEN
Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@HIDDEN;
 helo=mail.boiledscript.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hi Guix,

This patchset adds the AppArmor project, excluding the Apache and Tomcat parts.

Further tests are surely needed as I'm not an AppArmor user (yet)...

Tests for two packages are disabled, one is apparmor-profiles, which needs an
AppArmor-enforced system, the other is apparmor-utils, which wants Python
libraries to be installed, this later one might be easier to solve (I tried to
set GUIX_PYTHONPATH, but it fails either).

Thanks!

Hilton Chain (6):
  gnu: Add libapparmor.
  gnu: Add apparmor.
  gnu: Add apparmor-parser.
  gnu: Add apparmor-utils.
  gnu: Add apparmor-profiles.
  gnu: Add pam-apparmor.

 gnu/local.mk              |   1 +
 gnu/packages/apparmor.scm | 219 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 220 insertions(+)
 create mode 100644 gnu/packages/apparmor.scm


base-commit: 8e42bfaffa3ecee4c3f0ee6ff257f4fcd90d4677
--
2.38.1




Acknowledgement sent to Hilton Chain <hako@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#59336; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 4 Dec 2022 21:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.