unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* elogind WIP
@ 2015-04-20  8:40 Andy Wingo
  2015-04-23 21:08 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Wingo @ 2015-04-20  8:40 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]

Hi,

Just a quick note to update on elogind status.  Elogind is an attempt to
rip logind out of systemd.  logind integrates with PAM to expose the
org.freedesktop.login1 interface over D-Bus.  It also integrates with
polkit to let polkit know who is logged in at the console.
Gnome-session and gnome-settings-daemon both have logind integration of
some kind, using the d-bus interface, and actually the logind support is
necessary for basic things to work like backlight control and
suspend/resume.

Anyway.  I forked the systemd repo and removed most of the non-logind
parts.  What's remaining is a library that pokes elogind's internal
state, exposed over the filesystem, to query user/seats/slices, the
daemon itself, a pam module, and a couple of test binaries (loginctl,
systemd-inhibit).  Most names were changed from systemd to logind but
not all, for compatibility reasons.  The name "elogind" was chosen
because it was available and it's like "eudev".

libelogind is an equivalent to libsystemd, for some things.  It should
be enough for GNOME, anyway.

There are still some files that could probably be removed but it's in a
pretty good state there.  It compiles but I haven't gotten it integrated
in Guix yet.  However since I won't have time for the next couple weeks
to work on it, and don't intend to spend much time on it anyway, I put
the repo here for your interest:

  https://github.com/andywingo/elogind

You can "git clone" that URL.  To make, do "intltoolize --automake
--force && autoreconf -vif" and then configure as usual.

Attached is the beginnings of a Guix file to build the thing.

Regards,

Andy

[-- Attachment #2: elogind.scm --]
[-- Type: text/plain, Size: 4587 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Andy Wingo <wingo@pobox.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages elogind)
  #:use-module ((guix licenses) #:select (lgpl2.1+))
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages base)
  #:use-module (gnu packages docbook)
  #:use-module (gnu packages gettext)
  #:use-module (gnu packages gperf)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages xml))

(define-public elogind
  (let ((commit "b952404"))
    (package
      (name "elogind")
      (version (string-append "216." commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/andywingo/elogind")
                      ; (url "file:///home/wingo/src/elogind")
                      (commit commit)))
                (sha256
                 (base32
                  "0h54jw7h8csgfcjnyhijpmic5511jj0z5ln03p0b0mx0gvm11lsa"))))
      (build-system gnu-build-system)
      (arguments
       `(#:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'autogen
                      (lambda _
                        (and (zero? (system* "intltoolize" "--force" "--automake"))
                             (zero? (system* "autoreconf" "-vif")))))
           (add-before 'build 'fix-docbook
                       (lambda* (#:key inputs #:allow-other-keys)
                         (substitute* "man/custom-html.xsl"
                           (("http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl")
                            (string-append (assoc-ref inputs "docbook-xsl") 
                                           "/xml/xsl/docbook-xsl-"
                                           ,(package-version docbook-xsl)
                                           "/html/docbook.xsl")))
                         (substitute* "man/custom-man.xsl"
                           (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
                            (string-append (assoc-ref inputs "docbook-xsl") 
                                           "/xml/xsl/docbook-xsl-"
                                           ,(package-version docbook-xsl)
                                           "/manpages/docbook.xsl")))
                         #;
                         (setenv "XML_CATALOG_FILES" 
                                 (string-append (assoc-ref inputs "docbook-xml") 
                                                "/xml/dtd/docbook/catalog.xml"))
                         #t)))))
      (native-inputs
       `(("intltool" ,intltool)
         ("gettext" ,gnu-gettext)
         ("docbook-xsl" ,docbook-xsl)
         ("xsltproc" ,libxslt)
         ("pkg-config", pkg-config)
         ("autoconf" ,autoconf)
         ("automake" ,automake)
         ("libtool" ,libtool)
         ("gperf" ,gperf)
         ))
      (inputs
       `(("linux-pam" ,linux-pam)
         ("linux-libre-headers" ,linux-libre-headers)
         ("libcap" ,libcap)
         ("dbus" ,dbus)
         ("eudev" ,eudev)
         ))
      (home-page "https://github.com/andywingo/elogind")
      (synopsis "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 lgpl2.1+))))

[-- Attachment #3: Type: text/plain, Size: 26 bytes --]


-- 
http://wingolog.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: elogind WIP
  2015-04-20  8:40 elogind WIP Andy Wingo
@ 2015-04-23 21:08 ` Ludovic Courtès
  2015-04-23 21:11   ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2015-04-23 21:08 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]

Thanks for getting this started!

For the record, I went a bit further building it (patch attached), but
now I think we stuck because some of the XSL files used to produce man
pages are missing in the repo:


[-- Attachment #2: Type: text/x-patch, Size: 4583 bytes --]

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 386f4c5..ecfe7ea 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1,6 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2015 Andy Wingo <wingo@pobox.com>
+;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,12 +20,19 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages freedesktop)
-  #:use-module ((guix licenses) #:select (expat x11))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages gperf)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages docbook)
+  #:use-module (gnu packages glib)                ;intltool
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg))
 
@@ -48,7 +57,7 @@
     (description "The xdg-utils package is a set of simple scripts that
 provide basic desktop integration functions in the framework of the
 freedesktop.org project.")
-    (license expat)))
+    (license license:expat)))
 
 (define-public libinput
   (package
@@ -74,4 +83,67 @@ freedesktop.org project.")
     (description
      "Libinput is a library to handle input devices for display servers and
 other applications that need to directly deal with input devices.")
-    (license x11)))
+    (license license:x11)))
+
+(define-public elogind
+  (let ((commit "b952404"))
+    (package
+      (name "elogind")
+      (version (string-append "219." commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/andywingo/elogind")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "0h54jw7h8csgfcjnyhijpmic5511jj0z5ln03p0b0mx0gvm11lsa"))
+                (modules '((guix build utils)))
+                (snippet
+                 '(begin
+                    (use-modules (guix build utils))
+
+                    ;; Remove reference to nonexistent file.
+                    (substitute* "Makefile.am"
+                      (("shell-completion/zsh/_systemd-inhibit")
+                       "")
+                      (("shell-completion/zsh/_loginctl \\\\")
+                       "shell-completion/zsh/_loginctl"))
+
+                    ;; Rename this PAM configuration file to match what
+                    ;; Makefile.am expects.
+                    (rename-file "src/login/systemd-user"
+                                 "src/login/elogind-user")))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'autogen
+                      (lambda _
+                        (and (zero? (system* "intltoolize" "--force" "--automake"))
+                             (zero? (system* "autoreconf" "-vif"))))))))
+      (native-inputs
+       `(("intltool" ,intltool)
+         ("gettext" ,gnu-gettext)
+         ("docbook-xsl" ,docbook-xsl)
+         ("docbook-xml" ,docbook-xml-4.2)
+         ("xsltproc" ,libxslt)
+         ("libxml2" ,libxml2)                     ;for XML_CATALOG_FILES
+         ("pkg-config", pkg-config)
+         ("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("libtool" ,libtool)
+         ("gperf" ,gperf)))
+      (inputs
+       `(("linux-pam" ,linux-pam)
+         ("linux-libre-headers" ,linux-libre-headers)
+         ("libcap" ,libcap)
+         ("dbus" ,dbus)
+         ("eudev" ,eudev)))
+      (home-page "https://github.com/andywingo/elogind")
+      (synopsis "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+))))

[-- Attachment #3: Type: text/plain, Size: 53 bytes --]


Who’s willing to continue?

Thanks,
Ludo’.

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: elogind WIP
  2015-04-23 21:08 ` Ludovic Courtès
@ 2015-04-23 21:11   ` Ludovic Courtès
  2015-04-24 21:09     ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2015-04-23 21:11 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) skribis:

> For the record, I went a bit further building it (patch attached), but
> now I think we stuck because some of the XSL files used to produce man
> pages are missing in the repo:

And the error is:

--8<---------------cut here---------------start------------->8---
  XSLT     man/loginctl.html
  XSLT     man/logind.conf.html
warning: failed to load external entity "man/user-system-options.xml"
man/loginctl.xml:159: element include: XInclude error : could not load man/user-system-options.xml, and no fallback was found
warning: failed to load external entity "man/user-system-options.xml"
man/loginctl.xml:160: element include: XInclude error : could not load man/user-system-options.xml, and no fallback was found
warning: failed to load external entity "man/standard-options.xml"
man/loginctl.xml:162: element include: XInclude error : could not load man/standard-options.xml, and no fallback was found
warning: failed to load external entity "man/standard-options.xml"
[...]
--8<---------------cut here---------------end--------------->8---

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: elogind WIP
  2015-04-23 21:11   ` Ludovic Courtès
@ 2015-04-24 21:09     ` Ricardo Wurmus
  2015-04-29 20:10       ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2015-04-24 21:09 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Andy Wingo, guix-devel

[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]


Ludovic Courtès writes:

> For the record, I went a bit further building it (patch attached), but
> now I think we stuck because some of the XSL files used to produce man
> pages are missing in the repo:

I restored a few files needed to produce man page, renamed two instances
of "systemd.version", and disabled DTD validation.  There are,
unfortunately, even more XML files that are missing, but they look like
we shouldn't want them to be part of elogind:

--8<---------------cut here---------------start------------->8---
  XSLT     man/sd-login.html
warning: failed to load external entity "man/libsystemd-pkgconfig.xml"
man/sd-login.xml:118: element include: XInclude error : could not load man/libsystemd-pkgconfig.xml, and no fallback was found
Makefile:4988: recipe for target 'man/sd-login.html' failed
make[2]: *** [man/sd-login.html] Error 6
--8<---------------cut here---------------end--------------->8---

What to do with these files?  Should we ignore the man page generation
for now and rewrite the wee bit we need for elogind?  (Or should elogind
stay close to systemd upstream to make it easier to track development?)

Attached is the recipe I've been using.  (I modified it to work with my
clone of Andy's elogind repository which is ahead by two commits.)


[-- Attachment #2: elogind.patch --]
[-- Type: text/x-patch, Size: 4689 bytes --]

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 386f4c5..7e25686 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1,6 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2015 Andy Wingo <wingo@pobox.com>
+;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,12 +20,19 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages freedesktop)
-  #:use-module ((guix licenses) #:select (expat x11))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages gperf)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages docbook)
+  #:use-module (gnu packages glib)                ;intltool
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg))
 
@@ -48,7 +57,7 @@
     (description "The xdg-utils package is a set of simple scripts that
 provide basic desktop integration functions in the framework of the
 freedesktop.org project.")
-    (license expat)))
+    (license license:expat)))
 
 (define-public libinput
   (package
@@ -74,4 +83,70 @@ freedesktop.org project.")
     (description
      "Libinput is a library to handle input devices for display servers and
 other applications that need to directly deal with input devices.")
-    (license x11)))
+    (license license:x11)))
+
+(define-public elogind
+  (let ((commit "c9c0992"))
+    (package
+      (name "elogind")
+      (version (string-append "219." commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "http://git.elephly.net/software/elogind.git")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "0lg8jgp9rl3wf9w2xfip87nx9zpjhm4js7x1z05744xiyfmvawp5"))
+                (modules '((guix build utils)))
+                (snippet
+                 '(begin
+                    (use-modules (guix build utils))
+
+                    ;; Remove reference to nonexistent file.
+                    (substitute* "Makefile.am"
+                      (("shell-completion/zsh/_systemd-inhibit")
+                       "")
+                      (("shell-completion/zsh/_loginctl \\\\")
+                       "shell-completion/zsh/_loginctl")
+                      ;; Avoid validation against DTD because the DTDs for
+                      ;; both doctype 4.2 and 4.5 are needed.
+                      (("XSLTPROC_FLAGS = ") "XSLTPROC_FLAGS = --novalid"))
+
+                    ;; Rename this PAM configuration file to match what
+                    ;; Makefile.am expects.
+                    (rename-file "src/login/systemd-user"
+                                 "src/login/elogind-user")))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'autogen
+                      (lambda _
+                        (and (zero? (system* "intltoolize" "--force" "--automake"))
+                             (zero? (system* "autoreconf" "-vif"))))))))
+      (native-inputs
+       `(("intltool" ,intltool)
+         ("gettext" ,gnu-gettext)
+         ("docbook-xsl" ,docbook-xsl)
+         ("docbook-xml" ,docbook-xml)
+         ("xsltproc" ,libxslt)
+         ("libxml2" ,libxml2)                     ;for XML_CATALOG_FILES
+         ("pkg-config", pkg-config)
+         ("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("libtool" ,libtool)
+         ("gperf" ,gperf)))
+      (inputs
+       `(("linux-pam" ,linux-pam)
+         ("linux-libre-headers" ,linux-libre-headers)
+         ("libcap" ,libcap)
+         ("dbus" ,dbus)
+         ("eudev" ,eudev)))
+      (home-page "https://github.com/andywingo/elogind")
+      (synopsis "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+))))

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: elogind WIP
  2015-04-24 21:09     ` Ricardo Wurmus
@ 2015-04-29 20:10       ` Ludovic Courtès
  2015-04-29 20:19         ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2015-04-29 20:10 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Andy Wingo, guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

> I restored a few files needed to produce man page, renamed two instances
> of "systemd.version", and disabled DTD validation.  There are,
> unfortunately, even more XML files that are missing, but they look like
> we shouldn't want them to be part of elogind:
>
>   XSLT     man/sd-login.html
> warning: failed to load external entity "man/libsystemd-pkgconfig.xml"
> man/sd-login.xml:118: element include: XInclude error : could not load man/libsystemd-pkgconfig.xml, and no fallback was found
> Makefile:4988: recipe for target 'man/sd-login.html' failed
> make[2]: *** [man/sd-login.html] Error 6

sd-login.html sounds like it may have something to do with the logind
part of systemd, no?

> What to do with these files?  Should we ignore the man page generation
> for now and rewrite the wee bit we need for elogind?  (Or should elogind
> stay close to systemd upstream to make it easier to track development?)

I guess we should stay close to upstream.  Nevertheless, we should skip
manual page generation for now if that’s too much of a hindrance, so we
can get started with the more interesting parts.  WDYT?

Thanks for looking into it!

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: elogind WIP
  2015-04-29 20:10       ` Ludovic Courtès
@ 2015-04-29 20:19         ` Ricardo Wurmus
  2015-05-04  6:52           ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2015-04-29 20:19 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Andy Wingo, guix-devel


Ludovic Courtès writes:

> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> I restored a few files needed to produce man page, renamed two instances
>> of "systemd.version", and disabled DTD validation.  There are,
>> unfortunately, even more XML files that are missing, but they look like
>> we shouldn't want them to be part of elogind:
>>
>>   XSLT     man/sd-login.html
>> warning: failed to load external entity "man/libsystemd-pkgconfig.xml"
>> man/sd-login.xml:118: element include: XInclude error : could not load man/libsystemd-pkgconfig.xml, and no fallback was found
>> Makefile:4988: recipe for target 'man/sd-login.html' failed
>> make[2]: *** [man/sd-login.html] Error 6
>
> sd-login.html sounds like it may have something to do with the logind
> part of systemd, no?

It seems that libsystemd has already been renamed to libelogind, so I
went ahead and restored libsystemd-pkgconfig.xml as
libelogind-pkgconfig.xml and changed all references to it.  I will
continue to play with this in the coming days.

>> What to do with these files?  Should we ignore the man page generation
>> for now and rewrite the wee bit we need for elogind?  (Or should elogind
>> stay close to systemd upstream to make it easier to track development?)
>
> I guess we should stay close to upstream.  Nevertheless, we should skip
> manual page generation for now if that’s too much of a hindrance, so we
> can get started with the more interesting parts.  WDYT?

Okay.  I'll play around a little more and report back if man page
generation is taking too much time to get it right.

~~ Ricardo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: elogind WIP
  2015-04-29 20:19         ` Ricardo Wurmus
@ 2015-05-04  6:52           ` Ricardo Wurmus
  2015-05-04 15:07             ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2015-05-04  6:52 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Andy Wingo, guix-devel

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

Attached is a patch for a package definition for elogind.  I committed a
couple of changes to my fork of the elogind repository, that had the
effect of bypassing all build problems.

Actually, that's not quite true.  I disabled PAM support, because I
couldn't get it to work.  The symbol "__start_BUS_ERROR_MAP" cannot be
found at link time.  "BUS_ERROR_MAP" apparently is created manually in
"./src/libelogind/sd-bus/bus-error.h", but this doesn't seem to work
right.

I have not tested any of the binaries, obviously, so I don't know if
this is an actually working elogind daemon.

@Andy:
Feel free to cherry-pick commits from my fork's master branch and
incorporate them into your repository.  My repo is here:

  http://git.elephly.net/software/elogind.git

~~ Ricardo


[-- Attachment #2: 0001-WIP-add-elogind.patch --]
[-- Type: text/x-patch, Size: 4841 bytes --]

From 645e0c19317ac12286b7c37f086318cb98fcb232 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Sun, 26 Apr 2015 15:55:59 +0200
Subject: [PATCH] WIP: add elogind

---
 gnu/packages/freedesktop.scm | 77 ++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 74 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 386f4c5..891bd31 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1,6 +1,9 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2015 Andy Wingo <wingo@pobox.com>
+;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,12 +21,19 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages freedesktop)
-  #:use-module ((guix licenses) #:select (expat x11))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages gperf)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages docbook)
+  #:use-module (gnu packages glib)                ;intltool
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg))
 
@@ -48,7 +58,7 @@
     (description "The xdg-utils package is a set of simple scripts that
 provide basic desktop integration functions in the framework of the
 freedesktop.org project.")
-    (license expat)))
+    (license license:expat)))
 
 (define-public libinput
   (package
@@ -74,4 +84,65 @@ freedesktop.org project.")
     (description
      "Libinput is a library to handle input devices for display servers and
 other applications that need to directly deal with input devices.")
-    (license x11)))
+    (license license:x11)))
+
+(define-public elogind
+  (let ((commit "14405a9"))
+    (package
+      (name "elogind")
+      (version (string-append "219." commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "http://git.elephly.net/software/elogind.git")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "1wz5lxj95qg64x2q5hf4zcb35hpxlw3wfswx6sb2srvsg50y3y72"))
+                (file-name (string-append name "-checkout-" commit))
+                (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"))))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:configure-flags
+         (list
+          ;; pam_elogind fails because of bus-error.c hackery
+          "--disable-pam"
+          (string-append "--with-rootprefix=" (assoc-ref %outputs "out")))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'autogen
+                      (lambda _
+                        (and (zero? (system* "intltoolize" "--force" "--automake"))
+                             (zero? (system* "autoreconf" "-vif"))))))))
+      (native-inputs
+       `(("intltool" ,intltool)
+         ("gettext" ,gnu-gettext)
+         ("docbook-xsl" ,docbook-xsl)
+         ("docbook-xml" ,docbook-xml)
+         ("xsltproc" ,libxslt)
+         ("libxml2" ,libxml2)                     ;for XML_CATALOG_FILES
+         ("pkg-config", pkg-config)
+         ("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("libtool" ,libtool)
+         ("gperf" ,gperf)))
+      (inputs
+       `(("linux-pam" ,linux-pam)
+         ("linux-libre-headers" ,linux-libre-headers)
+         ("libcap" ,libcap)
+         ("dbus" ,dbus)
+         ("eudev" ,eudev)))
+      (home-page "https://github.com/andywingo/elogind")
+      (synopsis "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+))))
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: elogind WIP
  2015-05-04  6:52           ` Ricardo Wurmus
@ 2015-05-04 15:07             ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2015-05-04 15:07 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Andy Wingo, guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

> Attached is a patch for a package definition for elogind.  I committed a
> couple of changes to my fork of the elogind repository, that had the
> effect of bypassing all build problems.
>
> Actually, that's not quite true.  I disabled PAM support, because I
> couldn't get it to work.  The symbol "__start_BUS_ERROR_MAP" cannot be
> found at link time.  "BUS_ERROR_MAP" apparently is created manually in
> "./src/libelogind/sd-bus/bus-error.h", but this doesn't seem to work
> right.
>
> I have not tested any of the binaries, obviously, so I don't know if
> this is an actually working elogind daemon.

OK.  This seems like a good step forward.

> From 645e0c19317ac12286b7c37f086318cb98fcb232 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Sun, 26 Apr 2015 15:55:59 +0200
> Subject: [PATCH] WIP: add elogind
>
> ---
>  gnu/packages/freedesktop.scm | 77 ++++++++++++++++++++++++++++++++++++++++++--

Feel free to commit it (with a proper commit log.)

Then Someone™ should write a service for it and see what this allows us
to run on the GNOME side.  Any takers?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-05-04 15:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-20  8:40 elogind WIP Andy Wingo
2015-04-23 21:08 ` Ludovic Courtès
2015-04-23 21:11   ` Ludovic Courtès
2015-04-24 21:09     ` Ricardo Wurmus
2015-04-29 20:10       ` Ludovic Courtès
2015-04-29 20:19         ` Ricardo Wurmus
2015-05-04  6:52           ` Ricardo Wurmus
2015-05-04 15:07             ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).