all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#26970: plymouth
@ 2017-05-17 19:51 ng0
  2017-05-30 21:14 ` Ricardo Wurmus
  2020-05-07  8:41 ` Ricardo Wurmus
  0 siblings, 2 replies; 3+ messages in thread
From: ng0 @ 2017-05-17 19:51 UTC (permalink / raw)
  To: 26970

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

This patch adds plymouth, the early bootprocess daemon.
It provides a 'boot splash'.

Users will not install this on their own (or be able to
use it freestanding) which is why we need at least a
system-service for this.

I'd hate to be the bottleneck for this, so here is my work
from back in december (builds okay!).

According to Gentoo, we will need to apply changes to the
GRUB menu and are advised to disable the linux boot logo
display (https://wiki.gentoo.org/wiki/Plymouth).

I also advise like we concluded in a chat in december,
that we write a system test for this.

-- 
https://pragmatique.xyz
PGP: https://people.pragmatique.xyz/ng0/

[-- Attachment #2: 0001-gnu-Add-plymouth.patch --]
[-- Type: text/plain, Size: 5956 bytes --]

From 978af1382601655ebe40bd40d37fdd23f50c8af7 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@libertad.pw>
Date: Fri, 23 Dec 2016 19:00:22 +0000
Subject: [PATCH] gnu: Add plymouth.

* gnu/packages/freedesktop.scm (plymouth): New variable.
---
 gnu/packages/freedesktop.scm | 93 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 85a6c8b26..63fdbcde7 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
 ;;; Copyright © 2017 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -48,6 +49,7 @@
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -927,3 +929,94 @@ library to access fingerprint readers, over the D-Bus interprocess
 communication bus.  This daemon layer above libfprint solves problems related
 to applications simultaneously competing for fingerprint readers.")
     (license license:gpl2+)))
+
+(define-public plymouth
+  (package
+    (name "plymouth")
+    (version "0.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.freedesktop.org/software/"
+                           "plymouth/releases/" name "-" version ".tar.bz2"))
+       (sha256
+        (base32
+         "0zympsgy5bbfl2ag5nc1jxlshpx8r1s1yyjisanpx76g88hfh31g"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags (list (string-append "--sbindir="
+                                              (assoc-ref %outputs "out")
+                                              "/sbin")
+                               (string-append "--bindir="
+                                              (assoc-ref %outputs "out")
+                                              "/bin")
+                               (string-append "--prefix="
+                                              (assoc-ref %outputs "out"))
+                               (string-append "--exec-prefix="
+                                              (assoc-ref %outputs "out"))
+                               (string-append "--libexecdir="
+                                              (assoc-ref %outputs "out")
+                                              "/lib")
+                               (string-append "--sysconfdir="
+                                              "/etc")
+                               (string-append "--localstatedir="
+                                              "/var")
+                               (string-append "--with-logo="
+                                              "/etc/plymouth/logo.png")
+                               (string-append "--with-background-color="
+                                              "0x000000")
+                               (string-append "--with-background-start-color-stop="
+                                              "0x000000")
+                               (string-append "--with-background-end-color-stop="
+                                              "0x000000")
+                               "--without-system-root-install"
+                               "--without-rhgb-compat-link"
+                               "--enable-tracing"
+                               "--disable-systemd-integration"
+                               "--enable-pango"
+                               "--enable-gdm-transition"
+                               "--enable-gtk")
+       #:make-flags (list (string-append "plymouthd_defaultsdir="
+                                         (assoc-ref %outputs "out")
+                                         "/share/plymouth")
+                          (string-append "plymouthd_confdir="
+                                         (assoc-ref %outputs "out")
+                                         "/etc/plymouth"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'fix-docbook
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "docs/Makefile.in"
+               (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
+                (string-append (assoc-ref inputs "docbook-xsl")
+                               "/xml/xsl/docbook-xsl-"
+                               ,(package-version docbook-xsl)
+                               "/manpages/docbook.xsl")))
+             (setenv "XML_CATALOG_FILES"
+                     (string-append (assoc-ref inputs "docbook-xml")
+                                    "/xml/dtd/docbook/catalog.xml"))
+             #t)))))
+    (inputs
+     `(("gtk+" ,gtk+)
+       ("glib" ,glib)
+       ("cairo" ,cairo)
+       ("libdrm" ,libdrm)
+       ("pango" ,pango)
+       ("libpng" ,libpng)
+       ("eudev" ,eudev)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("libxslt" ,libxslt)
+       ("docbook-xsl" ,docbook-xsl)
+       ("docbook-xml" ,docbook-xml)))
+    (synopsis "Graphical boot animation (splash) and logger")
+    (home-page "https://www.freedesktop.org/wiki/Software/Plymouth/")
+    (description
+     "Plymouth is an application that runs very early in the boot
+process (even before the root filesystem is mounted!) that provides
+a graphical boot animation while the boot process happens in the
+background.
+
+You are not supposed to install this on your own, it is only useful
+with system integration.")
+    (license license:gpl2+)))
-- 
2.13.0


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

* bug#26970: plymouth
  2017-05-17 19:51 bug#26970: plymouth ng0
@ 2017-05-30 21:14 ` Ricardo Wurmus
  2020-05-07  8:41 ` Ricardo Wurmus
  1 sibling, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2017-05-30 21:14 UTC (permalink / raw)
  To: ng0; +Cc: 26970


> Subject: [PATCH] gnu: Add plymouth.
>
> * gnu/packages/freedesktop.scm (plymouth): New variable.
> ---

Thanks!

[…]

> +    (arguments
> +     `(#:configure-flags (list (string-append "--sbindir="
> +                                              (assoc-ref %outputs "out")
> +                                              "/sbin")
> +                               (string-append "--bindir="
> +                                              (assoc-ref %outputs "out")
> +                                              "/bin")
> +                               (string-append "--prefix="
> +                                              (assoc-ref %outputs "out"))
> +                               (string-append "--exec-prefix="
> +                                              (assoc-ref %outputs "out"))
> +                               (string-append "--libexecdir="
> +                                              (assoc-ref %outputs "out")
> +                                              "/lib")

Is it really necessary to set *all* of these?  Usually it’s sufficient
to just set “--prefix” and that’s done by default.

> +                               (string-append "--sysconfdir="
> +                                              "/etc")

You don’t need string-append here.  Is it *necessary* to use the global
/etc here, or can it be told (at runtime) to read its configuration
files from elsewhere?

> +                               (string-append "--localstatedir="
> +                                              "/var")
> +                               (string-append "--with-logo="
> +                                              "/etc/plymouth/logo.png")

I would prefer if we didn’t have to use the global /etc here.  You don’t
need string-append here.

> +                               (string-append "--with-background-color="
> +                                              "0x000000")
> +                               (string-append "--with-background-start-color-stop="
> +                                              "0x000000")
> +                               (string-append "--with-background-end-color-stop="
> +                                              "0x000000")

Why are these provided?

> +                               "--without-system-root-install"
> +                               "--without-rhgb-compat-link"
> +                               "--enable-tracing"
> +                               "--disable-systemd-integration"
> +                               "--enable-pango"
> +                               "--enable-gdm-transition"
> +                               "--enable-gtk")

And what about these?  Does “disable-systemd-integration” mean that it
won’t work with elogind?

> +       #:make-flags (list (string-append "plymouthd_defaultsdir="
> +                                         (assoc-ref %outputs "out")
> +                                         "/share/plymouth")
> +                          (string-append "plymouthd_confdir="
> +                                         (assoc-ref %outputs "out")
> +                                         "/etc/plymouth"))

These differ from the configure flags above that say that the global
/etc should be used.  Is this on purpose?

> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-before 'configure 'fix-docbook
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (substitute* "docs/Makefile.in"
> +               (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
> +                (string-append (assoc-ref inputs "docbook-xsl")
> +                               "/xml/xsl/docbook-xsl-"
> +                               ,(package-version docbook-xsl)
> +                               "/manpages/docbook.xsl")))
> +             (setenv "XML_CATALOG_FILES"
> +                     (string-append (assoc-ref inputs "docbook-xml")
> +                                    "/xml/dtd/docbook/catalog.xml"))
> +             #t)))))
> +    (inputs
> +     `(("gtk+" ,gtk+)
> +       ("glib" ,glib)
> +       ("cairo" ,cairo)
> +       ("libdrm" ,libdrm)
> +       ("pango" ,pango)
> +       ("libpng" ,libpng)
> +       ("eudev" ,eudev)))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)
> +       ("libxslt" ,libxslt)
> +       ("docbook-xsl" ,docbook-xsl)
> +       ("docbook-xml" ,docbook-xml)))
> +    (synopsis "Graphical boot animation (splash) and logger")
> +    (home-page "https://www.freedesktop.org/wiki/Software/Plymouth/")
> +    (description
> +     "Plymouth is an application that runs very early in the boot
> +process (even before the root filesystem is mounted!) that provides
                                      “and” ——————————————^

> +a graphical boot animation while the boot process happens in the
> +background.

I wonder how this will work “before the root filesystem is mounted” when
the store actually sits on the root filesystem.  I would prefer to only
add this once it actually works, so I’d very much like to see a proof of
concept for how to use it in a system.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

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

* bug#26970: plymouth
  2017-05-17 19:51 bug#26970: plymouth ng0
  2017-05-30 21:14 ` Ricardo Wurmus
@ 2020-05-07  8:41 ` Ricardo Wurmus
  1 sibling, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2020-05-07  8:41 UTC (permalink / raw)
  To: 26970-done

Commit 5b9bdeb52cc25e35e74bbc10fa102e3fcc4baab9 adds Plymouth.

I updated to 0.9.4, removed all the unnecessary configure and make
flags, removed GTK support because it blew up the closure size from
~200MB to 800MB, which isn’t suitable for use in an initrd.

I tried using it in a VM, but I haven’t yet been able to make the splash
appear.  It seems to be unable to find a graphical display and switches
to the “detailed” view, which merely prints to the console.

I did try loading uvesafb in the initrd, but all I get is a garbled
screen.

On the plus side, plymouth does work as expected on my booted machine,
so I went ahead and pushed the commit.

--
Ricardo




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

end of thread, other threads:[~2020-05-07  8:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-17 19:51 bug#26970: plymouth ng0
2017-05-30 21:14 ` Ricardo Wurmus
2020-05-07  8:41 ` Ricardo Wurmus

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.