Accepting request 230317 from home:trenn:branches:Base:System

- Kill all mkinitrd stuff
  Remove suse-initrd-support
- Tell zypper to regenerate initrd on installation/update via %post and
  %posttrans scripts

OBS-URL: https://build.opensuse.org/request/show/230317
OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=138
This commit is contained in:
Mark van Tinteren 2014-04-16 14:28:58 +00:00 committed by Git OBS Bridge
parent 42647bb201
commit fe1c200fc5
3 changed files with 13 additions and 155 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Apr 16 11:35:30 UTC 2014 - trenn@suse.de
- Kill all mkinitrd stuff
Remove suse-initrd-support
- Tell zypper to regenerate initrd on installation/update via %post and
%posttrans scripts
-------------------------------------------------------------------
Thu Apr 10 10:55:03 UTC 2014 - idonmez@suse.com

View File

@ -30,8 +30,6 @@ Group: System/Base
Url: http://freedesktop.org/software/plymouth/releases
Source0: %{name}-%{version}.tar.xz
Source1: boot-duration
# PATCH-OPENSUSE -- Support the openSUSE initrd
Patch1: suse-initrd-support
# PATCH-OPENSUSE -- Handle correctly multiple displays with different sizes
Patch3: plymouth-fix-window-size
# PATCH-OPENSUSE -- Ensure graphical.target is conflicting with plymouth-wait-quit.service
@ -63,7 +61,7 @@ Requires: suspend >= 0.80.20100129.1
%endif
Requires: systemd >= 186
Requires(post): plymouth-scripts = %{version}
Requires(post): mkinitrd
BuildRequires: suse-module-tools
Suggests: plymouth-plugin-label
Provides: bootsplash = 3.4
Obsoletes: bootsplash <= 3.4
@ -159,7 +157,6 @@ Requires: coreutils
Requires: cpio
Requires: findutils
Requires: pigz
Requires(post): mkinitrd
%description scripts
This package contains scripts that help integrate Plymouth with
@ -328,7 +325,6 @@ plugin.
%prep
%setup -q
%patch1 -p1
%patch3 -p1
%patch4 -p1
%ifarch %ix86 x86_64 ppc ppc64 ppc64le
@ -390,11 +386,8 @@ cp $RPM_SOURCE_DIR/boot-duration %{buildroot}%{_datadir}/plymouth/default-boot-d
cp $RPM_SOURCE_DIR/boot-duration %{buildroot}%{_localstatedir}/lib/plymouth
cp %{buildroot}/%{_datadir}/plymouth/plymouthd.defaults %{buildroot}/%{_sysconfdir}/plymouth/plymouthd.conf
mkdir -p %{buildroot}/lib/mkinitrd/scripts
install -t %{buildroot}/lib/mkinitrd/scripts \
scripts/{setup,boot}-plymouth*.sh
%post
%{?regenerate_initrd_post}
if [ ! -e /.buildenv ]; then
[ -f %{_localstatedir}/lib/plymouth/boot-duration ] || cp -f %{_datadir}/plymouth/default-boot-duration %{_localstatedir}/lib/plymouth/boot-duration
%{_libexecdir}/plymouth/plymouth-update-initrd
@ -408,9 +401,8 @@ if [ $1 -eq 0 ]; then
[ -x /bin/systemctl ] && /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%post scripts -p /sbin/mkinitrd_setup
%postun scripts -p /sbin/mkinitrd_setup
%posttrans
%{?regenerate_initrd_posttrans}
%post -n libply-boot-client2 -p /sbin/ldconfig
@ -525,6 +517,7 @@ fi
%{_unitdir}/*
%ghost %{_localstatedir}/log/boot.log
%ghost %{_localstatedir}/spool/plymouth/boot.log
%files dracut
%defattr(-, root, root)
%{_libexecdir}/plymouth/plymouth-populate-initrd
@ -562,9 +555,6 @@ fi
%dir %{_libexecdir}/plymouth
%{_sbindir}/plymouth-set-default-theme
%{_libexecdir}/plymouth/plymouth-update-initrd
/lib/mkinitrd/scripts/boot-plymouth.sh
/lib/mkinitrd/scripts/boot-plymouth.chroot.sh
/lib/mkinitrd/scripts/setup-plymouth.sh
%files utils
%defattr(-, root, root)

View File

@ -1,140 +0,0 @@
Index: plymouth-0.8.8_git201309032142/configure.ac
===================================================================
--- plymouth-0.8.8_git201309032142.orig/configure.ac
+++ plymouth-0.8.8_git201309032142/configure.ac
@@ -302,6 +302,7 @@ AC_CONFIG_FILES([Makefile
themes/spinner/Makefile
themes/script/Makefile
images/Makefile
+ scripts/setup-plymouth.sh
scripts/plymouth-generate-initrd
scripts/plymouth-populate-initrd
scripts/plymouth-set-default-theme
Index: plymouth-0.8.8_git201309032142/scripts/boot-plymouth.chroot.sh
===================================================================
--- /dev/null
+++ plymouth-0.8.8_git201309032142/scripts/boot-plymouth.chroot.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#%stage: setup
+#%depends: plymouth
+#%programs: /usr/bin/plymouth /usr/sbin/plymouthd /usr/bin/readlink
+#%dontshow
+
+ply_init_is_systemd()
+{
+ local d="$init"
+ [ -n "$d" ] || return 1
+ if [ -L "/root$d" ]; then
+ d=`readlink "/root$d"`
+ fi
+ [ "${d##*/}" = systemd ] || return 1
+ return 0
+}
+
+if ply_init_is_systemd; then
+ plymouth update-root-fs --new-root-dir=/root
+else
+ echo "init $init is not systemd, terminate plymouth"
+ plymouth quit
+fi
Index: plymouth-0.8.8_git201309032142/scripts/boot-plymouth.sh
===================================================================
--- /dev/null
+++ plymouth-0.8.8_git201309032142/scripts/boot-plymouth.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#%stage: boot
+#%depends: start udev kms
+#%programs: /usr/bin/plymouth /usr/sbin/plymouthd
+#%if: -z "$root_luks" -a -z "$luks"
+
+enable_plymouth=1
+for o in $(cat /proc/cmdline) ; do
+ case "$o" in
+ shell*|plymouth.enable=0*|rd.plymouth=0*)
+ enable_plymouth=0
+ break
+ ;;
+ esac
+done
+if [ "$enable_plymouth" = "1" ]; then
+ mkdir --mode 755 /run/plymouth
+
+ /usr/sbin/plymouthd --attach-to-session --pid-file /run/plymouth/pid
+
+ plymouth show-splash
+fi
+
Index: plymouth-0.8.8_git201309032142/scripts/setup-plymouth.sh.in
===================================================================
--- /dev/null
+++ plymouth-0.8.8_git201309032142/scripts/setup-plymouth.sh.in
@@ -0,0 +1,59 @@
+#!/bin/bash
+#
+#%stage: setup
+#%depends: start
+
+# We don't need to copy the binaries since boot-plymouth.sh does that for us
+
+[ -z "$tmp_mnt" ] && exit 1
+
+THEME=$(plymouth-set-default-theme)
+
+PLUGIN_PATH=$(plymouth --get-splash-plugin-path)
+
+MODULE=$(grep "ModuleName *= *" @PLYMOUTH_DATADIR@/plymouth/themes/${THEME}/${THEME}.plymouth | sed 's/ModuleName *= *//')
+
+if [ ! -f "$PLUGIN_PATH/${MODULE}.so" ]; then
+ echo "The default plymouth plugin ($MODULE) doesn't exist." > /dev/stderr
+ exit 1
+fi
+
+FILES="/usr/share/plymouth/themes/text/text.plymouth \
+ /usr/share/plymouth/themes/details/details.plymouth \
+ /usr/share/plymouth/plymouthd.defaults \
+ /usr/share/plymouth/themes/${THEME}/* \
+ /etc/plymouth/plymouthd.conf \
+ /usr/share/fonts/uni/unifont.pcf.gz /etc/os-release \
+ /etc/fonts/fonts.conf \
+ /etc/fonts/conf.d/69-unifont.conf "
+
+PLUGINS="${PLUGIN_PATH}/details.so \
+ ${PLUGIN_PATH}/text.so \
+ ${PLUGIN_PATH}/label.so \
+ ${PLUGIN_PATH}/${MODULE}.so \
+ ${PLUGIN_PATH}/renderers/drm.so \
+ ${PLUGIN_PATH}/renderers/frame-buffer.so"
+
+for file in $FILES; do
+ install -D $file $tmp_mnt/$file
+done
+
+for plugin in $PLUGINS; do
+ mkdir -p $tmp_mnt/$(dirname $plugin)
+ cp_bin $plugin $tmp_mnt/$plugin
+done
+
+_libdir=`rpm --eval '%{_lib}'`
+mkdir -p $tmp_mnt/etc/pango
+if [ "$_libdir" == "lib64" ];
+ then
+ _pangodir=`pango-querymodules-64 | grep ModulesPath | awk '{print $4}'`
+ pango-querymodules-64 > $tmp_mnt/etc/pango/pango.modules
+ pangobasicfc="${_pangodir}/pango-basic-fc.so"
+ else
+ _pangodir=`pango-querymodules | grep ModulesPath | awk '{print $4}'`
+ pango-querymodules > $tmp_mnt/etc/pango/pango.modules
+ pangobasicfc="${_pangodir}/pango-basic-fc.so"
+fi
+install -D ${pangobasicfc} $tmp_mnt/${pangobasicfc}
+mkdir -p $tmp_mnt/var/cache/fontconfig
Index: plymouth-0.8.8_git201309032142/scripts/plymouth-update-initrd
===================================================================
--- plymouth-0.8.8_git201309032142.orig/scripts/plymouth-update-initrd
+++ plymouth-0.8.8_git201309032142/scripts/plymouth-update-initrd
@@ -1,2 +1,2 @@
#!/bin/bash
-dracut -f
+/sbin/mkinitrd