mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-24 11:39:46 -05:00
gnu: elogind: Update to 252.9.
* gnu/packages/freedesktop.scm (elogind): Update to 252.9. [source]: Replace elogind-revert-polkit-detection.patch with elogind-fix-rpath.patch in patches. [configure-flags]: Add the dbussystemservicedir, dbussessionservicedir, dbussystemservicedir and dbus-interfaces-dir flags. [phases] <use-global-hook-directory> Update list of patched files. <adjust-tests> Update substitutions, and skip the copy_holes test. [native-inputs]: Add python-jinja2. [inputs]: Add util-linux:lib. * gnu/services/desktop.scm (elogind-dbus-service) <elogind-dbus-service-wrapper>: Add a symlink to elogind's share/dbus-1/system.d to expose D-Bus policy configurations. * gnu/tests/desktop.scm (run-elogind-test): Adjust expected result for the new "linger" value. * gnu/packages/patches/elogind-revert-polkit-detection.patch: Delete file. * gnu/packages/patches/elogind-fix-rpath.patch: New file. * gnu/local.mk (dist_patch_DATA): Update. Series-to: 64938@debbugs.gnu.org Series-prefix: elogind-updates Series-version: 2 Series-changes: 2 - Fix elogind system test - Install D-Bus policy files in elogind-dbus-service-wrapper - Remove duplicate 'dbussystemservicedir' configure flag
This commit is contained in:
parent
3309bb8ac2
commit
132ddca5a4
6 changed files with 98 additions and 64 deletions
|
@ -1089,7 +1089,7 @@ 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-revert-polkit-detection.patch \
|
%D%/packages/patches/elogind-fix-rpath.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-exec-path.patch \
|
%D%/packages/patches/emacs-exec-path.patch \
|
||||||
%D%/packages/patches/emacs-ess-fix-obsolete-function-alias.patch \
|
%D%/packages/patches/emacs-ess-fix-obsolete-function-alias.patch \
|
||||||
|
|
|
@ -643,7 +643,7 @@ (define-public libxdg-basedir
|
||||||
(define-public elogind
|
(define-public elogind
|
||||||
(package
|
(package
|
||||||
(name "elogind")
|
(name "elogind")
|
||||||
(version "246.10")
|
(version "252.9")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
|
@ -652,16 +652,21 @@ (define-public elogind
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"16045bhpwjq2nqgswln67ipg1zrz2djxlgkfngqng3jqpwagmnzq"))
|
"049cfv97975x700s7lx4p9i22nv6v7j046iwkspxba7kr5qq7akw"))
|
||||||
(patches (search-patches
|
(patches (search-patches "elogind-fix-rpath.patch"))))
|
||||||
"elogind-revert-polkit-detection.patch"))))
|
|
||||||
(build-system meson-build-system)
|
(build-system meson-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
`(#:configure-flags
|
||||||
,#~(let* ((out #$output)
|
,#~(let* ((out #$output)
|
||||||
(sysconf (string-append out "/etc"))
|
(sysconf (string-append out "/etc"))
|
||||||
(libexec (string-append out "/libexec/elogind"))
|
(libexec (string-append out "/libexec/elogind"))
|
||||||
(dbuspolicy (string-append out "/etc/dbus-1/system.d"))
|
(dbus-data (string-append out "/share/dbus-1"))
|
||||||
|
(dbuspolicy (string-append dbus-data "/system.d"))
|
||||||
|
(dbussessionservice (string-append dbus-data "/services"))
|
||||||
|
(dbussystemservice (string-append dbus-data
|
||||||
|
"/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")))
|
||||||
#~())
|
#~())
|
||||||
|
@ -679,6 +684,9 @@ (define-public elogind
|
||||||
(string-append "-Dsysconfdir=" sysconf)
|
(string-append "-Dsysconfdir=" sysconf)
|
||||||
(string-append "-Drootlibexecdir=" libexec)
|
(string-append "-Drootlibexecdir=" libexec)
|
||||||
(string-append "-Ddbuspolicydir=" dbuspolicy)
|
(string-append "-Ddbuspolicydir=" dbuspolicy)
|
||||||
|
(string-append "-Ddbussessionservicedir=" dbussessionservice)
|
||||||
|
(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)
|
||||||
|
@ -703,21 +711,28 @@ (define-public elogind
|
||||||
;; XXX There is no run-time setting to set this per-process, only a
|
;; XXX There is no run-time setting to set this per-process, only a
|
||||||
;; build-time, hard-coded list of global directories.
|
;; build-time, hard-coded list of global directories.
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* (list "src/login/elogind-dbus.c"
|
(substitute* (list "src/login/logind-core.c"
|
||||||
"src/sleep/sleep.c")
|
"src/login/logind-dbus.c"
|
||||||
|
"src/sleep/sleep.c"
|
||||||
|
"src/shared/sleep-config.c")
|
||||||
(("PKGSYSCONFDIR") "\"/etc/elogind\""))))
|
(("PKGSYSCONFDIR") "\"/etc/elogind\""))))
|
||||||
(add-after 'unpack 'adjust-tests
|
(add-after 'unpack 'adjust-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Skip the following test, which depends on users such as 'root'
|
;; Skip the user-util tests, which depends on users such as
|
||||||
;; existing in the build environment.
|
;; 'root' existing in the build environment.
|
||||||
(invoke "sed" "/src\\/test\\/test-user-util.c/,+2s/^/#/g"
|
(substitute* "src/test/meson.build"
|
||||||
"-i" "src/test/meson.build")
|
((".*'test-user-util.c'.*") "")
|
||||||
|
((".*'test-cgroup.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")
|
||||||
|
@ -742,12 +757,6 @@ (define-public elogind
|
||||||
;; loopback device, but that fails because /sys is unavailable.
|
;; loopback device, but that fails because /sys is unavailable.
|
||||||
(substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
|
(substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
|
||||||
((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
|
((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
|
||||||
"return 77;"))
|
|
||||||
;; Most of these tests require cgroups or an actual live
|
|
||||||
;; logind system so that it can flicker the monitor, etc.
|
|
||||||
;; Just skip it until a more narrow selection can be made.
|
|
||||||
(substitute* "src/libelogind/sd-login/test-login.c"
|
|
||||||
(("test_login\\(\\);")
|
|
||||||
"return 77;"))))
|
"return 77;"))))
|
||||||
(add-after 'unpack 'change-pid-file-path
|
(add-after 'unpack 'change-pid-file-path
|
||||||
(lambda _
|
(lambda _
|
||||||
|
@ -763,6 +772,7 @@ (define-public elogind
|
||||||
m4
|
m4
|
||||||
pkg-config
|
pkg-config
|
||||||
python
|
python
|
||||||
|
python-jinja2
|
||||||
libxslt))
|
libxslt))
|
||||||
(inputs
|
(inputs
|
||||||
(append
|
(append
|
||||||
|
@ -771,9 +781,10 @@ (define-public elogind
|
||||||
'())
|
'())
|
||||||
(list linux-pam
|
(list linux-pam
|
||||||
libcap
|
libcap
|
||||||
shadow ; for 'nologin'
|
`(,util-linux "lib") ;for 'libmount'
|
||||||
shepherd ; for 'halt' and 'reboot', invoked
|
shadow ;for 'nologin'
|
||||||
; when pressing the power button
|
shepherd ;for 'halt' and 'reboot', invoked
|
||||||
|
;when pressing the power button
|
||||||
dbus
|
dbus
|
||||||
eudev
|
eudev
|
||||||
acl))) ; to add individual users to ACLs on /dev nodes
|
acl))) ; to add individual users to ACLs on /dev nodes
|
||||||
|
|
60
gnu/packages/patches/elogind-fix-rpath.patch
Normal file
60
gnu/packages/patches/elogind-fix-rpath.patch
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
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
|
|
@ -1,41 +0,0 @@
|
||||||
From 715ce0a6459e418f92e74c7ce52df3244c18f383 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sven Eden <sven.eden@prydeworx.com>
|
|
||||||
Date: Mon, 8 Mar 2021 08:40:08 +0100
|
|
||||||
Subject: [PATCH] Revert "Disable polkit support if libpolkit is not installed"
|
|
||||||
|
|
||||||
This reverts commit 1194dec4f8f2d1b8bd14e1625f34418ecfce817e.
|
|
||||||
|
|
||||||
Removing polkit support with -Dpolkit=auto when libpolkit is not
|
|
||||||
installed, removes the whole interface. This makes it impossible to
|
|
||||||
add polkit support as a runtime dependency.
|
|
||||||
|
|
||||||
Bug: #167
|
|
||||||
Closes: #206
|
|
||||||
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
|
|
||||||
---
|
|
||||||
meson.build | 9 ---------
|
|
||||||
1 file changed, 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index 2dd05db3c..f38551f55 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -1157,15 +1157,6 @@ if want_polkit != 'false' and not skip_deps
|
|
||||||
message('Old polkit detected, will install pkla files')
|
|
||||||
install_polkit_pkla = true
|
|
||||||
endif
|
|
||||||
-#if 1 /// Disable polkit completely if libpolkit is not there. See elogind issue #167
|
|
||||||
- if not libpolkit.found()
|
|
||||||
- if want_polkit != 'auto'
|
|
||||||
- error('Polkit requested but libpolkit was not found.')
|
|
||||||
- endif
|
|
||||||
- install_polkit = false
|
|
||||||
- want_polkit = false
|
|
||||||
- endif
|
|
||||||
-#endif // 1
|
|
||||||
endif
|
|
||||||
conf.set10('ENABLE_POLKIT', install_polkit)
|
|
||||||
|
|
||||||
--
|
|
||||||
2.33.1
|
|
||||||
|
|
|
@ -1165,6 +1165,10 @@ (define service-directory
|
||||||
(string-append #$output service-directory))
|
(string-append #$output service-directory))
|
||||||
(symlink (string-append #$elogind "/etc") ;for etc/dbus-1
|
(symlink (string-append #$elogind "/etc") ;for etc/dbus-1
|
||||||
(string-append #$output "/etc"))
|
(string-append #$output "/etc"))
|
||||||
|
;; Also expose the D-Bus policy configurations (.conf) files, now
|
||||||
|
;; installed under '/share' instead of the legacy '/etc' prefix.
|
||||||
|
(symlink (string-append #$elogind "/share/dbus-1/system.d")
|
||||||
|
(string-append #$output "/share/dbus-1/system.d"))
|
||||||
|
|
||||||
;; Replace the "Exec=" line of the 'org.freedesktop.login1.service'
|
;; Replace the "Exec=" line of the 'org.freedesktop.login1.service'
|
||||||
;; file with one that refers to WRAPPER instead of elogind.
|
;; file with one that refers to WRAPPER instead of elogind.
|
||||||
|
|
|
@ -55,7 +55,7 @@ (define marionette
|
||||||
(test-equal "login on tty1"
|
(test-equal "login on tty1"
|
||||||
'(("c1" "0" "root" "seat0" "tty1") ;session
|
'(("c1" "0" "root" "seat0" "tty1") ;session
|
||||||
("seat0") ;seat
|
("seat0") ;seat
|
||||||
("0" "root")) ;user
|
("0" "root" "no")) ;user
|
||||||
|
|
||||||
(begin
|
(begin
|
||||||
;; Wait for tty1.
|
;; Wait for tty1.
|
||||||
|
|
Loading…
Reference in a new issue