From: Cheyenne Wills Date: Sat, 26 Jan 2019 00:35:51 +0000 (-0700) Subject: Redhat: 'clean build area' error message during dkms build/install X-Git-Tag: upstream/1.8.3^2~5 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ff3ae28f14cb42b5e72adfceb1f6271a8f675e4a;p=packages%2Fo%2Fopenafs.git Redhat: 'clean build area' error message during dkms build/install dkms invokes a make clean command before and after building the kernel module. The make clean that is issued at the start of building results in a nuisance error message because the Makefile doesn't yet exist Building module: cleaning build area...(bad exit status: 2) In the dkms.conf file, built from within the openafs.spec, change the command defined in the CLEAN statement to test for the existence of the Makefile prior to running the actual make clean Reviewed-on: https://gerrit.openafs.org/13460 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk (cherry picked from commit 10f2c469f45eece0e12573388ae66e392e2dff1c) Change-Id: If3440b576ad62441bb6b970016fa9808b51abf70 Reviewed-on: https://gerrit.openafs.org/13479 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand --- diff --git a/src/packaging/RedHat/openafs.spec.in b/src/packaging/RedHat/openafs.spec.in index c591f4939..d044b4cfa 100644 --- a/src/packaging/RedHat/openafs.spec.in +++ b/src/packaging/RedHat/openafs.spec.in @@ -851,7 +851,7 @@ PACKAGE_VERSION="%{dkms_version}" # Items below here should not have to change with each driver version. PACKAGE_NAME="%{name}" MAKE[0]='./configure --with-linux-kernel-headers=${kernel_source_dir} --with-linux-kernel-packaging && make && case "${kernelver_array[0]}${kernelver[0]}" in 2.4.*) mv src/libafs/MODLOAD-*/libafs-* openafs.o ;; *) mv src/libafs/MODLOAD-*/openafs.ko . ;; esac' -CLEAN="make -C src/libafs clean" +CLEAN="if [ -e src/libafs/Makefile ]; then make -C src/libafs clean; else true; fi" BUILT_MODULE_NAME[0]="$PACKAGE_NAME" DEST_MODULE_LOCATION[0]="/extra/$PACKAGE_NAME/"