[pkg-bacula-devel] Applied 0018-update-vcs-debian-control.patch
Luca Capello
luca at pca.it
Sun May 6 11:47:55 UTC 2012
Hi Willem!
Replying to the mailing list for the benefits of other contributors. I
am sorry if this email is quite long, but I wanted to send you a
complete example for my workflow.
BTW, I am 'gismo' on IRC as well, on both OFTC and freenode ;-)
On Sun, 06 May 2012 10:10:40 +0200, Willem van den Akker wrote:
> Which mailbox do I use for git am?
Basically, the patches I put online originated from:
=====
~/tmp$ git clone git://anonscm.debian.org/pkg-bacula/bacula.git
Cloning into 'bacula'...
[...]
Resolving deltas: 100% (8345/8345), done.
~/tmp$ cd bacula/
~/tmp/bacula(git)[master]$ git checkout development
Branch development set up to track remote branch development from origin.
Switched to a new branch 'development'
~/tmp/bacula(git)[development]$ git format-patch 709a7ea2a6f2b7158d19ebddb736e39d3c35e31b
# <http://people.debian.org/~gismo/tmp/bacula/merging-development-branch/>
0001-Revert-changes-made-without-using-patch-system.patch
0002-Rework-patching-to-use-3.0-quilt.patch
0003-Leave-patches-unapplied-by-dpkg-source.patch
0004-Disable-unclear-patch-about-SQL-stuff.patch
0005-Remove-sqlite-sqlite3-upgrade-path-lenny-squeeze.patch
0006-Remove-lenny-squeeze-upgrade-stuff.patch
0007-Fix-init-scripts-fail-if-daemon-already-running.patch
0008-Fix-FTBFS-with-binutils-gold.patch
0009-Rewrite-debian-rules-to-use-debhelper-7.patch
0010-Dropping-usr-bin-bconsole-as-it-s-defective-by-desig.patch
0011-Re-enable-mysql-upgrade-patch.patch
0012-Remove-unneeded-versions-in-dependencies.patch
0013-Don-t-pre-depend-on-debconf.patch
0014-Don-t-depend-on-build-essential-packages.patch
0015-Provide-debug-packages.patch
0016-Simplify-installation-process.patch
0017-Stop-shipping-.la-files.patch
0018-Update-Vcs-in-debian-control.patch
0019-Add-missing-build-dependency-on-procps.patch
0020-Don-t-add-useless-call-to-ldconfig.patch
0021-Make-use-of-etc-default-bacula-fd-sd-dir.patch
0022-Install-conffiles-don-t-mess-with-them.patch
0023-Decruft-maintainer-scripts.patch
0024-Create-common-maintainer-scripts-at-build-time.patch
0025-Don-t-set-passwords-at-build-time-but-ask-for-them.patch
0026-Document-changes.patch
0027-Clean-configure-generated-files-shipped-by-upstream.patch
0028-Fix-typo-in-package-descriptions.patch
0029-Override-missing-templates-files-check.patch
0030-Add-LSB-Short-Description.patch
0031-Make-all-maintainer-scripts-bash-independent.patch
0032-Fix-a-syntax-error-in-example-script.patch
0033-Drop-old-versions-of-dependencies-and-conflicts.patch
0034-Change-menu-section-of-console-qt-according.patch
0035-Add-a-few-lintian-overrides.patch
0036-Get-rid-of-useless-common-functions.patch
0037-Use-perl-script-to-handle-dbconfig-installs.patch
0038-Bump-Standards-Version-to-3.9.2.patch
0039-Install-bsmtp-to-usr-sbin-as-intended-by-upstream.patch
~/tmp/bacula(git)[development]$ git checkout development2
Branch development2 set up to track remote branch development2 from origin.
Switched to a new branch 'development2'
~/tmp/bacula(git)[development2]$ git format-patch 112e36a74dd6ab73fae5086ff4091ac442d6cc6f
# <http://people.debian.org/~gismo/tmp/bacula/merging-development2-branch/>
0001-White-space-and-line-breaks-clean-up.patch
0002-Fix-errors-in-man-pages.patch
0003-Remove-executable-bit-on-config-file-and-README.patch
0004-Add-manual-pages-for-usr-sbin-b-wild-regex.patch
0005-Add-at-least-short-patch-descriptions.patch
0006-Adjust-bat.conf-and-bconsole.conf-as-well.patch
0007-Upper-case-Bacula-as-it-s-a-name.patch
0008-Remove-reference-to-qwt.patch
0009-Drop-unneeded-build-dependency-on-libjconv-dev.patch
0010-Sort-debian-additions-a-bit.patch
0011-Deploy-alternative-backup-scripts.patch
=====
Then, you can simply call `git am $PATCH_ABOVE` to import the patch.
Please note that in the Git world you should use the merge command to do
this kind of stuff, but I prefer to manually read each patch (and I have
not found the time yet to read the full Git manual). So, one method or
the other is fine.
> Just to line things up: How do you review a patch? I have dug around but
> I cannot find
> a good workflow for reviewing. There a some global guidelines but I
> think its best to
> get in line with this project.
Let me use a real example:
=====
~/src/Debian/pkg-bacula/bacula(git)[master]$ git pull origin
Already up-to-date.
~/src/Debian/pkg-bacula/bacula(git)[master]$ git status
# On branch master
nothing to commit (working directory clean)
~/src/Debian/pkg-bacula/bacula(git)[master]$ git am \
../0005-Remove-sqlite-sqlite3-upgrade-path-lenny-squeeze.patch
Applying: Remove sqlite -> sqlite3 upgrade path (lenny->squeeze)
error: patch failed: debian/control:5
error: debian/control: patch does not apply
Patch failed at 0001 Remove sqlite -> sqlite3 upgrade path (lenny->squeeze)
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
=====
Let us investigate why the patch does not apply. The problem is that
while fixing #639466 I modified [master]debian/control without noticing
that other branches did the same:
<mid:87sjmb194r.fsf at gismo.pca.it>
<http://lists.alioth.debian.org/pipermail/pkg-bacula-devel/2011-October/000092.html>
Manually apply the patch editing the single files:
(easy) debian/TODO
(easy) debian/bacula-director-sqlite3.config
(easy) debian/bacula-director-sqlite3.postinst
(merge) debian/control
Check that only the conflicting part has been fixed:
$ git diff | \
diff -u ../0005-Remove-sqlite-sqlite3-upgrade-path-lenny-squeeze.patch - | \
less
If everything is OK, finally apply the patch:
=====
~/src/Debian/pkg-bacula/bacula(git)[master]$ git am --resolved
Applying: Remove sqlite -> sqlite3 upgrade path (lenny->squeeze)
~/src/Debian/pkg-bacula/bacula(git)[master]$ git log -1
commit e86e29c989d6f904978b9feabf7c440fbabd9dd2
Author: Jan Hauke Rahm <jhr at debian.org>
Date: Wed Apr 13 11:21:22 2011 +0200
Remove sqlite -> sqlite3 upgrade path (lenny->squeeze)
Closes: #612352
~/src/Debian/pkg-bacula/bacula(git)[master]$ mv \
../0005-Remove-sqlite-sqlite3-upgrade-path-lenny-squeeze.patch{,.APPLIED}
~/src/Debian/pkg-bacula/bacula(git)[master]$ mv \
../{,a___}0005-Remove-sqlite-sqlite3-upgrade-path-lenny-squeeze.patch.APPLIED
=====
At this point you should try to build the package and check it with the
latest built, either the one you have locally or from:
<http://people.debian.org/~gismo/tmp/bacula/>
If debdiff shows only what the last patch changed, simply go on,
otherwise fix what needs to be fixed:
=====
~/src/Debian/pkg-bacula/bacula(git)[master]$ git diff
diff --git a/debian/changelog b/debian/changelog
index 86588ce..d21da8d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-bacula (5.0.3-2) UNRELEASED; urgency=low
+bacula (5.0.3-2~gismo.dev0505.0a) UNRELEASED; urgency=low
[ Jan Hauke Rahm ]
* debian/*:
@@ -17,7 +17,7 @@ bacula (5.0.3-2) UNRELEASED; urgency=low
+ leave only the unversioned postgresql-client package in
bacula-director-pgsql's Depends: and Recommends:.
- --
+ -- Luca Capello <luca at pca.it> Sun, 06 May 2012 12:44:07 +0200
bacula (5.0.3-1) unstable; urgency=low
~/src/Debian/pkg-bacula/bacula(git)[master]$ git-buildpackage --git-ignore-new
[...]
~/src/Debian/pkg-bacula/bacula(git)[master]$ debdiff \
../bacula_5.0.3-2~gismo.dev0104.1.dsc \
../bacula_5.0.3-2~gismo.dev0505.0a.dsc
[...]
~/src/Debian/pkg-bacula/bacula(git)[master]$ debdiff \
~/var/cache/pbuilder/result/bacula_5.0.3-2~gismo.dev0104.1_amd64.changes \
~/var/cache/pbuilder/result/bacula_5.0.3-2~gismo.dev0505.0a_amd64.changes
[...]
=====
We are good, but before any push please check if other patches are
semantically similar, so we can group them, as in this case:
=====
~/src/Debian/pkg-bacula/bacula(git)[master]$ $ git am \
../0006-Remove-lenny-squeeze-upgrade-stuff.patch
Applying: Remove lenny->squeeze upgrade stuff
~/src/Debian/pkg-bacula/bacula(git)[master]$ mv \
../0006-Remove-lenny-squeeze-upgrade-stuff.patch{,.APPLIED}
~/src/Debian/pkg-bacula/bacula(git)[master]$ mv \
../{,a___}0006-Remove-lenny-squeeze-upgrade-stuff.patch.APPLIED
~/src/Debian/pkg-bacula/bacula(git)[master]$ git diff
$ git diff | less
diff --git a/debian/changelog b/debian/changelog
index 86588ce..703ed61 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-bacula (5.0.3-2) UNRELEASED; urgency=low
+bacula (5.0.3-2~gismo.dev0506.0a) UNRELEASED; urgency=low
[ Jan Hauke Rahm ]
* debian/*:
@@ -17,7 +17,7 @@ bacula (5.0.3-2) UNRELEASED; urgency=low
+ leave only the unversioned postgresql-client package in
bacula-director-pgsql's Depends: and Recommends:.
- --
+ -- Luca Capello <luca at pca.it> Sun, 06 May 2012 13:01:08 +0200
bacula (5.0.3-1) unstable; urgency=low
~/src/Debian/pkg-bacula/bacula(git)[master]$ git-buildpackage --git-ignore-new
[...]
~/src/Debian/pkg-bacula/bacula(git)[master]$ debdiff \
../bacula_5.0.3-2~gismo.dev0505.0a.dsc \
../bacula_5.0.3-2~gismo.dev0506.0a.dsc
[...]
~/src/Debian/pkg-bacula/bacula(git)[master]$ debdiff \
~/var/cache/pbuilder/result/bacula_5.0.3-2~gismo.dev0505.0a_amd64.changes \
~/var/cache/pbuilder/result/bacula_5.0.3-2~gismo.dev0506.0a_amd64.changes
[...]
=====
Now we could push, except that IMHO we miss a debian/changelog entry:
=====
~/src/Debian/pkg-bacula/bacula(git)[master]$ git diff | less
diff --git a/debian/changelog b/debian/changelog
index 86588ce..6578a4c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,13 @@ bacula (5.0.3-2) UNRELEASED; urgency=low
[ Jan Hauke Rahm ]
* debian/*:
+ rework patching to use 3.0 (quilt).
+ * debian/bacula-director-mysql.script.5.0.0,
+ debian/rules:
+ - remove lenny->squeeze upgrade path.
+ * debian/bacula-director-sqlite3.config,
+ debian/bacula-director-sqlite3.postinst,
+ debian/control (Closes: #612352):
+ - remove sqlite->sqlite3 upgrade path (lenny->squeeze).
* debian/bacula-traymonitor.links:
+ also link the man page for traymonitor.
~/src/Debian/pkg-bacula/bacula(git)[master]$ git commit \
-m "debian/changelog: add Hauke's changes up to 9c028ae" debian/changelog
[master 200b091] debian/changelog: add Hauke's changes up to 9c028ae
1 file changed, 7 insertions(+)
=====
Before pushing we build the "final" package (notice the version has
changed again) and publish the resulting binaries somewhere, so other
people can test it:
=====
~/src/Debian/pkg-bacula/bacula(git)[master]$ git diff | less
diff --git a/debian/changelog b/debian/changelog
index 6578a4c..69ee73f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-bacula (5.0.3-2) UNRELEASED; urgency=low
+bacula (5.0.3-2~gismo.dev0506.1) UNRELEASED; urgency=low
[ Jan Hauke Rahm ]
* debian/*:
@@ -24,7 +24,7 @@ bacula (5.0.3-2) UNRELEASED; urgency=low
+ leave only the unversioned postgresql-client package in
bacula-director-pgsql's Depends: and Recommends:.
- --
+ -- Luca Capello <luca at pca.it> Sun, 06 May 2012 13:15:34 +0200
bacula (5.0.3-1) unstable; urgency=low
~/src/Debian/pkg-bacula/bacula(git)[master]$ git-buildpackage --git-ignore-new
[...]
~/src/Debian/pkg-bacula/bacula(git)[master]$ debdiff \
../bacula_5.0.3-2~gismo.dev0506.0a.dsc \
../bacula_5.0.3-2~gismo.dev0506.1.dsc
[only debian/changelog differences]
~/src/Debian/pkg-bacula/bacula(git)[master]$ debdiff \
~/var/cache/pbuilder/result/bacula_5.0.3-2~gismo.dev0506.0a_amd64.changes \
~/var/cache/pbuilder/result/bacula_5.0.3-2~gismo.dev0506.1_amd64.changes
[only differences in the Debian package version]
~/src/Debian/pkg-bacula/bacula(git)[master]$ debsign \
~/var/cache/pbuilder/result/bacula_5.0.3-2~gismo.dev0506.1_amd64.changes
~/src/Debian/pkg-bacula/bacula(git)[master]$ scp \
../bacula_5.0.3.orig.tar.gz \
../bacula_5.0.3-2~gismo.dev0506.1_amd64.build \
~/var/cache/pbuilder/result/bacula*5.0.3-2~gismo.dev0506.1* \
people.debian.org:~/public_html/tmp/bacula/merging-development-branch/gismo.dev0506.1/
[...]
~/src/Debian/pkg-bacula/bacula(git)[master]$ git push
[...]
To git+ssh://git.debian.org/git/pkg-bacula/bacula.git
ab5fc63..200b091 master -> master
=====
If the future upload will close some bugs, please send a notice to the
BTS, so others are aware that the problem is being working on:
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612352#12>
Notifying the list is also a good thing to do, adding the link to a
"virtual" page where you uploaded your package is a plus:
<http://people.debian.org/~gismo/tmp/bacula/03_gismo.dev0506.1.html>
Hope it is clearer, now ;-)
Thx, bye,
Gismo / Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-bacula-devel/attachments/20120506/9b8e9f7f/attachment-0001.pgp>
More information about the pkg-bacula-devel
mailing list