Commit graph

125 commits

Author SHA1 Message Date
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
Ray Strode
8e70c530ea [set-default-theme] Drop nash dependency
Now we require one of

1) /bin/plymouth being installed
2) PLYMOUTH_PLUGIN_PATH being set
3) LIB being set (for compatibility)
2009-11-03 23:31:51 -05:00
Ray Strode
920051bc55 [drm] Add start of a drm plugin
This commit adds most of the non-driver specific bits
necessary for backing a renderer plugin.

Subsequent commits will add the driver specific bits.
2009-09-28 17:55:19 -04:00
Ray Strode
d47959e042 [renderer] Add start of frame-buffer plugin
Much of this code comes directly from ply-frame-buffer in libply,
but shoehorned to fit into the renderer plugin interface.

One improvement over the old code is it tracks VT changes, and
stops drawing when the wrong VT is active.
2009-09-28 11:23:37 -04:00
Ray Strode
3c2e1453d9 [populate-initrd] Don't require set_verbose function
If it's not around, define it, so we can use it without error
2009-09-10 09:55:18 -04:00
Ray Strode
736822e2f2 [populate-initrd] Try to find inst more aggressively
We've been using the inst function provided by mkinitrd
to install plymouth and its dependencies into the initrd
root, but mkinitrd may not be installed in a dracut world,
and dracut has its own inst function.

This commit tries getting access to either of them, before
bailing. At some point we may want to bundle our own inst
function or get a new flag added to /usr/bin/install to do
what inst does.
2009-09-09 11:26:46 -04:00
Ray Strode
803204e6cb [scripts] add plymouth-generate-initrd script
One useful way to use plymouth is by installing it into
an auxillary initrd image, that overlays the primary one.

This allows plymouth and its current theme to get updated
indepedently of the kernel and the rest of the initrd
stuff.

plymouth-generate-initrd creates an initrd named:

     initrd-plymouth.img

in /boot that is suitable for use a second initrd on
the initrd line in grub.conf.
2009-08-28 20:04:17 -04:00
Ray Strode
d633072a71 [populate-initrd] Get plugin path from plymouth
Previously, we'd try to guess the plugin path based
on the arch of the running process.  That's sort of
fragile, so better to just install plugins where
plymouth says it's going to look for them.
2009-08-25 14:53:31 -04:00
Frederic Crozat
279e709d91 allow to change system release filename with configure option 2009-08-11 17:25:41 +02:00
Ray Strode
6acf834f1e [splash] Split splashes into plugins and themes
Some of the plugins (well, the glow plugin) would be a lot more
versatile if they could be reused for multiple splashes with different
images.

This commit splits boot splashes into two parts, the plugin engine which
does all the dirty work, and the theme which says which plugin to use
and optionally how the plugin should work (using plugin specific
key/value pairs)
2009-05-20 17:27:52 -04:00