diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2026-04-06 22:48:54 +0900 |
|---|---|---|
| committer | NoƩ Lopez <noelopez@free.fr> | 2026-08-25 01:15:28 +0200 |
| commit | 11bbd9b45b77d837974a003e867ced0e92cae726 (patch) | |
| tree | 84db3186f8978e316a9a37cce054194f8e0dd6b8 /gnu/services | |
| parent | 68e7bcca54c3d3398482426cd6baf8b61db62c1c (diff) | |
gnu: elogind: Update to 257.14.
* gnu/packages/freedesktop.scm (elogind): Update to 257.14.
* gnu/services/desktop.scm (elogind-dbus-service): Delete variable.
(elogind-service-type) [extensions] {dbus-root-service-type}: De-register it.
Diffstat (limited to 'gnu/services')
| -rw-r--r-- | gnu/services/desktop.scm | 62 |
1 files changed, 1 insertions, 61 deletions
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index d731354f8ed..6c116646504 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm | |||
| @@ -1718,66 +1718,6 @@ the user shall be removed when the user fully logs out.") | |||
| 1718 | '#$(elogind-configuration-system-shutdown-hook-files | 1718 | '#$(elogind-configuration-system-shutdown-hook-files |
| 1719 | config)))))) | 1719 | config)))))) |
| 1720 | 1720 | ||
| 1721 | (define (elogind-dbus-service config) | ||
| 1722 | "Return a @file{org.freedesktop.login1.service} file that tells D-Bus how to | ||
| 1723 | \"start\" elogind. In practice though, our elogind is started when booting by | ||
| 1724 | shepherd. Thus, the @code{Exec} line of this @file{.service} file does not | ||
| 1725 | explain how to start elogind; instead, it spawns a wrapper that waits for the | ||
| 1726 | @code{elogind} shepherd service. This avoids a race condition where both | ||
| 1727 | @command{shepherd} and @command{dbus-daemon} would attempt to start elogind." | ||
| 1728 | ;; For more info on the elogind startup race, see | ||
| 1729 | ;; <https://issues.guix.gnu.org/55444>. | ||
| 1730 | |||
| 1731 | (define elogind | ||
| 1732 | (elogind-configuration-elogind config)) | ||
| 1733 | |||
| 1734 | (define wrapper | ||
| 1735 | (program-file "elogind-dbus-shepherd-sync" | ||
| 1736 | (with-imported-modules '((gnu services herd)) | ||
| 1737 | #~(begin | ||
| 1738 | (use-modules (gnu services herd) | ||
| 1739 | (srfi srfi-34)) | ||
| 1740 | |||
| 1741 | (guard (c ((service-not-found-error? c) | ||
| 1742 | (format (current-error-port) | ||
| 1743 | "no elogind shepherd service~%") | ||
| 1744 | (exit 1)) | ||
| 1745 | ((shepherd-error? c) | ||
| 1746 | (format (current-error-port) | ||
| 1747 | "elogind shepherd service not \ | ||
| 1748 | started~%") | ||
| 1749 | (exit 2))) | ||
| 1750 | (wait-for-service 'elogind)))))) | ||
| 1751 | |||
| 1752 | (define build | ||
| 1753 | (with-imported-modules '((guix build utils)) | ||
| 1754 | #~(begin | ||
| 1755 | (use-modules (guix build utils) | ||
| 1756 | (ice-9 match)) | ||
| 1757 | |||
| 1758 | (define service-directory | ||
| 1759 | "/share/dbus-1/system-services") | ||
| 1760 | |||
| 1761 | (mkdir-p (dirname (string-append #$output service-directory))) | ||
| 1762 | (copy-recursively (string-append #$elogind service-directory) | ||
| 1763 | (string-append #$output service-directory)) | ||
| 1764 | (symlink (string-append #$elogind "/etc") ;for etc/dbus-1 | ||
| 1765 | (string-append #$output "/etc")) | ||
| 1766 | ;; Also expose the D-Bus policy configurations (.conf) files, now | ||
| 1767 | ;; installed under '/share' instead of the legacy '/etc' prefix. | ||
| 1768 | (symlink (string-append #$elogind "/share/dbus-1/system.d") | ||
| 1769 | (string-append #$output "/share/dbus-1/system.d")) | ||
| 1770 | |||
| 1771 | ;; Replace the "Exec=" line of the 'org.freedesktop.login1.service' | ||
| 1772 | ;; file with one that refers to WRAPPER instead of elogind. | ||
| 1773 | (match (find-files #$output "\\.service$") | ||
| 1774 | ((file) | ||
| 1775 | (substitute* file | ||
| 1776 | (("Exec[[:blank:]]*=.*" _) | ||
| 1777 | (string-append "Exec=" #$wrapper "\n")))))))) | ||
| 1778 | |||
| 1779 | (list (computed-file "elogind-dbus-service-wrapper" build))) | ||
| 1780 | |||
| 1781 | (define (pam-extension-procedure config) | 1721 | (define (pam-extension-procedure config) |
| 1782 | "Return an extension for PAM-ROOT-SERVICE-TYPE that ensures that all the PAM | 1722 | "Return an extension for PAM-ROOT-SERVICE-TYPE that ensures that all the PAM |
| 1783 | services use 'pam_elogind.so', a module that allows elogind to keep track of | 1723 | services use 'pam_elogind.so', a module that allows elogind to keep track of |
| @@ -1825,7 +1765,7 @@ of the service's configuration files." | |||
| 1825 | (name 'elogind) | 1765 | (name 'elogind) |
| 1826 | (extensions | 1766 | (extensions |
| 1827 | (list (service-extension dbus-root-service-type | 1767 | (list (service-extension dbus-root-service-type |
| 1828 | elogind-dbus-service) | 1768 | (compose list elogind-configuration-elogind)) |
| 1829 | (service-extension udev-service-type | 1769 | (service-extension udev-service-type |
| 1830 | (compose list elogind-configuration-elogind)) | 1770 | (compose list elogind-configuration-elogind)) |
| 1831 | (service-extension polkit-service-type | 1771 | (service-extension polkit-service-type |
