redhat: remove the openafs-kernel-version.sh script 96/12996/2
authorMichael Meffie <mmeffie@sinenomine.net>
Fri, 6 Apr 2018 03:43:34 +0000 (23:43 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 6 Apr 2018 15:38:20 +0000 (11:38 -0400)
Commit ec706b21530240d7fb66bad2f08513eff8f7c335 (Remove Linux 2.4 compat
from RedHat packaging) removed the use of the script
openafs-kernel-version.sh, which was used in the linux 2.4 days to look
up the current kernel version.  Nowadays, we use the openafs-kmodtool
script to determine the kernel version.

Remove the unused openafs-kernel-version.sh script from the package
sources.

Change-Id: I6494812004f7b59c786ff670ff37c2fdc354f371
Reviewed-on: https://gerrit.openafs.org/12996
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/packaging/RedHat/makesrpm.pl
src/packaging/RedHat/openafs-kernel-version.sh [deleted file]
src/packaging/RedHat/openafs.spec.in

index c46e994..e36b6b7 100755 (executable)
@@ -118,8 +118,7 @@ while (defined($file = $pkgdirh->read)) {
 }
 undef $dirh;
 
-# Some files need particular modes.
-chmod 0755, $tmpdir."/rpmdir/SOURCES/openafs-kernel-version.sh";
+# This file needs particular modes.
 chmod 0755, $tmpdir."/rpmdir/SOURCES/openafs-kvers-is.sh";
 
 # Create the specfile. Use sed for this, cos its easier
diff --git a/src/packaging/RedHat/openafs-kernel-version.sh b/src/packaging/RedHat/openafs-kernel-version.sh
deleted file mode 100755 (executable)
index d3a0e49..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-#
-# investigate the name of the kernel
-#
-# $Revision$
-
-if [ "x$1" = "x" ] ; then
-    kernvers=`uname -r`
-    if [ ! -d /lib/modules/$kernvers/build/include ] ; then
-        kernvers=`/bin/ls /lib/modules/*/build/include/linux/version.h | \
-        cut -d/ -f4 | \
-        sort -u | \
-        tail -1`
-    fi
-else
-    kernvers=$1
-fi
-
-if [ -z "$kernvers" ]; then echo "unable to determine kernel version" >&2; exit 1; fi
-
-# strip "kernel-" off of the front
-if expr "$kernvers" : "kernel-" >&/dev/null
-then
-    kernvers=`expr "$kernvers" : 'kernel-\(.*\)'`
-fi
-
-# Strip kernel config mnemonic off 2.4 kernels.
-case $kernvers in
-  2.4.*)
-    # strip kernel config mnemonic off of the tail
-    case "$kernvers" in
-      *smp)
-         kernvers=`expr "$kernvers" : '\(.*\)smp'`
-         ;;
-      *bigmem)
-         kernvers=`expr "$kernvers" : '\(.*\)bigmem'`
-         ;;
-      *hugemem)
-         kernvers=`expr "$kernvers" : '\(.*\)hugemem'`
-         ;;
-      *enterprise)
-         kernvers=`expr "$kernvers" : '\(.*\)enterprise'`
-         ;;
-    esac
-    ;;
-esac
-
-echo $kernvers
-exit 0
index c68dde5..7f1052e 100644 (file)
@@ -114,7 +114,6 @@ Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
 
 Source20: https://www.central.org/dl/cellservdb/CellServDB.2017-03-14
 
-Source30: openafs-kernel-version.sh
 Source996: openafs-kvers-is.sh
 Source997: openafs-buildfedora.pl
 Source998: openafs-buildall.sh