From 0119f11732e6e8c707639857f3964f8ad0d2555a Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 27 Dec 2005 00:23:42 +0000 Subject: [PATCH] * Call kernel-version correctly from prep-modules, which fixes build issues with manually-built kernels. (Closes: #344851) Also always trust the KVERS determined by the Makefile in prep-modules if available, since otherwise we end up with broken packages when the makefile installs the module assuming one package name and the control file tries to build a package with a different name. Clean up a few remaining remnants of @sys handling when building kernel modules. Since the kernel module build never runs any sort of install target, this shouldn't be needed. --- debian/changelog | 4 +++- debian/prep-modules | 14 +++++++++++--- debian/rules | 5 +---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7299df48b..3d871b32d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ openafs (1.4.0-3) unstable; urgency=low * Stop unconditionally forcing the compiler to cc or gcc in configure, allowing, among other things, building the kernel module with a compiler other than the default system compiler. (Closes: #338306) + * Call kernel-version correctly from prep-modules, which fixes build + issues with manually-built kernels. (Closes: #344851) * Include afsmonitor and livesys in openafs-client. * Include volinfo in openafs-fileserver. * Document FAM's lack of support for AFS's security model and recommend @@ -24,7 +26,7 @@ openafs (1.4.0-3) unstable; urgency=low goes into each package. * Don't ignore make distclean errors. - -- Russ Allbery Wed, 21 Dec 2005 18:59:01 -0800 + -- Russ Allbery Mon, 26 Dec 2005 16:17:15 -0800 openafs (1.4.0-2) unstable; urgency=low diff --git a/debian/prep-modules b/debian/prep-modules index 4dff3c767..0ab5d5c10 100644 --- a/debian/prep-modules +++ b/debian/prep-modules @@ -51,7 +51,11 @@ if [ -n "$KVERS" ] && [ -n "$KDREV" ]; then afs_kvers="${KVERS}${INT_SUBARCH}" afs_kdrev="${KDREV}" elif [ ! -f "$changelog" ] ; then - afs_kvers=`perl debian/kernel-version` + if [ -n "$KVERS" ] ; then + afs_kvers="$KVERS" + else + afs_kvers=`perl debian/kernel-version "$1"` + fi if [ -z "$KDREV" ] ; then afs_kdrev="${afs_kvers}-0" else @@ -59,8 +63,12 @@ elif [ ! -f "$changelog" ] ; then afs_kdrev="${KDREV}" fi else - afs_kvers=`head -1 "$changelog" \ - | sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\1/'` + if [ -n "$KVERS" ] ; then + afs_kvers="$KVERS" + else + afs_kvers=`head -1 "$changelog" \ + | sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\1/'` + fi afs_kdrev=`head -1 "$changelog" \ | sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\2/'` fi diff --git a/debian/rules b/debian/rules index b9e7d2010..c871c447f 100755 --- a/debian/rules +++ b/debian/rules @@ -20,7 +20,6 @@ else DEBIAN_KERN_FLAGS = endif -# The AFS sysname is determined by a script ifndef KSRC KSRC = /usr/src/linux endif @@ -32,7 +31,7 @@ export KSRC export KVERS export KPKG_DEST_DIR -SYS_NAME := $(shell KSRC="$(KSRC)" KVERS="$(KVERS)" sh debian/sysname) +SYS_NAME := $(shell KSRC="$(KSRC)" KVERS="$(KVERS)" sh debian/sysname) package = openafs srcpkg = openafs-modules-source @@ -233,8 +232,6 @@ configure-modules-stamp: exit 1 ; \ fi sh debian/prep-modules $(KSRC) - -ln -s @sys/dest dest - -ln -s $(SYS_NAME) @sys sh configure --with-afs-sysname=$(SYS_NAME) \ --with-linux-kernel-headers=$(KSRC) --prefix=`pwd`/debian/tmp \ --enable-debug --enable-lwp-debug --enable-kernel-debug \ -- 2.39.5