From: "Stefan Stefanović" <stefanx2ovic@gmail.com>
To: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH][WIP] Elogind update
Date: Fri, 16 Nov 2018 07:11:47 +0100 [thread overview]
Message-ID: <CAFBTj=jgronN=sEFWo+SLTDxaVe3dc6mWL3hFg9gZyLhfTFg7g@mail.gmail.com> (raw)
In-Reply-To: <CAFBTj=gsoSHJbZmHTNdQb29ddic-X5hZekOQE+t2ooAgudWpCQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]
Hello,
Guix.
I solved my problem. Please use this new patch,
which will be attached to this message.
I must apologize for my carelessness.
I unnecessary added dependency cycle between elogind and polkit.
At the time I added polkit, as input dependency of elogind,
I was looking at service extension graph and
mistook it for dependency graph I had opened at that same time,
that was foolish of me. :(
My system compiled fine with newer version of elogind,
because the polkit my system used deepened on
older version of elogind.
But that meant that I had trouble when I tried to
replace old elogind in guix repository with the newer elogind version.
Problem is now solved.
I spent so much time looking for the cause of this problem. :(
But it was fun. And I gained useful experience. :)
I now know how guix behaves when I try to evaluate
derivation that has dependency cycle,
it hangs not printing anything and
keeps increasing RAM memory usage. :)
Thank you, for your patience.
I will wait for the official release of elogind version 239.2
before sending the modified version of this patch to guix-patches.
The 239.2 version of elogind should be released in a few days,
but that is only my prediction.
Stefan.
[-- Attachment #2: 0001-gnu-elogind-Update-to-version-239.2.patch --]
[-- Type: text/x-patch, Size: 12343 bytes --]
From 7366b0d198e7ac5d90419cfb081e3144f2248ad1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Stefanovi=C4=87?= <stefanx2ovic@gmail.com>
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
- ;; <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)))))
- (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
- ;; <https://github.com/wingo/elogind/issues/8>.
- ("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
prev parent reply other threads:[~2018-11-16 6:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 16:00 [PATCH][WIP] Elogind update Stefan Stefanović
2018-11-12 14:21 ` Andy Wingo
2018-11-12 21:06 ` Stefan Stefanović
2018-11-13 11:37 ` Stefan Stefanović
2018-11-14 10:33 ` Ludovic Courtès
2018-11-14 13:39 ` Stefan Stefanović
2018-11-14 17:04 ` Marius Bakke
[not found] ` <CAFBTj=gsoSHJbZmHTNdQb29ddic-X5hZekOQE+t2ooAgudWpCQ@mail.gmail.com>
2018-11-16 6:11 ` Stefan Stefanović [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFBTj=jgronN=sEFWo+SLTDxaVe3dc6mWL3hFg9gZyLhfTFg7g@mail.gmail.com' \
--to=stefanx2ovic@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.