4
This packaging is maintained with the use of Git, using the following
7
upstream-git - master branch of upstream Git source
8
upstream - unpackaged upstream tarballs
9
pristine-tar - binary deltas to recreate pristine tarballs
10
master - Debian packaging
12
With the above, we can switch between working from upstream released
13
tarballs and syncing directly with upstream development, both using
14
git-buildpackage (with its default branch names).
17
Package sugar-base as example
18
-----------------------------
20
The rest of this document uses sugar-base as sample package, and some
21
old actual version numbers from that package - replace with your actual
25
Getting packaging source from Git repository
26
--------------------------------------------
28
The following commands (in an empty dir) fetch and build the package:
30
aptitude install git-buildpackage
31
git clone git://git.debian.org/git/collab-maint/sugar-base
33
git fetch origin upstream:upstream
37
Merging with newer upstream Git tree
38
------------------------------------
40
The following commands (inside Git repository) updates the local mirror
41
of upstream source, and merges with our packaging branch:
44
git checkout upstream-git
48
git pull . upstream-git
50
The following command shows upstream changes possibly relevant to
51
mention in changelog (replace "HEAD^" with a reference to actual sync
52
commit if not invoked right after sync'ing):
54
git log --pretty="format:%h %s" HEAD^..upstream-git
57
Doing a package release from upstream tarball
58
---------------------------------------------
60
The following command (inside Git repository) imports a downloaded
61
tarball into the "upstream" and pristine-tarball Git branches (taball
62
name is recorded too and used later, so make sure to first rename the
63
tarball to follow Debian naming convention {name}_{version}.orig.{ext}):
65
git-import-orig --pristine-tar --sign-tags path/to/sugar-base_0.79.0.orig.tar.gz
67
Check that all files are included in "upstream" branch (don't know why
68
this fails sometimes):
72
If some files are "untracked", then do the following to manually add
73
untracked files to upstream branch and merge them with master branch
74
(the stash commands puts changelog update aside and restore it again
80
git commit -m "Add files mysteriously skipped by git-import-orig."
85
Comment out tarball hash in debian/control, test get-orig-source, and
86
enable hash line with new hash:
88
fakeroot debian/rules get-orig-source
90
Adjust changelog and package, and if satisfied with the result then tag
91
it, push Git sources and release the package:
93
git-buildpackage --git-tag --git-sign-tags
98
dput sugar-base_0.79.0-1_amd64.changes
101
Doing a package release from upstream Git snapshot
102
--------------------------------------------------
104
First, look at upstream development for a good place to release, and tag
105
by its date, replacing "~" with ".". Normally just tag the latest
106
upstream commit, to avoid simply including later upstream work in the
109
git log --abbrev-commit upstream-git
110
git tag -s -m "Tag upstream for package release." upstream/0.2.git20080130 61279f8
112
Adjust changelog and package, and if satisfied with the result then tag
113
it, push Git sources and release the package:
115
dch -r -v "0.2~git20080130-0~0jones1" "New upstream Git snapshot."
119
git tag -s -m "Tag package release." debian/0.2.git20080130-0.0jones1
123
dput sugar-base_0.2~git20080130-0~0jones1_amd64.changes
126
-- Jonas Smedegaard <dr@jones.dk> Sat, 08 Mar 2008 01:08:36 +0100