From 7366b0d198e7ac5d90419cfb081e3144f2248ad1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Stefanovi=C4=87?=
Date: Fri, 16 Nov 2018 06:50:16 +0100
Subject: [PATCH] gnu: elogind: Update to version 239.2.
---
gnu/packages/freedesktop.scm | 240 ++++++++++++++++++-----------------
1 file changed, 125 insertions(+), 115 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 5cc2699ad..b52d2339d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -43,6 +43,7 @@
#:use-module (gnu packages acl)
#:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
@@ -65,6 +66,7 @@
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages m4)
+ #:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages polkit)
@@ -72,6 +74,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages python)
+ #:use-module (gnu packages selinux)
#:use-module (gnu packages valgrind)
#:use-module (gnu packages w3m)
#:use-module (gnu packages web)
@@ -227,124 +230,131 @@ the freedesktop.org XDG Base Directory specification.")
(license license:expat)))
(define-public elogind
- (package
- (name "elogind")
- (version "232.4")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/elogind/elogind/"
- "archive/v" version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1qcxian48z2dj5gfmp7brrngdydqf2jm00f4rjr5sy1myh8fy931"))
- (patches (search-patches "elogind-glibc-2.27.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- (use-modules (guix build utils))
- (substitute* "Makefile.am"
- ;; Avoid validation against DTD because the DTDs for
- ;; both doctype 4.2 and 4.5 are needed.
- (("XSLTPROC_FLAGS = ") "XSLTPROC_FLAGS = --novalid"))
- #t))))
- (build-system gnu-build-system)
- (arguments
- `(#:tests? #f ;FIXME: "make check" in the "po" directory fails.
- #:configure-flags
- (list (string-append "--with-udevrulesdir="
- (assoc-ref %outputs "out")
- "/lib/udev/rules.d")
-
- ;; Let elogind be its own cgroup controller, rather than relying
- ;; on systemd or OpenRC. By default, 'configure' makes an
- ;; incorrect guess.
- "--with-cgroup-controller=elogind"
-
- (string-append "--with-rootprefix="
- (assoc-ref %outputs "out"))
- (string-append "--with-rootlibexecdir="
- (assoc-ref %outputs "out")
- "/libexec/elogind")
- ;; These are needed to ensure that lto linking works.
- "RANLIB=gcc-ranlib"
- "AR=gcc-ar"
- "NM=gcc-nm")
- #:make-flags '("PKTTYAGENT=/run/current-system/profile/bin/pkttyagent")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-locale-header
- (lambda _
- ;; Fix compilation with glibc >= 2.26, which removed xlocale.h.
- ;; This can be removed for elogind 234.
- (substitute* "src/basic/parse-util.c"
- (("xlocale\\.h") "locale.h"))
- #t))
- (replace 'bootstrap
- (lambda _
- (invoke "intltoolize" "--force" "--automake")
- (invoke "autoreconf" "-vif")))
- (add-before 'build 'fix-service-file
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Fix the file name of the 'elogind' binary in the D-Bus
- ;; '.service' file.
- (substitute* "src/login/org.freedesktop.login1.service"
- (("^Exec=.*")
- (string-append "Exec=" (assoc-ref %outputs "out")
- "/libexec/elogind/elogind\n")))
- #t))
- (add-after 'install 'add-libcap-to-search-path
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; Add a missing '-L' for libcap in libelogind.la. See
- ;; .
- (let ((libcap (assoc-ref inputs "libcap"))
- (out (assoc-ref outputs "out")))
- (substitute* (string-append out "/lib/libelogind.la")
- (("-lcap")
- (string-append "-L" libcap "/lib -lcap")))
- #t)))
- (add-after 'unpack 'remove-uaccess-tag
- (lambda _
- ;; systemd supports a "uaccess" built-in tag, but eudev currently
- ;; doesn't. This leads to eudev warnings that we'd rather not
- ;; see, so remove the reference to "uaccess."
- (substitute* "src/login/73-seat-late.rules.in"
- (("^TAG==\"uaccess\".*" line)
- (string-append "# " line "\n")))
- #t)))))
- (native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("libtool" ,libtool)
- ("intltool" ,intltool)
- ("gettext" ,gettext-minimal)
- ("python" ,python)
- ("docbook-xsl" ,docbook-xsl)
- ("docbook-xml" ,docbook-xml)
- ("xsltproc" ,libxslt)
- ("m4" ,m4)
- ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
- ("pkg-config" ,pkg-config)
-
- ;; Use gperf 3.0 to work around
- ;; .
- ("gperf" ,gperf-3.0)))
- (inputs
- `(("linux-pam" ,linux-pam)
- ("linux-libre-headers" ,linux-libre-headers)
- ("libcap" ,libcap)
- ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
- ;when pressing the power button
- ("dbus" ,dbus)
- ("eudev" ,eudev)
- ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
- (home-page "https://github.com/elogind/elogind")
- (synopsis "User, seat, and session management service")
- (description "Elogind is the systemd project's \"logind\" service,
+ (let* ((commit "0554def508b3328b70aaa6464886ad51219b9379")
+ (revision "1")
+ (version (git-version "239.2" revision commit)))
+ (package
+ (name "elogind-next")
+ (version version)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/elogind/elogind")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0xwwrkd20zwqsychf76yd8n8kydk5vsgkx17v3qqbmhnbyq30a42"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (use-modules (guix build utils))
+ (substitute* "meson.build"
+ ;; Clean RUNPATH.
+ (("install_rpath :") "#install_rpath :")
+ ;; TODO: To remove $ORIGIN...
+ ;; from RUNPATH of libexec executables:
+ ;; we should declare and use
+ ;; src/share/libshared as proper dependency.
+ ;; Fix pkttyagent path:
+ (("join_paths\\(bindir, 'pkttyagent'\\)")
+ "'\"/run/current-system/profileb/bin/pkttyagent\"'"))
+ (substitute* "man/meson.build"
+ ;; Necessary because
+ ;; there is no internet access
+ ;; inside the build environment.
+ (("xsltproc_flags = \\[")
+ (string-append "xsltproc_flags = ["
+ " '--novalid',")))
+ (substitute* "src/login/elogind.c"
+ ;; Change PID file path
+ ;; to fmpfs mount point.
+ (("\"/run/elogind.pid\"")
+ "\"/run/systemd/elogind.pid\""))
+ #t))))
+ (build-system meson-build-system)
+ (outputs '("out"))
+ (arguments
+ `(#:tests? #t
+ ;; Some tests fail only in chroot build environment:
+ ;; - https://github.com/elogind/elogind/issues/45
+ ;; Some tests assume existence of standard directories:
+ ;; *** test_copy_bytes FAILS because there is no
+ ;; /usr/lib/os-release or /etc/os-release file
+ ;; *** test_chase_symlinks FAILS because there is no
+ ;; /usr directory
+ ;;
+ #:configure-flags
+ (let* ((out (assoc-ref %outputs "out"))
+ (sysconf (string-append out "/etc"))
+ (libexec (string-append out "/libexec/elogind"))
+ (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
+ (shepherd (assoc-ref %build-inputs "shepherd"))
+ (halt-path (string-append shepherd "/sbin/halt"))
+ (kexec-path "") ;; NOTE: We need to package kexec-tools,
+ ;; or support kexec whit shepherd.
+ (poweroff-path (string-append shepherd "/sbin/shutdown"))
+ (reboot-path (string-append shepherd "/sbin/reboot")))
+ `(,(string-append
+ "-Drootprefix=" out)
+ ,(string-append
+ "-Dsysconfdir=" sysconf)
+ ,(string-append
+ "-Drootlibexecdir=" libexec)
+ ,(string-append
+ "-Ddbuspolicydir=" dbuspolicy)
+ ,(string-append
+ "-Dc_link_args=-Wl,-rpath=" libexec)
+ ,(string-append
+ "-Dcpp_link_args=-Wl,-rpath=" libexec)
+ ,(string-append
+ "-Dhalt-path=" halt-path)
+ ,(string-append
+ "-Dkexec-path=" kexec-path)
+ ,(string-append
+ "-Dpoweroff-path=" poweroff-path)
+ ,(string-append
+ "-Dreboot-path=" reboot-path)
+ "-Dcgroup-controller=elogind"
+ ;; Disable some tests.
+ "-Dtests=false"
+ "-Dslow-tests=false"))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'bootstrap))))
+ (native-inputs
+ `(("docbook-xsl" ,docbook-xsl)
+ ("docbook-xml-4.2" ,docbook-xml-4.2)
+ ("docbook-xml-4.5" ,docbook-xml)
+ ("libxml2" ,libxml2)
+ ("m4" ,m4)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python)
+ ("python-lxml" ,python-lxml)
+ ("gettext" ,gettext-minimal)
+ ("gperf" ,gperf)
+ ("xsltproc" ,libxslt)))
+ (inputs
+ `(("acl" ,acl)
+ ("audit" ,audit)
+ ("dbus" ,dbus)
+ ("eudev" ,eudev)
+ ("glibc" ,glibc)
+ ("libcap" ,libcap)
+ ("libseccomp" ,libseccomp)
+ ("libselinux" ,libselinux)
+ ("linux-pam" ,linux-pam)
+ ("pcre2" ,pcre2)
+ ("python" ,python) ;; libpython optional input
+ ("shepherd" ,shepherd)
+ ("util-linux" ,util-linux)))
+ (home-page "https://github.com/elogind/elogind")
+ (synopsis "Elogind provides user, seat, and session management service")
+ (description "Elogind is the systemd project's \"logind\" service,
extracted out as a separate project. Elogind integrates with PAM to provide
the org.freedesktop.login1 interface over the system bus, allowing other parts
of a the system to know what users are logged in, and where.")
- (license license:lgpl2.1+)))
+ (license license:lgpl2.1+))))
(define-public packagekit
(package
--
2.19.1