Subject: [WIP PATCH] gnu: elogind: Update to 234.4.

From: Marius Bakke <[email-masked]>
Date: Thu, 04 Jan 2018 01:23:11 +0100

Hello!

This patch is for 'master', even though it incidentally fixes a build
failure on 'core-updates'.

It passes the system test, and worked on a GuixSD system -- once.  On
three subsequent reboots it has failed to start.  Hence the WIP.

Not sure what's up yet, but you'll be the first to know.

From 2fdd9b556c4dd1a9eb6b43aa11bf3201441443ea Mon Sep 17 00:00:00 2001
From: Marius Bakke <[email-masked]>
Date: Wed, 3 Jan 2018 22:20:06 +0100
Subject: [PATCH] gnu: elogind: Update to 234.4.

* gnu/packages/freedesktop.scm (elogind): Update to 234.4.
[source]: Remove now-defunct XSLTPROC_FLAGS substitution.
[arguments]: Add --with-dbuspolicydir in #:configure-flags.  Remove obsolete
FIX-SERVICE-FILE-PHASE.
[native-inputs]: Add [email-masked].  Replace GPERF-3.0 with GPERF.
---
 gnu/packages/freedesktop.scm | 33 +++++++++++----------------------
 1 file changed, 11 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6a4e118f7..a69284178 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -216,7 +216,7 @@ the freedesktop.org XDG Base Directory specification.")
 (define-public elogind
   (package
     (name "elogind")
-    (version "232.4")
+    (version "234.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/elogind/elogind/"
@@ -224,15 +224,7 @@ the freedesktop.org XDG Base Directory specification.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1qcxian48z2dj5gfmp7brrngdydqf2jm00f4rjr5sy1myh8fy931"))
-              (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"))))))
+                "1ws28mqxfi1i5alnia71d9r3nzwqs2dbnzzb0ydw30a25jk6bd7z"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ;FIXME: "make check" in the "po" directory fails.
@@ -251,6 +243,13 @@ the freedesktop.org XDG Base Directory specification.")
              (string-append "--with-rootlibexecdir="
                             (assoc-ref %outputs "out")
                             "/libexec/elogind")
+
+             ;; XXX: The default since 233 is out/share/dbus-1/system.d, but
+             ;; that does not work in GuixSD.
+             (string-append "--with-dbuspolicydir="
+                            (assoc-ref %outputs "out")
+                            "/etc/dbus-1/system.d")
+
              ;; These are needed to ensure that lto linking works.
              "RANLIB=gcc-ranlib"
              "AR=gcc-ar"
@@ -262,14 +261,6 @@ the freedesktop.org XDG Base Directory specification.")
            (lambda _
              (and (zero? (system* "intltoolize" "--force" "--automake"))
                   (zero? (system* "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")))))
          (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
@@ -297,15 +288,13 @@ the freedesktop.org XDG Base Directory specification.")
        ("gettext" ,gettext-minimal)
        ("python" ,python)
        ("docbook-xsl" ,docbook-xsl)
+       ("[email-masked]" ,docbook-xml-4.2)
        ("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
-       ;; <https://github.com/wingo/elogind/issues/8>.
-       ("gperf" ,gperf-3.0)))
+       ("gperf" ,gperf)))
     (inputs
      `(("linux-pam" ,linux-pam)
        ("linux-libre-headers" ,linux-libre-headers)
-- 
2.15.1