From 9ee5fa152b7b7de6a6ddc6ed87bbf9f76da6e3e4 Mon Sep 17 00:00:00 2001 From: Stephan Wiesand Date: Mon, 22 Jun 2015 10:44:11 +0200 Subject: [PATCH] redhat: Avoid bogus dependencies when building the srpm By default the spec defines that both userland and kernel module packages should be built. This results in a dependency of the form "kernel-devel-`uname -m` = `uname -r`" being added to the source package created by makesrpm.pl, which is bogus because the uname values are from the system on which the srpm is built and needn't apply to the system where it is used. While rpm and rpmbuild ignore such dependencies of source packages, other tools don't and may fail. Some versions of rpmbuild will also enforce those requirements when building the srpm itself, which is pointless too. Avoid both problems by pretending not to attempt building modules and ignoring any dependencies when makesrpm.pl invokes rpmbuild -bs. Change-Id: I0134e1936638c7d9c3fd9ff0ccf1cba36710d0d3 Reviewed-on: http://gerrit.openafs.org/11903 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Benjamin Kaduk --- src/packaging/RedHat/makesrpm.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/packaging/RedHat/makesrpm.pl b/src/packaging/RedHat/makesrpm.pl index 7a238f3639..c46e99473d 100755 --- a/src/packaging/RedHat/makesrpm.pl +++ b/src/packaging/RedHat/makesrpm.pl @@ -159,7 +159,8 @@ if ($changelog) { } # Build an RPM -system("rpmbuild -bs --define \"dist %undefined\" ". +system("rpmbuild -bs --nodeps --define \"dist %undefined\" ". + "--define \"build_modules 0\" ". "--define \"_topdir $tmpdir/rpmdir\" ". "$tmpdir/rpmdir/SPECS/openafs.spec > /dev/null") == 0 or die "rpmbuild failed : $!\n";