~ubuntu-branches/ubuntu/lucid/sugar-hulahop/lucid

« back to all changes in this revision

Viewing changes to debian/README.packaging

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-06-25 11:17:47 UTC
  • mfrom: (1.1.5 upstream) (3.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090625111747-jbecfd2avl9bqi6y
Tags: 0.4.9-1ubuntu1
* Merge from debian unstable (LP: #391850), remaining changes:
  - debian/rules: Replace dependency on python-xpcom with xulrunner-1.9.
  - debian/control:
    + Fix build dependencies for Ubuntu: change xulrunner-dev to 
      xulrunner-1.9-dev, remove python-xpcom (built into xulrunner-1.9-dev)
    + Add Conflicts/Replaces to make the transitional package work correctly.
  - debian/{control,control.in}, debian/python-hulahop.install:
    + Add hulahop transitional package for upgrades (should be kept until
      after the next LTS) (LP: #286764)
  - Drop debian patch 1001 as it is Debian specific.
* debian/patches/1002_python2.6.patch:
  - Added support for python2.6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Packaging hints
2
 
===============
3
 
 
4
 
This packaging is maintained with the use of Git, using the following
5
 
branches:
6
 
 
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
11
 
 
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).
15
 
 
16
 
 
17
 
Package sugar-base as example
18
 
-----------------------------
19
 
 
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
22
 
package as needed...
23
 
 
24
 
 
25
 
Getting packaging source from Git repository
26
 
--------------------------------------------
27
 
 
28
 
The following commands (in an empty dir) fetch and build the package:
29
 
 
30
 
aptitude install git-buildpackage
31
 
git clone git://git.debian.org/git/collab-maint/sugar-base
32
 
cd sugar-base
33
 
git fetch origin upstream:upstream
34
 
git-buildpackage
35
 
 
36
 
 
37
 
Merging with newer upstream Git tree
38
 
------------------------------------
39
 
 
40
 
The following commands (inside Git repository) updates the local mirror
41
 
of upstream source, and merges with our packaging branch:
42
 
 
43
 
cd sugar-base
44
 
git checkout upstream-git
45
 
git pull
46
 
git fetch --tags
47
 
git checkout master
48
 
git pull . upstream-git
49
 
 
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):
53
 
 
54
 
git log --pretty="format:%h %s" HEAD^..upstream-git
55
 
 
56
 
 
57
 
Doing a package release from upstream tarball
58
 
---------------------------------------------
59
 
 
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}):
64
 
 
65
 
git-import-orig --pristine-tar --sign-tags path/to/sugar-base_0.79.0.orig.tar.gz
66
 
 
67
 
Check that all files are included in "upstream" branch (don't know why
68
 
this fails sometimes):
69
 
 
70
 
git status
71
 
 
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
75
 
afterwards):
76
 
 
77
 
git stash
78
 
git checkout upstream
79
 
git add *
80
 
git commit -m "Add files mysteriously skipped by git-import-orig."
81
 
git checkout master
82
 
git pull . upstream
83
 
git stash apply
84
 
 
85
 
Comment out tarball hash in debian/control, test get-orig-source, and
86
 
enable hash line with new hash:
87
 
 
88
 
fakeroot debian/rules get-orig-source
89
 
 
90
 
Adjust changelog and package, and if satisfied with the result then tag
91
 
it, push Git sources and release the package:
92
 
 
93
 
git-buildpackage --git-tag --git-sign-tags
94
 
[test package...]
95
 
git push --all
96
 
git push --tags
97
 
cd ..
98
 
dput sugar-base_0.79.0-1_amd64.changes
99
 
 
100
 
 
101
 
Doing a package release from upstream Git snapshot
102
 
--------------------------------------------------
103
 
 
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
107
 
debian diff:
108
 
 
109
 
git log --abbrev-commit upstream-git
110
 
git tag -s -m "Tag upstream for package release." upstream/0.2.git20080130 61279f8
111
 
 
112
 
Adjust changelog and package, and if satisfied with the result then tag
113
 
it, push Git sources and release the package:
114
 
 
115
 
dch -r -v "0.2~git20080130-0~0jones1" "New upstream Git snapshot."
116
 
debcommit -r -a
117
 
git-buildpackage
118
 
[test package...]
119
 
git tag -s -m "Tag package release." debian/0.2.git20080130-0.0jones1
120
 
git push --all
121
 
git push --tags
122
 
cd ..
123
 
dput sugar-base_0.2~git20080130-0~0jones1_amd64.changes
124
 
 
125
 
 
126
 
 -- Jonas Smedegaard <dr@jones.dk>  Sat, 08 Mar 2008 01:08:36 +0100