redhat: Make separate debuginfo for kmods work with recent rpm 30/13030/2
authorStephan Wiesand <stephan.wiesand@desy.de>
Thu, 26 Apr 2018 17:33:31 +0000 (19:33 +0200)
committerBenjamin Kaduk <kaduk@mit.edu>
Sat, 28 Apr 2018 18:15:09 +0000 (14:15 -0400)
Commit 443dd5367e0cd9050ad39a6594c5be521271b4e9 introduced the
creation of separate debuginfo packages for kmod packages, and
commmit 387ae9536888419d7b101513e04e1c644e3218d6 moved the code
from the spec into the kmodtool script.

Recent versions of rpm (the issue was found on Fedora 27) extract
the debuginfo data from a copy of the original files having the
package version-release as a suffix. This broke the original
change since the regular expression passed to find-debuginfo.sh
no longer matched the name of the openafs.ko file. The file list
for the -debuginfo package remained empty, which caused rpmbuild
to fail.

Relax the regex to match the previous and current file names we
are after. It is possible but unlikely that .*openafs\.ko.* will
ever match any file not being a kernel module.

Change-Id: I57178ed2c593551ede6f4ab2679dd0360dc362cf
Reviewed-on: https://gerrit.openafs.org/13030
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/packaging/RedHat/openafs-kmodtool

index 6721b79..eea4ed4 100644 (file)
@@ -93,7 +93,7 @@ get_rpmtemplate ()
 
     cat <<EOF
 
-%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*openafs.ko(\.debug)?' -o kmod-debuginfo.list
+%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*openafs\.ko.*' -o kmod-debuginfo.list
 
 %package       -n kmod-${kmod_name}${dashvariant}
 Summary:          ${kmod_name} kernel module(s)