gnu: elogind: Update to 255.17.

* gnu/packages/freedesktop.scm (elogind): Update to 255.17.
[source]: Delete patches.
[configure-flags]: Add mode and libexecdir options.  Remove obsolete
rootlibexecdir, dbussessionservicedir and dbus-interfaces-dir ones.  Update
'man' option value to 'enabled'.
[phases] {do-not-install-empty-/var/log/elogind-dir}
{patch-tzdata}: New phases.
{adjust-tests}: Fix FHS assumptions in a few test files.  Re-instate the
cgroup and copy_holes tests.  Disable the cgroup-util, mountpoint-util,
bus-creds, login and sd-device tests.
[native-inputs]: Remove m4.  Add tzdata.
* gnu/packages/patches/elogind-fix-rpath.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): De-register it.

Series-to: 73428@debbugs.gnu.org
Series-version: 3
Series-changes: 3
 - rebased
Series-cc: flake@uni-koblenz.de, me@tobias.gr>, ludo@gnu.org
Change-Id: I2426532b6b5143ad5e30ca879858356c4b9a2c3e
This commit is contained in:
Maxim Cournoyer 2024-04-18 10:14:53 -04:00 committed by Christopher Baines
parent 41c40bc1cf
commit 098b5cdf9c
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577
3 changed files with 54 additions and 81 deletions

View file

@ -1215,7 +1215,6 @@ dist_patch_DATA = \
%D%/packages/patches/elm-ghc9.2.patch \ %D%/packages/patches/elm-ghc9.2.patch \
%D%/packages/patches/elm-offline-package-registry.patch \ %D%/packages/patches/elm-offline-package-registry.patch \
%D%/packages/patches/elm-reactor-static-files.patch \ %D%/packages/patches/elm-reactor-static-files.patch \
%D%/packages/patches/elogind-fix-rpath.patch \
%D%/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch \ %D%/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch \
%D%/packages/patches/emacs-deferred-fix-number-of-arguments.patch \ %D%/packages/patches/emacs-deferred-fix-number-of-arguments.patch \
%D%/packages/patches/emacs-elpy-dup-test-name.patch \ %D%/packages/patches/emacs-elpy-dup-test-name.patch \

View file

@ -27,7 +27,7 @@
;;; Copyright © 2021 Robby Zambito <contact@robbyzambito.me> ;;; Copyright © 2021 Robby Zambito <contact@robbyzambito.me>
;;; Copyright © 2021, 2022, 2023 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021, 2022, 2023 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021, 2022, 2024 John Kehayias <john.kehayias@protonmail.com> ;;; Copyright © 2021, 2022, 2024 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2021-2024 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021-2025 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> ;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com> ;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com> ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
@ -875,7 +875,7 @@ the freedesktop.org XDG Base Directory specification.")
(define-public elogind (define-public elogind
(package (package
(name "elogind") (name "elogind")
(version "252.9") (version "255.17")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
@ -884,8 +884,7 @@ the freedesktop.org XDG Base Directory specification.")
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"049cfv97975x700s7lx4p9i22nv6v7j046iwkspxba7kr5qq7akw")) "0cb6p559281dzh24is91v6d4v4kz45yhyizibi4sfql9nign865h"))))
(patches (search-patches "elogind-fix-rpath.patch"))))
(build-system meson-build-system) (build-system meson-build-system)
(arguments (arguments
`(#:configure-flags `(#:configure-flags
@ -894,11 +893,8 @@ the freedesktop.org XDG Base Directory specification.")
(libexec (string-append out "/libexec/elogind")) (libexec (string-append out "/libexec/elogind"))
(dbus-data (string-append out "/share/dbus-1")) (dbus-data (string-append out "/share/dbus-1"))
(dbuspolicy (string-append dbus-data "/system.d")) (dbuspolicy (string-append dbus-data "/system.d"))
(dbussessionservice (string-append dbus-data "/services"))
(dbussystemservice (string-append dbus-data (dbussystemservice (string-append dbus-data
"/system-services")) "/system-services"))
(dbusinterfaces (string-append dbus-data "/interfaces"))
#$@(if (not (target-riscv64?)) #$@(if (not (target-riscv64?))
#~((kexec-tools #$(this-package-input "kexec-tools"))) #~((kexec-tools #$(this-package-input "kexec-tools")))
#~()) #~())
@ -912,13 +908,11 @@ the freedesktop.org XDG Base Directory specification.")
(poweroff-path (string-append shepherd "/sbin/shutdown")) (poweroff-path (string-append shepherd "/sbin/shutdown"))
(reboot-path (string-append shepherd "/sbin/reboot"))) (reboot-path (string-append shepherd "/sbin/reboot")))
(list (list
(string-append "-Drootprefix=" out) "-Dmode=release"
(string-append "-Dlibexecdir=" libexec)
(string-append "-Dsysconfdir=" sysconf) (string-append "-Dsysconfdir=" sysconf)
(string-append "-Drootlibexecdir=" libexec)
(string-append "-Ddbuspolicydir=" dbuspolicy) (string-append "-Ddbuspolicydir=" dbuspolicy)
(string-append "-Ddbussessionservicedir=" dbussessionservice)
(string-append "-Ddbussystemservicedir=" dbussystemservice) (string-append "-Ddbussystemservicedir=" dbussystemservice)
(string-append "-Ddbus-interfaces-dir=" dbusinterfaces)
(string-append "-Dc_link_args=-Wl,-rpath=" libexec) (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
(string-append "-Dcpp_link_args=-Wl,-rpath=" libexec) (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
(string-append "-Dhalt-path=" halt-path) (string-append "-Dhalt-path=" halt-path)
@ -929,7 +923,7 @@ the freedesktop.org XDG Base Directory specification.")
(string-append "-Dreboot-path=" reboot-path) (string-append "-Dreboot-path=" reboot-path)
(string-append "-Dnologin-path=" nologin-path) (string-append "-Dnologin-path=" nologin-path)
"-Dcgroup-controller=elogind" "-Dcgroup-controller=elogind"
"-Dman=true" "-Dman=enabled"
;; Disable some tests. ;; Disable some tests.
"-Dslow-tests=false" "-Dslow-tests=false"
;; Adjust the default user shell to /bin/sh (otherwise it is set ;; Adjust the default user shell to /bin/sh (otherwise it is set
@ -937,6 +931,18 @@ the freedesktop.org XDG Base Directory specification.")
"-Ddefault-user-shell=/bin/sh")) "-Ddefault-user-shell=/bin/sh"))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'patch-tzdata
(lambda* (#:key native-inputs inputs #:allow-other-keys)
(substitute* "src/basic/time-util.c"
(("/usr/share/zoneinfo")
(search-input-directory (or native-inputs inputs)
"share/zoneinfo")))))
(add-after 'unpack 'do-not-install-empty-/var/log/elogind-dir
(lambda _
;; This is the elogind state directory, which is not writable in
;; the build environment.
(substitute* "meson.build"
(("install_emptydir\\(elogindstatedir)") ""))))
(add-after 'unpack 'fix-pkttyagent-path (add-after 'unpack 'fix-pkttyagent-path
(lambda _ (lambda _
(substitute* "meson.build" (substitute* "meson.build"
@ -953,18 +959,46 @@ the freedesktop.org XDG Base Directory specification.")
(("PKGSYSCONFDIR") "\"/etc/elogind\"")))) (("PKGSYSCONFDIR") "\"/etc/elogind\""))))
(add-after 'unpack 'adjust-tests (add-after 'unpack 'adjust-tests
(lambda _ (lambda _
;; A few tests expect /var/tmp to exists, but it doesn't in the
;; container.
(substitute* '("src/test/test-xattr-util.c"
"src/test/test-copy.c"
"src/test/test-fs-util.c")
(("/var/tmp/")
"/tmp/"))
(substitute* "src/test/test-xattr-util.c"
;; The xattr-util test depends on /usr; patch it to use /tmp
;; instead.
(("fd, \"usr\", \"user.idontexist\"")
"fd, \"/tmp\", \"user.idontexist\""))
(substitute* '("src/test/test-chase.c"
"src/test/test-fd-util.c")
;; Many checks use /usr, which doesn't exist in our
;; environment.
(("/usr")
"/tmp")
(("\"usr\"")
"\"tmp\""))
(substitute* "src/test/meson.build" (substitute* "src/test/meson.build"
((".*'test-cgroup.c'.*") "")) ;no cgroup in container ;; Requires cgroup support.
((".*'test-cgroup-util\\.c'.*") "")
;; Requires privilege to create mount namespaces.
((".*'test-mountpoint-util\\.c'.*") ""))
(substitute* "src/libelogind/meson.build"
;; The bus-creds test fails due to requiring cgroups.
((".*'sd-bus/test-bus-creds.c'.*") "")
;; The login test fails due to 'sd_pid_get_slice' returning
;; NULL.
((".*'sd-login/test-login.c'.*") "")
;; The sd-device test fails due to 'devname_from_devnum'
;; returning NULL.
((".*'sd-device/test-sd-device.c'.*") ""))
;; This test tries to copy some bytes from /usr/lib/os-release, ;; This test tries to copy some bytes from /usr/lib/os-release,
;; which does not exist in the build container. Choose something ;; which does not exist in the build container. Choose something
;; more likely to be available. ;; more likely to be available.
(substitute* "src/test/test-copy.c" (substitute* "src/test/test-copy.c"
(("/usr/lib/os-release") (("/usr/lib/os-release")
"/etc/passwd") "/etc/passwd"))
;; Skip the copy_holes test, which fails for unknown reasons
;; (see: https://github.com/elogind/elogind/issues/261).
(("TEST_RET\\(copy_holes).*" all)
(string-append all " return 77;\n")))
;; Use a shebang that works in the build container. ;; Use a shebang that works in the build container.
(substitute* "src/test/test-exec-util.c" (substitute* "src/test/test-exec-util.c"
(("#!/bin/sh") (("#!/bin/sh")
@ -1000,11 +1034,11 @@ the freedesktop.org XDG Base Directory specification.")
docbook-xsl docbook-xsl
gettext-minimal gettext-minimal
gperf gperf
m4
pkg-config pkg-config
python python
python-jinja2 python-jinja2
libxslt)) libxslt
tzdata))
(inputs (inputs
(append (append
(if (not (target-riscv64?)) (if (not (target-riscv64?))

View file

@ -1,60 +0,0 @@
Retrieved from https://github.com/elogind/elogind/issues/258
From: Mark Hindley <mark@hindley.org.uk>
Date: Wed, 24 May 2023 10:39:41 +0100
Subject: Fixup_executable_rpath
./meson.build sets
install_rpath : rootlibexecdir
however src/shared/meson.build sets
libshared = shared_library(
[snip]
install_dir : rootpkglibdir
)
---
meson.build | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 694a2fd..a575f69 100644
--- a/meson.build
+++ b/meson.build
@@ -2903,7 +2903,7 @@ executable('elogind',
dependencies : [threads,
libacl,
libudev],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
@@ -2913,7 +2913,7 @@ exe = executable('loginctl',
link_with : [libshared],
dependencies : [threads,
libudev],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
public_programs += [exe]
@@ -2923,7 +2923,7 @@ exe = executable('elogind-inhibit',
include_directories : includes,
link_with : [libshared],
dependencies : [threads],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
public_programs += [exe]
@@ -4283,7 +4283,7 @@ executable('elogind-uaccess-command',
libshared],
dependencies: [libacl,
libudev],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
#endif // 0