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 a 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-source> or 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 =head2 git+origs based handoff
64 The elements of the handoff consists of:
74 Any .orig tarballs which will be needed,
75 or sample git-archive(1)
76 or gbp-buildpackage(1)
77 command(s) to generate them.
81 A sample dgit push command, containing
82 any dgit --quilt=, --gbp or --dpm option needed
86 Plus of course all the usual information about the state
88 any caveats or areas you would like the sponsor to focus their review,
89 constraints about upload timing, etc.
93 If the handoff is done by email,
94 the elements above should be a in a single, signed, message.
95 This could be an RFS submission
96 against the sponsorship-requests pseudo-package.
102 The sponsee should push their HEAD as a git branch
103 to any suitable git server.
104 They can use their own git server;
105 salsa is another possibility.
107 The branch names used by the sponsee on their local machine,
108 and on the server, do not matter.
110 Instead, the sponsee should include the
111 git commit id of their HEAD
112 in their handover email.
120 If there are any .origs that are not in the archive already,
121 the sponsor will need them as part of the upload.
123 If the sponsee generated these tarballs with git-archive(1)
124 or gbp-buildpackage(1),
125 they can simply include a sample invocation of git-archive(1)
126 or ensure that a suitable gbp.conf is present
127 in the source package
128 to generate the tarball.
130 Otherwise, the simplest approach is to
131 commit the orig tarballs
132 with pristine-tar(1), e.g.
136 % pristine-tar commit ../foo_1.2.3.orig.tar.xz upstream/1.2.3
140 and be sure to push the pristine-tar branch.
141 If you are using git-buildpackage(1), just pass
142 I<--git-pristine-tar> and I<--git-pristine-tar-commit>.
145 the sponsee can put them on a suitable webserver,
146 or attach to the e-mail,
149 The sponsee should quote sha256sums of the .origs in their
151 unless they supplied commands to generate them.
159 Some workflows involve git branches which are not natively
161 Normally dgit will convert them as needed, during push.
163 Supply a sample "dgit push" command
165 C<--gbp> (aka C<--quilt=gbp>),
166 C<--dpm> (aka C<--quilt=dpm>),
167 or other C<--quilt=> option
179 =head1 SPONSOR WORKFLOW
181 This part is addressed to the sponsor:
183 =head2 Receiving and validating the sponsorship request
185 You should check the signature on the email.
187 Use C<git fetch> or C<git clone> to obtain the git branch
188 prepared by your sponsee,
189 and obtain any .origs mentioned by the sponsee
190 (to extract .origs committed with pristine-tar,
191 you can use origtargz(1),
192 or use "gbp clone --pristine-tar".)
194 Check the git commit ID of the sponsee's branch tip,
195 and the sha256sums of the .origs,
196 against the handoff email.
198 Now you can check out the branch tip,
199 and do your substantive review.
201 =head2 Dealing with branches that want --quilt=
203 If your sponsee mentioned a C<--quilt>
204 option, and you don't want to grapple with their preferred tree format,
205 you can convert their tree into the standard dgit view:
209 % dgit -wgf --quilt=foo --dgit-view-save=unquilted quilt-fixup
210 % git checkout unquilted
214 You should check that what you're looking at is a descendant of
215 the sponsee's branch.
217 =head2 Some hints which may help the review
219 C<dgit fetch sid> will get you an up-to-date
220 C<refs/remotes/dgit/dgit/sid>
221 showing what's in the archive already.
223 C<dgit -wgf --damp-run push-source>
224 will check that dgit can build an appropriate source package.
226 There is no need to run debdiff.
227 dgit will not upload anything that doesn't unpack
228 to exactly the git commit you are pushing,
229 so you can rely on what you see in C<git diff>.
231 =head2 Doing the upload
233 When you have completed your source review,
235 C<dgit -wgf [--quilt=...] sbuild -A -C>
236 or similar, to to the build, and then
237 C<dgit -wgf [--quilt=...] push-source>
239 C<dgit -wgf [--quilt=...] push>
242 Check whether the sponsee made a debian/I<version> tag.
244 ensure you have their tag in the repository you are pushing from,
245 or pass C<--no-dep14tag>.
246 This avoids identically named, non-identical tags,
247 which can be confusing.
249 (It is possible to upload from
250 the quilt-cache dgit view.
251 If you want to do this,
252 B<do not> pass the C<--quilt> or C<--gbp> or C<--dpm> options again,
253 and B<do> pass C<--no-dep14tag>,
254 since the debian/I<version> tag
255 should go on the sponsee's branch.)
257 If this was the first upload done with dgit,
263 if this was the first ever dgit push of the package,
264 you can pass C<--deliberately-not-fast-forward>
265 instead of C<--overwrite>.
266 This avoids introducing a new origin commit
267 into the dgit view of
268 the sponsee's git history
269 which is unnecessary and could be confusing.
271 =head1 SPONSORING A NON-GIT-USING SPONSEE
273 This part is addressed to the sponsor:
275 If your sponsee does not use git,
276 you can still do your review with git,
277 and use dgit for the upload.
279 Your sponsee will provide you with a source package:
280 that is, a .dsc and the files it refers to.
281 Obtain these files, and check signatures as appropriate.
288 % dgit import-dsc /path/to/sponsee's.dsc +sponsee
289 % git checkout sponsee
293 Or for an entirely new package:
300 % dgit -pPACKAGE import-dsc /path/to/sponsee's.dsc +sponsee
304 This will leave you looking at the sponsee's package,
305 formatted as a dgit branch.
307 When you have finished your review and your tests,
310 dgit push directly from the "sponsee" branch.
312 You will need to pass
314 to dgit push for every successive upload.
315 This disables a safety catch which would normally spot
316 situations where changes are accidentally lost.
317 When your sponsee is sending you source packages -
318 perhaps multiple source pacakges with the same version number -
319 these safety catches are inevitably ineffective.
323 dgit(1), dgit(7), dgit-nmu-simple(7), dgit-maint-*(7)