r1011 - in trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian: . patches
Joshua Kwan
joshk@haydn.debian.org
Wed, 11 Aug 2004 10:55:49 -0600
Author: joshk
Date: 2004-08-11 10:55:42 -0600 (Wed, 11 Aug 2004)
New Revision: 1011
Added:
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/compat
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/014_nm256xl_plus.diff
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/prune-non-free
Modified:
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/official
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/patch-2.4.26-1
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/rules
Log:
prune non-free stuff, split out one more
Added: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/compat
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/compat 2004-08-11 15:43:48 UTC (rev 1010)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/compat 2004-08-11 16:55:42 UTC (rev 1011)
@@ -0,0 +1 @@
+3
Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/official
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/official 2004-08-11 15:43:48 UTC (rev 1010)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/official 2004-08-11 16:55:42 UTC (rev 1011)
@@ -1 +1 @@
-Do not remove this line.
+This is the Debian version of Linux 2.4.27.
Added: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/014_nm256xl_plus.diff
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/014_nm256xl_plus.diff 2004-08-11 15:43:48 UTC (rev 1010)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/014_nm256xl_plus.diff 2004-08-11 16:55:42 UTC (rev 1011)
@@ -0,0 +1,52 @@
+diff -urN kernel-source-2.4.26/drivers/sound/nm256.h kernel-source-2.4.26-1/drivers/sound/nm256.h
+--- kernel-source-2.4.26/drivers/sound/nm256.h 2000-12-12 08:02:32.000000000 +1100
++++ kernel-source-2.4.26-1/drivers/sound/nm256.h 2001-10-20 16:47:17.000000000 +1000
+@@ -5,7 +5,7 @@
+
+ /* The revisions that we currently handle. */
+ enum nm256rev {
+- REV_NM256AV, REV_NM256ZX
++ REV_NM256AV, REV_NM256ZX, REV_NM256XL_PLUS
+ };
+
+ /* Per-card structure. */
+diff -urN kernel-source-2.4.26/drivers/sound/nm256_audio.c kernel-source-2.4.26-1/drivers/sound/nm256_audio.c
+--- kernel-source-2.4.26/drivers/sound/nm256_audio.c 2003-08-25 21:44:42.000000000 +1000
++++ kernel-source-2.4.26-1/drivers/sound/nm256_audio.c 2003-09-03 20:27:11.000000000 +1000
+@@ -47,10 +47,6 @@
+ static void nm256_interrupt_zx (int irq, void *dev_id, struct pt_regs *dummy);
+ static int handle_pm_event (struct pm_dev *dev, pm_request_t rqst, void *data);
+
+-/* These belong in linux/pci.h. */
+-#define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005
+-#define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006
+-
+ /* List of cards. */
+ static struct nm256_info *nmcard_list;
+
+@@ -1259,10 +1255,14 @@
+ static int __devinit
+ nm256_probe(struct pci_dev *pcidev,const struct pci_device_id *pciid)
+ {
+- if (pcidev->device == PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO)
++ switch (pcidev->device) {
++ case PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO:
+ return nm256_install(pcidev, REV_NM256AV, "256AV");
+- if (pcidev->device == PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO)
++ case PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO:
+ return nm256_install(pcidev, REV_NM256ZX, "256ZX");
++ case PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO:
++ return nm256_install(pcidev, REV_NM256XL_PLUS, "256XL+");
++ }
+ return -1; /* should not come here ... */
+ }
+
+@@ -1650,6 +1650,8 @@
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0},
+ {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0},
++ {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO,
++ PCI_ANY_ID, PCI_ANY_ID, 0, 0},
+ {0,}
+ };
+ MODULE_DEVICE_TABLE(pci, nm256_pci_tbl);
Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/patch-2.4.26-1
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/patch-2.4.26-1 2004-08-11 15:43:48 UTC (rev 1010)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/patch-2.4.26-1 2004-08-11 16:55:42 UTC (rev 1011)
@@ -6751,7 +6751,7 @@
ahc_unlock(ahc, &s);
}
-diff -urN kernel-source-2.4.26/drivers/scsi/dpt_i2o.c kernel-source-2.4.26-1/drivers/scsi/dpt_i2o.c
+diff -urN kernel-source-2.4.26/drivers/scsi/dpt_i3o.c kernel-source-2.4.26-1/drivers/scsi/dpt_i2o.c
--- kernel-source-2.4.26/drivers/scsi/dpt_i2o.c 2003-06-14 00:51:36.000000000 +1000
+++ kernel-source-2.4.26-1/drivers/scsi/dpt_i2o.c 2003-06-01 20:43:49.000000000 +1000
@@ -81,9 +81,9 @@
@@ -6766,58 +6766,7 @@
#else
(-1),(-1)
#endif
-diff -urN kernel-source-2.4.26/drivers/sound/nm256.h kernel-source-2.4.26-1/drivers/sound/nm256.h
---- kernel-source-2.4.26/drivers/sound/nm256.h 2000-12-12 08:02:32.000000000 +1100
-+++ kernel-source-2.4.26-1/drivers/sound/nm256.h 2001-10-20 16:47:17.000000000 +1000
-@@ -5,7 +5,7 @@
-
- /* The revisions that we currently handle. */
- enum nm256rev {
-- REV_NM256AV, REV_NM256ZX
-+ REV_NM256AV, REV_NM256ZX, REV_NM256XL_PLUS
- };
-
- /* Per-card structure. */
-diff -urN kernel-source-2.4.26/drivers/sound/nm256_audio.c kernel-source-2.4.26-1/drivers/sound/nm256_audio.c
---- kernel-source-2.4.26/drivers/sound/nm256_audio.c 2003-08-25 21:44:42.000000000 +1000
-+++ kernel-source-2.4.26-1/drivers/sound/nm256_audio.c 2003-09-03 20:27:11.000000000 +1000
-@@ -47,10 +47,6 @@
- static void nm256_interrupt_zx (int irq, void *dev_id, struct pt_regs *dummy);
- static int handle_pm_event (struct pm_dev *dev, pm_request_t rqst, void *data);
-
--/* These belong in linux/pci.h. */
--#define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005
--#define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006
--
- /* List of cards. */
- static struct nm256_info *nmcard_list;
-
-@@ -1259,10 +1255,14 @@
- static int __devinit
- nm256_probe(struct pci_dev *pcidev,const struct pci_device_id *pciid)
- {
-- if (pcidev->device == PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO)
-+ switch (pcidev->device) {
-+ case PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO:
- return nm256_install(pcidev, REV_NM256AV, "256AV");
-- if (pcidev->device == PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO)
-+ case PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO:
- return nm256_install(pcidev, REV_NM256ZX, "256ZX");
-+ case PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO:
-+ return nm256_install(pcidev, REV_NM256XL_PLUS, "256XL+");
-+ }
- return -1; /* should not come here ... */
- }
-
-@@ -1650,6 +1650,8 @@
- PCI_ANY_ID, PCI_ANY_ID, 0, 0},
- {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0},
-+ {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO,
-+ PCI_ANY_ID, PCI_ANY_ID, 0, 0},
- {0,}
- };
- MODULE_DEVICE_TABLE(pci, nm256_pci_tbl);
+
diff -urN kernel-source-2.4.26/drivers/usb/Config.in kernel-source-2.4.26-1/drivers/usb/Config.in
--- kernel-source-2.4.26/drivers/usb/Config.in 2004-02-19 00:36:31.000000000 +1100
+++ kernel-source-2.4.26-1/drivers/usb/Config.in 2004-02-22 20:28:26.000000000 +1100
Copied: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/prune-non-free (from rev 1009, trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/prune-non-free)
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/prune-non-free 2004-08-11 15:05:02 UTC (rev 1009)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/prune-non-free 2004-08-11 16:55:42 UTC (rev 1011)
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Scrubs known non-DFSG-compliant stuff out of the source tree so that a
+# DFSG-free .orig.tar.gz for the source package can be created.
+
+PROGNAME=${0##*/}
+
+if [ ! -d kernel ]; then
+ echo "$PROGNAME: no unpacked source tree in current working directory" >&2
+ exit 1
+fi
+
+# outright remove firmware-only files
+rm -f drivers/net/acenic_firmware.h
+rm -f drivers/net/dgrs_firmware.c
+rm -f drivers/net/tg3.c
+rm -f drivers/net/tokenring/smctr_firmware.h
+rm -f drivers/scsi/qla2xxx/ql2100_fw.c
+rm -f drivers/scsi/qla2xxx/ql2200_fw.c
+rm -f drivers/scsi/qla2xxx/ql2300_fw.c
+rm -f drivers/scsi/qla2xxx/ql2322_fw.c
+rm -f drivers/scsi/qla2xxx/ql6312_fw.c
+rm -f drivers/scsi/qla2xxx/ql6322_fw.c
+rm -f drivers/usb/media/dabfirmware.h
+rm -f drivers/usb/misc/emi62_fw_m.h
+rm -f drivers/usb/misc/emi62_fw_s.h
+rm -f drivers/usb/serial/keyspan_mpr_fw.h
+rm -f drivers/usb/serial/keyspan_usa18x_fw.h
+rm -f drivers/usb/serial/keyspan_usa19_fw.h
+rm -f drivers/usb/serial/keyspan_usa19qi_fw.h
+rm -f drivers/usb/serial/keyspan_usa19qw_fw.h
+rm -f drivers/usb/serial/keyspan_usa19w_fw.h
+rm -f drivers/usb/serial/keyspan_usa28_fw.h
+rm -f drivers/usb/serial/keyspan_usa28x_fw.h
+rm -f drivers/usb/serial/keyspan_usa28xa_fw.h
+rm -f drivers/usb/serial/keyspan_usa28xb_fw.h
+rm -f drivers/usb/serial/keyspan_usa49w_fw.h
+rm -f drivers/usb/serial/keyspan_usa49wlc_fw.h
+
+# 2.4 only stuff
+rm -f drivers/sound/724hwmcode.h
+rm -f drivers/sound/Hwmcode.h
+
+# prune the firmware from the Tigon3 driver, leaving the rest in place
+#awk '/^(static )?u32.*tg3(Tso)?5?Fw(Data|Rodata|Text)/,/^};$/{evil=1}!evil{print}{evil=0}' drivers/net/tg3.c > drivers/net/tg3.c.pruned
+#mv drivers/net/tg3.c.pruned drivers/net/tg3.c
Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/rules
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/rules 2004-08-11 15:43:48 UTC (rev 1010)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/rules 2004-08-11 16:55:42 UTC (rev 1011)
@@ -10,11 +10,11 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-# This is the debhelper compatability version to use.
-export DH_COMPAT=3
+release := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }')
+upstream := $(shell echo "$(release)" | sed 's/:\?\([0-9\.]\+\)-[0-9]*/\1/')
version.Debian: debian/changelog
- sed 's/^[^ ]* (\([^)]*\)).*/\1/; q' $< > $@
+ echo $(release) > $@
debian/substvars.safe: debian/patches/list version.Debian debian/make-substvars
chmod u+x debian/make-substvars
@@ -61,3 +61,34 @@
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
+
+#####################
+# The following targets set the stage for building the Debian packages.
+#
+# They unpack the vanilla kernel, remove the tainted bits, and package
+# everything again. This produces both a free .orig.tar.gz in the
+# parent directory and an unpacked version plus the debian
+# subdirectory in the current directory. In order to use these
+# targets, download the vanilla kernel as a gzipped tarball, put it
+# into the parent directory as linux-<release>.tar.gz, and run
+# 'debian/rules prune'.
+
+# phony target for easy reference
+.PHONY: prune
+prune:../kernel-source-$(upstream)_$(upstream).orig.tar.gz
+
+# prune the tainted bits from the vanilla kernel and package the result
+../kernel-source-$(upstream)_$(upstream).orig.tar.gz: debian/official
+ chmod u+x debian/prune-non-free
+ debian/prune-non-free
+ test $(notdir $(CURDIR)) = kernel-source-$(upstream)-$(upstream)
+ tar czCf .. $@ --exclude debian kernel-source-$(upstream)-$(upstream)
+
+debian/official: ../linux-$(upstream).tar.gz
+ tar xzCf .. $<
+ mv ../linux-$(upstream)/* .
+ rmdir ../linux-$(upstream)
+ echo This is the Debian version of Linux $(upstream). > $@
+
+../linux-$(upstream).tar.gz:
+ if [ ! -f "$@" ]; then wget http://kernel.org/pub/linux/kernel/v2.4/$(notdir $@); fi