From: Nils Gillmann <ng0@n0.is>
To: Marius Bakke <mbakke@fastmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add systemd.
Date: Sun, 1 Apr 2018 20:30:16 +0000 [thread overview]
Message-ID: <20180401203016.bh6z6hli6pfnmjir@abyayala> (raw)
In-Reply-To: <87vadabsaj.fsf@fastmail.com>
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!
next prev parent reply other threads:[~2018-04-01 20:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-04-01 14:23 ` Jan Nieuwenhuizen
2018-04-01 21:55 ` Björn Höfling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180401203016.bh6z6hli6pfnmjir@abyayala \
--to=ng0@n0.is \
--cc=guix-devel@gnu.org \
--cc=mbakke@fastmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this 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).