Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package suse-module-tools for
openSUSE:Factory checked in at 2021-09-03 21:26:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/suse-module-tools (Old)
and /work/SRC/openSUSE:Factory/.suse-module-tools.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "suse-module-tools"
Fri Sep 3 21:26:04 2021 rev:46 rq:915051 version:16.0.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/suse-module-tools/suse-module-tools.changes
2021-08-24 10:55:04.844304427 +0200
+++
/work/SRC/openSUSE:Factory/.suse-module-tools.new.1899/suse-module-tools.changes
2021-09-03 21:26:50.146219047 +0200
@@ -1,0 +2,12 @@
+Mon Aug 30 13:15:20 UTC 2021 - Martin Wilck <[email protected]>
+
+- Update to version 16.0.9:
+ * weak_modules2: fix "warning: %post(kernel-...) scriptlet failed,
+ exit status 1" message from rpm (boo#1189881)
+ * weak-modules2: add logging at verbose level 2
+ * weak-modules2: control logging with environment variables
+ WM2_VERBOSE, WM2_DEBUG, WM2_LOGFILE
+ * regenerate-initrd-posttrans: friendly notice if dracut not found
+ (boo#1123721)
+
+-------------------------------------------------------------------
Old:
----
suse-module-tools-16.0.8+1.obscpio
New:
----
suse-module-tools-16.0.9.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ suse-module-tools.spec ++++++
--- /var/tmp/diff_new_pack.aM9aaC/_old 2021-09-03 21:26:50.670220083 +0200
+++ /var/tmp/diff_new_pack.aM9aaC/_new 2021-09-03 21:26:50.674220091 +0200
@@ -45,7 +45,7 @@
%global modprobe_conf_rpmsave %(echo "%{modprobe_conf_files}" | sed 's,\\([^
]*\\),%{_sysconfdir}/modprobe.d/\\1.conf.rpmsave,g')
Name: suse-module-tools
-Version: 16.0.8+1
+Version: 16.0.9
Release: 0
Summary: Configuration for module loading and SUSE-specific utilities
for KMPs
License: GPL-2.0-or-later
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.aM9aaC/_old 2021-09-03 21:26:50.706220154 +0200
+++ /var/tmp/diff_new_pack.aM9aaC/_new 2021-09-03 21:26:50.706220154 +0200
@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/openSUSE/suse-module-tools.git</param>
- <param
name="changesrevision">ec6c895407f494c886dd4de6ef58e5d2641f0962</param></service></servicedata>
\ No newline at end of file
+ <param
name="changesrevision">532eddd0313f212550d81ad86dfac00b2eeb29fd</param></service></servicedata>
\ No newline at end of file
++++++ suse-module-tools-16.0.8+1.obscpio -> suse-module-tools-16.0.9.obscpio
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/suse-module-tools-16.0.8+1/regenerate-initrd-posttrans
new/suse-module-tools-16.0.9/regenerate-initrd-posttrans
--- old/suse-module-tools-16.0.8+1/regenerate-initrd-posttrans 2021-08-20
10:59:52.000000000 +0200
+++ new/suse-module-tools-16.0.9/regenerate-initrd-posttrans 2021-08-30
15:11:32.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Packages that install kernels or kernel-modules create a flag
#
@@ -11,12 +11,10 @@
# to have all initrds generated. This script is called from posttrans
# and takes care of generating the initrds
-shopt -s nullglob
-
: ${DRACUT:=/usr/bin/dracut}
-if [[ ! -x "$DRACUT" ]]; then
- echo "ERROR: $DRACUT not found" >&2
- exit 1
+if [ ! -x "$DRACUT" ]; then
+ echo "${0##*/}: dracut is not installed, not rebuilding the initrd" >&2
+ exit 0
fi
dir=/run/regenerate-initrd
@@ -25,6 +23,10 @@
exit 0
fi
for f in "$dir"/*; do
+ case $f in
+ "$dir/*")
+ [ -e "$f" ] || break;;
+ esac
# check if we are in a build chroot
if ! [ -f /etc/fstab -a ! -e /.buildenv -a -x "$DRACUT" ] ; then
echo "Please run \"$DRACUT -f --regenerate-all\" as soon as
your system is complete." >&2
@@ -41,6 +43,10 @@
fi
err=0
for f in "$dir"/*; do
+ case $f in
+ "$dir/*")
+ [ -e "$f" ] || break;;
+ esac
rm "$f"
image=${f##*/}
kver=${image#*-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/suse-module-tools-16.0.8+1/suse-module-tools.rpmlintrc
new/suse-module-tools-16.0.9/suse-module-tools.rpmlintrc
--- old/suse-module-tools-16.0.8+1/suse-module-tools.rpmlintrc 2021-08-20
10:59:52.000000000 +0200
+++ new/suse-module-tools-16.0.9/suse-module-tools.rpmlintrc 1970-01-01
01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-# The package installs different configs for different architectures
-addFilter("no-binary");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/suse-module-tools-16.0.8+1/suse-module-tools.spec
new/suse-module-tools-16.0.9/suse-module-tools.spec
--- old/suse-module-tools-16.0.8+1/suse-module-tools.spec 2021-08-20
10:59:52.000000000 +0200
+++ new/suse-module-tools-16.0.9/suse-module-tools.spec 2021-08-30
15:11:32.000000000 +0200
@@ -45,7 +45,7 @@
%global modprobe_conf_rpmsave %(echo "%{modprobe_conf_files}" | sed 's,\\([^
]*\\),%{_sysconfdir}/modprobe.d/\\1.conf.rpmsave,g')
Name: suse-module-tools
-Version: 16.0.8
+Version: 16.0.9
Release: 0
Summary: Configuration for module loading and SUSE-specific utilities
for KMPs
License: GPL-2.0-or-later
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/suse-module-tools-16.0.8+1/weak-modules2
new/suse-module-tools-16.0.9/weak-modules2
--- old/suse-module-tools-16.0.8+1/weak-modules2 2021-08-20
10:59:52.000000000 +0200
+++ new/suse-module-tools-16.0.9/weak-modules2 2021-08-30 15:11:32.000000000
+0200
@@ -70,6 +70,7 @@
echo "$0: could not find lsinitrd" >&2
exit 1
fi
+ dlog "LSINITRD=$LSINITRD"
}
find_depmod() {
@@ -87,10 +88,17 @@
echo "ERROR: depmod is not installed - aborting" >&2
exit 1
fi
+ dlog "DEPMOD=$DEPMOD"
}
log() {
- [ -n "$opt_verbose" ] && echo "$@" >&2
+ [ $opt_verbose -gt 0 ] && echo "$@" >&2
+ return 0
+}
+
+dlog() {
+ [ $opt_verbose -gt 1 ] && echo "$@" >&2
+ return 0
}
doit() {
@@ -119,7 +127,7 @@
}
# Is a kmp already present in or linked to from this kernel?
-kmp_is_present() {
+__kmp_is_present() {
local kmp=$1 krel=$2
if [ $krel = "$(cat $tmpdir/krel-$kmp)" ]; then
@@ -134,6 +142,13 @@
return 0
}
+kmp_is_present() {
+ __kmp_is_present "$1" "$2"
+ local res=$?
+ dlog "kmp_is_present: kmp=$1 krel=$2 => $res"
+ return $res
+}
+
# Add the modules of a kmp to /lib/modules/$krel
add_kmp_modules() {
local kmp=$1 krel=$2 basedir=$3
@@ -145,6 +160,7 @@
symlink=$(symlink_to_module $module $krel)
doit mkdir -p ${opt_debug:+-v} $basedir${symlink%/*} || exit 1
doit ln -sf ${opt_debug:+-v} $module $basedir$symlink || exit 1
+ dlog "add_kmp_modules: added $module to $krel"
done < $tmpdir/modules-$kmp
}
@@ -158,6 +174,7 @@
while read module; do
symlink=$(symlink_to_module $module $krel)
doit rm -f ${opt_debug:+-v} $basedir$symlink
+ dlog "remove_kmp_modules: removed $module from $krel"
done < $tmpdir/modules-$kmp
}
@@ -178,10 +195,16 @@
# Check for unresolved symbols
has_unresolved_symbols() {
- local krel=$1 basedir=$2 output status args sym_errors
+ local krel=$1 basedir=$2 output status args sym_errors _f
- if [ ! -e $tmpdir/symvers-$krel -a -e /boot/symvers-$krel.gz ]; then
- zcat /boot/symvers-$krel.gz > $tmpdir/symvers-$krel
+ if [ ! -e $tmpdir/symvers-$krel ]; then
+ for _f in /boot/symvers-$krel.gz /usr/lib/modules/$krel/symvers.gz; do
+ if [ -e $_f ]; then
+ dlog "has_unresolved_symbols: found $_f"
+ zcat $_f >$tmpdir/symvers-$krel
+ break
+ fi
+ done
fi
if [ -e $tmpdir/symvers-$krel ]; then
args=(-E $tmpdir/symvers-$krel)
@@ -202,7 +225,7 @@
[ -z "$opt_debug" ] || echo "$sym_errors" >&2
return 0
fi
-
+ dlog "has_unresolved_symbols: no errors found for $krel"
return 1
}
@@ -214,17 +237,20 @@
if [ ! -d "$dir" ]; then
continue
fi
- if [ -n "$(comm -1 -2 $tmpdir/basenames-$kmp \
- <(find "$dir" -not -type d -printf '%f\n' | sort -u))" ]; then
+ local overlap="$(comm -1 -2 $tmpdir/basenames-$kmp \
+ <(find "$dir" -not -type d -printf '%f\n' | sort -u))"
+ if [ -n "$overlap" ]; then
+ dlog "basenames_are_unique: found name overlap for $kmp in $dir: "
$overlap
return 1
fi
done
+ dlog "basenames_are_unique: $kmp is unique in $basedir"
return 0
}
# Can a kmp be replaced by a different version of the same kmp in a kernel?
# Set the old kmp to "" when no kmp is to be removed.
-can_replace_kmp() {
+__can_replace_kmp() {
local old_kmp=$1 new_kmp=$2 krel=$3
local basedir=$tmpdir/$krel
@@ -248,6 +274,13 @@
return 0
}
+can_replace_kmp() {
+ __can_replace_kmp "$1" "$2" "$3"
+ local res=$?
+ dlog "can_replace_kmp: old=$1 new=$2 krel=$3 => $res"
+ return $res
+}
+
# Figure out which modules a kmp contains
check_kmp() {
local kmp=$1
@@ -262,6 +295,7 @@
return 1
fi
echo $1 > $tmpdir/krel-$kmp
+ dlog "check_kmp: $kmp contains modules for $1"
# Make sure none of the modules are in kernel/ or weak-updates/
if grep -qE -e '^/lib/modules/[^/]+/(kernel|weak-updates)/' \
@@ -272,6 +306,7 @@
fi
sed -e 's:.*/::' $tmpdir/modules-$kmp \
| sort -u > $tmpdir/basenames-$kmp
+ dlog "check_kmp: $kmp contains: " $(cat $tmpdir/basenames-$kmp)
}
# Figure out which kmps there are, and which modules they contain
@@ -281,6 +316,7 @@
local kmp
for kmp in $(rpm -qa --qf '%{n}-%{v}-%{r}\n' --nodigest --nosignature
"$basename-kmp-$flavor"); do
+ dlog "find_kmps: looking at $kmp"
if rpm -q --qf '[%{providename}\n]' --nodigest --nosignature "$kmp" | \
grep -q '^kmp_in_kernel$'; then
# KMP built directly from the kernel spec file (fate#319339)
@@ -302,9 +338,11 @@
| sed -re "s:$tmpdir/basenames-::" \
| /usr/lib/rpm/rpmsort -r \
> $tmpdir/kmps
+
+ dlog "find_kmps: kmps found: " $(cat $tmpdir/kmps)
}
-previous_version_of_kmp() {
+__previous_version_of_kmp() {
local new_kmp=$1 krel=$2
local module symlink old_kmp
@@ -325,6 +363,14 @@
echo "$old_kmp"
}
+previous_version_of_kmp() {
+ local old="$(__previous_version_of_kmp "$1" "$2")"
+ local res=$?
+ dlog "previous_version_of_kmp: kmp=$1 krel=$2 => $old"
+ echo "$old"
+ return $res
+}
+
get_initrd_basenames() {
$LSINITRD /boot/initrd-$1 | \
sed -rn 's:.*\<lib/modules/.*/::p' | \
@@ -339,7 +385,6 @@
# stdin - list of changed modules ("_kernel_" for the whole kernel)
needs_initrd() {
local krel=$1
- local changed_basenames=($(strip_mod_extensions | sort -u))
# Don't generate an initrd for kdump here. It's done automatically with
mkdumprd when
# /etc/init.d/boot.kdump is called to load the kdump kernel. See
mkdumprd(8) why
@@ -356,21 +401,31 @@
# this variable
if test -n "$KMP_NEEDS_MKINITRD" && \
! test "$KMP_NEEDS_MKINITRD" -eq 0 2>/dev/null; then
+ dlog "needs_initrd: yes, KMP_NEEDS_MKINITRD=$KMP_NEEDS_MKINITRD"
return 0
fi
+
+ local changed_basenames=($(strip_mod_extensions | sort -u))
+ dlog "needs_initrd: changed_basenames: " $changed_basenames
+
if [ "$changed_basenames" = "_kernel_" ]; then
+ dlog "needs_initrd: yes, kernel package"
return 0
fi
if [ ! -e /boot/initrd-$krel ]; then
+ dlog "needs_initrd: yes, initrd doesn't exist yet"
return 0
fi
local initrd_basenames=($(get_initrd_basenames "$krel" | sort -u))
+ dlog "needs_initrd: initrd_basenames: " $initrd_basenames
local i=($(join <(printf '%s\n' "${changed_basenames[@]}") \
<(printf '%s\n' "${initrd_basenames[@]}") ))
log "changed initrd modules for kernel $krel: ${i[@]-none}"
if [ ${#i[@]} -gt 0 ]; then
+ dlog "needs_initrd: yes, modules changed"
return 0
fi
+ dlog "needs_initrd: no"
return 1
}
@@ -394,7 +449,7 @@
if [ -n "$image" ]; then
if test -n "$INITRD_IN_POSTTRANS"; then
mkdir -p /run/regenerate-initrd
- touch /run/regenerate-initrd/$image-$krel
+ doit touch /run/regenerate-initrd/$image-$krel
else
doit "$DRACUT" -f /boot/initrd-$krel $krel
status=$?
@@ -406,21 +461,8 @@
return $status
}
-kernel_changed() {
- local krel=$1 flavor=${1##*-}
-
- if [ ! -f /boot/System.map-$krel ]; then
- # this kernel does not exist anymore
- return 0
- fi
- if [ ! -d /lib/modules/$krel ]; then
- # a kernel without modules - rebuild initrd nevertheless (to mount the
- # root fs, etc).
- echo "_kernel_" | run_depmod_build_initrd "$krel"
- return
- fi
-
- find_kmps '*' $flavor || return 1
+walk_kmps() {
+ local krel=$1
local kmps=( $(cat $tmpdir/kmps) )
while :; do
@@ -430,6 +472,7 @@
kmp=${kmps[n]}
[ -n "$kmp" ] || continue
+ dlog "walk_kmps: checking $kmp for $krel"
if kmp_is_present $kmp $krel; then
log "Package $kmp does not need to be added to kernel $krel"
kmps[n]=''
@@ -448,10 +491,29 @@
kmps[n]=''
continue
fi
+ dlog "walk_kmps: skipped $kmp"
skipped=1
done
[ -n "$added" -a -n "$skipped" ] || break
done
+}
+
+kernel_changed() {
+ local krel=$1 flavor=${1##*-}
+
+ if [ ! -f /boot/System.map-$krel ]; then
+ # this kernel does not exist anymore
+ dlog "kernel_changed: kernel removed"
+ return 0
+ fi
+ if [ ! -d /lib/modules/$krel ]; then
+ # a kernel without modules - rebuild initrd nevertheless (to mount the
+ # root fs, etc).
+ dlog "kernel_changed: kernel without modules"
+ elif find_kmps '*' $flavor; then
+ walk_kmps "$krel"
+ fi
+
echo "_kernel_" | run_depmod_build_initrd "$krel"
}
@@ -503,6 +565,7 @@
*)
continue
esac
+ dlog "add_kmp: processing $kmp for $krel"
[ -d $dir -a -f /boot/System.map-$krel ] || continue
if opt_debug=1 has_unresolved_symbols "$krel" "/"; then
echo "Warning: /lib/modules/$krel is inconsistent" >&2
@@ -528,8 +591,11 @@
cat $tmpdir/basenames-{$old_kmp,$kmp} \
| run_depmod_build_initrd "$krel" || status=1
fi
+ else
+ dlog "add_kmp: skipped $kmp"
fi
done
+ dlog "add_kmp: status=$status"
return $status
}
@@ -555,6 +621,7 @@
continue
esac
[ -d $dir -a -f /boot/System.map-$krel ] || continue
+ dlog "remove_kmp: processing $kmp for $krel"
if kmp_is_present $kmp $krel; then
local other_found=0 inconsistent=0
@@ -572,6 +639,7 @@
[ "$kmp" != "$other_kmp" ] || continue
other_found=1
+ dlog "remove_kmp: checking other KMP $other_kmp"
if can_replace_kmp "" "$other_kmp" "$krel"; then
add_kmp_modules "$other_kmp" "$krel"
break
@@ -597,6 +665,7 @@
rm -f $tmpdir/unresolved-"$krel"
fi
done
+ dlog "remove_kmp: status=$status"
return $status
}
@@ -651,13 +720,30 @@
save_argv=("$@")
options=`getopt -o vh --long add-kernel,remove-kernel,add-kmp,remove-kmp \
--long add-kernel-modules,remove-kernel-modules \
- --long usage,help,verbose,dry-run,debug -- "$@"`
+ --long usage,help,verbose,dry-run,debug,logfile: -- "$@"`
if [ $? -ne 0 ]; then
usage >&2
exit 1
fi
eval set -- "$options"
mode=
+opt_logfile=$WM2_LOGFILE
+case $WM2_VERBOSE in
+ [0-3])
+ opt_verbose=$WM2_VERBOSE
+ ;;
+ *)
+ opt_verbose=0
+ ;;
+esac
+case $WM2_DEBUG in
+ 1)
+ opt_debug=1
+ ;;
+ *)
+ opt_debug=
+ ;;
+esac
while :; do
case "$1" in
--add-kernel | --remove-kernel | --add-kernel-modules | \
@@ -665,7 +751,7 @@
mode="$1"
;;
-v | --verbose)
- opt_verbose=1
+ opt_verbose=$((opt_verbose + 1))
;;
--dry-run)
opt_dry_run=1
@@ -673,6 +759,10 @@
--debug)
opt_debug=1
;;
+ --logfile)
+ shift
+ opt_logfile=$1
+ ;;
--usage)
usage
exit 0
@@ -712,6 +802,17 @@
exit 1
fi
+if [ -n "$opt_logfile" ]; then
+ [ "${opt_logfile#/}" != "$opt_logfile" ] ||
opt_logfile="/var/log/$opt_logfile"
+ echo "${0##/*}: appending output to $opt_logfile" >&2
+ exec 2>>"$opt_logfile"
+fi
+if [ $opt_verbose -gt 2 ]; then
+ set -x
+ # tracing will print everything, no need to print in log()
+ opt_verbose=$((opt_verbose - 3))
+fi
+
#unset LANG LC_ALL LC_COLLATE
find_depmod
find_lsinitrd
++++++ suse-module-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.aM9aaC/_old 2021-09-03 21:26:50.826220392 +0200
+++ /var/tmp/diff_new_pack.aM9aaC/_new 2021-09-03 21:26:50.826220392 +0200
@@ -1,5 +1,5 @@
name: suse-module-tools
-version: 16.0.8+1
-mtime: 1629449992
-commit: ec6c895407f494c886dd4de6ef58e5d2641f0962
+version: 16.0.9
+mtime: 1630329092
+commit: 532eddd0313f212550d81ad86dfac00b2eeb29fd