blob: 383ef9274d8d53a234d31cd41c8dfaae320a3d8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
[[!meta title="Keyringer: development guidelines and workflow"]]
Development environment
-----------------------
The following steps needs to be run just once.
### Create the `debian/` structure
if [ ! -d "debian" ]; then
dh_make -p keyringer_0.1 --createorig
fi
### Setup a sid pbuilder chroot
DIST=sid sudo pbuilder create --debootstrapopts --variant=buildd
### Setup a sid cowbuilder chroot
DIST=sid sudo cowbuilder --create
You can also setup chroots for other archs and distributions:
mkdir /var/cache/pbuilder/squeeze-amd64
cowbuilder --create --basepath /var/cache/pbuilder/squeeze-amd64/base.cow \
--distribution squeeze --debootstrapopts --arch --debootstrapopts amd64
Environment maintenance
-----------------------
These steps should be run once in a while to ensure we have an up to date packaging environment.
### Pbuilder
DIST=sid sudo pbuilder update
### Cowbuilder
DIST=sid sudo cowbuilder --update
Release workflow
----------------
Go to master branch
git checkout master
Prepare the source code:
$EDITOR ChangeLog
make build_man
Commit and tag a release:
git commit -a -m "Keyringer $VERSION"
git tag -s $VERSION -m "Keyringer $VERSION"
Create a release file:
make tarball
Sign the release ([see backupninja development guidelines](https://labs.riseup.net/code/projects/backupninja/wiki/Release)):
cd ../tarballs
gpg --armor --detach-sign keyringer-$VERSION.tar.bz2
Upload the release:
scp keyringer-$VERSION.tar.bz2* keyringer:/var/sites/keyringer/releases/
cd -
Update the debian branch:
git checkout debian
git-import-orig --upstream-vcs-tag=$VERSION ../tarballs/keyringer-$VERSION.tar.bz2
dch -e # fine tune the changelog prepared by git-dch
Push everything:
git push --tags
Build the package from the debian Git branch:
git-buildpackage
Run lintian (or [add it to your pbuilder hooks](http://askubuntu.com/questions/140697/how-do-i-run-lintian-from-pbuilder-dist)):
lintian --info --display-info --pedantic --color auto \
../build-area/keyringer_$VERSION*.changes
Create a signed tag in the debian branch:
git-buildpackage --git-tag-only --git-sign-tags
Notes:
* `git-import-orig` takes care of running `pristine-tar commit`, of merging of the tag and orig tarball into the upstream branch, and then it merges the result into the debian branch. With the above configuration, it also runs git-dch to do the bulk of the work in `debian/changelog`.
* To build a development package, checkout the debian branch, merge master, run `git-dch --auto --snapshot` and build.
Adding or changing a subcommand
-------------------------------
When adding a new subcommand or changing subcommand behavior, ensure:
* Documentation is updated.
* Manpage is updated.
* Shell completions are updated.
References
----------
* [Using Git for Debian Packaging](http://www.eyrie.org/~eagle/notes/debian/git.html).
* [Building packages from the Git repository](http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.building.html).
* [Cowbuilder](https://wiki.debian.org/cowbuilder).
* [git-pbuilder](https://wiki.debian.org/git-pbuilder).
* [PackagingWithGit - Debian Wiki](https://wiki.debian.org/PackagingWithGit).
* [Generating pristine tarballs from git repositories](http://joeyh.name/blog/entry/generating_pristine_tarballs_from_git_repositories/).
* [Debian Packaging](https://wiki.debian.org/Packaging).
* [Debian Upstream Guide](https://wiki.debian.org/UpstreamGuide).
|