Using the date at build time prevents the build from being reproducible
later.
In order to facilitate reproducible builds, this commit changes the
logic to derive the version from the date of the last commit.
Plymouth currently assumes that setting the scanout buffer will succeed.
if it fails because of a driver bug or transient failure it should try
again next frame.
This commit adds that error handling code.
Numbers are arbitrary, and we've never successfully made it to
version 1.0 after like 15 years or something.
Furthermore, plymouth has a very slow release schedule at present
and some distros hate building from git.
So, I'd like to start generating tarballs more regularly.
Adopting a version number derived from the date will help facilitate
that.
This commit changes AC_INIT to compute the version automatically.
https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/143https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/158
Allow themes to configure at which percentage of the boot progress the
animation should transition to the end animation.
At Endless we use this to only show the end animation from the start of
the boot splash by setting it to 0.0.
Currently if the screen is rotated by 90 degrees, the effective
width/height will be swapped. Thus we will incorrectly detect the panel
as HiDPI.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Add a new option called ThemeDir to the configuration file, so a
configurable directory can be used to ship themes. The option applies
only to the theme specified in the same configuration file.
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>
When plymouth receives SIGTERM during shutdown or reboot, we must
exit cleanly to avoid keeping files open on the rootfs and to avoid
making drmModeSetCrtc () calls after the kms driver's shutdown method
has ran.
But at the same time we also want the boot-splash to stay up (in its
idle form) until the system actually reboots or powers off.
So we want to avoid the boot-splash getting replaced by e.g.
the text-console.
Add a plymouthd-fd-escrow helper which will get forked off when we
receive a SIGTERM in reboot/shutdown mode with pixel-displays active.
This helper will keep the fds for the pixel-displays open, so that
the boot-splash stays up until the end.
Changes by Hans de Goede:
- Start the escrow helper from main.c instead of from the drm plugin
- Rename the helper from plymouthd-drm-escrow to plymouthd-fd-escrow, since it
will be used to escrow fbdev fd-s too now
- In the child of the fork, continue with quiting normally (letting the
bootsplash become idle) instead of exiting directly
- Make plymouthd-fd-escrow a normal dynamic binary instead of a static binary,
the initrd already contains dynamic binaries so it does not have to be static
- Split the changes adding plymouth-switch-root-initramfs.service into a
separate patch
- Rewrite commit message
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
When working on plymouth I always have "plymouth.debug=stream:/dev/null"
on the kernel commandline. This enables tracing without logging anything
to the console and causes the entire trace to be logged to
/var/log/plymouth-debug.log when plymouth quits.
This is very useful for debugging (non crash) issues with plymouth at boot.
With the recent "main: Cleanly quit on SIGTERM" change plymouth will now
also write a trace log to /var/log/plymouth-debug.log on shutdown/reboot,
but this will be overwritten again on boot by the boot log.
This commit changes the default debug_buffer_path value from:
/var/log/plymouth-debug.log to /var/log/plymouth-shutdown-debug.log
when in shutdown or reboot mode so that it does not get overwritten
by the debug-log written at boot.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Now that we are no longer unconditionally opting out of getting terminated,
we get send a SIGTERM when transitioning from the rootfs back to the initrd
on poweroff/reboot.
Catch this SIGTERM and then exit cleanly by calling the on_quit handler,
besides exiting cleanly being the right thing to do, this will also allow the
boot-splash to go idle, so that it can cleanly finish the end-animation.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>