From 1b07fd3f49bf2855b9800a4e4fb3cca2aafac80e89a54bbff72d042047774491 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 16 Apr 2014 10:17:08 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=597 --- systemd-mini.spec | 21 +++++++++++++++++++++ systemd.spec | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/systemd-mini.spec b/systemd-mini.spec index e34d1fc7..789fd00c 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -45,6 +45,7 @@ BuildRequires: audit-devel BuildRequires: binutils-gold %endif %endif +BuildRequires: config(suse-module-tools) %if ! 0%{?bootstrap} BuildRequires: docbook-xsl-stylesheets %endif @@ -472,6 +473,11 @@ Group: System/Kernel Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html PreReq: /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq Requires(post): lib%{udevpkgname}%{udev_major} +%if %{defined regenerate_initrd_post} +Requires(post): config(suse-module-tools) +Requires(postun): config(suse-module-tools) +Requires(posttrans): config(suse-module-tools) +%endif Conflicts: systemd < 39 Conflicts: aaa_base < 11.5 Conflicts: filesystem < 11.5 @@ -1133,9 +1139,14 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" +%if %{defined regenerate_initrd_post} + else + %regenerate_initrd_post +%else elif [ -x /sbin/mkinitrd ]; then [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup /sbin/mkinitrd || : +%endif fi fi @@ -1147,12 +1158,22 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" +%if %{defined regenerate_initrd_post} + else + %regenerate_initrd_post +%else elif [ -x /sbin/mkinitrd ]; then [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup /sbin/mkinitrd || : +%endif fi fi +%if %{defined regenerate_initrd_post} +%posttrans -n %{udevpkgname} +%regenerate_initrd_posttrans +%endif + %post -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %postun -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig diff --git a/systemd.spec b/systemd.spec index 7d307c99..98121192 100644 --- a/systemd.spec +++ b/systemd.spec @@ -40,6 +40,7 @@ BuildRequires: audit-devel BuildRequires: binutils-gold %endif %endif +BuildRequires: config(suse-module-tools) %if ! 0%{?bootstrap} BuildRequires: docbook-xsl-stylesheets %endif @@ -467,6 +468,11 @@ Group: System/Kernel Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html PreReq: /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq Requires(post): lib%{udevpkgname}%{udev_major} +%if %{defined regenerate_initrd_post} +Requires(post): config(suse-module-tools) +Requires(postun): config(suse-module-tools) +Requires(posttrans): config(suse-module-tools) +%endif Conflicts: systemd < 39 Conflicts: aaa_base < 11.5 Conflicts: filesystem < 11.5 @@ -1128,9 +1134,14 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" +%if %{defined regenerate_initrd_post} + else + %regenerate_initrd_post +%else elif [ -x /sbin/mkinitrd ]; then [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup /sbin/mkinitrd || : +%endif fi fi @@ -1142,12 +1153,22 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" +%if %{defined regenerate_initrd_post} + else + %regenerate_initrd_post +%else elif [ -x /sbin/mkinitrd ]; then [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup /sbin/mkinitrd || : +%endif fi fi +%if %{defined regenerate_initrd_post} +%posttrans -n %{udevpkgname} +%regenerate_initrd_posttrans +%endif + %post -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %postun -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig