r997 - in trunk/kernel-2.4/source: . kernel-source-2.4.27-2.4.27/debian

Andres Salomon dilinger-guest@haydn.debian.org
Wed, 11 Aug 2004 00:51:35 -0600


Author: dilinger-guest
Date: 2004-08-11 00:51:19 -0600 (Wed, 11 Aug 2004)
New Revision: 997

Added:
   trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/
   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/changelog
   trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/control
   trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/rules
Log:
Add preliminary 2.4.27 branch, w/ the addition of prune-non-free from 2.6.
Obviously, more work is needed; we really need to split apart those damned
patches.


Copied: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27 (from rev 996, trunk/kernel-2.4/source/kernel-source-2.4.26-2.4.26)

Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/changelog
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.26-2.4.26/debian/changelog	2004-08-10 06:32:39 UTC (rev 996)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/changelog	2004-08-11 06:51:19 UTC (rev 997)
@@ -1,3 +1,12 @@
+kernel-source-2.4.27 (2.4.27-1) unstable; urgency=low
+
+  * New upstream release.
+  
+  * Add prune-non-free script and associated debian/rules target;
+    backported from 2.6 kernels (Andres Salomon).
+
+ -- Andres Salomon <dilinger@voxel.net>  Wed, 11 Aug 2004 02:09:42 -0400
+
 kernel-source-2.4.26 (2.4.26-5) unstable; urgency=high
 
   * Cleaned up after the previous upload.  In particular, patch-2.4.26-3

Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/control
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.26-2.4.26/debian/control	2004-08-10 06:32:39 UTC (rev 996)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/control	2004-08-11 06:51:19 UTC (rev 997)
@@ -1,4 +1,4 @@
-Source: kernel-source-2.4.26
+Source: kernel-source-2.4.27
 Section: devel
 Priority: optional
 Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
@@ -6,7 +6,7 @@
 Standards-Version: 3.6.1
 Build-Depends: bzip2, debhelper, docbook-utils, gs, kernel-package (>= 7.48), transfig
 
-Package: kernel-source-2.4.26
+Package: kernel-source-2.4.27
 Architecture: all
 Section: devel
 Priority: optional
@@ -14,8 +14,8 @@
 Depends: binutils, bzip2, coreutils | fileutils (>= 4.0)
 Recommends: libc-dev, gcc, make
 Suggests: libncurses-dev | ncurses-dev, kernel-package
-Description: Linux kernel source for version 2.4.26 with Debian patches
- This package provides the source code for the Linux kernel version 2.4.26 with
+Description: Linux kernel source for version 2.4.27 with Debian patches
+ This package provides the source code for the Linux kernel version 2.4.27 with
  modifications by Debian.  It is used to build the various prepackaged
  kernel-image packages.
  .
@@ -23,21 +23,21 @@
  and following instructions, but you could get ncursesX.X-dev and
  tkX.X-dev and try "make menuconfig" for a jazzier, and easier to use
  interface. Also, please read the detailed documentation in the file
- /usr/share/doc/kernel-source-2.4.26/README.headers.gz. 
+ /usr/share/doc/kernel-source-2.4.27/README.headers.gz. 
  .
  If you wish to use this package to create a custom Linux kernel, then
  it is suggested that you investigate the package kernel-package,
  which has been designed to ease the task of creating kernel image
  packages. 
 
-Package: kernel-doc-2.4.26
+Package: kernel-doc-2.4.27
 Architecture: all
 Section: doc
 Priority: optional
 Provides: kernel-doc-2.4
 Depends: coreutils | fileutils (>= 4.0)
-Description: Linux kernel specific documentation for version 2.4.26
- This package provides The various readme's in the 2.4.26 kernel
+Description: Linux kernel specific documentation for version 2.4.27
+ This package provides The various readme's in the 2.4.27 kernel
  Documentation/ subdirectory: these typically contain kernel-specific
  installation notes for some drivers for example. See
  /usr/share/doc/kernel-doc-X.X.XX/Documentation/00-INDEX for a list of what
@@ -45,23 +45,22 @@
  contains information about the problems, which may result by
  upgrading your kernel.
 
-Package: kernel-patch-debian-2.4.26
+Package: kernel-patch-debian-2.4.27
 Architecture: all
 Section: devel
 Priority: optional
 Depends: bzip2
-Suggests: kernel-source-2.4.26
-Description: Debian patches to Linux 2.4.26
+Suggests: kernel-source-2.4.27
+Description: Debian patches to Linux 2.4.27
  This package includes the patches used to produce the prepackaged
- kernel-source-2.4.26 package.  They should be applied to a pristine
- Linux 2.4.26 kernel.
+ kernel-source-2.4.27 package.  They should be applied to a pristine
+ Linux 2.4.27 kernel.
 
-Package: kernel-tree-2.4.26
+Package: kernel-tree-2.4.27
 Architecture: all
 Section: devel
 Priority: optional
-Depends: kernel-patch-debian-2.4.26 (= ${Source-Version}), ${kt-depends}
-Conflicts: kernel-source-2.4.26 (= 2.4.26-4)
+Depends: kernel-patch-debian-2.4.27 (= ${Source-Version}), ${kt-depends}
 Provides: ${kt-provides}
 Description: Linux kernel tree for building prepackaged Debian kernel images
  This meta package is used as a build-time dependency of prepackaged
@@ -72,5 +71,5 @@
  For those intending to use this package as a build-time dependency, this
  package provides a list of virtual packages that guarantees the availability
  of a particular Debian revision of the kernel tree.  The
- kernel-image-2.4.26-i386 package is an example of this.
+ kernel-image-2.4.27-i386 package is an example of this.
 

Added: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/prune-non-free
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.26-2.4.26/debian/prune-non-free	2004-08-10 06:32:39 UTC (rev 996)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/prune-non-free	2004-08-11 06:51:19 UTC (rev 997)
@@ -0,0 +1,42 @@
+#!/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
+
+# 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


Property changes on: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/prune-non-free
___________________________________________________________________
Name: svn:executable
   + *

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.26-2.4.26/debian/rules	2004-08-10 06:32:39 UTC (rev 996)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/rules	2004-08-11 06:51:19 UTC (rev 997)
@@ -13,6 +13,10 @@
 # This is the debhelper compatability version to use.
 export DH_COMPAT=3
 
+# extract the upstream release and the full package version from the changelog
+release := $(shell sed -n '1s/^.*(\(.*\)-.*).*$$/\1/p' debian/changelog)
+version := $(shell sed -n '1s/^.*(\(.*\)).*$$/\1/p' debian/changelog)
+
 version.Debian: debian/changelog
 	sed 's/^[^ ]* (\([^)]*\)).*/\1/; q' $< > $@
 
@@ -61,3 +65,32 @@
 
 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-$(release)_$(release).orig.tar.gz
+
+# prune the tainted bits from the vanilla kernel and package the result
+../kernel-source-$(release)_$(release).orig.tar.gz: debian/official
+	chmod u+x debian/prune-non-free
+	debian/prune-non-free
+	test $(notdir $(CURDIR)) = kernel-source-$(release)-$(release)
+	tar czCf .. $@ --exclude debian kernel-source-$(release)-$(release)
+
+# unpack the vanilla kernel from a tarball, move stuff over, and create a stamp file
+debian/official: ../linux-$(release).tar.gz
+	tar xzCf .. $<
+	mv ../linux-$(release)/* .
+	rmdir ../linux-$(release)
+	echo This is the Debian version of Linux $(release). > $@