Package: iscsitarget-source Version: 0.4.15-2 Severity: important Tags: patch
Currently it is not possible to use the iscsitarget-source package to build the kernel module for kernels < 2.6.19 as the patch for these kernels is not applied. This is a pity for machines running the kernel shipped with etch. The attached patch will make sure the patch gets applied for these kernels. I also fixed the 'kdist_clean' so that is actually cleans up files generated during the module compilation. Cheers, Jeremy -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.21-2-686 (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages iscsitarget-source depends on: ii bzip2 1.0.3-7 high-quality block-sorting file co ii debhelper 5.0.50 helper programs for debian/rules ii module-assistant 0.10.11 tool to make module package creati Versions of packages iscsitarget-source recommends: pn iscsitarget <none> (no description available) -- no debconf information
diff -u iscsitarget-0.4.15/debian/rules iscsitarget-0.4.15/debian/rules --- iscsitarget-0.4.15/debian/rules +++ iscsitarget-0.4.15/debian/rules @@ -41,7 +41,12 @@ kdist_clean: dh_clean - -$(MAKE) clean + $(MAKE) -C $(KSRC) SUBDIRS=$(shell pwd)/kernel clean + # Revert patch for kernels < 2.6.19 + if [ -f debian/stamp-patched ]; then \ + patch -p0 -R < patches/compat-2.6.14-2.6.18.patch; \ + rm -f debian/stamp-patched; \ + fi # prep-deb-files rewrites the debian/ files as needed. See RATIONALE for # details @@ -54,6 +59,11 @@ dh_testdir dh_testroot dh_clean -k + # Apply patch for kernels < 2.6.19 + if dpkg --compare-versions $(KVERS) lt 2.6.19; then \ + patch -p0 < patches/compat-2.6.14-2.6.18.patch; \ + touch debian/stamp-patched; \ + fi #$(MAKE) -C $(KSRC) KERNEL_SOURCES=$(KSRC) MODVERSIONS=detect KERNEL=linux-$(KVERS) KDIR=$(KSRC) SUBDIRS=$(shell pwd)/kernel modules $(MAKE) -C $(KSRC) SUBDIRS=$(shell pwd)/kernel modules @@ -101,10 +111,12 @@ dh_installdirs -p$(psource) usr/src/modules/$(PACKAGE)/debian dh_installdirs -p$(psource) usr/src/modules/$(PACKAGE)/include dh_installdirs -p$(psource) usr/src/modules/$(PACKAGE)/kernel + dh_installdirs -p$(psource) usr/src/modules/$(PACKAGE)/patches # Copy only the driver source to the proper location cp kernel/* debian/$(psource)/usr/src/modules/$(PACKAGE)/kernel/ cp include/* debian/$(psource)/usr/src/modules/$(PACKAGE)/include/ + cp patches/* debian/$(psource)/usr/src/modules/$(PACKAGE)/patches/ # Copy the needed debian/ pieces to the proper location cp debian/*-module-* \