Commit graph

134 commits

Author SHA1 Message Date
Alfonso Sánchez-Beato
3003cabf96 scripts: support populating from configurable theme dir
Support populating initramfs with themes from the configurable theme
directory.
2021-09-27 10:03:53 +00:00
Ray Strode
2a7755febb systemd: Add plymouth-switch-root-initramfs.service to switch back to initramfs on shutdown
Add a plymouth-switch-root-initramfs.service, which will call
"plymouth update-root-fs --new-root-dir=/run/initramfs" to switch back
to the initramfs (when applicable).

Systemd will run this service before plymouthd receives the SIGTERM on
shutdown, so this will cause the plymouthd-fd-escrow helper to run
from the initramfs.

This avoids the plymouthd-fd-escrow helper keeping the rootfs busy.

Changes by Hans de Goede:
- Fix a couple of typos
- Add Conflicts=dracut-shutdown.service to plymouth-switch-root-initramfs.service
  dracut-shutdown.service restores the initramfs when it is _stopped_
  use Conflicts to make sure its ExecStop has run before we do
- Add a check for switching back to the initramfs to on_newroot () and dump
  the debug-buffer before the switch (while we still have access to /var/log).
- Also add plymouth-switch-root-initramfs.service to kexec.target.wants.
  kexec.target.wants uses --mode=shutdown, so the plymouthd-fd-escrow helper
  will run, so we need to switch to the initramfs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-04-06 13:45:41 +02:00
Hans de Goede
ba1a1e28d3 scripts: Remove new-object.sh
Remove new-object.sh. As discussed in:

https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/113

It is not used (and may very well have never been used?).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-03-06 10:40:36 +01:00
Zhao Qiang
6844c84704 build-goo: Remove vestigial remnants of old GDM integration code.
commit 04102125 removed a feature, only several versions of
GDM relied on for doing the splash to login screen transition.
but it missed a few spots in the build goo and documentation. So
this commit does another pass to fully clean up any lingering
references to obsolete GDM transition code.
2020-03-07 00:36:54 +08:00
Böszörményi Zoltán
19f3885d3e Allow running plymouth-populate-initrd in a cross-compiler environment
Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
2019-10-30 19:36:52 +00:00
Hans de Goede
8e811f8f88 themes: spinner/bgrt: Modify password dialog to match gnome 3.34 changes
There have been some small tweaks to the gnome lockscreen password
entry filed which we use as template for the diskcrypt password dialog,
adjust our dialog to match these tweaks.

Also move the keyboard indicator to be close to the entry, so that it
is clear it belongs to the entry.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-10-15 11:33:55 +02:00
Hans de Goede
5409977505 scripts: Add a logrotate file for /var/log/boot.log
Since plymouth concatenates boot logs one after the other in
/var/log/boot.log, causing it to grow endlessly. we need to logrotrate it.

Fixes #31

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-10-13 16:46:42 +02:00
Alberto Ruiz
b26a956a11 scripts: Add keymap-render.py script
Add a script for generating a png with the short-name (ignoring variants)
of all keymaps listed by "localectl list-keymaps" pre-generated.

This scripts also generates a ply-keymap-metadata.h file with info on
which pre-generated keymap name is where in the png.

This will be used in a follow-up commit to add support for a new
keyboard-keymap-icon control to libply-splash-graphics.

Note that this commit does not add the generated keymap-render.png file,
this file will be added to each themes image-dir separately as the color
of the pre-generated text may differ per theme.

Changes by Hans de Goede:
- Change generated metadata into a C header file
- Drop drawing of curved corners, we just want the text
- Add special handling for dvorak

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-10-01 00:43:34 +02:00
zhaoqiang
8e578dce5b scripts: update file plymouth.spec to integrate recent fixes. 2019-09-04 07:25:15 +00:00
Hans de Goede
6117fe683b plymouth-populate-initrd: Don't assume the ImageDir is the theme-dir
Before this commit plymouth-populate-initrd was only recursively copying the
/usr/share/plymouth/themes/$PLYMOUTH_THEME_NAME to the initrd, assuming
that ImageDir will point there.

This makes it impossible for 2 themes to share their ImageDir, which is
desirable for example for the spinner and bgrt themes, which use the same
images with slightly different settings.

This commit also makes plymouth-populate-initrd also copy the ImageDir
if it is different from the theme-dir, making it possible for ImageDir
to point to a different dir.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-01-16 09:29:32 +01:00
Ray Strode
4ff6d59d10 populate-initrd: drop unused local variable
the inst_library function declares a variable `_lib`
that's completely unused.

This commit removes the declaration.
2018-10-15 21:02:50 -04:00
mike@mgoodwin.net
8982822bd8 populate-initrd: handle themes with subdirs
Not all distros use the upstream plymouth-populate-initrd
script to populate their initramfs.  As a consequence,
some themes have been developed that use subdirectories,
(which is not supported by plymouth-populate-initrd).

This commit adds support for that feature, so that
preexisting themes get properly installed.

https://bugs.freedesktop.org/show_bug.cgi?id=103424
2017-11-09 13:23:24 -05:00
Daniel Baumann
f9425978e1 scripts: Use >&2 instead of /dev/stderr
/dev/stderr isn't always available in chroots, so use
>&2 instead.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581649
https://bugs.freedesktop.org/show_bug.cgi?id=102388
2017-08-24 11:42:24 -04:00
Will Woods
22e0596c3f plymouth-populate-initrd: fix THEME_OVERRIDE with empty conf
If you set PLYMOUTH_THEME_NAME to override the theme in an initrd
(as e.g. lorax does when building upgrade.img), plymouth-populate-initrd
tries to edit plymouthd.conf to enable that theme.

Unfortunately, the existing `sed` line doesn't work if your
plymouthd.conf is empty or all commented out - which is how we currently
ship it.

So before modifying the config, make sure it has a [Daemon] section
header, and a Theme=[placeholder] line for us to modify.

Resolves: RHBZ#1223344
2016-05-20 16:31:01 -04:00
Ray Strode
9a58de52dd Revert "populate-initrd: support theme subfolders"
This reverts commit 3a60023f26.
2016-05-16 12:13:19 -04:00
Ray Strode
3a60023f26 populate-initrd: support theme subfolders
Some themes like to keep their content in subfolders,
but plymouth-populate-initrd currently fails to copy
those subfolders over to the initrd.

This commit fixes that.

https://bugzilla.gnome.org/show_bug.cgi?id=94883
2016-04-11 07:48:40 -04:00
Ray Strode
5e55bdb33e scripts: change out uncrustify config
I'm going to be updating the coding style of plymouth, so
this is the new uncrustify config.
2014-05-20 15:16:47 -04:00
Enrico Tagliavini
2d85c8d0a3 populate-initrd: install binaries to their configured location
If plymouth is configured --with-system-root-install=no then the
systemd unitd files will write the paths of plymouth and plymouthd
relative to /usr .  The script currently hardcodes installing them
to the initrd's /

This commit makes sure they get placed on the same part of the of
the initrd filesystem as systemd expects to find them.

https://bugs.freedesktop.org/show_bug.cgi?id=74174
2014-01-29 09:18:22 -05:00
Ray Strode
293e37ed93 scripts: plymouth-update-initrd should call dracut -f with no args
dracut -f does the right thing on it's own, so we shouldn't try
to overspecify it
2014-01-10 15:55:20 -05:00
Ray Strode
319448f651 scripts: make plymouth-update-initrd somewhat more useful
plymouth-update-initrd is a script that should probably be eventually
dropped.  It was originally created to unpack and initrd and graft
plymouth in.  Later, it just became a thin wrapper around mkinitrd.

These days, very few (any?) distros use mkinitrd.  Change it to call
dracut instead.

Relevant irc log:

<newfo> this is SO WRONG:
http://cgit.freedesktop.org/plymouth/tree/scripts/plymouth-update-initrd
<newfo> it won't work on any distro
<newfo> would you mind updating that please?
<newfo> replace the mkinitrd line in
/usr/libexec/plymouth/plymouth-update-initrd to  dracut -f
/boot/initramfs-$(uname -r).img $(uname -r)
<-- newfo has quit (Client Quit)
2013-10-15 09:52:46 -04:00
Ray Strode
8be792a5a7 systemd: add plymouth-start.service to initrd-switch-root.target
<haraldh> halfline, can you add plymouth-start.service to
plymouth-populate-initrd ??
<halfline> haraldh: sure, can you give me details on the bug its fixing?
<haraldh> except, if you put yourself out of the plymouth cgroup
<haraldh> and the "@" in argv[0][0]
<haraldh> better put plymouth-start.service in the
initrd-switch-root.target
<haraldh> easier
<halfline> well we already do the "@" in argv[0][0]
<halfline> and we already put KillMode=none SendSIGKILL=no in the
service file
<halfline> but will add the change
<haraldh> hmm, ok
2013-03-13 10:24:14 -04:00
Ville Skyttä
5ee5644f6c generate-initrd: Use pigz if available. 2013-02-12 17:33:19 -05:00
Will Woods
a9703fb6e3 populate-initrd: If PLYMOUTH_THEME_NAME is set, write it into plymouthd.conf
You can set PLYMOUTH_THEME_NAME when building initramfs to get a
different theme into initramfs, but this doesn't change the default
theme, so the resulting initramfs won't actually use the theme we
installed.

This patch makes plymouth-populate-initrd rewrite the 'Theme=XXX' line
in plymouthd.conf, so plymouth will use the theme we install.
2012-11-29 17:14:44 -05:00
Ray Strode
c8e548d5e4 systemd: don't run read-write service from initrd
the initrd hits the local-fs.target as part of its normal
boot process.  We used to use local-fs.target as a way of
knowing the system / is read-write.  This no longer is a
valid mechanism.

This commit:

1) Stops installing plymouth-read-write service in the initrd
2) Makes it so if it does end up in the initrd it won't be
used

Related to fedora bug 830482
2012-07-26 13:05:22 -04:00
Ray Strode
ca2f604c3b populate-initrd: copy service files to initrd
Since we're in charge of the systemd service files now,
we should probably be in charge of copying them to the initrd.
2012-07-23 17:37:03 -04:00
Ray Strode
6fac021e66 populate-initrd: put plymouthd in /sbin not /bin
This matches what we do post-boot better
2012-07-17 17:09:43 -04:00
Ray Strode
d80a23cb59 populate-initrd: don't depend on inst from mkinitrd/dracut
Having the dependency is awkward and causes problems, so
don't bother.

This commit just copy and pastes the relevant bits for
inst().

Ideally, this would be an installroot command implemented in
C in util-linux, but shrug
2012-06-06 15:10:35 -04:00
Ray Strode
270615b516 populate-initrd: add new location for dracut source functions 2012-04-04 15:02:53 -04:00
Ray Strode
b8de41ef07 plymouth-populate-initrd: Check for new path to dracut-functions 2012-02-23 10:04:37 -05:00
Lucian Muresan
22a1273bb2 drm: reduce minimum build requirements
This patch adds the respective configure options to make it possible to
disable libdrm_intel, libdrm_radeon, libdrm_nouveau, and libkms
independently from each other.

https://bugs.freedesktop.org/show_bug.cgi?id=29804
2011-02-01 14:33:23 -05:00
Ray Strode
0f1b124a2b populate-initrd: pre-expand logofile variable
The logofile by default is $datadir/plymouth.png

$datadir contains a reference to $datarootdir, so
we need to preexpand the variable in configure, for
the right value to get written to plymouth-populate-initrd.
2010-10-13 08:26:42 -04:00
Brett Witherspoon
d7f59d9dc2 populate-initrd: don't hardcode client and daemon path
When not installing in system root, the populate initrd script would not
install the client or daemon due to the paths being hardcoded.
Environmental variables are also now available to override the defaults.
2010-10-13 08:20:44 -04:00
Ray Strode
da723a3033 set-default-theme: redirect to /dev/null not /null
The set-default-theme script was incorrectly redirecting
stderr from a grep command to /null instead of /dev/null.

This causes a /null file to get created on the filesystem.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=30576
Reported by: David LeBlanc <leblancdw@yahoo.com>
2010-10-04 09:47:24 -04:00
Ray Strode
288a42120e set-default-theme: exit 0 at bottom of file
This is so that if there is no --rebuild-initrd it still
exits successfully.
2010-09-29 13:25:22 -04:00
Ray Strode
e5380671be [populate-initrd] don't croak when encountering broken symlink
Because of an apparent think-o in the script, if a custom theme
has a broken symlink in it, plymouth-populate-initrd would silently
stop processing files and ship an incomplete set of data files.

This commit changes "break" to "continue" so that broken symlinks
are ignored, which was probably the original intent.
2010-07-13 17:33:39 -04:00
Bruce Jerrick
95bf9eed86 [set-default-theme] Properly quote arguments to basename
It's important to make sure the theme name is properly
quoted when passed to the basename command.  This
is because, if the theme name is empty we want the empty
string returned, not the suffix that would otherwise be
stripped off.

Some discussion here:
https://bugzilla.redhat.com/show_bug.cgi?id=606634
2010-07-06 11:16:43 -04:00
Ray Strode
070d2a0a5a [set-default-theme] More fixes to the fallback logic
It still wasn't properly falling back in the event the
configured theme was uninstalled.
2010-05-14 10:56:00 -04:00
Ray Strode
07d5f10f60 [set-default-theme] Add more compat goo
If there's no configured theme installed, return "text"
2010-05-07 15:35:49 -04:00
Charlie Brej
991549626b [plymouth-set-default-theme] Replace tabs with spaces 2010-03-25 22:42:26 +00:00
Frederic Crozat
75ae8d50cc [plymouth-set-default-theme] handle old symlink configuration file 2010-03-25 17:30:41 +01:00
Ray Strode
2ecbcd99eb [set-default-theme] Another fix with commented group lines 2010-03-24 15:10:35 -04:00
Ray Strode
91547048f8 [set-default-theme] properly handle commented out [Daemon] section
Before we would assume there was a valid [Daemon] section already
if a comment contained [Daemon] in it.
2010-03-24 13:59:17 -04:00
Ray Strode
cf766763f2 [daemon] Ship default configuration files
This commit adds plymouthd.defaults and plymouthd.conf.

The former is for distributions to override, and the latter
is for administrators to change.
2010-03-23 18:00:50 -04:00
Ray Strode
5baed15f09 [set-default-theme] Write plymouthd.conf instead of symlink
Now that the daemon looks for the default theme in configuration
files, we should make plymouth-set-default-theme write the
configuration files instead of doing symlinks.

That's what this commit does.
2010-03-23 17:54:08 -04:00
Scott James Remnant
df26cfe6ed [scripts] Don't hardcode LIBEXECDIR and DATADIR paths
The scripts hard-coded the paths for LIBEXECDIR and DATADIR, unless
passed as environment variables.  Instead of doing this, which breaks
if plymouth is installed outside of /usr, set these derived from the
configure $libexecdir and $datadir variables just as we do for
pkg-config, etc.

Since we use so many variables, it makes more sense to generate these
scripts from config.status rather than having special Makefile rules
for them.
2010-03-02 20:08:22 +00:00
Ray Strode
cc85f63927 [splash] Rename libplybootsplash to libply-splash-core
Splashes aren't just shown for "boot" so including "boot" in
the name isn't right.  Also, right now we link against libpng
even if we don't have any splash that uses it.  This is the first
step toward making libpng only get linked to graphical splashes.

We'll need to move the graphical bits to their own library to
complete the process.
2010-01-13 16:47:09 -05:00
Adrian Glaubitz
c588145997 [set-default-theme] Provide GNU-style short options 2009-12-16 08:35:06 -05:00
Charlie Brej
828fda6fb5 [set-default-theme] Make --help format match that of plymouth and plymouthd
Minor rejig to make the help messages more consistant. Also removes some tabs
and empty lines.
2009-12-14 21:29:01 +00:00
Ray Strode
e40e0b8719 [set-default-theme] Call usage function in --help
This way the top line of the help output gives usage.
2009-12-05 12:08:53 -05:00
Adrian Glaubitz
8d6358fc4f [set-default-theme] Add --help option
When running new, unfamiliar commands I usually invoke them with
--help to see what options they have. For plymouth-set-default-theme,
there is no --help option which I find a bit confusing, especially
since the usage is not straight-forward.

There is now an additional function "show_help" which displays an
help output when invoking plymouth-set-default-theme with --help.
2009-12-05 12:08:01 -05:00