[go: up one dir, main page]

File: README.source

package info (click to toggle)
torbirdy 0.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 664 kB
  • ctags: 198
  • sloc: makefile: 28; sh: 19
file content (145 lines) | stat: -rw-r--r-- 5,444 bytes parent folder | download
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# So you want to build a new Debian package for TorBirdy?
# These are the exact steps taken to update from TorBirdy 0.1.2 to 0.1.3
# 
sudo apt-get install git-buildpackage pristine-tar mozilla-devscripts zip
export VERSION=0.1.3
git clone ssh://anonscm.debian.org/git/pkg-mozext/torbirdy.git torbirdy
cd torbirdy
git checkout upstream
git checkout pristine-tar
git checkout master
cd ..
git clone git@github.com:ioerror/torbirdy.git torbirdy.upstream
cd torbirdy.upstream
git checkout $VERSION
git archive --format=tar --prefix="torbirdy_$VERSION.orig/" \ 
  -o ../torbirdy_$VERSION.orig.tar -v $VERSION
cd ../torbirdy
git checkout master
git import-orig --filter=*.git --pristine-tar --upstream-version=$VERSION \
  ../torbirdy_$VERSION.orig.tar
dch -v $VERSION-1 "New upstream release"
git add debian/changelog
git commit -m "stage release $VERSION"
# Make any other changes here ...
# stage them and commit them ...
# Now build it and ignore anything not in git:
git-buildpackage --git-ignore-new
# Test the resulting .deb
# Please tag this release, build and upload the Debian package
# Hooray!
# You're done!

#########################################################################
# The following notes are different ways to accomplish the same job
# They are potential alternative methods for doing the task above
# in the future.
#########################################################################

# First install some packages to do the job:
sudo apt-get install git-buildpackage pristine-tar mozilla-devscripts zip
# Or if using schroot
mysid=sid$RANDOM;
schroot -b -c sid -n $mysid; dd-schroot-cmd -c $mysid apt-get update;
dd-schroot-cmd -c $mysid apt-get build-dep torbirdy;
dd-schroot-cmd -c $mysid apt-get install git git-buildpackage \
  pristine-tar mozilla-devscripts zip ssh ca-certificates gitpkg
schroot -r -c $mysid

# Lunar suggests the following as the ideal workflow
# You may need to do this: gpg --recv-key 0x744301A2
# Set the version we're going to import
VERSION=0.1.3
gbp clone https://anonscm.debian.org/git/pkg-mozext/torbirdy.git
# Or if you're doing this with ssh keys:
# gbp clone ssh://anonscm.debian.org/git/pkg-mozext/torbirdy.git
cd torbirdy
git remote add torbirdy-upstream https://github.com/ioerror/torbirdy.git
# Or if you're doing this with ssh keys:
# git remote add torbirdy-upstream ssh://git@github.com:ioerror/torbirdy.git
git fetch torbirdy-upstream
git tag -v $VERSION
git checkout upstream
git merge --ff-only $VERSION
git tag upstream/$VERSION
git checkout master
git merge upstream/$VERSION
# Make any packaging changes here (eg: dch, etc)
git-buildpackage --git-ignore-new

##########################################
# Alternative ways to build this package #
##########################################

# Grab the current package's source:
git clone ssh://anonscm.debian.org/git/pkg-mozext/torbirdy.git torbirdy
# OR perhaps https://anonscm.debian.org/git/pkg-mozext/torbirdy.git
# checkout the various branches:
cd torbirdy
git checkout upstream
git checkout pristine-tar
git checkout master
# Grab upstream's latest git repo:
cd ..
git clone ssh://git@github.com:ioerror/torbirdy.git torbirdy.upstream
# OR perhaps https://github.com/ioerror/torbirdy.git
# Now create an orig.tar.bz of the upstream release
cd torbirdy.upstream
git checkout $VERSION # This is to ensure that we create a .tar of tag $VERSION
# Make a pristine tarball from the upstream repo:
git archive --format=tar --prefix="torbirdy_$VERSION.orig/" \ 
  -o ../torbirdy_$VERSION.orig.tar -v $VERSION
# Now import it
cd ../torbirdy
git checkout master
git import-orig --filter=*.git --pristine-tar --upstream-version=$VERSION \
  ../torbirdy_$VERSION.orig.tar
# update the debian/changelog
dch -v $VERSION-1 "New upstream release"
# Commit the changes
git add debian/changes
git commit -m "stage release $VERSION"
# Now build it and ignore anything not in git:
git-buildpackage --git-ignore-new

######################################
# Git expert version follows:        #
######################################
git clone https://anonscm.debian.org/git/pkg-mozext/torbirdy.git
cd torbirdy
git checkout upstream
git checkout pristine-tar
git checkout master
git remote add torbirdy.upstream https://github.com/ioerror/torbirdy.git
git fetch torbirdy.upstream
git checkout $VERSION
git checkout -b $VERSION-merge-madness
git merge -m 'directed acyclic graph trick' upstream -s ours
git branch -m upstream old-upstream
git branch -m $VERSION-merge-madness upstream
git branch -d old-upstream
git checkout upstream
git checkout master
# update the debian/changelog
dch -v $VERSION-1 "New upstream release"
# Commit the changes
git add debian/changes
git commit -m "stage release $VERSION"
# Merge upstream into master
git merge upstream
# create the pristine-tar in ../deb-packages/torbirdy/torbirdy_$VERSION.orig.tar.gz
# this also creates a source package in ../deb-packages/torbirdy/
gitpkg master upstream
# build the package
cd ../deb-packages/torbirdy/
dpkg-source -x torbirdy_$VERSION-1.dsc
cd torbirdy-$VERSION
DEBUILD_DPKG_BUILDPACKAGE_OPTS="-us -uc -I -i"
DEBUILD_LINTIAN_OPTS="-i -I --show-overrides"
debuild

#### Now if you want - you can pretend you did the same steps as above ....
git import-orig --filter=*.git --pristine-tar --upstream-version=$VERSION \
  ../deb-packages/torbirdy/torbirdy_$VERSION.orig.tar.gz
# build our deb and ignore anything not in git:
git-buildpackage --git-ignore-new