From 08cdd6577e7f6d807db8d89e51869afae4b2f97a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sun, 28 Feb 2010 01:09:08 +0000 Subject: * Update README.source to match, and add a 'quilt-setup' target to debian/rules for the benefit of those checking out the package from revision control. * All patches are now maintained separately and tagged according to DEP-3. --- debian/README.source | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ debian/changelog | 4 ++++ debian/rules | 9 ++++++++ 3 files changed, 78 insertions(+) (limited to 'debian') diff --git a/debian/README.source b/debian/README.source index 919b04f36..89e832305 100644 --- a/debian/README.source +++ b/debian/README.source @@ -39,6 +39,71 @@ repository in ~/src/debian/openssh/, upstream checkouts in ~/src/debian/openssh/upstream/, and my own working trees in ~/src/debian/openssh/trunk/. +Patch handling +-------------- + +This package uses quilt to manage all modifications to the upstream source. +Changes are stored in the source package as diffs in debian/patches and +applied automatically by dpkg-source when the source package is extracted. + +To configure quilt to use debian/patches instead of patches, you want either +to export QUILT_PATCHES=debian/patches in your environment or use this +snippet in your ~/.quiltrc: + + for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do + if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then + export QUILT_PATCHES=debian/patches + break + fi + done + +After unpacking the source package, all patches will be applied, and you can +use quilt normally. + +If you check out the source code from bzr, then all patches will be applied, +but you will need to inform quilt of this manually. Do this by running: + + debian/rules quilt-setup + +To add a new set of changes, first run quilt push -a, and then run: + + quilt new + +where is a descriptive name for the patch, used as the filename in +debian/patches. Then, for every file that will be modified by this patch, +run: + + quilt add + +before editing those files. You must tell quilt with quilt add what files +will be part of the patch before making changes or quilt will not work +properly. After editing the files, run: + + quilt refresh + +to save the results as a patch. + +Alternately, if you already have an external patch and you just want to add +it to the build system, run quilt push -a and then: + + quilt import -P /path/to/patch + quilt push -a + +(add -p 0 to quilt import if needed). as above is the filename to +use in debian/patches. The last quilt push -a will apply the patch to make +sure it works properly. + +To remove an existing patch from the list of patches that will be applied, +run: + + quilt delete + +You may need to run quilt pop -a to unapply patches first before running +this command. + +You should only commit changes to bzr with all patches applied, i.e. after +'quilt push -a'. + Merging new upstream releases ----------------------------- diff --git a/debian/changelog b/debian/changelog index a92370243..5157f5f71 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,10 @@ openssh (1:5.3p1-3) UNRELEASED; urgency=low * Convert to source format 3.0 (quilt). + * Update README.source to match, and add a 'quilt-setup' target to + debian/rules for the benefit of those checking out the package from + revision control. + * All patches are now maintained separately and tagged according to DEP-3. -- Colin Watson Sat, 27 Feb 2010 01:07:15 +0000 diff --git a/debian/rules b/debian/rules index 7383de843..1abd84781 100755 --- a/debian/rules +++ b/debian/rules @@ -347,6 +347,15 @@ debian/faq.html: sed 's,\(href="\)\(txt/\|[^":]*\.html\),\1http://www.openssh.org/\2,g' \ > debian/faq.html +# You only need to run this immediately after checking out the package from +# revision control. +quilt-setup: + [ ! -d .pc ] + set -e; for patch in $$(quilt series | tac); do \ + patch -p1 -R <"debian/patches/$$patch"; \ + done + quilt push -a + .PHONY: build clean binary-indep binary-arch binary install .PHONY: build-deb build-udeb .PHONY: binary-openssh-client binary-openssh-server binary-ssh -- cgit v1.2.3