GNU bug report logs - #72316
[PATCH 0/3] Switch to Guile-PAM.

Previous Next

Package: guix-patches;

Reported by: Felix Lechner <felix.lechner <at> lease-up.com>

Date: Fri, 26 Jul 2024 22:03:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Z572 <z572 <at> z572.online>
To: 72316 <at> debbugs.gnu.org
Cc: maxim.cournoyer <at> gmail.com, w <at> wmeyer.eu, ludo <at> gnu.org, zhengjunjie <at> iscas.ac.cn, pelzflorian <at> pelzflorian.de, leo <at> famulari.name, felix.lechner <at> lease-up.com, matt <at> excalamus.com
Subject: [bug#72316] [PATCH v2 1/3] Add guile-pam.
Date: Thu, 01 May 2025 23:14:03 +0800
[Message part 1 (text/plain, inline)]
Felix Lechner via Guix-patches via <guix-patches <at> gnu.org> writes:

> 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))

i think should (git-version "0.0.1" revision commit)

because this commit is after v0.0.1.

> +      (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

why linux-pam both in native-inputs and inputs, is it required when
cross compiling?

> +                      nyacc-2.01

Please add a comment why we can't just use nyacc.

> +                      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")
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 89 days ago.

Previous Next


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