chiark / gitweb /
71fb2054286d2ad832dbfaff985e5f6c851f37a2
[dgit.git] / dgit-sponsorship.7.pod
1 =head1 NAME
2
3 dgit-sponsorship - tutorial for Debian upload sponsorship, using git
4
5 =head1 INTRODUCTION AND SCOPE
6
7 This tutorial describes how a Debian sponsored contributor
8 and
9 their sponsoring DD (or DM)
10 can collaborate and publish using git.
11
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.)
16
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.
21
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.
25
26 =head1 SPONSEE WORKFLOW
27
28 This section is addressed to the sponsee:
29
30 =head2 General
31
32 You should prepare the package as if you were going
33 to upload it with C<dgit push> yourself.
34
35 For a straightforward NMU, consult L<dgit-nmu-simple(7)>.
36
37 If you are the (prospective) maintainer,
38 you can adopt any suitable (dgit-compatible)
39 git workflow.
40 The L<dgit-maint-*(7)> tutorials describe some of the possibilities.
41
42 =head2 Upload preparation
43
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).
49
50 At the point where you would,
51 if you were a DD, 
52 do the actual upload
53 by running dgit push,
54 you hand off to your sponsor.
55
56 If you were going to use one of the
57 C<--quilt=>
58 options to dgit, or
59 C<dgit --gbp> or C<dgit --dpm>,
60 you must specify that in your handoff email - see below.
61
62 =head1 GIT+ORIGS BASED HANDOFF
63
64 The elements of the handoff consists of:
65
66 =over
67
68 =item *
69
70 The git branch.
71
72 =item *
73
74 Any .orig tarballs which will be needed.
75
76 =item *
77
78 Any dgit --quilt= (or --gbp or --dpm) option needed
79
80 =item *
81
82 Plus of course all the usual information about the state
83 of the package,
84 any caveats or areas you would like the sponsor to focus their review,
85 constraints about upload timing, etc.
86
87 =back
88
89 If the handoff is done by email,
90 the elements above should be a in a single, signed, message.
91
92 =head2 git branch
93
94 The sponsee should push their HEAD as a git branch
95 to any suitable git server.
96 They can use their own git server;
97 alioth is another possibility.
98
99 The branch names used by the sponsee on their local machine,
100 and on the server, do not matter.
101
102 The sponsee should not make a C<debian/>I<version> tag.
103
104 Instead, the sponsor should include the
105 git commit id of their HEAD
106 in their handover email.
107
108 =head2 orig tarballs
109
110 If there are any .origs that are not in the archive already,
111 the sponsor will need them as part of the upload.
112
113 The sponsee can put them on a suitable webserver,
114 or attach to an email.
115
116 The sponsee should quote sha256sums of the .origs in their
117 handoff email.
118
119 =head2 quilt options
120
121 Some workflows involve git branches which are not natively
122 dgit-compatible.
123 Normally dgit will convert them as needed, during push.
124 You need to tell your sponsor if they need to use
125 C<--gbp> (aka C<--quilt=gbp>),
126 C<--dpm> (aka C<--quilt=dpm>),
127 or one of the other C<--quilt=> options.
128
129
130 =head1 SPONSOR WORKFLOW
131
132 This part is addressed to the sponsor:
133
134 =head2 Receiving and validating the sponsorship request
135
136 You should check the signature on the email.
137
138 Use C<git fetch> to fetch the git branch
139 prepared by your sponsee,
140 and obtain any .origs mentioned by the sponsee.
141
142 Check the git commit ID of the sponsee's branch tip,
143 and the sha256sums of the .origs,
144 against the handoff email.
145
146 Now you can check out the branch tip,
147 and do your substantive review.
148
149 =head2 Dealing with branches that want --quilt=
150
151 If your sponsee mentioned a C<--quilt>
152 option, and you don't want to grapple with their preferred tree format,
153 you can convert their tree into the standard dgit view:
154
155 =over 4
156
157     % dgit -wgf quilt-fixup
158     [ Watch for a message about split brain, and if so: ]
159     % git checkout -b dgit-view-for-review refs/dgit-intern/quilt-cache
160
161 =back
162
163 You should check that what you're looking at is a descendant of
164 the sponsee's branch.
165
166 =head2 Some hints which may help the review
167
168 C<dgit fetch sid> will get you an up-to-date
169 C<refs/remotes/dgit/dgit/sid>
170 showing what's in the archive already.
171
172 C<dgit -wgf --damp-run push>
173 will check that dgit can build an appropriate source package.
174
175 There is no need to run debdiff.
176 dgit will not upload anything that doesn't unpack
177 to exactly the git commit you are pushing,
178 so you can rely on what you see in C<git diff>.
179
180 =head2 Doing the upload
181
182 When you have completed your source review,
183 and use
184 C<dgit -wgf [--quilt=...] sbuild -A -C>
185 or similar, to to the build, and then
186 C<dgit -wgf [--quilt=...] push>
187 to do the upload.
188
189 (If you switched to the quilt-cache dgit view,
190 B<do not> pass the --quilt or --gbp or --dpm option again.)
191
192 If this was the first upload done with dgit,
193 you may need to pass
194 C<--overwrite>
195 to dgit.
196
197
198 =head1 SPONSORING A NON-GIT-USING SPONSEE
199
200 This part is addressed to the sponsor:
201
202 If your sponsee does not use git,
203 you can still do your review with git,
204 and use dgit for the upload.
205
206 Your sponsee will provide you with a source package:
207 that is, a .dsc and the files it refers to.
208 Obtain these files, and check signatures as appropriate.
209 Then:
210
211 =over 4
212
213     % dgit clone PACKAGE
214     % cd PACKAGE
215     % dgit import-dsc /path/to/sponsee's.dsc +sponsee
216     % git checkout sponsee
217
218 =back
219
220 This will leave you looking at the sponsee's package,
221 formatted as a dgit branch.
222
223 When you have finished your review and your tests,
224 you can do the
225 dgit sbuild and
226 dgit push directly from the "sponsee" branch.
227
228 You will need to pass
229 C<--overwrite>
230 to dgit push for every successive upload.
231 This disables a safety catch which would normally spot
232 situations where changes are accidentally lost.
233 When your sponsee is sending you source packages -
234 perhaps multiple source pacakges with the same version number -
235 these safety catches are inevitably ineffective.
236
237 =head1 SEE ALSO
238
239 dgit(1), dgit(7), dgit-nmu-simple(7), dgit-maint-*(7)