From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iB3HJJUKd2MW6QAAbAwnHQ (envelope-from ) for ; Fri, 18 Nov 2022 05:31:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 4K/IJJUKd2M9EQAA9RJhRA (envelope-from ) for ; Fri, 18 Nov 2022 05:31:17 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4B344E7A5 for ; Fri, 18 Nov 2022 05:31:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovt1s-0000uv-QF; Thu, 17 Nov 2022 23:31:04 -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 ) id 1ovt1q-0000uf-WE for guix-patches@gnu.org; Thu, 17 Nov 2022 23:31:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovt1q-0004Td-NQ for guix-patches@gnu.org; Thu, 17 Nov 2022 23:31:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ovt1q-0007Pe-Iy for guix-patches@gnu.org; Thu, 17 Nov 2022 23:31:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59336] [PATCH v2 2/3] gnu: Add apparmor. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Nov 2022 04:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59336 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59336@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166874585128474 (code B ref -1); Fri, 18 Nov 2022 04:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Nov 2022 04:30:51 +0000 Received: from localhost ([127.0.0.1]:34872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovt1e-0007PC-Ma for submit@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 ) id 1ovt1d-0007P5-8P for submit@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 ) id 1ovt1c-0000se-D5 for guix-patches@gnu.org; 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 ) id 1ovt1a-0004On-Ee for guix-patches@gnu.org; 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: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Spamd-Bar: / Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@ultrarare.space; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668745877; h=from:from:sender:sender:reply-to: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=71lS6wljEtVrsGAwrEx5Y8zMtTKBYvbwiIm7lw3j24o=; b=O0iPDBH4jjFRGzJzI9xnhhBdbkjV5IxEBNYGtK7ddFJmSiayDmHKbX8guAk3bzaeqYKN7/ HYifz/9QKxtU7KjCfEmy8OqXD0iQt6S2tSu98nHZLpnXKoUvsNF15o91ZNai+SJRVGXuOt K58koX0CRN7XMTQryaVQZO2SDVwBzNnvjg4c1SFcBLx1rUTm88DUZIFRLg4tHeS7TeoVpQ Qgv6CCXvB8vQpxubuxYrDw28hKMyxgiJjGmdLryyvPRolgZilMhEEX0hEbIo0cRs5/plZF kdYZIxB6mysqxMuLUCksQH3xmjTIPFG06sBJVQTvbpSZJjiMxwu7MHLj9O1y1g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668745877; a=rsa-sha256; cv=none; b=ht53/fH/nuROd1ENNrUTZ7AckpRxSF1pED7po6FdoHsPNk+Y8Zlrg401tIRgzh2/MS+95+ 3uuUSggoTXxcpz+abyy093wxqjrFIQgvQnElacnjEbdYGiH/ll6d+KgLSXW0u7LjstVlg2 sOPFwRb7/6oTTgAIgbXH7OdKUPy4GumdMI0PiJgL20Xs6XTKzYZsico+CmDBVJMgCaUO0M 38WqI0XxfiL9nWdIqvW0QVk/eqJCNCSasQlurNRxoYIur+XKLVkfslbm/aaDIyx1zsHRsr UCM4oNPlJuXDD37Sb1sCqW37BZUeDYHMo5hAR2EQjsklwi53nH8iRbVJmtXZBg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=NCeAh+GP; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.23 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=NCeAh+GP; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4B344E7A5 X-Spam-Score: -2.23 X-Migadu-Scanner: scn0.migadu.com X-TUID: QMte2TFiMFWP * 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