r1041 - in trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian: . patches patches/series
Joshua Kwan
joshk@haydn.debian.org
Thu, 12 Aug 2004 15:06:53 -0600
Author: joshk
Date: 2004-08-12 15:06:36 -0600 (Thu, 12 Aug 2004)
New Revision: 1041
Added:
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series/
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series/2.4.27-1
Removed:
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series-2.4.27-1
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/substvars
Modified:
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/apply
trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/make-substvars
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/unpatch
Log:
it builds! it builds!
Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/apply
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/apply 2004-08-12 19:38:41 UTC (rev 1040)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/apply 2004-08-12 21:06:36 UTC (rev 1041)
@@ -1,8 +1,10 @@
-#!/bin/sh
+#!/bin/sh
# $Id: apply,v 1.4 2003/06/30 12:49:09 herbert Exp $
set -e
+stampdir=".patch-stamps"
+
die() {
echo "E: $@" >&2
exit 1
@@ -21,25 +23,50 @@
esac
}
-apply_patch() {
+find_patch() {
patch=$1
- [ -f "$home/$patch" ] || die "$patch does not exist, but is in the series!"
- if uncompress_patch "$home/$patch" | patch -p1 -s -t; then
- printf "%-32s\tOK (+)\n" "$patch"
+
+ if [ -f "$patch" ]; then
+ echo "$patch"
+ elif [ -f "$patch.bz2" ]; then
+ echo "$patch.bz2"
+ elif [ -f "$patch.gz" ]; then
+ echo "$patch.gz"
else
- printf "%-32s\tFAIL (+)\n" "$patch"
- exit 1
+ die "$patch is in the series, but doesn't exist!"
fi
}
+
+apply_patch() {
+ patch=$(find_patch $home/$1)
+ base=$1
+ if [ -e "$stampdir/$base" ]; then
+ printf "%-32s\tUNCHANGED (+)\n" "$base"
+ else
+ if uncompress_patch "$patch" | patch -p1 -s -t; then
+ printf "%-32s\tOK (+)\n" "$base"
+ mkdir -p $stampdir
+ touch $stampdir/$base
+ else
+ printf "%-32s\tFAIL (+)\n" "$base"
+ exit 1
+ fi
+ fi
+}
deapply_patch() {
- patch=$1
- [ -f "$home/$patch" ] || die "$patch does not exist, but is in the series!"
- if uncompress_patch "$home/$patch" | patch -p1 -s -t -R; then
- printf "%-32s\tOK (-)\n" "$patch"
+ patch=$(find_patch $home/$1)
+ base=$1
+ if [ -e "$stampdir/$base" ]; then
+ if uncompress_patch "$patch" | patch -p1 -s -t -R; then
+ printf "%-32s\tOK (-)\n" "$base"
+ rm -f $stampdir/$base
+ else
+ printf "%-32s\tFAIL (-)\n" "$base"
+ exit 1
+ fi
else
- printf "%-32s\tFAIL (-)\n" "$patch"
- exit 1
+ printf "%-32s\tUNCHANGED (-)\n" "$base"
fi
}
@@ -134,6 +161,7 @@
die "Series doesn't have a revision!"
fi
done
+ rmdir --ignore-fail-on-non-empty $stampdir
elif [ "$current_rev" = "$upstream" ] || [ $target_rev -gt $current_rev ]; then
for sver in $home/series/*; do
base=$(basename "$sver")
@@ -162,6 +190,7 @@
die "Series doesn't have a revision!"
fi
done
+ rmdir --ignore-fail-on-non-empty $stampdir
fi
echo $target > version.Debian
Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/make-substvars
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/make-substvars 2004-08-12 19:38:41 UTC (rev 1040)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/make-substvars 2004-08-12 21:06:36 UTC (rev 1041)
@@ -1,43 +1,20 @@
-#!/usr/bin/awk -f
-# $Id: make-substvars,v 1.2 2003/06/14 11:58:09 herbert Exp $
+#!/bin/sh
-BEGIN {
- version_file = ARGV[1]
- delete ARGV[1]
- getline < version_file
- version = $0
- upstream = version
- sub(/-[^-]*$/, "", upstream)
-}
+upstream=$1
-/^#/ || NF < 1 {
- next
-}
+ktdepends="kt-depends="
+ktprovides="kt-provides="
-NF != 3 {
- print "Line " NR ": incorrect number of fields" > "/dev/stderr"
- exit 1
-}
+for series in debian/patches/series/*; do
+ base=$(basename $series)
+ ktdepends="${ktdepends}kernel-source-$upstream (= $base) | "
+ ktprovides="${ktprovides}kernel-tree-$base, "
+done
-$2 != upstream && !($2 in prev) {
- print "Line " NR ": patch " $1 " is not well-founded" > "/dev/stderr"
- exit 1
-}
+ktprovides=${ktprovides%, }
+ktdepends=${ktdepends%| }
-{
- prev[$3] = $2
-}
+echo $ktdepends
+echo $ktprovides
-END {
- if (!(version in prev)) {
- print "Patch for " version " must be listed" > "/dev/stderr"
- exit 1
- }
-
- for (v in prev) {
- dep = dep " | kernel-source-" upstream " (= " v ")"
- prov = prov ", kernel-tree-" v
- }
- print "kt-depends=" substr(dep, 4)
- print "kt-provides=" substr(prov, 3)
-}
+# vim:ts=4:noet:ai
Copied: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series/2.4.27-1 (from rev 1038, trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series-2.4.27-1)
Deleted: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series-2.4.27-1
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series-2.4.27-1 2004-08-12 19:38:41 UTC (rev 1040)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series-2.4.27-1 2004-08-12 21:06:36 UTC (rev 1041)
@@ -1,61 +0,0 @@
-+ 000_panic_vsnprintf.diff
-+ 001_optimise_size.diff
-+ 002_alpha_time.diff
-+ 003_kbuild_fixes.diff
-+ 004_386_emu.diff
-+ 005_bigphysarea.diff
-+ 006_acpi_default_off.diff
-+ 007_drmP_no_cmpxchg.diff
-+ 008_DAC960_alpha_fw.diff
-+ 009_scsi_changer.diff
-+ 010_tex_heading.diff
-+ 011_double_request_region.diff
-+ 012_8139too_deadlock.diff
-+ 013_mpparse_cries_wolf.diff
-+ 014_nm256xl_plus.diff
-+ 015_amd8111e_fp.diff
-+ 016_disable_non-free.diff
-+ 017_modularize_vesafb.diff
-+ 018_core_cia_1G.diff
-+ 019_cpqarray_init.diff
-+ 020_cpqphp_proc_cond.diff
-+ 021_ide_module_fix.diff
-+ 022_radeonfb_fixes.diff
-+ 023_jbd_commit_interval.diff
-+ 024_isofs_fixes.diff
-+ 025_proc_tty_security.diff
-+ 026_binfmt_misc_unload.diff
-+ 027_vfat_cries_wolf.diff
-+ 028_bttv_wintvd.diff
-+ 029_hid_manufacturer.diff
-+ 030_pegasus_lockup.diff
-+ 031_dpti2o_alpha_fix.diff
-+ 032_cramfs_initrd.diff
-+ 033_umsdos_oops.diff
-+ 034_modules_seq.diff
-+ 035_epatc8_runtime.diff
-+ 036_soundmodem_static.diff
-+ 037_pm768_cond.diff
-+ 038_i810_dma_workaround.diff
-+ 039_ibmtr_dupe_fix.diff
-+ 040_via-rhine_port_size.diff
-+ 041_7xxxosm_deadlock.diff
-+ 042_toshiba_blacklist.diff
-+ 043_ipsec.diff
-+ 045_isdn_cleanups.diff
-+ 046_mtd_config_dep.diff
-+ 047_advansys_le32.diff
-+ 048_aic_werror.diff
-+ 049_ohci_urb_complete.diff
-+ 050_export_proc.diff
-+ 051_sparse_off_t.diff
-+ 052_missing_includes.diff
-+ 053_spinlock_gcc_version.diff
-+ 054_skbuff_forward_decl.diff
-+ 055_main_arg_handling.diff
-+ 056_always_check_ECN.diff
-+ 057_init_unshare.diff
-+ 058_do_mounts_printk.diff
-+ 059_ea_acl.diff
-+ 060_ipsec_update.diff
-+ 999_spelling_mistakes.diff
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-12 19:38:41 UTC (rev 1040)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/rules 2004-08-12 21:06:36 UTC (rev 1041)
@@ -12,55 +12,78 @@
release := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }')
upstream := $(shell echo "$(release)" | sed 's/:\?\([0-9\.]\+\)-[0-9]*/\1/')
-
+patch_home := debian/kernel-patch-debian-$(upstream)/usr/src/kernel-patches/all/$(upstream)
+
version.Debian: debian/changelog
echo $(release) > $@
-debian/substvars.safe: debian/patches/list version.Debian debian/make-substvars
+debian/substvars: debian/patches version.Debian debian/make-substvars
chmod u+x debian/make-substvars
- debian/make-substvars version.Debian debian/patches/list > $@
+ debian/make-substvars $(upstream) > $@
-build: build-stamp
-build-stamp: version.Debian debian/substvars.safe debian/make-kernel-patch-pkgs
- dh_testdir
-
- chmod u+x debian/make-kernel-patch-pkgs
-
- touch build-stamp
-
clean:
dh_testdir
dh_testroot
- rm -f build-stamp install-stamp
+ rm -f install-stamp
+ifneq (,$(wildcard .patch-stamps))
+ home=$(patch_home)/debian sh $(patch_home)/unpatch/debian
+endif
+
make-kpkg clean
- rm -f .config*
- rm -f version.Debian
+ rm -f .config* version.Debian stamp-*
dh_clean
-install: build
+install:
dh_testdir
dh_testroot
dh_clean -k
- dh_installdirs
+ dh_installdirs -A
- cp debian/substvars.safe debian/substvars
+binary-kernel-patch:
+ mkdir -p $(patch_home) $(patch_home)/apply $(patch_home)/debian $(patch_home)/unpatch
+ cp debian/patches/*.diff $(patch_home)/debian
+ mkdir -p $(patch_home)/debian/series
+ cp debian/patches/series/* $(patch_home)/debian/series/
+ sed 's/@version@/$(release)/' debian/apply > $(patch_home)/apply/debian
+ sed 's/@upstream@/$(upstream)/' debian/unpatch > $(patch_home)/unpatch/debian
+ chmod a+x $(patch_home)/apply/debian $(patch_home)/unpatch/debian
+ bzip2 -9 $(patch_home)/debian/*.diff
+
+ dh_installdocs -pkernel-patch-debian-$(upstream)
+ dh_installchangelogs -pkernel-patch-debian-$(upstream)
+ dh_compress -pkernel-patch-debian-$(upstream)
+ dh_installdeb -pkernel-patch-debian-$(upstream)
+ dh_gencontrol -pkernel-patch-debian-$(upstream)
+ dh_builddeb -pkernel-patch-debian-$(upstream)
+
# Build architecture-independent files here.
-binary-indep: build install
+binary-indep: install binary-kernel-patch
dh_testdir
dh_testroot
- debian/make-kernel-patch-pkgs
+# Patch kernel with the Debian patch!
+ home=$(patch_home)/debian sh $(patch_home)/apply/debian
make-kpkg kernel-doc
make-kpkg kernel-source
+# Clean up after yourself
+ home=$(patch_home)/debian sh $(patch_home)/apply/debian $(upstream)
+ dh_installdocs -pkernel-tree-$(upstream)
+ dh_installchangelogs -pkernel-tree-$(upstream)
+ dh_compress -pkernel-tree-$(upstream)
+ dh_installdeb -pkernel-tree-$(upstream)
+ dh_gencontrol -pkernel-tree-$(upstream)
+ dh_builddeb -pkernel-tree-$(upstream)
+
# Build architecture-dependent files here.
-binary-arch: build install
+binary-arch:
+# Ye olde no-op.
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+binary: binary-indep
+.PHONY: clean binary-indep binary-arch binary install
#####################
# The following targets set the stage for building the Debian packages.
Deleted: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/substvars
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/substvars 2004-08-12 19:38:41 UTC (rev 1040)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/substvars 2004-08-12 21:06:36 UTC (rev 1041)
@@ -1,2 +0,0 @@
-kt-depends=kernel-source-2.4.26 (= 2.4.26-1) | kernel-source-2.4.26 (= 2.4.26-2) | kernel-source-2.4.26 (= 2.4.26-3) | kernel-source-2.4.26 (= 2.4.26-4) | kernel-source-2.4.26 (= 2.4.26-5)
-kt-provides=kernel-tree-2.4.26-1, kernel-tree-2.4.26-2, kernel-tree-2.4.26-3, kernel-tree-2.4.26-4, kernel-tree-2.4.26-5
Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/unpatch
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/unpatch 2004-08-12 19:38:41 UTC (rev 1040)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/unpatch 2004-08-12 21:06:36 UTC (rev 1041)
@@ -3,6 +3,6 @@
set -e
-version=@version@
-upstream=${version%-*}
+upstream=${override_upstream:-@upstream@}
+
/usr/src/kernel-patches/all/$upstream/apply/debian $upstream