3 dgit-sponsorship - tutorial for Debian upload sponsorship, using git
5 =head1 INTRODUCTION AND SCOPE
7 This tutorial describes how a Debian sponsored contributor
9 their sponsoring DD (or DM)
10 can collaborate and publish using git.
12 The sponsor must to be intending to use dgit for the upload.
13 (If the sponsor does not use dgit,
14 it is not possible to properly publish
15 a sponsee's git branch.)
17 It is best if the sponsee also uses dgit;
18 but also covered (later on) is the case where
19 the sponsee provides a proposed upload in source package form,
20 but the sponsor would like to work in git.
22 This tutorial does not provide a checklist for the sponsor's review.
23 Both contributors are expected to be familiar with Debian
24 packaging and Debian's processes, and with git.
26 =head1 SPONSEE WORKFLOW
28 This section is addressed to the sponsee:
32 You should prepare the package as if you were going
33 to upload it with C<dgit push> yourself.
35 For a straightforward NMU, consult L<dgit-nmu-simple(7)>.
37 If you are the (prospective) maintainer,
38 you can adopt any suitable (dgit-compatible)
40 The L<dgit-maint-*(7)> tutorials describe some of the possibilities.
42 =head2 Upload preparation
44 You should go through all of the steps
45 a self-uploading maintainer would do,
46 including building for ad hoc tests,
47 and checking via a formal build (eg using C<dgit sbuild>)
48 that the package builds on sid (or the target release).
50 At the point where you would,
54 you hand off to your sponsor.
56 If you were going to use one of the
59 C<dgit --gbp> or C<dgit --dpm>,
60 you must specify that in your handoff email - see below.
62 =head1 GIT+ORIGS BASED HANDOFF
64 The elements of the handoff consists of:
74 Any .orig tarballs which will be needed.
78 A sample dgit push command, containing
79 any dgit --quilt=, --gbp or --dpm option needed
83 Plus of course all the usual information about the state
85 any caveats or areas you would like the sponsor to focus their review,
86 constraints about upload timing, etc.
90 If the handoff is done by email,
91 the elements above should be a in a single, signed, message.
95 The sponsee should push their HEAD as a git branch
96 to any suitable git server.
97 They can use their own git server;
98 alioth is another possibility.
100 The branch names used by the sponsee on their local machine,
101 and on the server, do not matter.
103 The sponsee should not make a C<debian/>I<version> tag.
105 Instead, the sponsor should include the
106 git commit id of their HEAD
107 in their handover email.
111 If there are any .origs that are not in the archive already,
112 the sponsor will need them as part of the upload.
114 The simplest approach is to
115 commit them with pristine-tar(1), e.g.
119 % pristine-tar commit ../foo_1.2.3.orig.tar.xz upstream/1.2.3
123 and be sure to push the pristine-tar branch.
124 If you are using git-buildpackage(1), just pass
125 I<--git-pristine-tar> and I<--git-pristine-tar-commit>.
128 the sponsee can put them on a suitable webserver,
129 or attach to the e-mail,
132 The sponsee should quote sha256sums of the .origs in their
137 Some workflows involve git branches which are not natively
139 Normally dgit will convert them as needed, during push.
141 Supply a sample "dgit push" command
143 C<--gbp> (aka C<--quilt=gbp>),
144 C<--dpm> (aka C<--quilt=dpm>),
145 or other C<--quilt=> option
157 =head1 SPONSOR WORKFLOW
159 This part is addressed to the sponsor:
161 =head2 Receiving and validating the sponsorship request
163 You should check the signature on the email.
165 Use C<git fetch> to fetch the git branch
166 prepared by your sponsee,
167 and obtain any .origs mentioned by the sponsee
168 (to extract .origs committed with pristine-tar,
169 you can use origtargz(1).)
171 Check the git commit ID of the sponsee's branch tip,
172 and the sha256sums of the .origs,
173 against the handoff email.
175 Now you can check out the branch tip,
176 and do your substantive review.
178 =head2 Dealing with branches that want --quilt=
180 If your sponsee mentioned a C<--quilt>
181 option, and you don't want to grapple with their preferred tree format,
182 you can convert their tree into the standard dgit view:
186 % dgit -wgf quilt-fixup
187 [ Watch for a message about split brain, and if so: ]
188 % git checkout -b dgit-view-for-review refs/dgit-intern/quilt-cache
192 You should check that what you're looking at is a descendant of
193 the sponsee's branch.
195 =head2 Some hints which may help the review
197 C<dgit fetch sid> will get you an up-to-date
198 C<refs/remotes/dgit/dgit/sid>
199 showing what's in the archive already.
201 C<dgit -wgf --damp-run push>
202 will check that dgit can build an appropriate source package.
204 There is no need to run debdiff.
205 dgit will not upload anything that doesn't unpack
206 to exactly the git commit you are pushing,
207 so you can rely on what you see in C<git diff>.
209 =head2 Doing the upload
211 When you have completed your source review,
213 C<dgit -wgf [--quilt=...] sbuild -A -C>
214 or similar, to to the build, and then
215 C<dgit -wgf [--quilt=...] push>
218 (If you switched to the quilt-cache dgit view,
219 B<do not> pass the --quilt or --gbp or --dpm option again.)
221 If this was the first upload done with dgit,
227 =head1 SPONSORING A NON-GIT-USING SPONSEE
229 This part is addressed to the sponsor:
231 If your sponsee does not use git,
232 you can still do your review with git,
233 and use dgit for the upload.
235 Your sponsee will provide you with a source package:
236 that is, a .dsc and the files it refers to.
237 Obtain these files, and check signatures as appropriate.
244 % dgit import-dsc /path/to/sponsee's.dsc +sponsee
245 % git checkout sponsee
249 This will leave you looking at the sponsee's package,
250 formatted as a dgit branch.
252 When you have finished your review and your tests,
255 dgit push directly from the "sponsee" branch.
257 You will need to pass
259 to dgit push for every successive upload.
260 This disables a safety catch which would normally spot
261 situations where changes are accidentally lost.
262 When your sponsee is sending you source packages -
263 perhaps multiple source pacakges with the same version number -
264 these safety catches are inevitably ineffective.
268 dgit(1), dgit(7), dgit-nmu-simple(7), dgit-maint-*(7)