Hello community, here is the log from the commit of package suse-module-tools for openSUSE:Factory checked in at 2014-04-11 14:40:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/suse-module-tools (Old) and /work/SRC/openSUSE:Factory/.suse-module-tools.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "suse-module-tools" Changes: -------- --- /work/SRC/openSUSE:Factory/suse-module-tools/suse-module-tools.changes 2014-04-05 16:49:59.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.suse-module-tools.new/suse-module-tools.changes 2014-04-11 14:40:27.000000000 +0200 @@ -1,0 +2,17 @@ +Fri Apr 4 14:32:48 UTC 2014 - [email protected] + +- weak-modules2: Run mkinitrd in posttrans if $INITRD_IN_POSTTRANS + is set (fate#313506) + +------------------------------------------------------------------- +Fri Apr 4 13:34:09 UTC 2014 - [email protected] + +- regenerate-initrd-posttrans: Run mkinitrd_setup + +------------------------------------------------------------------- +Fri Apr 4 12:13:18 UTC 2014 - [email protected] + +- Add macros for regenerating the initrd in %posttrans + (fate#313506). + +------------------------------------------------------------------- New: ---- macros.initrd regenerate-initrd-posttrans ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ suse-module-tools.spec ++++++ --- /var/tmp/diff_new_pack.d2wPNt/_old 2014-04-11 14:40:30.000000000 +0200 +++ /var/tmp/diff_new_pack.d2wPNt/_new 2014-04-11 14:40:30.000000000 +0200 @@ -39,6 +39,8 @@ Source8: suse-module-tools.rpmlintrc Source9: modsign-verify Source10: kmp-install +Source11: macros.initrd +Source12: regenerate-initrd-posttrans BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -78,6 +80,11 @@ install -pm 755 %_sourcedir/weak-modules{,2} "$b/usr/lib/module-init-tools/" install -pm 755 %_sourcedir/driver-check.sh "$b/usr/lib/module-init-tools/" +# rpm macros and helper +install -d -m 755 "$b/etc/rpm" +install -pm 644 "%_sourcedir/macros.initrd" "$b/etc/rpm/" +install -pm 755 "%_sourcedir/regenerate-initrd-posttrans" "$b/usr/lib/module-init-tools/" + # modsign-verify for verifying module signatures install -d -m 755 "$b/usr/bin" install -pm 755 %_sourcedir/modsign-verify "$b/usr/bin/" @@ -145,6 +152,7 @@ %config(noreplace) /etc/modprobe.d/99-local.conf %dir /etc/depmod.d %config /etc/depmod.d/00-system.conf +%config /etc/rpm/macros.initrd %_docdir/module-init-tools /usr/bin/kmp-install /usr/bin/modsign-verify ++++++ macros.initrd ++++++ # Packages installing files and binaries that end up in the initrd should # call these macros in their post(trans) scriptlets to have the initrd # regenerated # See also fate#313506 %regenerate_initrd_post \ mkdir -p /var/run/regenerate-initrd/ \ touch /var/run/regenerate-initrd/all \ %nil %regenerate_initrd_posttrans \ if test -x /usr/lib/module-init-tools/regenerate-initrd-posttrans; then \ /bin/bash -${-/e/} /usr/lib/module-init-tools/regenerate-initrd-posttrans \ fi \ %nil ++++++ regenerate-initrd-posttrans ++++++ #!/bin/bash # # Packages that install kernels or kernel-modules create a flag # # /var/run/regenerate-initrd/<kernel image> # # to have the initrd for <kernel image> generated, or # # /var/run/regenerate-initrd/all # # to have all initrds generated. This script is called from posttrans # and takes care of generating the initrds shopt -s nullglob dir=/var/run/regenerate-initrd did_mkinitrd_setup=false run_mkinitrd_setup() { if ! $did_mkinitrd_setup; then if test -x /sbin/mkinitrd_setup; then /sbin/mkinitrd_setup fi did_mkinitrd_setup=true fi } if ! test -d "$dir"; then exit 0 fi for f in "$dir"/*; do # check if we are in a build chroot if ! [ -f /etc/fstab -a ! -e /.buildenv -a -x /sbin/mkinitrd ] ; then echo "Please run mkinitrd as soon as your system is complete." >&2 rm "$dir"/* exit 0 fi break done if test -e "$dir/all"; then rm "$dir"/* run_mkinitrd_setup mkinitrd exit fi err=0 for f in "$dir"/*; do rm "$f" image=${f##*/} initrd=initrd-${image#*-} if ! test -e "/boot/$image"; then echo "$0: /boot/$image does not exist, initrd won't be generated" continue fi run_mkinitrd_setup if ! mkinitrd -k "/boot/$image" -i "/boot/$initrd"; then err=$? fi done exit $err ++++++ weak-modules2 ++++++ --- /var/tmp/diff_new_pack.d2wPNt/_old 2014-04-11 14:40:30.000000000 +0200 +++ /var/tmp/diff_new_pack.d2wPNt/_new 2014-04-11 14:40:30.000000000 +0200 @@ -355,14 +355,19 @@ fi done if [ -n "$image" ]; then - doit /sbin/mkinitrd -k /boot/$image-$krel -i /boot/initrd-$krel - status=$? - # mkinitrd fails with status 10 if any required kernel modules - # missing. We expect those modules to be added later (by one of - # the other kernel-$flavor packages). - if [ $status -eq 10 ]; then - log "mkinitrd failed with status 10 (module missing), proceeding" - status=0 + if test -n "$INITRD_IN_POSTTRANS"; then + mkdir -p /var/run/regenerate-initrd + touch /var/run/regenerate-initrd/$image-$krel + else + doit /sbin/mkinitrd -k /boot/$image-$krel -i /boot/initrd-$krel + status=$? + # mkinitrd fails with status 10 if any required kernel modules + # missing. We expect those modules to be added later (by one of + # the other kernel-$flavor packages). + if [ $status -eq 10 ]; then + log "mkinitrd failed with status 10 (module missing), proceeding" + status=0 + fi fi else echo "WARNING: kernel image for $krel not found!" >&2 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
