From patchwork Thu May 1 13:42:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Lechner X-Patchwork-Id: 42211 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 50A1627BC49; Thu, 1 May 2025 14:43:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5167027BC49 for ; Thu, 1 May 2025 14:43:09 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAUBs-0006i6-Vr; Thu, 01 May 2025 09:43:05 -0400 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 1uAUBr-0006ho-Bo for guix-patches@gnu.org; Thu, 01 May 2025 09:43:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAUBr-00025K-2W for guix-patches@gnu.org; Thu, 01 May 2025 09:43:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=/fHeXqV3Z5sXYOMIzK+6egw1JDlINDTr0zpQ5hsdpAA=; b=siqaBnRve7/p2sJbTrIZIxJTP8hdBdH8hLR7dzcG0NfnCsES2+0PDBpij3qgnk3fFno9GUa5qdnK0vBiDjtvl/iL610gU7w7F9UDAiz9aPBG+njGnkxdneOuBUxG4b1ujZxRd5LTme3Fdw+y4lRMxrEkUYc7m87ieZ/oJ4AE7o1Qe5598wwpdBwDdmwNc2cJlqwDj896ryem6ThD5oFDi1XvfK8CcF06C+f7ji+foQB0Jpymagb5iSrotYIi3kTYjQnOcI+u+sO5jiq4zub7iTFX9i4D5BhgM73acTIywOz/cbCNXWsGq2PJ4YaJzNdWiG2w/8Nj11H3WF82jRxYcQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uAUBq-0001J9-Sz; Thu, 01 May 2025 09:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72316] [PATCH v2 1/3] Add guile-pam. Resent-From: Felix Lechner Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Thu, 01 May 2025 13:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72316 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72316@debbugs.gnu.org Cc: Maxim Cournoyer , Ludovic =?utf-8?q?Court?= =?utf-8?q?=C3=A8s?= , Z572 , Florian Pelz , Felix Lechner , Matthew Trzcinski , Leo Famulari , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Wilko Meyer Received: via spool by 72316-submit@debbugs.gnu.org id=B72316.17461069795007 (code B ref 72316); Thu, 01 May 2025 13:43:02 +0000 Received: (at 72316) by debbugs.gnu.org; 1 May 2025 13:42:59 +0000 Received: from localhost ([127.0.0.1]:49841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uAUBm-0001Ie-Sp for submit@debbugs.gnu.org; Thu, 01 May 2025 09:42:59 -0400 Received: from sail-ipv4.us-core.com ([208.82.101.137]:33450) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uAUBj-0001I8-N9 for 72316@debbugs.gnu.org; Thu, 01 May 2025 09:42:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=2n3KExTpnNjeJL6 +PepF9pvPo2XuvTFdY9ob4yFF6hw=; h=references:in-reply-to:date:subject: cc:to:from; d=lease-up.com; b=AhsfleZ6XXDK9+XeN8yG5m0IYDyyUWx+Sn8NIL5L m90hoL0/+dYlyQmcRlxFMwes5B7059PeuXJz6wPamOjCW1z+au9h8TI68VyNVCBP9WNs4s xqNrYbnCn6W/HX1dVy5tp7OYBnFlJBG/om/vsBVR8w0vjt6brhELsfhR+5SEQ= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id dcd2c8d3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 1 May 2025 13:42:55 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 2a763324; Thu, 1 May 2025 13:42:55 +0000 (UTC) Date: Thu, 1 May 2025 06:42:35 -0700 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: <878qnj80pt.fsf@iscas.ac.cn> References: <878qnj80pt.fsf@iscas.ac.cn> MIME-Version: 1.0 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: Felix Lechner X-ACL-Warn: , Felix Lechner via Guix-patches X-Patchwork-Original-From: Felix Lechner via Guix-patches via From: Felix Lechner Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Change-Id: I991ca32c8696de0e6751b0f4225bf24151ba22f2 --- gnu/packages/linux.scm | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index b4adf0c2b43..35ae4558043 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -113,6 +113,7 @@ (define-module (gnu packages linux) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages boost) + #:use-module (gnu packages build-tools) #:use-module (gnu packages calendar) #:use-module (gnu packages check) #:use-module (gnu packages cpio) @@ -145,6 +146,7 @@ (define-module (gnu packages linux) #:use-module (gnu packages graphviz) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) + #:use-module (gnu packages guile) #:use-module (gnu packages haskell-apps) #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages image) @@ -158,6 +160,7 @@ (define-module (gnu packages linux) #:use-module (gnu packages m4) #:use-module (gnu packages man) #:use-module (gnu packages maths) + #:use-module (gnu packages mes) #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages netpbm) @@ -2412,6 +2415,74 @@ (define-public vendor-reset-linux-module ;;; Pluggable authentication modules (PAM). ;;; +(define-public guile-pam + (let ((commit "5ea70a5d88e7ade27ba9f231acab7d363b6400fb") + (revision "0")) + (package + (name "guile-pam") + (version (git-version "0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://codeberg.org/lechner/guile-pam") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1i034f42wnmnsz76pcniif2ikpbamh0cki3ib2zwmbnvif4656av")))) + (native-inputs (list + autoconf + automake + gnulib + guile-3.0 + libtool + linux-pam + nyacc-2.01 + pkg-config + texinfo)) + (inputs (list + guile-3.0 + linux-pam)) + (propagated-inputs (list + nyacc-2.01)) + (build-system gnu-build-system) + (arguments + (list + #:make-flags + #~(list (string-append "ENTRY_POINT_DIR=" #$output "/share/entry-points")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'install-gnulib + ;; per https://lists.gnu.org/archive/html/guile-devel/2012-08/msg00042.html + (lambda* (#:key inputs #:allow-other-keys) + (let ((gnulib-build-aux (dirname + (search-input-file inputs + "/src/gnulib/build-aux/config.rpath")))) + (mkdir-p "build-aux") + (copy-recursively gnulib-build-aux "build-aux")) + (let ((gnulib-m4 (dirname (search-input-file inputs + "/src/gnulib/m4/lib-link.m4")))) + (mkdir-p "m4") + (copy-recursively gnulib-m4 "m4")))) + (add-after 'patch-source-shebangs 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (for-each (lambda (file) + (substitute* file + (("/usr/bin/env -S guile ") + (string-append (search-input-file inputs "/bin/guile") " \\\n")))) + '("test/legacy-control-strings")) + (substitute* "scm/pam.scm" + (("[.]/wrap/c/[.]libs/conversation.so") + (string-append #$output "/lib/guile-pam/wrapper/conversation.so")))))))) + (home-page "https://codeberg.org/lechner/guile-pam") + (synopsis "Write your Linux-PAM authentication logic in Guile Scheme") + (description + "Guile-PAM provides a way to rewrite your authentication logic in the +Linux PAM (pluggable authentication modules) in Guile Scheme. It should make +those modules more transparent to the administrator and more intuitive to +use.") + (license license:gpl3+)))) + (define-public linux-pam (package (name "linux-pam")