diff options
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/freedesktop.scm | 8 | ||||
| -rw-r--r-- | gnu/services/desktop.scm | 62 |
2 files changed, 5 insertions, 65 deletions
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index f71037c95f7..91833480874 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm | |||
| @@ -794,16 +794,16 @@ the freedesktop.org XDG Base Directory specification.") | |||
| 794 | (define-public elogind | 794 | (define-public elogind |
| 795 | (package | 795 | (package |
| 796 | (name "elogind") | 796 | (name "elogind") |
| 797 | (version "255.22") | 797 | (version "257.14") |
| 798 | (source (origin | 798 | (source (origin |
| 799 | (method git-fetch) | 799 | (method git-fetch) |
| 800 | (uri (git-reference | 800 | (uri (git-reference |
| 801 | (url "https://github.com/elogind/elogind") | 801 | (url "https://github.com/elogind/elogind") |
| 802 | (commit (string-append "V" version)))) | 802 | (commit (string-append "v" version)))) |
| 803 | (file-name (git-file-name name version)) | 803 | (file-name (git-file-name name version)) |
| 804 | (sha256 | 804 | (sha256 |
| 805 | (base32 | 805 | (base32 |
| 806 | "0hnzks8f0jl2hkf954pqky5490zacqaipz20k38qvzl5g8i1if5l")))) | 806 | "16cbkkia2wmcjwqxgzl714igi9sgpcl4sdvag388vlh941136bs9")))) |
| 807 | (build-system meson-build-system) | 807 | (build-system meson-build-system) |
| 808 | (arguments | 808 | (arguments |
| 809 | `(#:configure-flags | 809 | `(#:configure-flags |
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 |
