diff --git a/main/postmarketos-bootsplash/20-plymouth.conf b/main/postmarketos-bootsplash/20-plymouth.conf new file mode 100644 index 000000000..ad89dc98a --- /dev/null +++ b/main/postmarketos-bootsplash/20-plymouth.conf @@ -0,0 +1,7 @@ +# This is required for plymouth to show any splash: +splash + +# If plymouth detects *any* serial console, it disables the splash, even if +# there's a valid drm-enabled console available. This tells plymouth to run +# anyways. +plymouth.ignore-serial-consoles diff --git a/main/postmarketos-bootsplash/99-shutdown-pbsplash.stop b/main/postmarketos-bootsplash/99-shutdown-pbsplash.stop deleted file mode 100644 index 9672b692b..000000000 --- a/main/postmarketos-bootsplash/99-shutdown-pbsplash.stop +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -VT=7 - -# Retrieve device name -. /usr/share/misc/source_deviceinfo - -# Do not show splash if framebuffer is disabled -if [ "$deviceinfo_no_framebuffer" = "true" ]; then - return; -fi - -# Do not show splash if PMOS_NOSPLASH is set -if grep -q PMOS_NOSPLASH /proc/cmdline; then - return; -fi - -# Run on separate VT to avoid interference of display managers -chvt "$VT" - -# Run splash -pbsplash -s /usr/share/pbsplash/pmos-logo-text.svg -b "Linux $(uname -r) | $deviceinfo_codename" -m "Shutting down..." & diff --git a/main/postmarketos-bootsplash/APKBUILD b/main/postmarketos-bootsplash/APKBUILD index 28dcea5de..c18f3ea5d 100644 --- a/main/postmarketos-bootsplash/APKBUILD +++ b/main/postmarketos-bootsplash/APKBUILD @@ -1,61 +1,51 @@ maintainer="Casey Connolly " pkgname=postmarketos-bootsplash -pkgver=0.3.1 -pkgrel=1 +pkgver=0.4.0 +pkgrel=0 pkgdesc="pmOS integration components for pbsplash" url="https://postmarketos.org" arch="all" license="CC-BY-SA-3.0" -depends="devicepkg-utils pbsplash" +depends=" + devicepkg-utils + font-droid + plymouth + plymouth-drm + postmarketos-plymouth-themes +" +depends_openrc="plymouth-openrc-plugin" options="!check" # no testsuite -subpackages="$pkgname-openrc $pkgname-systemd" +subpackages="$pkgname-openrc" source=" - kill-pbsplash - kill-pbsplash.service - shutdown-splash.service - kill-pbsplash-override.conf - 99-shutdown-pbsplash.stop - OpenSans-Regular.svg - pmos-logo.svg - pmos-logo-text.svg - pmos-logo-text-epaper.svg + 20-plymouth.conf + plymouthd.conf postmarketos-bootsplash.files " -install="postmarketos-bootsplash-openrc.post-install" +replaces="plymouth" package() { - install -Dm755 "$srcdir/kill-pbsplash" -t "$pkgdir"/etc/init.d/ - install -Dm755 "$srcdir/99-shutdown-pbsplash.stop" -t "$pkgdir"/etc/local.d/ - install -Dm644 "$srcdir"/OpenSans-Regular.svg -t "$pkgdir"/usr/share/pbsplash/ - install -Dm644 "$srcdir"/pmos-logo.svg -t "$pkgdir"/usr/share/pbsplash/ - install -Dm644 "$srcdir"/pmos-logo-text.svg -t "$pkgdir"/usr/share/pbsplash/ - install -Dm644 "$srcdir"/pmos-logo-text-epaper.svg -t "$pkgdir"/usr/share/pbsplash/ + # NOTE: install files to initramfs-extra due to size install -Dm644 "$srcdir"/postmarketos-bootsplash.files \ - "$pkgdir"/usr/share/mkinitfs/files/30-postmarketos-bootsplash.files + "$pkgdir"/usr/share/mkinitfs/files-extra/30-postmarketos-bootsplash.files - for _service in display-manager emergency getty@ rescue shutdown-splash; do - install -Dm644 "$srcdir/kill-pbsplash-override.conf" -t \ - "$pkgdir"/usr/lib/systemd/system/"$_service".service.d/ - done + install -Dm644 "$srcdir"/plymouthd.conf \ + "$pkgdir"/usr/share/plymouth/plymouthd.defaults - install -Dm644 "$srcdir/shutdown-splash.service" \ - -t "$pkgdir"/usr/lib/systemd/system/ - for target in halt reboot shutdown; do - mkdir -p "$pkgdir"/usr/lib/systemd/system/"$target".target.wants - ln -s ../shutdown-splash.service \ - "$pkgdir"/usr/lib/systemd/system/"$target".target.wants/ - done + touch bootsplash-trigger + install -Dm644 bootsplash-trigger \ + "$pkgdir"/usr/share/mkinitfs-triggers/bootsplash + + install -Dm644 20-plymouth.conf -t "$pkgdir"/usr/lib/kernel-cmdline.d +} + +openrc() { + default_openrc + + mkdir -p "$subpkgdir" } sha512sums=" -aa3489ae15a36f3dd247d6850c72c8431365058e248948bac6c89bb0b77de7eca3b99112eec5fde2e7ca55b8a03a74fa224055696e798f3ae5a0aefc92456334 kill-pbsplash -8be71d7901bae213408bdc60e1c8429502fd0082fc60ec5080ac3968e652986e9869223d5297363f0f5bbdd5dae848c9ddd56c412fc4017478d00b72af423cf6 kill-pbsplash.service -476c7a8106429c35e772eaf98e257f7a77070050431875113c7c0c75a358250757a381086c7302f1eded0d4cde88d2e63f9fa5d69b6fce46e2d908afd8d9323a shutdown-splash.service -14f725acf0737306e56bb5aba0296af48925e9706c975b5b79c2562ddc88b1858c6a71a814dcf83fb080fb87ee20f337c9d2ee4feb4dc31abc71aed056771262 kill-pbsplash-override.conf -ad54176548c67bb1cb1208588847d0269c388b61fc3a96ec775b747c3d90d3402a016e50146858c70552f3f4159cfba2d88598edd930e1127cf79b2eb9bdcfff 99-shutdown-pbsplash.stop -2387c64d84f0ba3ee76925f55c87ce025140aa3cd462107a851c34ffd89bd52f606e0d1f9f371d4f642d96545d5cc1bc0fcfb23ca7629a9149055f068da6bffd OpenSans-Regular.svg -98984fd67b99400d2b08422c4d314da558d3c94ee67dbc895e7bbfd6fdf22d4b2c9d35f48f4b73b383a054f535d4089fb705c5532f034cb2ee54eab2184e8e86 pmos-logo.svg -1940480fb98ffd1cef17c0ed440d44aa200119d022ce59973a18fa39ee040b19e748312ae61edae4ff8d2bacf42b4d7c9144274b99cd8563e4a106447825b8f2 pmos-logo-text.svg -d673bacfcf16cdaa602e82663ffc17e131040e76e4ebd4078f8340c4ebb5be983ac8a4c9acf25f7c8b725a36adb7e775cbeef1b3cc809f58d876e70994b8f6c2 pmos-logo-text-epaper.svg -bdef8c991bc8caff2788433fdc399a36541833f373b2db236d55419ccce34993a6b897ec7c27f27b16facadf2699aa189c6c867f233bb38d778ffb6e67efc090 postmarketos-bootsplash.files +dc6d38d3048ee3be47871cb9f4909cc7572f57be792c1cf39688abfd9659e5149699308ead35fe7fd37b87fbac5668cbf03d3b6acd74ec05c8c4b39735e9e8df 20-plymouth.conf +d4cab2578116afa4ca33ca94671191d44e71d4c46cfb11248c42f6bd1e49714eae56339330f483b247a3da0865892a100dc6f33e378a9cbfaea2f56e9616fcd8 plymouthd.conf +c261e23acc70c8062abf4d5419806a832889a70ed8222535269206bb333dfa6f9ab953fe2ddfcf032fe7f89c2ca0ed6497e6a61cf9fd99f6b6372b3dd55658af postmarketos-bootsplash.files " diff --git a/main/postmarketos-bootsplash/OpenSans-Regular.svg b/main/postmarketos-bootsplash/OpenSans-Regular.svg deleted file mode 100644 index b34ed428a..000000000 --- a/main/postmarketos-bootsplash/OpenSans-Regular.svg +++ /dev/null @@ -1,958 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Digitized data copyright 20102011 Google Corporation -Foundry : Ascender Corporation -Foundry URL : httpwwwascendercorpcom - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/main/postmarketos-bootsplash/kill-pbsplash b/main/postmarketos-bootsplash/kill-pbsplash deleted file mode 100644 index 8fec99010..000000000 --- a/main/postmarketos-bootsplash/kill-pbsplash +++ /dev/null @@ -1,12 +0,0 @@ -#!/sbin/openrc-run -# Copyright 2023 Casey Connolly -# SPDX-License-Identifier: GPL-3.0-or-later -name="kill-pbsplash" -description="Stop the splash animation" - -command="/usr/bin/killall" -command_args="pbsplash" - -depend() { - before display-manager -} diff --git a/main/postmarketos-bootsplash/kill-pbsplash-override.conf b/main/postmarketos-bootsplash/kill-pbsplash-override.conf deleted file mode 100644 index c81512c2b..000000000 --- a/main/postmarketos-bootsplash/kill-pbsplash-override.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -ExecStartPre=+-killall pbsplash diff --git a/main/postmarketos-bootsplash/kill-pbsplash.service b/main/postmarketos-bootsplash/kill-pbsplash.service deleted file mode 100644 index 90557d82f..000000000 --- a/main/postmarketos-bootsplash/kill-pbsplash.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Stop pbsplash -Before=display-manager.service emergency.service rescue.service shutdown-splash.service - -[Service] -RemainAfterExit=yes -# Prevent systemd from sending final TERM/KILL signals on shutdown/reboot -SurviveFinalKillSignal=yes -ExecStart=-/usr/bin/killall pbsplash -Type=oneshot - -[Install] -WantedBy=graphical.target emergency.target rescue.target halt.target shutdown.target reboot.target diff --git a/main/postmarketos-bootsplash/plymouthd.conf b/main/postmarketos-bootsplash/plymouthd.conf new file mode 100644 index 000000000..0044f7ded --- /dev/null +++ b/main/postmarketos-bootsplash/plymouthd.conf @@ -0,0 +1,5 @@ +[Daemon] +Theme=pmos-spin +DeviceScale=1.0 +DeviceTimeout=5.0 +XkbExtraEscButton=0x1008ff2a # Power button (XKB_KEY_XF86PowerOff) diff --git a/main/postmarketos-bootsplash/pmos-logo-text-epaper.svg b/main/postmarketos-bootsplash/pmos-logo-text-epaper.svg deleted file mode 100644 index 15dd6da48..000000000 --- a/main/postmarketos-bootsplash/pmos-logo-text-epaper.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/main/postmarketos-bootsplash/pmos-logo-text.svg b/main/postmarketos-bootsplash/pmos-logo-text.svg deleted file mode 100644 index 78659ac71..000000000 --- a/main/postmarketos-bootsplash/pmos-logo-text.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/main/postmarketos-bootsplash/pmos-logo.svg b/main/postmarketos-bootsplash/pmos-logo.svg deleted file mode 100644 index 3cd9ea03a..000000000 --- a/main/postmarketos-bootsplash/pmos-logo.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/main/postmarketos-bootsplash/postmarketos-bootsplash-openrc.post-install b/main/postmarketos-bootsplash/postmarketos-bootsplash-openrc.post-install deleted file mode 100644 index 04e92d376..000000000 --- a/main/postmarketos-bootsplash/postmarketos-bootsplash-openrc.post-install +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -rc-update add kill-pbsplash default diff --git a/main/postmarketos-bootsplash/postmarketos-bootsplash.files b/main/postmarketos-bootsplash/postmarketos-bootsplash.files index 2a0ca934f..da4595cca 100644 --- a/main/postmarketos-bootsplash/postmarketos-bootsplash.files +++ b/main/postmarketos-bootsplash/postmarketos-bootsplash.files @@ -1,4 +1,17 @@ -/usr/bin/pbsplash -/usr/share/pbsplash/pmos-logo-text.svg -/usr/share/pbsplash/pmos-logo-text-epaper.svg -/usr/share/pbsplash/OpenSans-Regular.svg +/etc/fonts/conf.avail/65-ttf-droid-sans.conf +/etc/fonts/conf.d/65-ttf-droid-sans.conf +/etc/plymouth +/usr/bin/fc-match +/usr/bin/plymouth +/usr/lib/libfreetype.so.* +/usr/lib/libply* +/usr/lib/libpng16.so.* +# NOTE: full /usr/lib/plymouth is **not** included to avoid adding +# cairo/pango/gtk/X11 libs in the initramfs +/usr/lib/plymouth/label-freetype.so +/usr/lib/plymouth/renderers/drm.so +/usr/lib/plymouth/renderers/frame-buffer.so +/usr/lib/plymouth/script.so +/usr/sbin/plymouthd +/usr/share/fonts/droid/DroidSans.ttf +/usr/share/plymouth diff --git a/main/postmarketos-bootsplash/shutdown-splash.service b/main/postmarketos-bootsplash/shutdown-splash.service deleted file mode 100644 index 44f08215b..000000000 --- a/main/postmarketos-bootsplash/shutdown-splash.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Displays shutdown splash -DefaultDependencies=no -Before=halt.target shutdown.target reboot.target - -[Service] -RemainAfterExit=yes -ExecStart=-/usr/bin/pbsplash -s /usr/share/pbsplash/pmos-logo-text.svg -b "Shutting down..." - -[Install] -WantedBy=halt.target shutdown.target reboot.target