diff options
| author | Dariqq <dariqq@posteo.net> | 2025-07-27 13:55:38 +0000 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2026-07-22 12:20:07 +0900 |
| commit | f4860cfe3fe434950324e2c5ce663d7a09f5c7de (patch) | |
| tree | cc983b359168709470d2e148ef02dbd646a705d7 /gnu/packages | |
| parent | f9aa4dfc09e098a4a11160181d09862cc96e84d7 (diff) | |
gnu: linux-pam: Update to 1.7.2.
nis/yp is disabled since support got removed in glibc.
includedir and libdir are set to the correct value automatically.
* gnu/packages/linux.scm (linux-pam): Update to 1.7.2.
[source]: Switch to git-fetch. [build-system]: Switch to meson.
[arguments]<#:phases>: Remove 'skip-pam-limits phases.
<#:configure-flags>: Remove includedir, libdir and disable-nis.
Enable pam_lastlog, set docbook-rng, htmldir and vendordir.
[native-inputs]: Add gettext-minimal, bison, libxslt, libxml2,
docbook-xml, docbook-xsl. [outputs]: Add doc.
* gnu/packages/patches/linux-pam-unix_chkpwd.patch: Adjust for meson.
Merges: https://codeberg.org/guix/guix/pulls/1652
Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/linux.scm | 71 | ||||
| -rw-r--r-- | gnu/packages/patches/linux-pam-unix_chkpwd.patch | 16 |
2 files changed, 41 insertions, 46 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 32059f21f07..032e389cd63 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm | |||
| @@ -86,6 +86,7 @@ | |||
| 86 | ;;; Copyright © 2025 Mathieu Laparie <mlaparie@disr.it> | 86 | ;;; Copyright © 2025 Mathieu Laparie <mlaparie@disr.it> |
| 87 | ;;; Copyright © 2025 John Kehayias <john.kehayias@protonmail.com> | 87 | ;;; Copyright © 2025 John Kehayias <john.kehayias@protonmail.com> |
| 88 | ;;; Copyright © 2025 Arjan Adriaanse <arjan@adriaan.se> | 88 | ;;; Copyright © 2025 Arjan Adriaanse <arjan@adriaan.se> |
| 89 | ;;; Copyright © 2025 Dariqq <dariqq@posteo.net> | ||
| 89 | ;;; Copyright © 2026 Justin Veilleux <terramorpha@cock.li> | 90 | ;;; Copyright © 2026 Justin Veilleux <terramorpha@cock.li> |
| 90 | ;;; Copyright © 2026 Simen Endsjø <contact@simendsjo.me> | 91 | ;;; Copyright © 2026 Simen Endsjø <contact@simendsjo.me> |
| 91 | ;;; | 92 | ;;; |
| @@ -3299,57 +3300,45 @@ which need to be installed separately.") | |||
| 3299 | (define-public linux-pam | 3300 | (define-public linux-pam |
| 3300 | (package | 3301 | (package |
| 3301 | (name "linux-pam") | 3302 | (name "linux-pam") |
| 3302 | (version "1.5.2") | 3303 | (version "1.7.2") |
| 3303 | (source | 3304 | (source |
| 3304 | (origin | 3305 | (origin |
| 3305 | (method url-fetch) | 3306 | (method git-fetch) |
| 3306 | (uri (string-append | 3307 | (uri (git-reference |
| 3307 | "https://github.com/linux-pam/linux-pam/releases/download/v" | 3308 | (url "https://github.com/linux-pam/linux-pam") |
| 3308 | version "/Linux-PAM-" version ".tar.xz")) | 3309 | (commit (string-append "v" version)))) |
| 3310 | (file-name (git-file-name name version)) | ||
| 3309 | (sha256 | 3311 | (sha256 |
| 3310 | (base32 | 3312 | (base32 |
| 3311 | "0kgrsj2scv5mx6w925h9hxf11jnqqs9z8s22aw94b90xm4qp3v74")) | 3313 | "1z5apric696zsci28c7651spvdll0zrpfm9z574gcjf45mp22gmi")) |
| 3312 | (patches (search-patches "linux-pam-unix_chkpwd.patch" | 3314 | (patches (search-patches "linux-pam-unix_chkpwd.patch" |
| 3313 | "linux-pam-no-setfsuid.patch")))) | 3315 | "linux-pam-no-setfsuid.patch")))) |
| 3314 | 3316 | (build-system meson-build-system) | |
| 3315 | (build-system gnu-build-system) | 3317 | (outputs '("out" "doc")) ;; 0.8 MiB of html |
| 3316 | (inputs (list libxcrypt)) | 3318 | (inputs (list libxcrypt)) |
| 3317 | (native-inputs | 3319 | (native-inputs |
| 3318 | (list flex | 3320 | (list gettext-minimal |
| 3319 | ;; TODO: optional dependencies | 3321 | flex bison |
| 3320 | ;; ("cracklib" ,cracklib) | 3322 | ;; manpages |
| 3321 | )) | 3323 | libxslt |
| 3324 | libxml2 | ||
| 3325 | docbook-xml | ||
| 3326 | docbook-xsl)) | ||
| 3322 | (arguments | 3327 | (arguments |
| 3323 | (list | 3328 | (list |
| 3324 | ;; Most users, such as `shadow', expect the headers to be under | 3329 | #:configure-flags |
| 3325 | ;; `security'. | 3330 | #~(list |
| 3326 | #:configure-flags #~(list (string-append "--includedir=" | 3331 | ;; lastlog is deprecated since 1.5.3 |
| 3327 | (assoc-ref %outputs "out") | 3332 | "-Dpam_lastlog=enabled" |
| 3328 | "/include/security") | 3333 | (string-append "-Dvendordir=" #$output "/share/pam") |
| 3329 | ;; explicit libdir for pkgconfig files | 3334 | (string-append "-Ddocbook-rng=" |
| 3330 | ;; drop with 1.5.3, which fixes | 3335 | #$(let ((docbook-xml (this-package-native-input |
| 3331 | ;; https://github.com/linux-pam/linux-pam/issues/466 | 3336 | "docbook-xml"))) |
| 3332 | (string-append "--libdir=" | 3337 | (file-append docbook-xml |
| 3333 | (assoc-ref %outputs "out") | 3338 | "/xml/docbook/" |
| 3334 | "/lib") | 3339 | (package-version docbook-xml) |
| 3335 | 3340 | "/rng/docbookxi.rng"))) | |
| 3336 | ;; XXX: <rpc/rpc.h> is missing from glibc when | 3341 | (string-append "-Dhtmldir=" #$output:doc "/share/doc/" #$name "/html")) |
| 3337 | ;; cross-compiling, so we have to disable NIS | ||
| 3338 | ;; support altogether. | ||
| 3339 | #$@(if (%current-target-system) | ||
| 3340 | #~("--disable-nis") | ||
| 3341 | #~())) | ||
| 3342 | |||
| 3343 | #:phases (if (target-hurd?) | ||
| 3344 | #~(modify-phases %standard-phases | ||
| 3345 | (add-after 'unpack 'skip-pam-limits | ||
| 3346 | (lambda _ | ||
| 3347 | ;; 'pam_limits.c' uses <sys/prctl.h>, which is | ||
| 3348 | ;; Linux-specific. Skip it on GNU/Hurd. | ||
| 3349 | (substitute* "modules/Makefile.in" | ||
| 3350 | (("pam_limits") ""))))) | ||
| 3351 | #~%standard-phases) | ||
| 3352 | |||
| 3353 | ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d | 3342 | ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d |
| 3354 | ;; isn't available. | 3343 | ;; isn't available. |
| 3355 | #:tests? #f)) | 3344 | #:tests? #f)) |
diff --git a/gnu/packages/patches/linux-pam-unix_chkpwd.patch b/gnu/packages/patches/linux-pam-unix_chkpwd.patch index 0e865ff18c7..bf580b3c462 100644 --- a/gnu/packages/patches/linux-pam-unix_chkpwd.patch +++ b/gnu/packages/patches/linux-pam-unix_chkpwd.patch | |||
| @@ -2,8 +2,14 @@ unix_chkpwd is designed to have a suid bit, but it's not possible to set it | |||
| 2 | for files in the store. This patch tells unix_pam.so to look for | 2 | for files in the store. This patch tells unix_pam.so to look for |
| 3 | unix_chkpwd in setuid program directory on Guix System. | 3 | unix_chkpwd in setuid program directory on Guix System. |
| 4 | 4 | ||
| 5 | --- a/modules/pam_unix/Makefile.in | 5 | --- a/modules/module-meson.build |
| 6 | +++ b/modules/pam_unix/Makefile.in | 6 | +++ b/modules/module-meson.build |
| 7 | @@ -651,1 +651,1 @@ | 7 | @@ -114,7 +114,7 @@ if module == 'pam_unix' |
| 8 | - -DCHKPWD_HELPER=\"$(sbindir)/unix_chkpwd\" \ | 8 | if enable_nis |
| 9 | + -DCHKPWD_HELPER=\"/run/setuid-programs/unix_chkpwd\" \ | 9 | pam_module_src += ['yppasswd_xdr.c'] |
| 10 | endif | ||
| 11 | - pam_module_c_args += ['-DCHKPWD_HELPER="@0@"'.format(sbindir / 'unix_chkpwd'), | ||
| 12 | + pam_module_c_args += ['-DCHKPWD_HELPER="@0@"'.format('/run/privileged/bin' / 'unix_chkpwd'), | ||
| 13 | '-DUPDATE_HELPER="@0@"'.format(sbindir / 'unix_update')] | ||
| 14 | pam_module_deps += [libcrypt, libselinux, libtirpc, libnsl] | ||
| 15 | endif | ||
