From 30c6b3e359d4e8872a0ce6635593f362218c2511 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Wed, 21 Nov 2012 23:27:40 -0600 Subject: plymouth: first build refs #869 --- abs/core/plymouth/PKGBUILD | 130 +++++++++++++++++++ abs/core/plymouth/__changelog | 2 + abs/core/plymouth/arch-logo.png | Bin 0 -> 46233 bytes abs/core/plymouth/encrypt_hook | 139 +++++++++++++++++++++ abs/core/plymouth/encrypt_hook.patch | 19 +++ abs/core/plymouth/encrypt_install | 44 +++++++ abs/core/plymouth/encrypt_install.patch | 15 +++ abs/core/plymouth/gdm-plymouth.service | 13 ++ abs/core/plymouth/kdm-plymouth.service | 13 ++ abs/core/plymouth/kdm-unpatched-plymouth.service | 15 +++ abs/core/plymouth/lightdm-plymouth.service | 14 +++ abs/core/plymouth/lxdm-plymouth.service | 13 ++ abs/core/plymouth/plymouth-0.8.8.tar.bz2 | Bin 0 -> 1143549 bytes abs/core/plymouth/plymouth-pid.patch | 33 +++++ abs/core/plymouth/plymouth-quit.service | 9 ++ .../plymouth/plymouth-set-default-theme.in.patch | 14 +++ abs/core/plymouth/plymouth-update-initrd.patch | 8 ++ abs/core/plymouth/plymouth.functions | 65 ++++++++++ abs/core/plymouth/plymouth.initcpio_hook | 16 +++ abs/core/plymouth/plymouth.initcpio_install | 58 +++++++++ abs/core/plymouth/plymouth.install | 45 +++++++ abs/core/plymouth/plymouthd.conf | 3 + abs/core/plymouth/system-release | 1 + abs/core/plymouth/systemd-unit-dir.patch | 11 ++ abs/core/plymouth/udevadm.patch | 11 ++ 25 files changed, 691 insertions(+) create mode 100644 abs/core/plymouth/PKGBUILD create mode 100644 abs/core/plymouth/__changelog create mode 100644 abs/core/plymouth/arch-logo.png create mode 100644 abs/core/plymouth/encrypt_hook create mode 100644 abs/core/plymouth/encrypt_hook.patch create mode 100644 abs/core/plymouth/encrypt_install create mode 100644 abs/core/plymouth/encrypt_install.patch create mode 100644 abs/core/plymouth/gdm-plymouth.service create mode 100644 abs/core/plymouth/kdm-plymouth.service create mode 100644 abs/core/plymouth/kdm-unpatched-plymouth.service create mode 100644 abs/core/plymouth/lightdm-plymouth.service create mode 100644 abs/core/plymouth/lxdm-plymouth.service create mode 100644 abs/core/plymouth/plymouth-0.8.8.tar.bz2 create mode 100644 abs/core/plymouth/plymouth-pid.patch create mode 100644 abs/core/plymouth/plymouth-quit.service create mode 100644 abs/core/plymouth/plymouth-set-default-theme.in.patch create mode 100644 abs/core/plymouth/plymouth-update-initrd.patch create mode 100644 abs/core/plymouth/plymouth.functions create mode 100644 abs/core/plymouth/plymouth.initcpio_hook create mode 100644 abs/core/plymouth/plymouth.initcpio_install create mode 100644 abs/core/plymouth/plymouth.install create mode 100644 abs/core/plymouth/plymouthd.conf create mode 100644 abs/core/plymouth/system-release create mode 100644 abs/core/plymouth/systemd-unit-dir.patch create mode 100644 abs/core/plymouth/udevadm.patch diff --git a/abs/core/plymouth/PKGBUILD b/abs/core/plymouth/PKGBUILD new file mode 100644 index 0000000..599e6a8 --- /dev/null +++ b/abs/core/plymouth/PKGBUILD @@ -0,0 +1,130 @@ +# Maintainer: M0Rf30 +# Contributor: PirateJonno +# Contributor: Det +# Contributor: Biginoz +# Based on plymouth-git: http://aur.archlinux.org/packages.php?ID=26117 + +pkgname=plymouth +pkgver=0.8.8 +pkgrel=2 +pkgdesc="A graphical boot splash screen with kernel mode-setting support" +arch=('i686' 'x86_64') +url="http://freedesktop.org/wiki/Software/Plymouth" +license=('GPL') +depends=('libdrm' 'pango' 'gtk2') +options=('!libtool' '!emptydirs') +install=${pkgname}.install +backup=('etc/plymouth/plymouthd.conf') +provides=('plymouth') +conflicts=('plymouth-git') +source=("http://www.freedesktop.org/software/$pkgname/releases/$pkgname-$pkgver.tar.bz2" + 'arch-logo.png' + "http://projects.archlinux.org/svntogit/packages.git/plain/cryptsetup/repos/core-i686/encrypt_hook" + 'encrypt_hook.patch' + "http://projects.archlinux.org/svntogit/packages.git/plain/cryptsetup/repos/core-i686/encrypt_install" + 'encrypt_install.patch' + 'gdm-plymouth.service' + 'kdm-plymouth.service' + 'kdm-unpatched-plymouth.service' + 'lightdm-plymouth.service' + 'lxdm-plymouth.service' + 'plymouth.functions' + 'plymouth.initcpio_hook' + 'plymouth.initcpio_install' + 'plymouth-pid.patch' + 'plymouth-quit.service' + 'plymouth-set-default-theme.in.patch' + 'plymouth-update-initrd.patch' + 'plymouthd.conf' + 'system-release' + 'systemd-unit-dir.patch' + 'udevadm.patch' +) + + +build() { + + cd $srcdir + msg "Applying Patches..." + + msg2 "Fixing encrypt HOOK" + #patch -p0 -i encrypt_hook.patch --follow-symlinks + #patch -p0 -i encrypt_install.patch --follow-symlinks + + + cd $srcdir/$pkgname-$pkgver + msg2 "Setting a human-readable error for '# plymouth-set-default-theme -R'" + patch -p0 -i ../plymouth-set-default-theme.in.patch + + msg2 "Fixing updating initrd" + patch -p0 -i ../plymouth-update-initrd.patch + + msg2 "Changing PID file to /run/plymouth.pid" + patch -p1 -i ../plymouth-pid.patch + + msg2 "Changing udevadm path" + patch -p1 -i ../udevadm.patch + + msg2 "Changing SYSTEMD_UNIT_DIR to /usr/lib/systemd/system/" + patch -p0 -i ../systemd-unit-dir.patch + + sed -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:g' \ + -i src/libply-splash-graphics/ply-image.c + + msg "Starting make..." + + ./configure --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --libexecdir=/usr/lib \ + --enable-tracing \ + --without-rhgb-compat-link \ + --with-gdm-autostart-file=yes \ + --with-logo=/usr/share/plymouth/arch-logo.png \ + --with-background-start-color-stop=0x000000 \ + --with-background-end-color-stop=0x4D4D4D \ + --enable-systemd-integration \ + --without-system-root-install + + make +} + +package() { + cd $srcdir/$pkgname-$pkgver + + make DESTDIR="$pkgdir" install + + install -Dm644 "$srcdir/arch-logo.png" "$pkgdir/usr/share/plymouth/arch-logo.png" + install -Dm644 ../../encrypt_hook "$pkgdir/usr/lib/initcpio/hooks/plymouth-encrypt" + install -Dm644 ../../encrypt_install "$pkgdir/usr/lib/initcpio/install/plymouth-encrypt" + install -Dm644 "$srcdir/plymouth.functions" "$pkgdir/etc/rc.d/functions.d/plymouth.functions" + install -Dm644 "$srcdir/plymouth.initcpio_hook" "$pkgdir/usr/lib/initcpio/hooks/plymouth" + install -Dm644 "$srcdir/plymouth.initcpio_install" "$pkgdir/usr/lib/initcpio/install/plymouth" + install -Dm644 "$srcdir/plymouthd.conf" "$pkgdir/etc/plymouth/plymouthd.conf" + install -Dm644 "$srcdir/system-release" "$pkgdir/etc/system-release" + + # Plymouth<->systemd integration, including units for DMs + for i in {{gdm,kdm{,-unpatched},lightdm,lxdm}-plymouth,plymouth-quit}.service; do + install -Dm644 "$srcdir/$i" "$pkgdir/usr/lib/systemd/system/$i" + done +} + +md5sums=('38f5e613e5ab17806b950cee2d0d0d4e' + '65fa2763d5c9bb9f80973ea5e6e3db3e' + 'c970831d733ca42e20415005967e7843' + '59f703eafd1aee4ca5782a523d412a46' + '21c45f9cab3e0b5165f68358884fbd0f' + 'cdee5ae4c4087181e80fe14061b7d604' + '34d0ed7bbcb3d0ea498de24bc17b2ee9' + '75ec0ac73eb9a1e3f6104df64520d431' + 'ceec65ce58accdb270f3eaa23d794b4a' + 'e6d573b1913f3aa020cbde3863ee80f0' + '62c3b4e894330a2ca4c2b8fbcaba083c' + 'f0110fba1e77cd22c32d1727399d0b8a' + '4f3be343eea9956bbc94d615d5f41def' + 'e606ce14ceace727c2f13758e371a4ed' + '761f5090dc999e50b4572138347c775b' + '3bb0b8008edfad9e23703674341766a0' + '42fddd683720dbacbe6e30b4b7892f3c' + 'c2a0cf5a499d6c14723461166a24ede7' + '37479b134827dc307b3c55bfb2711e99' + 'ab8a557d10f74bec5c94ed6cae34729c' + '30acbfc7722fb62ee464b8fec32b5cfd' + '89014b04513d61e0085e7a0c9924c183') diff --git a/abs/core/plymouth/__changelog b/abs/core/plymouth/__changelog new file mode 100644 index 0000000..21edf18 --- /dev/null +++ b/abs/core/plymouth/__changelog @@ -0,0 +1,2 @@ +removed systemd as a dep + diff --git a/abs/core/plymouth/arch-logo.png b/abs/core/plymouth/arch-logo.png new file mode 100644 index 0000000..9f8446b Binary files /dev/null and b/abs/core/plymouth/arch-logo.png differ diff --git a/abs/core/plymouth/encrypt_hook b/abs/core/plymouth/encrypt_hook new file mode 100644 index 0000000..11db344 --- /dev/null +++ b/abs/core/plymouth/encrypt_hook @@ -0,0 +1,139 @@ +#!/usr/bin/ash + +run_hook() { + modprobe -a -q dm-crypt >/dev/null 2>&1 + [ "${quiet}" = "y" ] && CSQUIET=">/dev/null" + + # Get keyfile if specified + ckeyfile="/crypto_keyfile.bin" + if [ -n "$cryptkey" ]; then + IFS=: read ckdev ckarg1 ckarg2 </dev/null 2>&1 + umount /ckey + ;; + *) + # Read raw data from the block device + # ckarg1 is numeric: ckarg1=offset, ckarg2=length + dd if="$resolved" of="$ckeyfile" bs=1 skip="$ckarg1" count="$ckarg2" >/dev/null 2>&1 + ;; + esac + fi + [ ! -f ${ckeyfile} ] && echo "Keyfile could not be opened. Reverting to passphrase." + fi + + if [ -n "${cryptdevice}" ]; then + DEPRECATED_CRYPT=0 + IFS=: read cryptdev cryptname cryptoptions <&2 + ;; + esac + done + + if resolved=$(resolve_device "${cryptdev}" ${rootdelay}); then + if cryptsetup isLuks ${resolved} >/dev/null 2>&1; then + [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated + dopassphrase=1 + # If keyfile exists, try to use that + if [ -f ${ckeyfile} ]; then + if eval cryptsetup --key-file ${ckeyfile} luksOpen ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; then + dopassphrase=0 + else + echo "Invalid keyfile. Reverting to passphrase." + fi + fi + # Ask for a passphrase + if [ ${dopassphrase} -gt 0 ]; then + echo "" + echo "A password is required to access the ${cryptname} volume:" + + #loop until we get a real password + while ! eval cryptsetup luksOpen ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do + sleep 2; + done + fi + if [ -e "/dev/mapper/${cryptname}" ]; then + if [ ${DEPRECATED_CRYPT} -eq 1 ]; then + export root="/dev/mapper/root" + fi + else + err "Password succeeded, but ${cryptname} creation failed, aborting..." + exit 1 + fi + elif [ -n "${crypto}" ]; then + [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated + msg "Non-LUKS encrypted device found..." + if echo "$crypto" | awk -F: '{ exit(NF == 5) }'; then + err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip" + err "Non-LUKS decryption not attempted..." + return 1 + fi + exe="cryptsetup create $cryptname $resolved $cryptargs" + IFS=: read c_hash c_cipher c_keysize c_offset c_skip </dev/null 2>&1 /dev/stderr + exit 1 + fi diff --git a/abs/core/plymouth/plymouth-update-initrd.patch b/abs/core/plymouth/plymouth-update-initrd.patch new file mode 100644 index 0000000..648c874 --- /dev/null +++ b/abs/core/plymouth/plymouth-update-initrd.patch @@ -0,0 +1,8 @@ +--- scripts/plymouth-update-initrd.old ++++ scripts/plymouth-update-initrd +@@ -1,2 +1,4 @@ + #!/bin/bash +-mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r) ++find /etc/mkinitcpio.d/ -name \*.preset -a \! -name example.preset | while read p; do ++ mkinitcpio -p $p ++done diff --git a/abs/core/plymouth/plymouth.functions b/abs/core/plymouth/plymouth.functions new file mode 100644 index 0000000..b866643 --- /dev/null +++ b/abs/core/plymouth/plymouth.functions @@ -0,0 +1,65 @@ +if [[ -x /usr/bin/plymouth && -x /usr/sbin/plymouthd ]]; then + + ply_client() { /usr/bin/plymouth --ping && /usr/bin/plymouth "$@"; } + ply_daemon() { /usr/sbin/plymouthd "$@"; } + + # save a function under a new name + save_function() { + local ORIG=$(declare -f $1) + eval "$2${ORIG#$1}" + } + + save_function stat_busy std_stat_busy + save_function stat_fail std_stat_fail + + # overwrite status functions + stat_busy() { + ply_client --update="$1" + ply_client message --text="$1" + std_stat_busy "$@" + } + + stat_fail() { + ply_client --quit + std_stat_fail "$@" + } + + # update after local filesystems are mounted + ply_sysinit_postmount() { ply_client --sysinit; } + add_hook sysinit_postmount ply_sysinit_postmount + + # stop plymouth after rc.multi + ply_quit_boot() { + ply_client quit --retain-splash + } + add_hook multi_end ply_quit_boot + + # stop plymouth before shutdown + ply_quit_shutdown() { + ply_quit_boot + [[ $(ps h $(cat /tmp/plymouthd)) ]] && kill -9 $(cat /tmp/plymouthd) + } + add_hook shutdown_poweroff ply_quit_shutdown + + # start plymouth at the beginning of rc.shutdown + ply_shutdown_start(){ + XPID=`pidof X` + if [ "$XPID" ]; then + if [ "`runlevel | cut -c 3`" != '5' ]; then + local DM + for DM in slim gdm kdm xdm entrance; do + ck_daemon "$DM" || stop_daemon "$DM" + done + fi + kill -9 $XPID &> /dev/null + fi + ply_daemon --mode=shutdown --pid-file=/tmp/plymouthd + ply_client --show-splash + + # don't get killed by kill_all + add_omit_pids `cat /tmp/plymouthd` + } + add_hook shutdown_start ply_shutdown_start + +fi +# vim: set ts=2 sw=2 ft=sh noet: diff --git a/abs/core/plymouth/plymouth.initcpio_hook b/abs/core/plymouth/plymouth.initcpio_hook new file mode 100644 index 0000000..d527f24 --- /dev/null +++ b/abs/core/plymouth/plymouth.initcpio_hook @@ -0,0 +1,16 @@ +run_hook() { + msg -n ":: Loading plymouth..." + + /bin/mknod /dev/fb c 29 0 &>/dev/null + #/bin/mount devpts /dev/pts -t devpts + + # plymouth deamon + #/bin/mkdir -p /run/plymouth + /usr/sbin/plymouthd --mode=boot --pid-file=/run/plymouth.pid + + # plymouth frontend + /usr/bin/plymouth --show-splash + msg "done." +} + +# vim: set ft=sh: diff --git a/abs/core/plymouth/plymouth.initcpio_install b/abs/core/plymouth/plymouth.initcpio_install new file mode 100644 index 0000000..16048f1 --- /dev/null +++ b/abs/core/plymouth/plymouth.initcpio_install @@ -0,0 +1,58 @@ +build() { + add_dir /dev/pts + add_dir /usr/share/plymouth/themes + + DATADIR="/usr/share" + PLYMOUTH_LOGO_FILE="${DATADIR}/plymouth/arch-logo.png" + PLYMOUTH_THEME_NAME="$(/usr/sbin/plymouth-set-default-theme)" + PLYMOUTH_MODULE_NAME="$(grep "ModuleName *= *" ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')" + PLYMOUTH_PLUGIN_PATH="$(plymouth --get-splash-plugin-path)" + + add_binary /usr/sbin/plymouthd + add_binary /usr/bin/plymouth + + add_file ${DATADIR}/plymouth/themes/text/text.plymouth + add_binary ${PLYMOUTH_PLUGIN_PATH}/text.so + add_file ${DATADIR}/plymouth/themes/details/details.plymouth + add_binary ${PLYMOUTH_PLUGIN_PATH}/details.so + + + add_file "${PLYMOUTH_LOGO_FILE}" + add_file /etc/system-release /etc/system-release + add_file /etc/plymouth/plymouthd.conf + add_file ${DATADIR}/plymouth/plymouthd.defaults + + if [ ! -f ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so ]; then + echo "The default plymouth plugin (${PLYMOUTH_MODULE_NAME}) doesn't exist" > /dev/stderr + exit 1 + fi + + add_binary ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so + + add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so + #add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/x11.so + add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so + + if [ -d ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then + for x in ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/* ; do + [ ! -f "$x" ] && break + add_file $x + done + fi + + # suppress a warning in glib (which the label control uses) + # about uid 0 by building a dummy NSS stack (LP #649917) + add_file /etc/passwd + add_file /etc/nsswitch.conf + add_binary "$(readlink -e /lib/libnss_files.so.2)" + add_file /lib/libnss_files.so.2 + + SCRIPT='plymouth' +} + +help() { + echo "This hook includes plymouth in the initramfs image." +} + +# vim: set ft=sh: +#EOF diff --git a/abs/core/plymouth/plymouth.install b/abs/core/plymouth/plymouth.install new file mode 100644 index 0000000..aafcca8 --- /dev/null +++ b/abs/core/plymouth/plymouth.install @@ -0,0 +1,45 @@ +post_install() { +cat < + + To rebuild initrd image: + # mkinitcpio -p linux + +4. For Smooth Transition to Display Manager you have to: + 4.1. See the Wiki Page (link in 5) to prepare your Display Manager + 4.2. Disable your Display Manager Unit + E.g. : systemctl disable kdm.service + 4.3. Enable the respective DM-plymouth Unit (GDM,KDM,Lightdm,LXDM units provided) + E.g. : systemctl enable kdm-plymouth.service + +5. For more information please visit the Wiki page: + https://wiki.archlinux.org/index.php/Plymouth + +OBS. If you have any leftover "kill Plymouth" lines in /etc/rc.local or ~/.xinitrc + they are no longer required. +================================================================================== + +EOT +} + +post_upgrade() { + post_install +} diff --git a/abs/core/plymouth/plymouthd.conf b/abs/core/plymouth/plymouthd.conf new file mode 100644 index 0000000..50de7f8 --- /dev/null +++ b/abs/core/plymouth/plymouthd.conf @@ -0,0 +1,3 @@ +# Administrator customizations go in this file +[Daemon] +Theme=spinfinity diff --git a/abs/core/plymouth/system-release b/abs/core/plymouth/system-release new file mode 100644 index 0000000..850183e --- /dev/null +++ b/abs/core/plymouth/system-release @@ -0,0 +1 @@ +Arch Linux diff --git a/abs/core/plymouth/systemd-unit-dir.patch b/abs/core/plymouth/systemd-unit-dir.patch new file mode 100644 index 0000000..7058c8f --- /dev/null +++ b/abs/core/plymouth/systemd-unit-dir.patch @@ -0,0 +1,11 @@ +--- configure.ac.orig 2012-06-12 17:19:48.903409717 +0300 ++++ configure.ac 2012-06-12 17:20:01.916743217 +0300 +@@ -254,7 +254,7 @@ + + if test x$enable_systemd_integration = xyes; then + AC_DEFINE(PLY_ENABLE_SYSTEMD_INTEGRATION, 1, [Coordinate boot up with systemd]) +- SYSTEMD_UNIT_DIR=/lib/systemd/system ++ SYSTEMD_UNIT_DIR=/usr/lib/systemd/system + AC_SUBST(SYSTEMD_UNIT_DIR) + fi + diff --git a/abs/core/plymouth/udevadm.patch b/abs/core/plymouth/udevadm.patch new file mode 100644 index 0000000..aa01e00 --- /dev/null +++ b/abs/core/plymouth/udevadm.patch @@ -0,0 +1,11 @@ +--- a/systemd-units/plymouth-start.service.in 2012-09-26 18:50:53.000000000 +0200 ++++ b/systemd-units/plymouth-start.service.in 2012-11-01 00:12:35.186732840 +0100 +@@ -8,7 +8,7 @@ + + [Service] + ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=/run/plymouth.pid --attach-to-session +-ExecStartPost=-/bin/udevadm settle --timeout=30 --exit-if-exists=/sys/class/drm/card0/dev ; /bin/udevadm settle --timeout=30 --exit-if-exists=/sys/class/graphics/fb0/dev ; @PLYMOUTH_CLIENT_DIR@/plymouth show-splash ++ExecStartPost=-/usr/bin/udevadm settle --timeout=30 --exit-if-exists=/sys/class/drm/card0/dev ; /usr/bin/udevadm settle --timeout=30 --exit-if-exists=/sys/class/graphics/fb0/dev ; @PLYMOUTH_CLIENT_DIR@/plymouth show-splash + Type=forking + KillMode=none + SendSIGKILL=no -- cgit v0.12