mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: elogind: Update to 239.2.
* gnu/packages/freedesktop.scm (elogind): Update to 239.2. [source](patches): Remove elogind-glibc-2.27.patch. [source](snippet): Remove snippet. [arguments]: <#:tests?>: Enable tests. <#:configure-flags>: Adjust build paths. Disable some tests. <#:make-flags>: Remove argument. <#:phases>[patch-locale-header]: Remove phase. <#:phases>[clean-runpath]: Add phase. <#:phases>[bootstrap]: Remove phase. <#:phases>[fix-pkttyagent-path]: Add phase. <#:phases>[fix-service-file]: Remove phase. <#:phases>[add-libcap-to-search-path]: Remove phase. <#:phases>[remove-uaccess-tag]: Remove phase. <#:phases>[change-pid-file-path]: Add phase. [build-system]: Switch to meson-build-system. [native-inputs]: Sort native-inputs list. Remove gperf package version constraint. Remove: autoconf, automake, libtool, intltool. Add: docbook-xml-4.2. [inputs]: Remove: linux-libre-headers. * gnu/packages/patches/elogind-glibc-2.27.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch file. Signed-off-by: Marius Bakke <mbakke@fastmail.com>
This commit is contained in:
parent
1f9b1d3d97
commit
4163f2467b
3 changed files with 43 additions and 106 deletions
|
@ -666,7 +666,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/dropbear-CVE-2018-15599.patch \
|
%D%/packages/patches/dropbear-CVE-2018-15599.patch \
|
||||||
%D%/packages/patches/dvd+rw-tools-add-include.patch \
|
%D%/packages/patches/dvd+rw-tools-add-include.patch \
|
||||||
%D%/packages/patches/elfutils-tests-ptrace.patch \
|
%D%/packages/patches/elfutils-tests-ptrace.patch \
|
||||||
%D%/packages/patches/elogind-glibc-2.27.patch \
|
|
||||||
%D%/packages/patches/einstein-build.patch \
|
%D%/packages/patches/einstein-build.patch \
|
||||||
%D%/packages/patches/emacs-exec-path.patch \
|
%D%/packages/patches/emacs-exec-path.patch \
|
||||||
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
|
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
|
;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
|
||||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
|
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
|
||||||
|
;;; Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -227,7 +228,7 @@ the freedesktop.org XDG Base Directory specification.")
|
||||||
(define-public elogind
|
(define-public elogind
|
||||||
(package
|
(package
|
||||||
(name "elogind")
|
(name "elogind")
|
||||||
(version "232.4")
|
(version "239.2")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
|
@ -236,101 +237,60 @@ the freedesktop.org XDG Base Directory specification.")
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"06qqs6yfcwg8aiinqqvy5374pys6sspmvsrqz93c724hqq38d93z"))
|
"17khwbzqmkfd3hcscs51kzdpvq9p2llm08vbpsdhy9yxgwfzlfa6"))))
|
||||||
(patches (search-patches "elogind-glibc-2.27.patch"))
|
(build-system meson-build-system)
|
||||||
(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
|
(arguments
|
||||||
`(#:tests? #f ;FIXME: "make check" in the "po" directory fails.
|
`(#:configure-flags
|
||||||
#:configure-flags
|
(let* ((out (assoc-ref %outputs "out"))
|
||||||
(list (string-append "--with-udevrulesdir="
|
(sysconf (string-append out "/etc"))
|
||||||
(assoc-ref %outputs "out")
|
(libexec (string-append out "/libexec/elogind"))
|
||||||
"/lib/udev/rules.d")
|
(dbuspolicy (string-append out "/etc/dbus-1/system.d"))
|
||||||
|
(shepherd (assoc-ref %build-inputs "shepherd"))
|
||||||
;; Let elogind be its own cgroup controller, rather than relying
|
(halt-path (string-append shepherd "/sbin/halt"))
|
||||||
;; on systemd or OpenRC. By default, 'configure' makes an
|
(kexec-path "") ;not available in Guix yet
|
||||||
;; incorrect guess.
|
(poweroff-path (string-append shepherd "/sbin/shutdown"))
|
||||||
"--with-cgroup-controller=elogind"
|
(reboot-path (string-append shepherd "/sbin/reboot")))
|
||||||
|
(list
|
||||||
(string-append "--with-rootprefix="
|
(string-append "-Drootprefix=" out)
|
||||||
(assoc-ref %outputs "out"))
|
(string-append "-Dsysconfdir=" sysconf)
|
||||||
(string-append "--with-rootlibexecdir="
|
(string-append "-Drootlibexecdir=" libexec)
|
||||||
(assoc-ref %outputs "out")
|
(string-append "-Ddbuspolicydir=" dbuspolicy)
|
||||||
"/libexec/elogind")
|
(string-append "-Dc_link_args=-Wl,-rpath=" libexec)
|
||||||
;; These are needed to ensure that lto linking works.
|
(string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
|
||||||
"RANLIB=gcc-ranlib"
|
(string-append "-Dhalt-path=" halt-path)
|
||||||
"AR=gcc-ar"
|
(string-append "-Dkexec-path=" kexec-path)
|
||||||
"NM=gcc-nm")
|
(string-append "-Dpoweroff-path=" poweroff-path)
|
||||||
#:make-flags '("PKTTYAGENT=/run/current-system/profile/bin/pkttyagent")
|
(string-append "-Dreboot-path=" reboot-path)
|
||||||
|
"-Dcgroup-controller=elogind"
|
||||||
|
;; Disable some tests.
|
||||||
|
"-Dtests=false"
|
||||||
|
"-Dslow-tests=false"))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'patch-locale-header
|
(add-after 'unpack 'fix-pkttyagent-path
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Fix compilation with glibc >= 2.26, which removed xlocale.h.
|
(substitute* "meson.build"
|
||||||
;; This can be removed for elogind 234.
|
(("join_paths\\(bindir, 'pkttyagent'\\)")
|
||||||
(substitute* "src/basic/parse-util.c"
|
"'\"/run/current-system/profile/bin/pkttyagent\"'"))
|
||||||
(("xlocale\\.h") "locale.h"))
|
|
||||||
#t))
|
#t))
|
||||||
(replace 'bootstrap
|
(add-after 'unpack 'change-pid-file-path
|
||||||
(lambda _
|
(lambda _
|
||||||
(invoke "intltoolize" "--force" "--automake")
|
(substitute* "src/login/elogind.c"
|
||||||
(invoke "autoreconf" "-vif")))
|
(("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
|
||||||
(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
|
|
||||||
;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00084.html>.
|
|
||||||
(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)))))
|
#t)))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("autoconf" ,autoconf)
|
`(("docbook-xml" ,docbook-xml)
|
||||||
("automake" ,automake)
|
("docbook-xml-4.2" ,docbook-xml-4.2)
|
||||||
("libtool" ,libtool)
|
|
||||||
("intltool" ,intltool)
|
|
||||||
("gettext" ,gettext-minimal)
|
|
||||||
("python" ,python)
|
|
||||||
("docbook-xsl" ,docbook-xsl)
|
("docbook-xsl" ,docbook-xsl)
|
||||||
("docbook-xml" ,docbook-xml)
|
("gettext" ,gettext-minimal)
|
||||||
("xsltproc" ,libxslt)
|
("gperf" ,gperf)
|
||||||
("m4" ,m4)
|
|
||||||
("libxml2" ,libxml2) ;for XML_CATALOG_FILES
|
("libxml2" ,libxml2) ;for XML_CATALOG_FILES
|
||||||
|
("m4" ,m4)
|
||||||
("pkg-config" ,pkg-config)
|
("pkg-config" ,pkg-config)
|
||||||
|
("python" ,python)
|
||||||
;; Use gperf 3.0 to work around
|
("xsltproc" ,libxslt)))
|
||||||
;; <https://github.com/wingo/elogind/issues/8>.
|
|
||||||
("gperf" ,gperf-3.0)))
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("linux-pam" ,linux-pam)
|
`(("linux-pam" ,linux-pam)
|
||||||
("linux-libre-headers" ,linux-libre-headers)
|
|
||||||
("libcap" ,libcap)
|
("libcap" ,libcap)
|
||||||
("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
|
("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
|
||||||
;when pressing the power button
|
;when pressing the power button
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
Look for memfd_create in sys/mman.h instead of linux/memfd.h.
|
|
||||||
Needed to build with glibc-2.27.
|
|
||||||
|
|
||||||
--- a/configure.ac 1969-12-31 19:00:00.000000000 -0500
|
|
||||||
+++ b/configure.ac 2018-03-27 23:54:15.414589005 -0400
|
|
||||||
@@ -360,7 +360,7 @@
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
|
|
||||||
-AC_CHECK_HEADERS([linux/memfd.h], [], [])
|
|
||||||
+AC_CHECK_HEADERS([sys/mman.h], [], [])
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS([printf.h], [have_printf_h=yes], [have_printf_h=no])
|
|
||||||
AS_IF([test x$have_printf_h = xyes], [
|
|
||||||
@@ -395,6 +395,7 @@
|
|
||||||
[], [], [[
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
+#include <sys/mman.h>
|
|
||||||
#include <sys/mount.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <sched.h>
|
|
Loading…
Add table
Add a link
Reference in a new issue