unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add systemd.
@ 2018-04-01 12:22 Marius Bakke
  2018-04-01 12:49 ` Ludovic Courtès
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Marius Bakke @ 2018-04-01 12:22 UTC (permalink / raw)
  To: guix-devel; +Cc: Marius Bakke

Guix,

As discussed at FOSDEM, it is clear that The Shepherd does not have what
it takes to boot a modern Linux system.  While it works today, adding
bootloader, DNS server, NTP client, syslog, udev, seat management,
dishwasher, hardware database, network management and other essential
PID 1 features is going to take too much effort and duplicate work.

Meanwhile, GuixSD keeps drifting away from other distributions.  This
patch is the first of many in order to gain feature parity with the
modern GNU/Linux world.  2018 is surely the year of the GuixSD desktop!

Note: It requires the patch from <https://bugs.gnu.org/31014>.

* gnu/packages/systemd.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register it.
---
 gnu/local.mk             |   1 +
 gnu/packages/systemd.scm | 251 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 252 insertions(+)
 create mode 100644 gnu/packages/systemd.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 2705fb37a..dbefd8cca 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -402,6 +402,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/statistics.scm			\
   %D%/packages/storage.scm			\
   %D%/packages/suckless.scm			\
+  %D%/packages/systemd.scm			\
   %D%/packages/swig.scm				\
   %D%/packages/sync.scm			\
   %D%/packages/syncthing.scm			\
diff --git a/gnu/packages/systemd.scm b/gnu/packages/systemd.scm
new file mode 100644
index 000000000..e90ed65cc
--- /dev/null
+++ b/gnu/packages/systemd.scm
@@ -0,0 +1,251 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.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 systemd)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system meson)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages acl)
+  #:use-module (gnu packages admin)
+  #:use-module (gnu packages aidc)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages docbook)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnunet)
+  #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages gperf)
+  #:use-module (gnu packages libidn)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages m4)
+  #:use-module (gnu packages package-management)
+  #:use-module (gnu packages pcre)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages xml))
+
+(define-public systemd
+  (package
+    (name "systemd")
+    (version "238")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/systemd/systemd/archive/v"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "08p0wf6qby2hksa890hbybdfr274chjb3ykdi1rl4g1fmfdmkj5v"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:tests? #f             ;FIXME: The disable-broken-tests phase is ineffective.
+       #:configure-flags
+       (let ((bash            (assoc-ref %build-inputs "bash"))
+             (coreutils       (assoc-ref %build-inputs "coreutils"))
+             (kbd             (assoc-ref %build-inputs "kbd"))
+             (kmod            (assoc-ref %build-inputs "kmod"))
+             (util-linux      (assoc-ref %build-inputs "util-linux"))
+
+             (out (assoc-ref %outputs "out")))
+         (list (string-append "-Dkill-path=" coreutils "/bin/kill")
+               (string-append "-Dkmod-path=" kmod "/bin/kmod")
+               (string-append "-Dsulogin-path=" util-linux "/bin/sulogin")
+               (string-append "-Dmount-path=" util-linux "/bin/mount")
+               (string-append "-Dumount-path=" util-linux "/bin/umount")
+               (string-append "-Dloadkeys-path=" kbd "/bin/loadkeys")
+               (string-append "-Dsetfont-path=" kbd "/bin/setfont")
+               (string-append "-Ddebug-shell=" bash "/bin/sh")
+
+               ;; XXX: Can we reuse %ntp-servers here?
+               (string-append "-Dntp-servers="
+                              (string-join (map (lambda (n)
+                                                  (string-append (number->string n)
+                                                                 ".guix.pool.ntp.org"))
+                                                '(0 1 2 3))
+                                           ","))
+
+               ;; Use localhost for DNS with fallback to Quad9 (instead of Google).
+               "-Ddns-servers=127.0.0.1,::1,9.9.9.10,2620:fe::10"
+
+               ;; FIXME: "Attempt to load external entity http://docbook.sf.net".
+               "-Dman=false"
+
+               ;; Don't install SysV compatibility scripts.
+               "-Dsysvinit-path="
+               "-Dsysvrcnd-path="
+
+               (string-append "-Dbashcompletiondir=" out "/etc/bash_completion.d")
+               (string-append "-Dsysconfdir=" out "/etc")
+               (string-append "-Drootprefix=" out)
+               (string-append "-Drootlibdir=" out "/lib")
+               (string-append "-Ddbuspolicydir=" out "/etc/dbus-1/system.d")
+               (string-append "-Dpamconfdir=" out "/etc/pam.d")))
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-paths
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let ((bash            (assoc-ref inputs "bash"))
+                            (coreutils       (assoc-ref inputs "coreutils"))
+                            (glibc           (assoc-ref inputs "glibc"))
+                            (util-linux      (assoc-ref inputs "util-linux"))
+
+                            (out (assoc-ref outputs "out")))
+
+                        (substitute* '("src/core/swap.c"
+                                       "src/fsck/fsck.c"
+                                       "src/journal/cat.c"
+                                       "src/nspawn/nspawn.c"
+                                       "src/nspawn/nspawn-setuid.c")
+                          (("/bin/sh") (string-append bash "/bin/sh"))
+                          (("/bin/bash") (string-append bash "/bin/bash"))
+                          (("/bin/cat") (string-append coreutils "/bin/cat"))
+                          (("/bin/echo") (string-append coreutils "/bin/echo"))
+                          (("/bin/getent") (string-append glibc "/bin/getent"))
+                          (("/sbin/fsck") (string-append util-linux "/sbin/fsck"))
+                          (("/sbin/swapon") (string-append util-linux "/sbin/swapon"))
+                          (("/sbin/swapoff") (string-append util-linux "/sbin/swapoff")))
+                        (substitute* "src/journal/catalog.c"
+                          (("/usr/lib/systemd/catalog")
+                           (string-append out "/lib/systemd/catalog")))
+                        #t)))
+                  (add-after 'patch-paths 'fix-install
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        ;; Don't create /var/lib/systemd during install.
+                        (substitute* "meson.build"
+                          ((".*mkdir_p\\.format\\(systemdstatedir\\)\\)") ""))
+                        ;; Nor /var/lib/systemd/catalog.
+                        (substitute* "catalog/meson.build"
+                          (("journalctl --update-catalog") "journalctl --version"))
+                        ;; Likewise for /var/log/journal.
+                        (substitute* '("src/journal/meson.build"
+                                       "src/journal-remote/meson.build")
+                          (("/var/log/journal") "/tmp/journal"))
+                        ;; Create the hwdb in out/etc/udev/hwdb.d, not /etc/udev.
+                        (substitute* "hwdb/meson.build"
+                          (("systemd-hwdb update")
+                           (string-append "systemd-hwdb -r " out
+                                          "/etc/udev/hwdb.d update")))
+                        #t)))
+                  (add-before 'configure 'set-runpath
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        ;; We need out/lib and out/lib/systemd in RUNPATH.
+                        (setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib,"
+                                                         "-rpath=" out "/lib/systemd"))
+                        #t)))
+                  (add-before 'check 'disable-broken-tests
+                    (lambda _
+                      (delete-file "test-network")           ;requires loopback
+                      (delete-file "test-engine")            ;requires cgroups
+                      (delete-file "test-unit-name")         ;likewise
+                      (delete-file "test-unit-file")         ;likewise
+                      (delete-file "test-copy")              ;FIXME
+                      (delete-file "test-condition")         ;requires containers
+                      (delete-file "test-mount-util")        ;requires /sys
+                      (delete-file "test-exec-util")         ;FIXME
+                      (delete-file "test-xattr-util")        ;FIXME
+                      (delete-file "test-fs-util")           ;requires /var/tmp
+                      (delete-file "test-stat-util")         ;FIXME
+                      (delete-file "test-user-util")         ;needs "root" user
+                      (delete-file "test-path-lookup")       ;expects systemd paths
+                      (delete-file "test-namespace")         ;requires containers
+                      (delete-file "test-bpf")               ;requires cgroups
+                      (delete-file "test-fileio")            ;FIXME
+                      (delete-file "test-time-util")         ;FIXME tzdata
+                      (delete-file "test-date")              ;likewise
+                      (delete-file "test-calendarspec")      ;likewise
+                      (delete-file "test-cgroup-util")       ;requires cgroup (duh)
+                      (delete-file "test-strv")              ;FIXME
+                      (delete-file "test-path-util")         ;FIXME /bin/sh
+                      (delete-file "test-path")              ;requires cgroup
+                      (delete-file "test-sched-prio")        ;requires cgroup
+                      (delete-file "test-id128")             ;FIXME
+                      (delete-file "test-journal-flush")     ;FIXME
+                      (delete-file "test-bus-creds")         ;requires cgroup
+                      (delete-file "test-login")             ;FIXME
+                      (delete-file "test-dhcp-client")       ;requires network
+                      (delete-file "test-dhcp6-client")      ;likewise
+                      #t))
+                  (add-after 'install 'fix-environment-symlink
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      ;; The install phase creates this dangling symlink:
+                      ;; lib/environment.d/00-environment.conf -> ../../etc/environment
+                      ;; ...which causes the 'fix-runpath' phase to error out.
+                      ;; XXX: This should probably use /etc/environment instead.
+                      (mkdir-p (string-append (assoc-ref outputs "out")
+                                              "/etc/environment"))
+                      #t)))))
+    (native-inputs
+     `(("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("gperf" ,gperf)
+       ("lxml" ,python-lxml)
+       ("m4" ,m4)
+       ("pkg-config" ,pkg-config)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("acl" ,acl)
+       ("audit" ,audit)
+       ("bash" ,bash)
+       ("bzip2" ,bzip2)
+       ("coreutils" ,coreutils)
+       ("cryptsetup" ,cryptsetup)
+       ("curl" ,curl)
+       ("dbus" ,dbus)
+       ;; TODO: Add gnu-efi for bootloader functionality.
+       ("elfutils" ,elfutils)
+       ("glib" ,glib)
+       ("glibc" ,glibc)
+       ("gnutls" ,gnutls)
+       ("kbd" ,kbd)
+       ("kmod" ,kmod)
+       ("libcap" ,libcap)
+       ("libgcrypt" ,libgcrypt)
+       ("libidn2" ,libidn2)
+       ("libmicrohttpd" ,libmicrohttpd)
+       ("libseccomp" ,libseccomp)
+       ("libxkbcommon" ,libxkbcommon)
+       ("linux-pam" ,linux-pam)
+       ("lz4" ,lz4)
+       ("pcre2" ,pcre2)
+       ("python" ,python)
+       ("qrencode" ,qrencode)
+       ("util-linux" ,util-linux)
+       ("xz" ,xz)
+       ("zlib" ,zlib)))
+    (home-page "https://www.freedesktop.org/wiki/Software/systemd/")
+    (synopsis "System and service manager")
+    (description
+     "@code{systemd} is a suite of basic building blocks for a Linux system.
+It provides a system and service manager that runs as PID 1 and starts the
+rest of the system.  systemd provides aggressive parallelization capabilities,
+uses socket and D-Bus activation for starting services, offers on-demand
+starting of daemons, keeps track of processes using Linux control groups,
+maintains mount and automount points, and implements an elaborate transactional
+dependency-based service control logic.")
+    (license license:lgpl2.1+)))
+
-- 
2.16.3

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 12:22 [PATCH] gnu: Add systemd Marius Bakke
@ 2018-04-01 12:49 ` Ludovic Courtès
  2018-04-01 17:01   ` Mark H Weaver
  2018-04-01 20:07   ` Chris Marusich
  2018-04-01 12:52 ` Nils Gillmann
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 18+ messages in thread
From: Ludovic Courtès @ 2018-04-01 12:49 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

Hello Marius,

Marius Bakke <mbakke@fastmail.com> skribis:

> As discussed at FOSDEM, it is clear that The Shepherd does not have what
> it takes to boot a modern Linux system.  While it works today, adding
> bootloader, DNS server, NTP client, syslog, udev, seat management,
> dishwasher, hardware database, network management and other essential
> PID 1 features is going to take too much effort and duplicate work.

To be honest, while the Shepherd has been a fun hack, I’ve been more and
more feeling that yeah, it wouldn’t cut it in the long term (it’s also
become clearer Scheme as convenient as C when it comes to systems
programming and things like dealing with dependency graphs.)

Thanks a lot for taking this step!

> Meanwhile, GuixSD keeps drifting away from other distributions.  This
> patch is the first of many in order to gain feature parity with the
> modern GNU/Linux world.  2018 is surely the year of the GuixSD desktop!

I hope so!  Note that we’ll have to think about actual integration in
GuixSD.  I suppose we could change services to generate unit files?

> +                  (add-before 'check 'disable-broken-tests
> +                    (lambda _
> +                      (delete-file "test-network")           ;requires loopback
> +                      (delete-file "test-engine")            ;requires cgroups
> +                      (delete-file "test-unit-name")         ;likewise
> +                      (delete-file "test-unit-file")         ;likewise
> +                      (delete-file "test-copy")              ;FIXME
> +                      (delete-file "test-condition")         ;requires containers
> +                      (delete-file "test-mount-util")        ;requires /sys
> +                      (delete-file "test-exec-util")         ;FIXME
> +                      (delete-file "test-xattr-util")        ;FIXME
> +                      (delete-file "test-fs-util")           ;requires /var/tmp
> +                      (delete-file "test-stat-util")         ;FIXME
> +                      (delete-file "test-user-util")         ;needs "root" user
> +                      (delete-file "test-path-lookup")       ;expects systemd paths
> +                      (delete-file "test-namespace")         ;requires containers
> +                      (delete-file "test-bpf")               ;requires cgroups
> +                      (delete-file "test-fileio")            ;FIXME
> +                      (delete-file "test-time-util")         ;FIXME tzdata
> +                      (delete-file "test-date")              ;likewise
> +                      (delete-file "test-calendarspec")      ;likewise
> +                      (delete-file "test-cgroup-util")       ;requires cgroup (duh)
> +                      (delete-file "test-strv")              ;FIXME
> +                      (delete-file "test-path-util")         ;FIXME /bin/sh
> +                      (delete-file "test-path")              ;requires cgroup
> +                      (delete-file "test-sched-prio")        ;requires cgroup
> +                      (delete-file "test-id128")             ;FIXME
> +                      (delete-file "test-journal-flush")     ;FIXME
> +                      (delete-file "test-bus-creds")         ;requires cgroup
> +                      (delete-file "test-login")             ;FIXME
> +                      (delete-file "test-dhcp-client")       ;requires network
> +                      (delete-file "test-dhcp6-client")      ;likewise

I wonder if we should be concerned about these test failures.

> +    (inputs
> +     `(("acl" ,acl)
> +       ("audit" ,audit)
> +       ("bash" ,bash)
> +       ("bzip2" ,bzip2)
> +       ("coreutils" ,coreutils)
> +       ("cryptsetup" ,cryptsetup)
> +       ("curl" ,curl)
> +       ("dbus" ,dbus)
> +       ;; TODO: Add gnu-efi for bootloader functionality.
> +       ("elfutils" ,elfutils)
> +       ("glib" ,glib)
> +       ("glibc" ,glibc)
> +       ("gnutls" ,gnutls)
> +       ("kbd" ,kbd)
> +       ("kmod" ,kmod)
> +       ("libcap" ,libcap)
> +       ("libgcrypt" ,libgcrypt)
> +       ("libidn2" ,libidn2)
> +       ("libmicrohttpd" ,libmicrohttpd)
> +       ("libseccomp" ,libseccomp)
> +       ("libxkbcommon" ,libxkbcommon)
> +       ("linux-pam" ,linux-pam)
> +       ("lz4" ,lz4)
> +       ("pcre2" ,pcre2)
> +       ("python" ,python)
> +       ("qrencode" ,qrencode)
> +       ("util-linux" ,util-linux)
> +       ("xz" ,xz)
> +       ("zlib" ,zlib)))

There seem to be relatively few dependencies here.  Aren’t we missing
important features?

Also, did you make sure that the built-in HTTP server listens to 0.0.0.0
by default?  That makes remote administration much more convenient.

Thank you!

Ludo’.

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 12:22 [PATCH] gnu: Add systemd Marius Bakke
  2018-04-01 12:49 ` Ludovic Courtès
@ 2018-04-01 12:52 ` Nils Gillmann
  2018-04-01 13:03 ` Martin Castillo
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Nils Gillmann @ 2018-04-01 12:52 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

This is one hell of a write-up for an april-fools..

Does it build though?

Marius Bakke transcribed 14K bytes:
> Guix,
> 
> As discussed at FOSDEM, it is clear that The Shepherd does not have what
> it takes to boot a modern Linux system.  While it works today, adding
> bootloader, DNS server, NTP client, syslog, udev, seat management,
> dishwasher, hardware database, network management and other essential
> PID 1 features is going to take too much effort and duplicate work.
> 
> Meanwhile, GuixSD keeps drifting away from other distributions.  This
> patch is the first of many in order to gain feature parity with the
> modern GNU/Linux world.  2018 is surely the year of the GuixSD desktop!
> 
> Note: It requires the patch from <https://bugs.gnu.org/31014>.
> 
> * gnu/packages/systemd.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Register it.
> ---
>  gnu/local.mk             |   1 +
>  gnu/packages/systemd.scm | 251 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 252 insertions(+)
>  create mode 100644 gnu/packages/systemd.scm
> 
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 2705fb37a..dbefd8cca 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -402,6 +402,7 @@ GNU_SYSTEM_MODULES =				\
>    %D%/packages/statistics.scm			\
>    %D%/packages/storage.scm			\
>    %D%/packages/suckless.scm			\
> +  %D%/packages/systemd.scm			\
>    %D%/packages/swig.scm				\
>    %D%/packages/sync.scm			\
>    %D%/packages/syncthing.scm			\
> diff --git a/gnu/packages/systemd.scm b/gnu/packages/systemd.scm
> new file mode 100644
> index 000000000..e90ed65cc
> --- /dev/null
> +++ b/gnu/packages/systemd.scm
> @@ -0,0 +1,251 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.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 systemd)
> +  #:use-module (guix packages)
> +  #:use-module (guix download)
> +  #:use-module (guix build-system meson)
> +  #:use-module ((guix licenses) #:prefix license:)
> +  #:use-module (gnu packages acl)
> +  #:use-module (gnu packages admin)
> +  #:use-module (gnu packages aidc)
> +  #:use-module (gnu packages base)
> +  #:use-module (gnu packages bash)
> +  #:use-module (gnu packages compression)
> +  #:use-module (gnu packages cryptsetup)
> +  #:use-module (gnu packages curl)
> +  #:use-module (gnu packages docbook)
> +  #:use-module (gnu packages elf)
> +  #:use-module (gnu packages gettext)
> +  #:use-module (gnu packages glib)
> +  #:use-module (gnu packages gnunet)
> +  #:use-module (gnu packages gnupg)
> +  #:use-module (gnu packages gperf)
> +  #:use-module (gnu packages libidn)
> +  #:use-module (gnu packages linux)
> +  #:use-module (gnu packages m4)
> +  #:use-module (gnu packages package-management)
> +  #:use-module (gnu packages pcre)
> +  #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages python)
> +  #:use-module (gnu packages tls)
> +  #:use-module (gnu packages xdisorg)
> +  #:use-module (gnu packages xml))
> +
> +(define-public systemd
> +  (package
> +    (name "systemd")
> +    (version "238")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/systemd/systemd/archive/v"
> +                                  version ".tar.gz"))
> +              (file-name (string-append name "-" version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "08p0wf6qby2hksa890hbybdfr274chjb3ykdi1rl4g1fmfdmkj5v"))))
> +    (build-system meson-build-system)
> +    (arguments
> +     `(#:tests? #f             ;FIXME: The disable-broken-tests phase is ineffective.
> +       #:configure-flags
> +       (let ((bash            (assoc-ref %build-inputs "bash"))
> +             (coreutils       (assoc-ref %build-inputs "coreutils"))
> +             (kbd             (assoc-ref %build-inputs "kbd"))
> +             (kmod            (assoc-ref %build-inputs "kmod"))
> +             (util-linux      (assoc-ref %build-inputs "util-linux"))
> +
> +             (out (assoc-ref %outputs "out")))
> +         (list (string-append "-Dkill-path=" coreutils "/bin/kill")
> +               (string-append "-Dkmod-path=" kmod "/bin/kmod")
> +               (string-append "-Dsulogin-path=" util-linux "/bin/sulogin")
> +               (string-append "-Dmount-path=" util-linux "/bin/mount")
> +               (string-append "-Dumount-path=" util-linux "/bin/umount")
> +               (string-append "-Dloadkeys-path=" kbd "/bin/loadkeys")
> +               (string-append "-Dsetfont-path=" kbd "/bin/setfont")
> +               (string-append "-Ddebug-shell=" bash "/bin/sh")
> +
> +               ;; XXX: Can we reuse %ntp-servers here?
> +               (string-append "-Dntp-servers="
> +                              (string-join (map (lambda (n)
> +                                                  (string-append (number->string n)
> +                                                                 ".guix.pool.ntp.org"))
> +                                                '(0 1 2 3))
> +                                           ","))
> +
> +               ;; Use localhost for DNS with fallback to Quad9 (instead of Google).
> +               "-Ddns-servers=127.0.0.1,::1,9.9.9.10,2620:fe::10"
> +
> +               ;; FIXME: "Attempt to load external entity http://docbook.sf.net".
> +               "-Dman=false"
> +
> +               ;; Don't install SysV compatibility scripts.
> +               "-Dsysvinit-path="
> +               "-Dsysvrcnd-path="
> +
> +               (string-append "-Dbashcompletiondir=" out "/etc/bash_completion.d")
> +               (string-append "-Dsysconfdir=" out "/etc")
> +               (string-append "-Drootprefix=" out)
> +               (string-append "-Drootlibdir=" out "/lib")
> +               (string-append "-Ddbuspolicydir=" out "/etc/dbus-1/system.d")
> +               (string-append "-Dpamconfdir=" out "/etc/pam.d")))
> +       #:phases (modify-phases %standard-phases
> +                  (add-after 'unpack 'patch-paths
> +                    (lambda* (#:key inputs outputs #:allow-other-keys)
> +                      (let ((bash            (assoc-ref inputs "bash"))
> +                            (coreutils       (assoc-ref inputs "coreutils"))
> +                            (glibc           (assoc-ref inputs "glibc"))
> +                            (util-linux      (assoc-ref inputs "util-linux"))
> +
> +                            (out (assoc-ref outputs "out")))
> +
> +                        (substitute* '("src/core/swap.c"
> +                                       "src/fsck/fsck.c"
> +                                       "src/journal/cat.c"
> +                                       "src/nspawn/nspawn.c"
> +                                       "src/nspawn/nspawn-setuid.c")
> +                          (("/bin/sh") (string-append bash "/bin/sh"))
> +                          (("/bin/bash") (string-append bash "/bin/bash"))
> +                          (("/bin/cat") (string-append coreutils "/bin/cat"))
> +                          (("/bin/echo") (string-append coreutils "/bin/echo"))
> +                          (("/bin/getent") (string-append glibc "/bin/getent"))
> +                          (("/sbin/fsck") (string-append util-linux "/sbin/fsck"))
> +                          (("/sbin/swapon") (string-append util-linux "/sbin/swapon"))
> +                          (("/sbin/swapoff") (string-append util-linux "/sbin/swapoff")))
> +                        (substitute* "src/journal/catalog.c"
> +                          (("/usr/lib/systemd/catalog")
> +                           (string-append out "/lib/systemd/catalog")))
> +                        #t)))
> +                  (add-after 'patch-paths 'fix-install
> +                    (lambda* (#:key outputs #:allow-other-keys)
> +                      (let ((out (assoc-ref outputs "out")))
> +                        ;; Don't create /var/lib/systemd during install.
> +                        (substitute* "meson.build"
> +                          ((".*mkdir_p\\.format\\(systemdstatedir\\)\\)") ""))
> +                        ;; Nor /var/lib/systemd/catalog.
> +                        (substitute* "catalog/meson.build"
> +                          (("journalctl --update-catalog") "journalctl --version"))
> +                        ;; Likewise for /var/log/journal.
> +                        (substitute* '("src/journal/meson.build"
> +                                       "src/journal-remote/meson.build")
> +                          (("/var/log/journal") "/tmp/journal"))
> +                        ;; Create the hwdb in out/etc/udev/hwdb.d, not /etc/udev.
> +                        (substitute* "hwdb/meson.build"
> +                          (("systemd-hwdb update")
> +                           (string-append "systemd-hwdb -r " out
> +                                          "/etc/udev/hwdb.d update")))
> +                        #t)))
> +                  (add-before 'configure 'set-runpath
> +                    (lambda* (#:key outputs #:allow-other-keys)
> +                      (let ((out (assoc-ref outputs "out")))
> +                        ;; We need out/lib and out/lib/systemd in RUNPATH.
> +                        (setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib,"
> +                                                         "-rpath=" out "/lib/systemd"))
> +                        #t)))
> +                  (add-before 'check 'disable-broken-tests
> +                    (lambda _
> +                      (delete-file "test-network")           ;requires loopback
> +                      (delete-file "test-engine")            ;requires cgroups
> +                      (delete-file "test-unit-name")         ;likewise
> +                      (delete-file "test-unit-file")         ;likewise
> +                      (delete-file "test-copy")              ;FIXME
> +                      (delete-file "test-condition")         ;requires containers
> +                      (delete-file "test-mount-util")        ;requires /sys
> +                      (delete-file "test-exec-util")         ;FIXME
> +                      (delete-file "test-xattr-util")        ;FIXME
> +                      (delete-file "test-fs-util")           ;requires /var/tmp
> +                      (delete-file "test-stat-util")         ;FIXME
> +                      (delete-file "test-user-util")         ;needs "root" user
> +                      (delete-file "test-path-lookup")       ;expects systemd paths
> +                      (delete-file "test-namespace")         ;requires containers
> +                      (delete-file "test-bpf")               ;requires cgroups
> +                      (delete-file "test-fileio")            ;FIXME
> +                      (delete-file "test-time-util")         ;FIXME tzdata
> +                      (delete-file "test-date")              ;likewise
> +                      (delete-file "test-calendarspec")      ;likewise
> +                      (delete-file "test-cgroup-util")       ;requires cgroup (duh)
> +                      (delete-file "test-strv")              ;FIXME
> +                      (delete-file "test-path-util")         ;FIXME /bin/sh
> +                      (delete-file "test-path")              ;requires cgroup
> +                      (delete-file "test-sched-prio")        ;requires cgroup
> +                      (delete-file "test-id128")             ;FIXME
> +                      (delete-file "test-journal-flush")     ;FIXME
> +                      (delete-file "test-bus-creds")         ;requires cgroup
> +                      (delete-file "test-login")             ;FIXME
> +                      (delete-file "test-dhcp-client")       ;requires network
> +                      (delete-file "test-dhcp6-client")      ;likewise
> +                      #t))
> +                  (add-after 'install 'fix-environment-symlink
> +                    (lambda* (#:key outputs #:allow-other-keys)
> +                      ;; The install phase creates this dangling symlink:
> +                      ;; lib/environment.d/00-environment.conf -> ../../etc/environment
> +                      ;; ...which causes the 'fix-runpath' phase to error out.
> +                      ;; XXX: This should probably use /etc/environment instead.
> +                      (mkdir-p (string-append (assoc-ref outputs "out")
> +                                              "/etc/environment"))
> +                      #t)))))
> +    (native-inputs
> +     `(("docbook-xml" ,docbook-xml)
> +       ("docbook-xsl" ,docbook-xsl)
> +       ("gettext" ,gettext-minimal)
> +       ("gperf" ,gperf)
> +       ("lxml" ,python-lxml)
> +       ("m4" ,m4)
> +       ("pkg-config" ,pkg-config)
> +       ("xsltproc" ,libxslt)))
> +    (inputs
> +     `(("acl" ,acl)
> +       ("audit" ,audit)
> +       ("bash" ,bash)
> +       ("bzip2" ,bzip2)
> +       ("coreutils" ,coreutils)
> +       ("cryptsetup" ,cryptsetup)
> +       ("curl" ,curl)
> +       ("dbus" ,dbus)
> +       ;; TODO: Add gnu-efi for bootloader functionality.
> +       ("elfutils" ,elfutils)
> +       ("glib" ,glib)
> +       ("glibc" ,glibc)
> +       ("gnutls" ,gnutls)
> +       ("kbd" ,kbd)
> +       ("kmod" ,kmod)
> +       ("libcap" ,libcap)
> +       ("libgcrypt" ,libgcrypt)
> +       ("libidn2" ,libidn2)
> +       ("libmicrohttpd" ,libmicrohttpd)
> +       ("libseccomp" ,libseccomp)
> +       ("libxkbcommon" ,libxkbcommon)
> +       ("linux-pam" ,linux-pam)
> +       ("lz4" ,lz4)
> +       ("pcre2" ,pcre2)
> +       ("python" ,python)
> +       ("qrencode" ,qrencode)
> +       ("util-linux" ,util-linux)
> +       ("xz" ,xz)
> +       ("zlib" ,zlib)))
> +    (home-page "https://www.freedesktop.org/wiki/Software/systemd/")
> +    (synopsis "System and service manager")
> +    (description
> +     "@code{systemd} is a suite of basic building blocks for a Linux system.
> +It provides a system and service manager that runs as PID 1 and starts the
> +rest of the system.  systemd provides aggressive parallelization capabilities,
> +uses socket and D-Bus activation for starting services, offers on-demand
> +starting of daemons, keeps track of processes using Linux control groups,
> +maintains mount and automount points, and implements an elaborate transactional
> +dependency-based service control logic.")
> +    (license license:lgpl2.1+)))
> +
> -- 
> 2.16.3
> 
> 

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 12:22 [PATCH] gnu: Add systemd Marius Bakke
  2018-04-01 12:49 ` Ludovic Courtès
  2018-04-01 12:52 ` Nils Gillmann
@ 2018-04-01 13:03 ` Martin Castillo
  2018-04-01 14:04 ` Efraim Flashner
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Martin Castillo @ 2018-04-01 13:03 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 414 bytes --]

Hi,

On 01.04.2018 14:22, Marius Bakke wrote:
> While it works today, adding
> bootloader, DNS server, NTP client, syslog, udev, seat management,
> dishwasher, hardware database, network management and other essential
> PID 1 features is going to take too much effort and duplicate work.

Are those essential _PID 1_ features?

Is it possible to have the init system in GuixSD configurable?

Martin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 12:22 [PATCH] gnu: Add systemd Marius Bakke
                   ` (2 preceding siblings ...)
  2018-04-01 13:03 ` Martin Castillo
@ 2018-04-01 14:04 ` Efraim Flashner
  2018-04-01 14:19   ` Nils Gillmann
  2018-04-01 20:11   ` Marius Bakke
  2018-04-01 14:23 ` Jan Nieuwenhuizen
  2018-04-01 21:55 ` Björn Höfling
  5 siblings, 2 replies; 18+ messages in thread
From: Efraim Flashner @ 2018-04-01 14:04 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

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

On Sun, Apr 01, 2018 at 02:22:59PM +0200, Marius Bakke wrote:
> Guix,
> 
> As discussed at FOSDEM, it is clear that The Shepherd does not have what
> it takes to boot a modern Linux system.  While it works today, adding
> bootloader, DNS server, NTP client, syslog, udev, seat management,
> dishwasher, hardware database, network management and other essential
> PID 1 features is going to take too much effort and duplicate work.
> 
> Meanwhile, GuixSD keeps drifting away from other distributions.  This
> patch is the first of many in order to gain feature parity with the
> modern GNU/Linux world.  2018 is surely the year of the GuixSD desktop!

This also allows us to save time with all of these services and allow us
to focus on adding new features that we need.

> 
> Note: It requires the patch from <https://bugs.gnu.org/31014>.
> 
> * gnu/packages/systemd.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Register it.
> ---
>  gnu/local.mk             |   1 +
>  gnu/packages/systemd.scm | 251 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 252 insertions(+)
>  create mode 100644 gnu/packages/systemd.scm
> 
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 2705fb37a..dbefd8cca 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -402,6 +402,7 @@ GNU_SYSTEM_MODULES =				\
>    %D%/packages/statistics.scm			\
>    %D%/packages/storage.scm			\
>    %D%/packages/suckless.scm			\
> +  %D%/packages/systemd.scm			\
>    %D%/packages/swig.scm				\
>    %D%/packages/sync.scm			\
>    %D%/packages/syncthing.scm			\
> diff --git a/gnu/packages/systemd.scm b/gnu/packages/systemd.scm
> new file mode 100644
> index 000000000..e90ed65cc
> --- /dev/null
> +++ b/gnu/packages/systemd.scm
> @@ -0,0 +1,251 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.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 systemd)
> +  #:use-module (guix packages)
> +  #:use-module (guix download)
> +  #:use-module (guix build-system meson)
> +  #:use-module ((guix licenses) #:prefix license:)
> +  #:use-module (gnu packages acl)
> +  #:use-module (gnu packages admin)
> +  #:use-module (gnu packages aidc)
> +  #:use-module (gnu packages base)
> +  #:use-module (gnu packages bash)
> +  #:use-module (gnu packages compression)
> +  #:use-module (gnu packages cryptsetup)
> +  #:use-module (gnu packages curl)
> +  #:use-module (gnu packages docbook)
> +  #:use-module (gnu packages elf)
> +  #:use-module (gnu packages gettext)
> +  #:use-module (gnu packages glib)
> +  #:use-module (gnu packages gnunet)
> +  #:use-module (gnu packages gnupg)
> +  #:use-module (gnu packages gperf)
> +  #:use-module (gnu packages libidn)
> +  #:use-module (gnu packages linux)
> +  #:use-module (gnu packages m4)
> +  #:use-module (gnu packages package-management)
> +  #:use-module (gnu packages pcre)
> +  #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages python)
> +  #:use-module (gnu packages tls)
> +  #:use-module (gnu packages xdisorg)
> +  #:use-module (gnu packages xml))
> +
> +(define-public systemd
> +  (package
> +    (name "systemd")
> +    (version "238")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/systemd/systemd/archive/v"
> +                                  version ".tar.gz"))
> +              (file-name (string-append name "-" version ".tar.gz"))

This should be a git-checkout, as per bug FILL-IN, with the changing
github tarballs.

> +              (sha256
> +               (base32
> +                "08p0wf6qby2hksa890hbybdfr274chjb3ykdi1rl4g1fmfdmkj5v"))))
> +    (build-system meson-build-system)
> +    (arguments
> +     `(#:tests? #f             ;FIXME: The disable-broken-tests phase is ineffective.
> +       #:configure-flags
> +       (let ((bash            (assoc-ref %build-inputs "bash"))
> +             (coreutils       (assoc-ref %build-inputs "coreutils"))
> +             (kbd             (assoc-ref %build-inputs "kbd"))
> +             (kmod            (assoc-ref %build-inputs "kmod"))
> +             (util-linux      (assoc-ref %build-inputs "util-linux"))
> +
> +             (out (assoc-ref %outputs "out")))
> +         (list (string-append "-Dkill-path=" coreutils "/bin/kill")
> +               (string-append "-Dkmod-path=" kmod "/bin/kmod")
> +               (string-append "-Dsulogin-path=" util-linux "/bin/sulogin")
> +               (string-append "-Dmount-path=" util-linux "/bin/mount")
> +               (string-append "-Dumount-path=" util-linux "/bin/umount")
> +               (string-append "-Dloadkeys-path=" kbd "/bin/loadkeys")
> +               (string-append "-Dsetfont-path=" kbd "/bin/setfont")
> +               (string-append "-Ddebug-shell=" bash "/bin/sh")
> +
> +               ;; XXX: Can we reuse %ntp-servers here?
> +               (string-append "-Dntp-servers="
> +                              (string-join (map (lambda (n)
> +                                                  (string-append (number->string n)
> +                                                                 ".guix.pool.ntp.org"))
> +                                                '(0 1 2 3))
> +                                           ","))
> +
> +               ;; Use localhost for DNS with fallback to Quad9 (instead of Google).
> +               "-Ddns-servers=127.0.0.1,::1,9.9.9.10,2620:fe::10"
> +
> +               ;; FIXME: "Attempt to load external entity http://docbook.sf.net".
> +               "-Dman=false"
> +
> +               ;; Don't install SysV compatibility scripts.
> +               "-Dsysvinit-path="
> +               "-Dsysvrcnd-path="

;; Don't record build time.
"-Dtime-epoch=1"

> +
> +               (string-append "-Dbashcompletiondir=" out "/etc/bash_completion.d")
> +               (string-append "-Dsysconfdir=" out "/etc")
> +               (string-append "-Drootprefix=" out)
> +               (string-append "-Drootlibdir=" out "/lib")
> +               (string-append "-Ddbuspolicydir=" out "/etc/dbus-1/system.d")
> +               (string-append "-Dpamconfdir=" out "/etc/pam.d")))
> +       #:phases (modify-phases %standard-phases
> +                  (add-after 'unpack 'patch-paths
> +                    (lambda* (#:key inputs outputs #:allow-other-keys)
> +                      (let ((bash            (assoc-ref inputs "bash"))
> +                            (coreutils       (assoc-ref inputs "coreutils"))
> +                            (glibc           (assoc-ref inputs "glibc"))
> +                            (util-linux      (assoc-ref inputs "util-linux"))
> +
> +                            (out (assoc-ref outputs "out")))
> +
> +                        (substitute* '("src/core/swap.c"
> +                                       "src/fsck/fsck.c"
> +                                       "src/journal/cat.c"
> +                                       "src/nspawn/nspawn.c"
> +                                       "src/nspawn/nspawn-setuid.c")
> +                          (("/bin/sh") (string-append bash "/bin/sh"))

this could be (which "sh")

> +                          (("/bin/bash") (string-append bash "/bin/bash"))
> +                          (("/bin/cat") (string-append coreutils "/bin/cat"))
> +                          (("/bin/echo") (string-append coreutils "/bin/echo"))
> +                          (("/bin/getent") (string-append glibc "/bin/getent"))
> +                          (("/sbin/fsck") (string-append util-linux "/sbin/fsck"))
> +                          (("/sbin/swapon") (string-append util-linux "/sbin/swapon"))
> +                          (("/sbin/swapoff") (string-append util-linux "/sbin/swapoff")))
> +                        (substitute* "src/journal/catalog.c"
> +                          (("/usr/lib/systemd/catalog")
> +                           (string-append out "/lib/systemd/catalog")))
> +                        #t)))
> +                  (add-after 'patch-paths 'fix-install
> +                    (lambda* (#:key outputs #:allow-other-keys)
> +                      (let ((out (assoc-ref outputs "out")))
> +                        ;; Don't create /var/lib/systemd during install.
> +                        (substitute* "meson.build"
> +                          ((".*mkdir_p\\.format\\(systemdstatedir\\)\\)") ""))
> +                        ;; Nor /var/lib/systemd/catalog.
> +                        (substitute* "catalog/meson.build"
> +                          (("journalctl --update-catalog") "journalctl --version"))
> +                        ;; Likewise for /var/log/journal.
> +                        (substitute* '("src/journal/meson.build"
> +                                       "src/journal-remote/meson.build")
> +                          (("/var/log/journal") "/tmp/journal"))

we'll need to keep an eye on this:
This will become a hard error in a future Meson release.                                  'chown 0:0 $DESTDIR/tmp/journal/remote && 64 33

> +                        ;; Create the hwdb in out/etc/udev/hwdb.d, not /etc/udev.
> +                        (substitute* "hwdb/meson.build"
> +                          (("systemd-hwdb update")
> +                           (string-append "systemd-hwdb -r " out
> +                                          "/etc/udev/hwdb.d update")))
> +                        #t)))
> +                  (add-before 'configure 'set-runpath
> +                    (lambda* (#:key outputs #:allow-other-keys)
> +                      (let ((out (assoc-ref outputs "out")))
> +                        ;; We need out/lib and out/lib/systemd in RUNPATH.
> +                        (setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib,"
> +                                                         "-rpath=" out "/lib/systemd"))
> +                        #t)))
> +                  (add-before 'check 'disable-broken-tests
> +                    (lambda _
> +                      (delete-file "test-network")           ;requires loopback
> +                      (delete-file "test-engine")            ;requires cgroups
> +                      (delete-file "test-unit-name")         ;likewise
> +                      (delete-file "test-unit-file")         ;likewise
> +                      (delete-file "test-copy")              ;FIXME
> +                      (delete-file "test-condition")         ;requires containers
> +                      (delete-file "test-mount-util")        ;requires /sys
> +                      (delete-file "test-exec-util")         ;FIXME
> +                      (delete-file "test-xattr-util")        ;FIXME
> +                      (delete-file "test-fs-util")           ;requires /var/tmp
> +                      (delete-file "test-stat-util")         ;FIXME
> +                      (delete-file "test-user-util")         ;needs "root" user
> +                      (delete-file "test-path-lookup")       ;expects systemd paths
> +                      (delete-file "test-namespace")         ;requires containers
> +                      (delete-file "test-bpf")               ;requires cgroups
> +                      (delete-file "test-fileio")            ;FIXME
> +                      (delete-file "test-time-util")         ;FIXME tzdata
> +                      (delete-file "test-date")              ;likewise
> +                      (delete-file "test-calendarspec")      ;likewise
> +                      (delete-file "test-cgroup-util")       ;requires cgroup (duh)
> +                      (delete-file "test-strv")              ;FIXME
> +                      (delete-file "test-path-util")         ;FIXME /bin/sh
> +                      (delete-file "test-path")              ;requires cgroup
> +                      (delete-file "test-sched-prio")        ;requires cgroup
> +                      (delete-file "test-id128")             ;FIXME
> +                      (delete-file "test-journal-flush")     ;FIXME
> +                      (delete-file "test-bus-creds")         ;requires cgroup
> +                      (delete-file "test-login")             ;FIXME
> +                      (delete-file "test-dhcp-client")       ;requires network
> +                      (delete-file "test-dhcp6-client")      ;likewise
> +                      #t))
> +                  (add-after 'install 'fix-environment-symlink
> +                    (lambda* (#:key outputs #:allow-other-keys)
> +                      ;; The install phase creates this dangling symlink:
> +                      ;; lib/environment.d/00-environment.conf -> ../../etc/environment
> +                      ;; ...which causes the 'fix-runpath' phase to error out.
> +                      ;; XXX: This should probably use /etc/environment instead.
> +                      (mkdir-p (string-append (assoc-ref outputs "out")
> +                                              "/etc/environment"))
> +                      #t)))))
> +    (native-inputs
> +     `(("docbook-xml" ,docbook-xml)
> +       ("docbook-xsl" ,docbook-xsl)
> +       ("gettext" ,gettext-minimal)
> +       ("gperf" ,gperf)
> +       ("lxml" ,python-lxml)
> +       ("m4" ,m4)
> +       ("pkg-config" ,pkg-config)
> +       ("xsltproc" ,libxslt)))
> +    (inputs
> +     `(("acl" ,acl)
> +       ("audit" ,audit)
> +       ("bash" ,bash)

we probably don't need to include bash specifically, isn't it part of
the build system? Also, it should be bash-minimal

> +       ("bzip2" ,bzip2)
> +       ("coreutils" ,coreutils)
> +       ("cryptsetup" ,cryptsetup)
> +       ("curl" ,curl)
> +       ("dbus" ,dbus)
> +       ;; TODO: Add gnu-efi for bootloader functionality.
> +       ("elfutils" ,elfutils)

Currently elfutils fails its test phase on armhf and aarch64, so we'll
need to fix this before rolling it out so we don't cut out users on
these platforms

> +       ("glib" ,glib)
> +       ("glibc" ,glibc)

what about our future Hurd users?

> +       ("gnutls" ,gnutls)
> +       ("kbd" ,kbd)
> +       ("kmod" ,kmod)
> +       ("libcap" ,libcap)
> +       ("libgcrypt" ,libgcrypt)
> +       ("libidn2" ,libidn2)
> +       ("libmicrohttpd" ,libmicrohttpd)
> +       ("libseccomp" ,libseccomp)
> +       ("libxkbcommon" ,libxkbcommon)
> +       ("linux-pam" ,linux-pam)
> +       ("lz4" ,lz4)
> +       ("pcre2" ,pcre2)
> +       ("python" ,python)
> +       ("qrencode" ,qrencode)
> +       ("util-linux" ,util-linux)
> +       ("xz" ,xz)
> +       ("zlib" ,zlib)))
> +    (home-page "https://www.freedesktop.org/wiki/Software/systemd/")
> +    (synopsis "System and service manager")
> +    (description
> +     "@code{systemd} is a suite of basic building blocks for a Linux system.
> +It provides a system and service manager that runs as PID 1 and starts the
> +rest of the system.  systemd provides aggressive parallelization capabilities,
> +uses socket and D-Bus activation for starting services, offers on-demand
> +starting of daemons, keeps track of processes using Linux control groups,
> +maintains mount and automount points, and implements an elaborate transactional
> +dependency-based service control logic.")
> +    (license license:lgpl2.1+)))
> +
> -- 
> 2.16.3
> 
> 

Currently installing fails with the error:
Failed to run install script '/gnu/store/rl5m6cysqhizqr2nminx2nxficpiadmi-bash-4.4.12/bin/sh -c test -n "$DESTDIR" || /gnu/store/mqgzqi600k8yqhih863r6ngw0bmamqkq-systemd-238/bin/journalctl --version'
FAILED: meson-install

I'll take a look at it.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 14:04 ` Efraim Flashner
@ 2018-04-01 14:19   ` Nils Gillmann
  2018-04-01 20:11   ` Marius Bakke
  1 sibling, 0 replies; 18+ messages in thread
From: Nils Gillmann @ 2018-04-01 14:19 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Efraim Flashner transcribed 17K bytes:
> On Sun, Apr 01, 2018 at 02:22:59PM +0200, Marius Bakke wrote:
> > Guix,
> > 
> > As discussed at FOSDEM, it is clear that The Shepherd does not have what
> > it takes to boot a modern Linux system.  While it works today, adding
> > bootloader, DNS server, NTP client, syslog, udev, seat management,
> > dishwasher, hardware database, network management and other essential
> > PID 1 features is going to take too much effort and duplicate work.
> > 
> > Meanwhile, GuixSD keeps drifting away from other distributions.  This
> > patch is the first of many in order to gain feature parity with the
> > modern GNU/Linux world.  2018 is surely the year of the GuixSD desktop!
> 
> This also allows us to save time with all of these services and allow us
> to focus on adding new features that we need.
> 
> > 
> > Note: It requires the patch from <https://bugs.gnu.org/31014>.
> > 
> > * gnu/packages/systemd.scm: New file.
> > * gnu/local.mk (GNU_SYSTEM_MODULES): Register it.
> > ---
> >  gnu/local.mk             |   1 +
> >  gnu/packages/systemd.scm | 251 +++++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 252 insertions(+)
> >  create mode 100644 gnu/packages/systemd.scm
> > 
> > diff --git a/gnu/local.mk b/gnu/local.mk
> > index 2705fb37a..dbefd8cca 100644
> > --- a/gnu/local.mk
> > +++ b/gnu/local.mk
> > @@ -402,6 +402,7 @@ GNU_SYSTEM_MODULES =				\
> >    %D%/packages/statistics.scm			\
> >    %D%/packages/storage.scm			\
> >    %D%/packages/suckless.scm			\
> > +  %D%/packages/systemd.scm			\
> >    %D%/packages/swig.scm				\
> >    %D%/packages/sync.scm			\
> >    %D%/packages/syncthing.scm			\
> > diff --git a/gnu/packages/systemd.scm b/gnu/packages/systemd.scm
> > new file mode 100644
> > index 000000000..e90ed65cc
> > --- /dev/null
> > +++ b/gnu/packages/systemd.scm
> > @@ -0,0 +1,251 @@
> > +;;; GNU Guix --- Functional package management for GNU
> > +;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.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 systemd)
> > +  #:use-module (guix packages)
> > +  #:use-module (guix download)
> > +  #:use-module (guix build-system meson)
> > +  #:use-module ((guix licenses) #:prefix license:)
> > +  #:use-module (gnu packages acl)
> > +  #:use-module (gnu packages admin)
> > +  #:use-module (gnu packages aidc)
> > +  #:use-module (gnu packages base)
> > +  #:use-module (gnu packages bash)
> > +  #:use-module (gnu packages compression)
> > +  #:use-module (gnu packages cryptsetup)
> > +  #:use-module (gnu packages curl)
> > +  #:use-module (gnu packages docbook)
> > +  #:use-module (gnu packages elf)
> > +  #:use-module (gnu packages gettext)
> > +  #:use-module (gnu packages glib)
> > +  #:use-module (gnu packages gnunet)
> > +  #:use-module (gnu packages gnupg)
> > +  #:use-module (gnu packages gperf)
> > +  #:use-module (gnu packages libidn)
> > +  #:use-module (gnu packages linux)
> > +  #:use-module (gnu packages m4)
> > +  #:use-module (gnu packages package-management)
> > +  #:use-module (gnu packages pcre)
> > +  #:use-module (gnu packages pkg-config)
> > +  #:use-module (gnu packages python)
> > +  #:use-module (gnu packages tls)
> > +  #:use-module (gnu packages xdisorg)
> > +  #:use-module (gnu packages xml))
> > +
> > +(define-public systemd
> > +  (package
> > +    (name "systemd")
> > +    (version "238")
> > +    (source (origin
> > +              (method url-fetch)
> > +              (uri (string-append "https://github.com/systemd/systemd/archive/v"
> > +                                  version ".tar.gz"))
> > +              (file-name (string-append name "-" version ".tar.gz"))
> 
> This should be a git-checkout, as per bug FILL-IN, with the changing
> github tarballs.
> 
> > +              (sha256
> > +               (base32
> > +                "08p0wf6qby2hksa890hbybdfr274chjb3ykdi1rl4g1fmfdmkj5v"))))
> > +    (build-system meson-build-system)
> > +    (arguments
> > +     `(#:tests? #f             ;FIXME: The disable-broken-tests phase is ineffective.
> > +       #:configure-flags
> > +       (let ((bash            (assoc-ref %build-inputs "bash"))
> > +             (coreutils       (assoc-ref %build-inputs "coreutils"))
> > +             (kbd             (assoc-ref %build-inputs "kbd"))
> > +             (kmod            (assoc-ref %build-inputs "kmod"))
> > +             (util-linux      (assoc-ref %build-inputs "util-linux"))
> > +
> > +             (out (assoc-ref %outputs "out")))
> > +         (list (string-append "-Dkill-path=" coreutils "/bin/kill")
> > +               (string-append "-Dkmod-path=" kmod "/bin/kmod")
> > +               (string-append "-Dsulogin-path=" util-linux "/bin/sulogin")
> > +               (string-append "-Dmount-path=" util-linux "/bin/mount")
> > +               (string-append "-Dumount-path=" util-linux "/bin/umount")
> > +               (string-append "-Dloadkeys-path=" kbd "/bin/loadkeys")
> > +               (string-append "-Dsetfont-path=" kbd "/bin/setfont")
> > +               (string-append "-Ddebug-shell=" bash "/bin/sh")
> > +
> > +               ;; XXX: Can we reuse %ntp-servers here?
> > +               (string-append "-Dntp-servers="
> > +                              (string-join (map (lambda (n)
> > +                                                  (string-append (number->string n)
> > +                                                                 ".guix.pool.ntp.org"))
> > +                                                '(0 1 2 3))
> > +                                           ","))
> > +
> > +               ;; Use localhost for DNS with fallback to Quad9 (instead of Google).
> > +               "-Ddns-servers=127.0.0.1,::1,9.9.9.10,2620:fe::10"
> > +
> > +               ;; FIXME: "Attempt to load external entity http://docbook.sf.net".
> > +               "-Dman=false"
> > +
> > +               ;; Don't install SysV compatibility scripts.
> > +               "-Dsysvinit-path="
> > +               "-Dsysvrcnd-path="
> 
> ;; Don't record build time.
> "-Dtime-epoch=1"
> 
> > +
> > +               (string-append "-Dbashcompletiondir=" out "/etc/bash_completion.d")
> > +               (string-append "-Dsysconfdir=" out "/etc")
> > +               (string-append "-Drootprefix=" out)
> > +               (string-append "-Drootlibdir=" out "/lib")
> > +               (string-append "-Ddbuspolicydir=" out "/etc/dbus-1/system.d")
> > +               (string-append "-Dpamconfdir=" out "/etc/pam.d")))
> > +       #:phases (modify-phases %standard-phases
> > +                  (add-after 'unpack 'patch-paths
> > +                    (lambda* (#:key inputs outputs #:allow-other-keys)
> > +                      (let ((bash            (assoc-ref inputs "bash"))
> > +                            (coreutils       (assoc-ref inputs "coreutils"))
> > +                            (glibc           (assoc-ref inputs "glibc"))
> > +                            (util-linux      (assoc-ref inputs "util-linux"))
> > +
> > +                            (out (assoc-ref outputs "out")))
> > +
> > +                        (substitute* '("src/core/swap.c"
> > +                                       "src/fsck/fsck.c"
> > +                                       "src/journal/cat.c"
> > +                                       "src/nspawn/nspawn.c"
> > +                                       "src/nspawn/nspawn-setuid.c")
> > +                          (("/bin/sh") (string-append bash "/bin/sh"))
> 
> this could be (which "sh")
> 
> > +                          (("/bin/bash") (string-append bash "/bin/bash"))
> > +                          (("/bin/cat") (string-append coreutils "/bin/cat"))
> > +                          (("/bin/echo") (string-append coreutils "/bin/echo"))
> > +                          (("/bin/getent") (string-append glibc "/bin/getent"))
> > +                          (("/sbin/fsck") (string-append util-linux "/sbin/fsck"))
> > +                          (("/sbin/swapon") (string-append util-linux "/sbin/swapon"))
> > +                          (("/sbin/swapoff") (string-append util-linux "/sbin/swapoff")))
> > +                        (substitute* "src/journal/catalog.c"
> > +                          (("/usr/lib/systemd/catalog")
> > +                           (string-append out "/lib/systemd/catalog")))
> > +                        #t)))
> > +                  (add-after 'patch-paths 'fix-install
> > +                    (lambda* (#:key outputs #:allow-other-keys)
> > +                      (let ((out (assoc-ref outputs "out")))
> > +                        ;; Don't create /var/lib/systemd during install.
> > +                        (substitute* "meson.build"
> > +                          ((".*mkdir_p\\.format\\(systemdstatedir\\)\\)") ""))
> > +                        ;; Nor /var/lib/systemd/catalog.
> > +                        (substitute* "catalog/meson.build"
> > +                          (("journalctl --update-catalog") "journalctl --version"))
> > +                        ;; Likewise for /var/log/journal.
> > +                        (substitute* '("src/journal/meson.build"
> > +                                       "src/journal-remote/meson.build")
> > +                          (("/var/log/journal") "/tmp/journal"))
> 
> we'll need to keep an eye on this:
> This will become a hard error in a future Meson release.                                  'chown 0:0 $DESTDIR/tmp/journal/remote && 64 33
> 
> > +                        ;; Create the hwdb in out/etc/udev/hwdb.d, not /etc/udev.
> > +                        (substitute* "hwdb/meson.build"
> > +                          (("systemd-hwdb update")
> > +                           (string-append "systemd-hwdb -r " out
> > +                                          "/etc/udev/hwdb.d update")))
> > +                        #t)))
> > +                  (add-before 'configure 'set-runpath
> > +                    (lambda* (#:key outputs #:allow-other-keys)
> > +                      (let ((out (assoc-ref outputs "out")))
> > +                        ;; We need out/lib and out/lib/systemd in RUNPATH.
> > +                        (setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib,"
> > +                                                         "-rpath=" out "/lib/systemd"))
> > +                        #t)))
> > +                  (add-before 'check 'disable-broken-tests
> > +                    (lambda _
> > +                      (delete-file "test-network")           ;requires loopback
> > +                      (delete-file "test-engine")            ;requires cgroups
> > +                      (delete-file "test-unit-name")         ;likewise
> > +                      (delete-file "test-unit-file")         ;likewise
> > +                      (delete-file "test-copy")              ;FIXME
> > +                      (delete-file "test-condition")         ;requires containers
> > +                      (delete-file "test-mount-util")        ;requires /sys
> > +                      (delete-file "test-exec-util")         ;FIXME
> > +                      (delete-file "test-xattr-util")        ;FIXME
> > +                      (delete-file "test-fs-util")           ;requires /var/tmp
> > +                      (delete-file "test-stat-util")         ;FIXME
> > +                      (delete-file "test-user-util")         ;needs "root" user
> > +                      (delete-file "test-path-lookup")       ;expects systemd paths
> > +                      (delete-file "test-namespace")         ;requires containers
> > +                      (delete-file "test-bpf")               ;requires cgroups
> > +                      (delete-file "test-fileio")            ;FIXME
> > +                      (delete-file "test-time-util")         ;FIXME tzdata
> > +                      (delete-file "test-date")              ;likewise
> > +                      (delete-file "test-calendarspec")      ;likewise
> > +                      (delete-file "test-cgroup-util")       ;requires cgroup (duh)
> > +                      (delete-file "test-strv")              ;FIXME
> > +                      (delete-file "test-path-util")         ;FIXME /bin/sh
> > +                      (delete-file "test-path")              ;requires cgroup
> > +                      (delete-file "test-sched-prio")        ;requires cgroup
> > +                      (delete-file "test-id128")             ;FIXME
> > +                      (delete-file "test-journal-flush")     ;FIXME
> > +                      (delete-file "test-bus-creds")         ;requires cgroup
> > +                      (delete-file "test-login")             ;FIXME
> > +                      (delete-file "test-dhcp-client")       ;requires network
> > +                      (delete-file "test-dhcp6-client")      ;likewise
> > +                      #t))
> > +                  (add-after 'install 'fix-environment-symlink
> > +                    (lambda* (#:key outputs #:allow-other-keys)
> > +                      ;; The install phase creates this dangling symlink:
> > +                      ;; lib/environment.d/00-environment.conf -> ../../etc/environment
> > +                      ;; ...which causes the 'fix-runpath' phase to error out.
> > +                      ;; XXX: This should probably use /etc/environment instead.
> > +                      (mkdir-p (string-append (assoc-ref outputs "out")
> > +                                              "/etc/environment"))
> > +                      #t)))))
> > +    (native-inputs
> > +     `(("docbook-xml" ,docbook-xml)
> > +       ("docbook-xsl" ,docbook-xsl)
> > +       ("gettext" ,gettext-minimal)
> > +       ("gperf" ,gperf)
> > +       ("lxml" ,python-lxml)
> > +       ("m4" ,m4)
> > +       ("pkg-config" ,pkg-config)
> > +       ("xsltproc" ,libxslt)))
> > +    (inputs
> > +     `(("acl" ,acl)
> > +       ("audit" ,audit)
> > +       ("bash" ,bash)
> 
> we probably don't need to include bash specifically, isn't it part of
> the build system? Also, it should be bash-minimal

I think bash is now part of systemd, so we won't need to reference
our store bash as we can simply use the systemd-shell (full featured bash)
for this, solving the bootstrap problem for systemd at least, as it
already includes everything we'll ever need.

> > +       ("bzip2" ,bzip2)
> > +       ("coreutils" ,coreutils)
> > +       ("cryptsetup" ,cryptsetup)
> > +       ("curl" ,curl)
> > +       ("dbus" ,dbus)
> > +       ;; TODO: Add gnu-efi for bootloader functionality.
> > +       ("elfutils" ,elfutils)
> 
> Currently elfutils fails its test phase on armhf and aarch64, so we'll
> need to fix this before rolling it out so we don't cut out users on
> these platforms
> 
> > +       ("glib" ,glib)
> > +       ("glibc" ,glibc)
> 
> what about our future Hurd users?
> 
> > +       ("gnutls" ,gnutls)
> > +       ("kbd" ,kbd)
> > +       ("kmod" ,kmod)
> > +       ("libcap" ,libcap)
> > +       ("libgcrypt" ,libgcrypt)
> > +       ("libidn2" ,libidn2)
> > +       ("libmicrohttpd" ,libmicrohttpd)
> > +       ("libseccomp" ,libseccomp)
> > +       ("libxkbcommon" ,libxkbcommon)
> > +       ("linux-pam" ,linux-pam)
> > +       ("lz4" ,lz4)
> > +       ("pcre2" ,pcre2)
> > +       ("python" ,python)
> > +       ("qrencode" ,qrencode)
> > +       ("util-linux" ,util-linux)
> > +       ("xz" ,xz)
> > +       ("zlib" ,zlib)))
> > +    (home-page "https://www.freedesktop.org/wiki/Software/systemd/")
> > +    (synopsis "System and service manager")
> > +    (description
> > +     "@code{systemd} is a suite of basic building blocks for a Linux system.
> > +It provides a system and service manager that runs as PID 1 and starts the
> > +rest of the system.  systemd provides aggressive parallelization capabilities,
> > +uses socket and D-Bus activation for starting services, offers on-demand
> > +starting of daemons, keeps track of processes using Linux control groups,
> > +maintains mount and automount points, and implements an elaborate transactional
> > +dependency-based service control logic.")
> > +    (license license:lgpl2.1+)))
> > +
> > -- 
> > 2.16.3
> > 
> > 
> 
> Currently installing fails with the error:
> Failed to run install script '/gnu/store/rl5m6cysqhizqr2nminx2nxficpiadmi-bash-4.4.12/bin/sh -c test -n "$DESTDIR" || /gnu/store/mqgzqi600k8yqhih863r6ngw0bmamqkq-systemd-238/bin/journalctl --version'
> FAILED: meson-install
> 
> I'll take a look at it.
> 
> -- 
> Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 12:22 [PATCH] gnu: Add systemd Marius Bakke
                   ` (3 preceding siblings ...)
  2018-04-01 14:04 ` Efraim Flashner
@ 2018-04-01 14:23 ` Jan Nieuwenhuizen
  2018-04-01 21:55 ` Björn Höfling
  5 siblings, 0 replies; 18+ messages in thread
From: Jan Nieuwenhuizen @ 2018-04-01 14:23 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

Marius Bakke writes:

> As discussed at FOSDEM, it is clear that The Shepherd does not have what
> it takes to boot a modern Linux system.

Damn, I knew I should have been at FOSDEM.  While I'm pretty happy with
the Shepherd and my emacs-exwm, it would be a pity if users who truly
depend on more modernness couldn't run GuixSD.  I just hope this will be
optional?!

Sorry to sound so harsh, really I appreciate your enourmous effort here!

On a more practical note -- I had a minor breakthrough with Mes
yesterday, mes+mescc now builds mes.c in 21min.  This means that we may
be able to build tcc in ~3.5h.  Not great, but entering feasible
territory.

My happiness just got a dent when reading this:

> +    (native-inputs
> +     `(("docbook-xml" ,docbook-xml)
> +       ("docbook-xsl" ,docbook-xsl)
> +       ("gettext" ,gettext-minimal)
> +       ("gperf" ,gperf)
> +       ("lxml" ,python-lxml)
> +       ("m4" ,m4)
> +       ("pkg-config" ,pkg-config)
> +       ("xsltproc" ,libxslt)))
> +    (inputs
> +     `(("acl" ,acl)
> +       ("audit" ,audit)
> +       ("bash" ,bash)
> +       ("bzip2" ,bzip2)
> +       ("coreutils" ,coreutils)
> +       ("cryptsetup" ,cryptsetup)
> +       ("curl" ,curl)
> +       ("dbus" ,dbus)
> +       ;; TODO: Add gnu-efi for bootloader functionality.
> +       ("elfutils" ,elfutils)
> +       ("glib" ,glib)
> +       ("glibc" ,glibc)
> +       ("gnutls" ,gnutls)
> +       ("kbd" ,kbd)
> +       ("kmod" ,kmod)
> +       ("libcap" ,libcap)
> +       ("libgcrypt" ,libgcrypt)
> +       ("libidn2" ,libidn2)
> +       ("libmicrohttpd" ,libmicrohttpd)
> +       ("libseccomp" ,libseccomp)
> +       ("libxkbcommon" ,libxkbcommon)
> +       ("linux-pam" ,linux-pam)
> +       ("lz4" ,lz4)
> +       ("pcre2" ,pcre2)
> +       ("python" ,python)
> +       ("qrencode" ,qrencode)
> +       ("util-linux" ,util-linux)
> +       ("xz" ,xz)
> +       ("zlib" ,zlib)))

I have good hopes of bootstrapping Guile but...won't we be creating
a non-bootstrappable system here?  Does this mean that modern Linux
systems are essentially non-bootstrappable?  Has this been discussed?

Greetings,
janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 12:49 ` Ludovic Courtès
@ 2018-04-01 17:01   ` Mark H Weaver
  2018-04-01 20:07   ` Chris Marusich
  1 sibling, 0 replies; 18+ messages in thread
From: Mark H Weaver @ 2018-04-01 17:01 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

> Hello Marius,
>
> Marius Bakke <mbakke@fastmail.com> skribis:
>
>> As discussed at FOSDEM, it is clear that The Shepherd does not have what
>> it takes to boot a modern Linux system.  While it works today, adding
>> bootloader, DNS server, NTP client, syslog, udev, seat management,
>> dishwasher, hardware database, network management and other essential
>> PID 1 features is going to take too much effort and duplicate work.
>
> To be honest, while the Shepherd has been a fun hack, I’ve been more and
> more feeling that yeah, it wouldn’t cut it in the long term (it’s also
> become clearer Scheme as convenient as C when it comes to systems
> programming and things like dealing with dependency graphs.)
>
> Thanks a lot for taking this step!

Does this mean that our Hurd port is to be abandoned, or is the plan to
maintain a fork of systemd that supports the Hurd?

       Mark

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 12:49 ` Ludovic Courtès
  2018-04-01 17:01   ` Mark H Weaver
@ 2018-04-01 20:07   ` Chris Marusich
  2018-04-01 20:18     ` Marius Bakke
  1 sibling, 1 reply; 18+ messages in thread
From: Chris Marusich @ 2018-04-01 20:07 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

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

> To be honest, while the Shepherd has been a fun hack, I’ve been more and
> more feeling that yeah, it wouldn’t cut it in the long term (it’s also
> become clearer Scheme as convenient as C when it comes to systems
> programming and things like dealing with dependency graphs.)

I think you may have forgotten some words.  When you said "it’s also
become clearer Scheme as convenient as C when it comes to systems
programming and things like dealing with dependency graphs", what did
you mean?

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 14:04 ` Efraim Flashner
  2018-04-01 14:19   ` Nils Gillmann
@ 2018-04-01 20:11   ` Marius Bakke
  2018-04-01 20:30     ` Nils Gillmann
  1 sibling, 1 reply; 18+ messages in thread
From: Marius Bakke @ 2018-04-01 20:11 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

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

Efraim Flashner <efraim@flashner.co.il> writes:

>> +    (build-system meson-build-system)
>> +    (arguments
>> +     `(#:tests? #f             ;FIXME: The disable-broken-tests phase is ineffective.
>> +       #:configure-flags
>> +       (let ((bash            (assoc-ref %build-inputs "bash"))
>> +             (coreutils       (assoc-ref %build-inputs "coreutils"))
>> +             (kbd             (assoc-ref %build-inputs "kbd"))
>> +             (kmod            (assoc-ref %build-inputs "kmod"))
>> +             (util-linux      (assoc-ref %build-inputs "util-linux"))
>> +
>> +             (out (assoc-ref %outputs "out")))
>> +         (list (string-append "-Dkill-path=" coreutils "/bin/kill")
>> +               (string-append "-Dkmod-path=" kmod "/bin/kmod")
>> +               (string-append "-Dsulogin-path=" util-linux "/bin/sulogin")
>> +               (string-append "-Dmount-path=" util-linux "/bin/mount")
>> +               (string-append "-Dumount-path=" util-linux "/bin/umount")
>> +               (string-append "-Dloadkeys-path=" kbd "/bin/loadkeys")
>> +               (string-append "-Dsetfont-path=" kbd "/bin/setfont")
>> +               (string-append "-Ddebug-shell=" bash "/bin/sh")
>> +
>> +               ;; XXX: Can we reuse %ntp-servers here?
>> +               (string-append "-Dntp-servers="
>> +                              (string-join (map (lambda (n)
>> +                                                  (string-append (number->string n)
>> +                                                                 ".guix.pool.ntp.org"))
>> +                                                '(0 1 2 3))
>> +                                           ","))
>> +
>> +               ;; Use localhost for DNS with fallback to Quad9 (instead of Google).
>> +               "-Ddns-servers=127.0.0.1,::1,9.9.9.10,2620:fe::10"
>> +
>> +               ;; FIXME: "Attempt to load external entity http://docbook.sf.net".
>> +               "-Dman=false"
>> +
>> +               ;; Don't install SysV compatibility scripts.
>> +               "-Dsysvinit-path="
>> +               "-Dsysvrcnd-path="
>
> ;; Don't record build time.
> "-Dtime-epoch=1"

Good catch!

>> +
>> +               (string-append "-Dbashcompletiondir=" out "/etc/bash_completion.d")
>> +               (string-append "-Dsysconfdir=" out "/etc")
>> +               (string-append "-Drootprefix=" out)
>> +               (string-append "-Drootlibdir=" out "/lib")
>> +               (string-append "-Ddbuspolicydir=" out "/etc/dbus-1/system.d")
>> +               (string-append "-Dpamconfdir=" out "/etc/pam.d")))
>> +       #:phases (modify-phases %standard-phases
>> +                  (add-after 'unpack 'patch-paths
>> +                    (lambda* (#:key inputs outputs #:allow-other-keys)
>> +                      (let ((bash            (assoc-ref inputs "bash"))
>> +                            (coreutils       (assoc-ref inputs "coreutils"))
>> +                            (glibc           (assoc-ref inputs "glibc"))
>> +                            (util-linux      (assoc-ref inputs "util-linux"))
>> +
>> +                            (out (assoc-ref outputs "out")))
>> +
>> +                        (substitute* '("src/core/swap.c"
>> +                                       "src/fsck/fsck.c"
>> +                                       "src/journal/cat.c"
>> +                                       "src/nspawn/nspawn.c"
>> +                                       "src/nspawn/nspawn-setuid.c")
>> +                          (("/bin/sh") (string-append bash "/bin/sh"))
>
> this could be (which "sh")

In a cross-compilation context, "which" might pick up the "native"
bash, which is why I opted for the explicit coreutils and bash inputs.

>> +                        ;; Create the hwdb in out/etc/udev/hwdb.d, not /etc/udev.
>> +                        (substitute* "hwdb/meson.build"
>> +                          (("systemd-hwdb update")
>> +                           (string-append "systemd-hwdb -r " out
>> +                                          "/etc/udev/hwdb.d update")))
>> +                        #t)))
>> +                  (add-before 'configure 'set-runpath
>> +                    (lambda* (#:key outputs #:allow-other-keys)
>> +                      (let ((out (assoc-ref outputs "out")))
>> +                        ;; We need out/lib and out/lib/systemd in RUNPATH.
>> +                        (setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib,"
>> +                                                         "-rpath=" out "/lib/systemd"))
>> +                        #t)))
>> +                  (add-before 'check 'disable-broken-tests
>> +                    (lambda _
>> +                      (delete-file "test-network")           ;requires loopback
>> +                      (delete-file "test-engine")            ;requires cgroups
>> +                      (delete-file "test-unit-name")         ;likewise
>> +                      (delete-file "test-unit-file")         ;likewise
>> +                      (delete-file "test-copy")              ;FIXME
>> +                      (delete-file "test-condition")         ;requires containers
>> +                      (delete-file "test-mount-util")        ;requires /sys
>> +                      (delete-file "test-exec-util")         ;FIXME
>> +                      (delete-file "test-xattr-util")        ;FIXME
>> +                      (delete-file "test-fs-util")           ;requires /var/tmp
>> +                      (delete-file "test-stat-util")         ;FIXME
>> +                      (delete-file "test-user-util")         ;needs "root" user
>> +                      (delete-file "test-path-lookup")       ;expects systemd paths
>> +                      (delete-file "test-namespace")         ;requires containers
>> +                      (delete-file "test-bpf")               ;requires cgroups
>> +                      (delete-file "test-fileio")            ;FIXME
>> +                      (delete-file "test-time-util")         ;FIXME tzdata
>> +                      (delete-file "test-date")              ;likewise
>> +                      (delete-file "test-calendarspec")      ;likewise
>> +                      (delete-file "test-cgroup-util")       ;requires cgroup (duh)
>> +                      (delete-file "test-strv")              ;FIXME
>> +                      (delete-file "test-path-util")         ;FIXME /bin/sh
>> +                      (delete-file "test-path")              ;requires cgroup
>> +                      (delete-file "test-sched-prio")        ;requires cgroup
>> +                      (delete-file "test-id128")             ;FIXME
>> +                      (delete-file "test-journal-flush")     ;FIXME
>> +                      (delete-file "test-bus-creds")         ;requires cgroup
>> +                      (delete-file "test-login")             ;FIXME
>> +                      (delete-file "test-dhcp-client")       ;requires network
>> +                      (delete-file "test-dhcp6-client")      ;likewise
>> +                      #t))
>> +                  (add-after 'install 'fix-environment-symlink
>> +                    (lambda* (#:key outputs #:allow-other-keys)
>> +                      ;; The install phase creates this dangling symlink:
>> +                      ;; lib/environment.d/00-environment.conf -> ../../etc/environment
>> +                      ;; ...which causes the 'fix-runpath' phase to error out.
>> +                      ;; XXX: This should probably use /etc/environment instead.
>> +                      (mkdir-p (string-append (assoc-ref outputs "out")
>> +                                              "/etc/environment"))
>> +                      #t)))))
>> +    (native-inputs
>> +     `(("docbook-xml" ,docbook-xml)
>> +       ("docbook-xsl" ,docbook-xsl)
>> +       ("gettext" ,gettext-minimal)
>> +       ("gperf" ,gperf)
>> +       ("lxml" ,python-lxml)
>> +       ("m4" ,m4)
>> +       ("pkg-config" ,pkg-config)
>> +       ("xsltproc" ,libxslt)))
>> +    (inputs
>> +     `(("acl" ,acl)
>> +       ("audit" ,audit)
>> +       ("bash" ,bash)
>
> we probably don't need to include bash specifically, isn't it part of
> the build system? Also, it should be bash-minimal

Bash-minimal indeed.  Oops.  :-)

However as ng0 mentioned, bash is soon part of systemd, so it won't be
needed for very long.

(I'm not sure we can joke about this, since we've talked about including
"gash"[0] in the initrd...)

[0] https://gitlab.com/rutger.van.beusekom/gash

>> +       ("bzip2" ,bzip2)
>> +       ("coreutils" ,coreutils)
>> +       ("cryptsetup" ,cryptsetup)
>> +       ("curl" ,curl)
>> +       ("dbus" ,dbus)
>> +       ;; TODO: Add gnu-efi for bootloader functionality.
>> +       ("elfutils" ,elfutils)
>
> Currently elfutils fails its test phase on armhf and aarch64, so we'll
> need to fix this before rolling it out so we don't cut out users on
> these platforms

That's a shame.  Users of those platforms will have to step in and do
their part if they want to enjoy the New And Improved GuixSD.

>> +       ("glib" ,glib)
>> +       ("glibc" ,glibc)
>
> what about our future Hurd users?

I'm sure Linux and the Hurd will both be subsumed by systemd in due time.

[...]

> Currently installing fails with the error:
> Failed to run install script '/gnu/store/rl5m6cysqhizqr2nminx2nxficpiadmi-bash-4.4.12/bin/sh -c test -n "$DESTDIR" || /gnu/store/mqgzqi600k8yqhih863r6ngw0bmamqkq-systemd-238/bin/journalctl --version'
> FAILED: meson-install

You'll need <https://bugs.gnu.org/31014> to make linking work properly.

Thanks for the feedback!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 20:07   ` Chris Marusich
@ 2018-04-01 20:18     ` Marius Bakke
  2018-04-02 21:36       ` Ludovic Courtès
  0 siblings, 1 reply; 18+ messages in thread
From: Marius Bakke @ 2018-04-01 20:18 UTC (permalink / raw)
  To: Chris Marusich, Ludovic Courtès; +Cc: guix-devel

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

Chris Marusich <cmmarusich@gmail.com> writes:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> To be honest, while the Shepherd has been a fun hack, I’ve been more and
>> more feeling that yeah, it wouldn’t cut it in the long term (it’s also
>> become clearer Scheme as convenient as C when it comes to systems
>> programming and things like dealing with dependency graphs.)
>
> I think you may have forgotten some words.  When you said "it’s also
> become clearer Scheme as convenient as C when it comes to systems
> programming and things like dealing with dependency graphs", what did
> you mean?

I think Ludovic meant to convey "Scheme is NOT as convenient as C when
it comes to ...", but made something of a "Kinsley Gaffe" since the
opposite is obviously true.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 20:11   ` Marius Bakke
@ 2018-04-01 20:30     ` Nils Gillmann
  0 siblings, 0 replies; 18+ messages in thread
From: Nils Gillmann @ 2018-04-01 20:30 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

Marius Bakke transcribed 10K bytes:
> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> >> +    (build-system meson-build-system)
> >> +    (arguments
> >> +     `(#:tests? #f             ;FIXME: The disable-broken-tests phase is ineffective.
> >> +       #:configure-flags
> >> +       (let ((bash            (assoc-ref %build-inputs "bash"))
> >> +             (coreutils       (assoc-ref %build-inputs "coreutils"))
> >> +             (kbd             (assoc-ref %build-inputs "kbd"))
> >> +             (kmod            (assoc-ref %build-inputs "kmod"))
> >> +             (util-linux      (assoc-ref %build-inputs "util-linux"))
> >> +
> >> +             (out (assoc-ref %outputs "out")))
> >> +         (list (string-append "-Dkill-path=" coreutils "/bin/kill")
> >> +               (string-append "-Dkmod-path=" kmod "/bin/kmod")
> >> +               (string-append "-Dsulogin-path=" util-linux "/bin/sulogin")
> >> +               (string-append "-Dmount-path=" util-linux "/bin/mount")
> >> +               (string-append "-Dumount-path=" util-linux "/bin/umount")
> >> +               (string-append "-Dloadkeys-path=" kbd "/bin/loadkeys")
> >> +               (string-append "-Dsetfont-path=" kbd "/bin/setfont")
> >> +               (string-append "-Ddebug-shell=" bash "/bin/sh")
> >> +
> >> +               ;; XXX: Can we reuse %ntp-servers here?
> >> +               (string-append "-Dntp-servers="
> >> +                              (string-join (map (lambda (n)
> >> +                                                  (string-append (number->string n)
> >> +                                                                 ".guix.pool.ntp.org"))
> >> +                                                '(0 1 2 3))
> >> +                                           ","))
> >> +
> >> +               ;; Use localhost for DNS with fallback to Quad9 (instead of Google).
> >> +               "-Ddns-servers=127.0.0.1,::1,9.9.9.10,2620:fe::10"
> >> +
> >> +               ;; FIXME: "Attempt to load external entity http://docbook.sf.net".
> >> +               "-Dman=false"
> >> +
> >> +               ;; Don't install SysV compatibility scripts.
> >> +               "-Dsysvinit-path="
> >> +               "-Dsysvrcnd-path="
> >
> > ;; Don't record build time.
> > "-Dtime-epoch=1"
> 
> Good catch!
> 
> >> +
> >> +               (string-append "-Dbashcompletiondir=" out "/etc/bash_completion.d")
> >> +               (string-append "-Dsysconfdir=" out "/etc")
> >> +               (string-append "-Drootprefix=" out)
> >> +               (string-append "-Drootlibdir=" out "/lib")
> >> +               (string-append "-Ddbuspolicydir=" out "/etc/dbus-1/system.d")
> >> +               (string-append "-Dpamconfdir=" out "/etc/pam.d")))
> >> +       #:phases (modify-phases %standard-phases
> >> +                  (add-after 'unpack 'patch-paths
> >> +                    (lambda* (#:key inputs outputs #:allow-other-keys)
> >> +                      (let ((bash            (assoc-ref inputs "bash"))
> >> +                            (coreutils       (assoc-ref inputs "coreutils"))
> >> +                            (glibc           (assoc-ref inputs "glibc"))
> >> +                            (util-linux      (assoc-ref inputs "util-linux"))
> >> +
> >> +                            (out (assoc-ref outputs "out")))
> >> +
> >> +                        (substitute* '("src/core/swap.c"
> >> +                                       "src/fsck/fsck.c"
> >> +                                       "src/journal/cat.c"
> >> +                                       "src/nspawn/nspawn.c"
> >> +                                       "src/nspawn/nspawn-setuid.c")
> >> +                          (("/bin/sh") (string-append bash "/bin/sh"))
> >
> > this could be (which "sh")
> 
> In a cross-compilation context, "which" might pick up the "native"
> bash, which is why I opted for the explicit coreutils and bash inputs.
> 
> >> +                        ;; Create the hwdb in out/etc/udev/hwdb.d, not /etc/udev.
> >> +                        (substitute* "hwdb/meson.build"
> >> +                          (("systemd-hwdb update")
> >> +                           (string-append "systemd-hwdb -r " out
> >> +                                          "/etc/udev/hwdb.d update")))
> >> +                        #t)))
> >> +                  (add-before 'configure 'set-runpath
> >> +                    (lambda* (#:key outputs #:allow-other-keys)
> >> +                      (let ((out (assoc-ref outputs "out")))
> >> +                        ;; We need out/lib and out/lib/systemd in RUNPATH.
> >> +                        (setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib,"
> >> +                                                         "-rpath=" out "/lib/systemd"))
> >> +                        #t)))
> >> +                  (add-before 'check 'disable-broken-tests
> >> +                    (lambda _
> >> +                      (delete-file "test-network")           ;requires loopback
> >> +                      (delete-file "test-engine")            ;requires cgroups
> >> +                      (delete-file "test-unit-name")         ;likewise
> >> +                      (delete-file "test-unit-file")         ;likewise
> >> +                      (delete-file "test-copy")              ;FIXME
> >> +                      (delete-file "test-condition")         ;requires containers
> >> +                      (delete-file "test-mount-util")        ;requires /sys
> >> +                      (delete-file "test-exec-util")         ;FIXME
> >> +                      (delete-file "test-xattr-util")        ;FIXME
> >> +                      (delete-file "test-fs-util")           ;requires /var/tmp
> >> +                      (delete-file "test-stat-util")         ;FIXME
> >> +                      (delete-file "test-user-util")         ;needs "root" user
> >> +                      (delete-file "test-path-lookup")       ;expects systemd paths
> >> +                      (delete-file "test-namespace")         ;requires containers
> >> +                      (delete-file "test-bpf")               ;requires cgroups
> >> +                      (delete-file "test-fileio")            ;FIXME
> >> +                      (delete-file "test-time-util")         ;FIXME tzdata
> >> +                      (delete-file "test-date")              ;likewise
> >> +                      (delete-file "test-calendarspec")      ;likewise
> >> +                      (delete-file "test-cgroup-util")       ;requires cgroup (duh)
> >> +                      (delete-file "test-strv")              ;FIXME
> >> +                      (delete-file "test-path-util")         ;FIXME /bin/sh
> >> +                      (delete-file "test-path")              ;requires cgroup
> >> +                      (delete-file "test-sched-prio")        ;requires cgroup
> >> +                      (delete-file "test-id128")             ;FIXME
> >> +                      (delete-file "test-journal-flush")     ;FIXME
> >> +                      (delete-file "test-bus-creds")         ;requires cgroup
> >> +                      (delete-file "test-login")             ;FIXME
> >> +                      (delete-file "test-dhcp-client")       ;requires network
> >> +                      (delete-file "test-dhcp6-client")      ;likewise
> >> +                      #t))
> >> +                  (add-after 'install 'fix-environment-symlink
> >> +                    (lambda* (#:key outputs #:allow-other-keys)
> >> +                      ;; The install phase creates this dangling symlink:
> >> +                      ;; lib/environment.d/00-environment.conf -> ../../etc/environment
> >> +                      ;; ...which causes the 'fix-runpath' phase to error out.
> >> +                      ;; XXX: This should probably use /etc/environment instead.
> >> +                      (mkdir-p (string-append (assoc-ref outputs "out")
> >> +                                              "/etc/environment"))
> >> +                      #t)))))
> >> +    (native-inputs
> >> +     `(("docbook-xml" ,docbook-xml)
> >> +       ("docbook-xsl" ,docbook-xsl)
> >> +       ("gettext" ,gettext-minimal)
> >> +       ("gperf" ,gperf)
> >> +       ("lxml" ,python-lxml)
> >> +       ("m4" ,m4)
> >> +       ("pkg-config" ,pkg-config)
> >> +       ("xsltproc" ,libxslt)))
> >> +    (inputs
> >> +     `(("acl" ,acl)
> >> +       ("audit" ,audit)
> >> +       ("bash" ,bash)
> >
> > we probably don't need to include bash specifically, isn't it part of
> > the build system? Also, it should be bash-minimal
> 
> Bash-minimal indeed.  Oops.  :-)
> 
> However as ng0 mentioned, bash is soon part of systemd, so it won't be
> needed for very long.
> 
> (I'm not sure we can joke about this, since we've talked about including
> "gash"[0] in the initrd...)

Yeah, but that's different, right?

> [0] https://gitlab.com/rutger.van.beusekom/gash
> 
> >> +       ("bzip2" ,bzip2)
> >> +       ("coreutils" ,coreutils)
> >> +       ("cryptsetup" ,cryptsetup)
> >> +       ("curl" ,curl)
> >> +       ("dbus" ,dbus)
> >> +       ;; TODO: Add gnu-efi for bootloader functionality.
> >> +       ("elfutils" ,elfutils)
> >
> > Currently elfutils fails its test phase on armhf and aarch64, so we'll
> > need to fix this before rolling it out so we don't cut out users on
> > these platforms
> 
> That's a shame.  Users of those platforms will have to step in and do
> their part if they want to enjoy the New And Improved GuixSD.
> 
> >> +       ("glib" ,glib)
> >> +       ("glibc" ,glibc)
> >
> > what about our future Hurd users?
> 
> I'm sure Linux and the Hurd will both be subsumed by systemd in due time.
> 
> [...]
> 
> > Currently installing fails with the error:
> > Failed to run install script '/gnu/store/rl5m6cysqhizqr2nminx2nxficpiadmi-bash-4.4.12/bin/sh -c test -n "$DESTDIR" || /gnu/store/mqgzqi600k8yqhih863r6ngw0bmamqkq-systemd-238/bin/journalctl --version'
> > FAILED: meson-install
> 
> You'll need <https://bugs.gnu.org/31014> to make linking work properly.
> 
> Thanks for the feedback!

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 12:22 [PATCH] gnu: Add systemd Marius Bakke
                   ` (4 preceding siblings ...)
  2018-04-01 14:23 ` Jan Nieuwenhuizen
@ 2018-04-01 21:55 ` Björn Höfling
  5 siblings, 0 replies; 18+ messages in thread
From: Björn Höfling @ 2018-04-01 21:55 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

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

On Sun,  1 Apr 2018 14:22:59 +0200
Marius Bakke <mbakke@fastmail.com> wrote:

> Guix,
> 
> As discussed at FOSDEM, it is clear that The Shepherd does not have
> what it takes to boot a modern Linux system.  While it works today,
> adding bootloader, DNS server, NTP client, syslog, udev, seat
> management, dishwasher, hardware database, network management and
> other essential PID 1 features is going to take too much effort and
> duplicate work.
> 
> Meanwhile, GuixSD keeps drifting away from other distributions.  This
> patch is the first of many in order to gain feature parity with the
> modern GNU/Linux world.  2018 is surely the year of the GuixSD
> desktop!

Hi Marius,

I have missed that discussion at FOSDEM, but it sounds great!

Good to know about that systemd, today I tried to pack a program that
urgently needs the '/etc/os-release' file and I didn't know how to get
that in. But systemd is the "owner" of that file and so we get it for
free now. Cool (This time it's free as in beer).

Here is a great article about that file:

http://0pointer.de/blog/projects/os-release.html

So, yeah, finally GuixSD is no longer one of those small ones, but a
big player in distributions.

I'm only a bit disappointed that you couldn't get that in a bit earlier
than April 1, as I used the holidays to brainwash my head with the
services documentation. I'm so into the topic now that I painted all my
easter eggs full with parenthesis, "#~" and "#$" and dragged colored
strings between them building a big Easter-DAG, and now I should forget
about all of that? Well, OK, if it is for the future of GuixSD, I can
live with that.

Björn


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-01 20:18     ` Marius Bakke
@ 2018-04-02 21:36       ` Ludovic Courtès
  2018-04-03 22:33         ` Joshua Branson
  0 siblings, 1 reply; 18+ messages in thread
From: Ludovic Courtès @ 2018-04-02 21:36 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

Marius Bakke <mbakke@fastmail.com> skribis:

> Chris Marusich <cmmarusich@gmail.com> writes:
>
>> ludo@gnu.org (Ludovic Courtès) writes:
>>
>>> To be honest, while the Shepherd has been a fun hack, I’ve been more and
>>> more feeling that yeah, it wouldn’t cut it in the long term (it’s also
>>> become clearer Scheme as convenient as C when it comes to systems
>>> programming and things like dealing with dependency graphs.)
>>
>> I think you may have forgotten some words.  When you said "it’s also
>> become clearer Scheme as convenient as C when it comes to systems
>> programming and things like dealing with dependency graphs", what did
>> you mean?
>
> I think Ludovic meant to convey "Scheme is NOT as convenient as C when
> it comes to ...", but made something of a "Kinsley Gaffe" since the
> opposite is obviously true.

Heheh.  :-)

I was so excited by the announcement that my message was full of typos.

Ludo’.

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-02 21:36       ` Ludovic Courtès
@ 2018-04-03 22:33         ` Joshua Branson
  2018-04-04  0:44           ` Leo Famulari
  0 siblings, 1 reply; 18+ messages in thread
From: Joshua Branson @ 2018-04-03 22:33 UTC (permalink / raw)
  To: guix-devel

So this isn't an april fools joke?  guixSD may move to systemd?

On Mon, Apr 2, 2018, at 2:36 PM, Ludovic Courtès wrote:
> Marius Bakke <mbakke@fastmail.com> skribis:
> 
> > Chris Marusich <cmmarusich@gmail.com> writes:
> >
> >> ludo@gnu.org (Ludovic Courtès) writes:
> >>
> >>> To be honest, while the Shepherd has been a fun hack, I’ve been more and
> >>> more feeling that yeah, it wouldn’t cut it in the long term (it’s also
> >>> become clearer Scheme as convenient as C when it comes to systems
> >>> programming and things like dealing with dependency graphs.)
> >>
> >> I think you may have forgotten some words.  When you said "it’s also
> >> become clearer Scheme as convenient as C when it comes to systems
> >> programming and things like dealing with dependency graphs", what did
> >> you mean?
> >
> > I think Ludovic meant to convey "Scheme is NOT as convenient as C when
> > it comes to ...", but made something of a "Kinsley Gaffe" since the
> > opposite is obviously true.
> 
> Heheh.  :-)
> 
> I was so excited by the announcement that my message was full of typos.
> 
> Ludo’.
> 

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-03 22:33         ` Joshua Branson
@ 2018-04-04  0:44           ` Leo Famulari
  2018-04-04  8:41             ` Ludovic Courtès
  0 siblings, 1 reply; 18+ messages in thread
From: Leo Famulari @ 2018-04-04  0:44 UTC (permalink / raw)
  To: Joshua Branson; +Cc: guix-devel

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

On Tue, Apr 03, 2018 at 03:33:22PM -0700, Joshua Branson wrote:
> So this isn't an april fools joke?  guixSD may move to systemd?

It was a joke :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-04  0:44           ` Leo Famulari
@ 2018-04-04  8:41             ` Ludovic Courtès
  2018-04-06 18:57               ` Marius Bakke
  0 siblings, 1 reply; 18+ messages in thread
From: Ludovic Courtès @ 2018-04-04  8:41 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel, Joshua Branson

Hello Guix,

Leo Famulari <leo@famulari.name> skribis:

> On Tue, Apr 03, 2018 at 03:33:22PM -0700, Joshua Branson wrote:
>> So this isn't an april fools joke?  guixSD may move to systemd?
>
> It was a joke :)

Indeed!

That said, if the package can be of any use, I don’t have any objections
to its inclusion, especially after all the hard work that Marius and the
reviewers put in it.  ;-)  I suspect the only use case that might work
would be running it as an unprivileged user, right?  Would that make
sense?

We’d also have to make sure someone will maintain it though, which is
probably a bit of work.

Ludo’.

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

* Re: [PATCH] gnu: Add systemd.
  2018-04-04  8:41             ` Ludovic Courtès
@ 2018-04-06 18:57               ` Marius Bakke
  0 siblings, 0 replies; 18+ messages in thread
From: Marius Bakke @ 2018-04-06 18:57 UTC (permalink / raw)
  To: Ludovic Courtès, Leo Famulari; +Cc: guix-devel, Joshua Branson

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

Ludovic Courtès <ludo@gnu.org> writes:

> That said, if the package can be of any use, I don’t have any objections
> to its inclusion, especially after all the hard work that Marius and the
> reviewers put in it.  ;-)

FWIW I think my work already paid off plenty ;-)

> I suspect the only use case that might work would be running it as an
> unprivileged user, right?  Would that make sense?

Out of curiosity, I tried this:

$ /gnu/store/1f6rib753hvxpxqdih1m3zhhsiw4r91n-systemd-238/lib/systemd/systemd --user
Trying to run as user instance, but the system has not been booted with systemd.

So that does not work either.

> We’d also have to make sure someone will maintain it though, which is
> probably a bit of work.

It might as well bitrot on guix-devel instead of in the repository IMO.
It could be fun to add a (gnu packages jokes) module though...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

end of thread, other threads:[~2018-04-06 18:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-01 12:22 [PATCH] gnu: Add systemd Marius Bakke
2018-04-01 12:49 ` Ludovic Courtès
2018-04-01 17:01   ` Mark H Weaver
2018-04-01 20:07   ` Chris Marusich
2018-04-01 20:18     ` Marius Bakke
2018-04-02 21:36       ` Ludovic Courtès
2018-04-03 22:33         ` Joshua Branson
2018-04-04  0:44           ` Leo Famulari
2018-04-04  8:41             ` Ludovic Courtès
2018-04-06 18:57               ` Marius Bakke
2018-04-01 12:52 ` Nils Gillmann
2018-04-01 13:03 ` Martin Castillo
2018-04-01 14:04 ` Efraim Flashner
2018-04-01 14:19   ` Nils Gillmann
2018-04-01 20:11   ` Marius Bakke
2018-04-01 20:30     ` Nils Gillmann
2018-04-01 14:23 ` Jan Nieuwenhuizen
2018-04-01 21:55 ` Björn Höfling

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).