1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2019-03-01 16:59+0000\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
20 #: ../dgit.1:3 ../dgit.7:2 ../dgit-user.7.pod:1 ../dgit-nmu-simple.7.pod:1
21 #: ../dgit-maint-native.7.pod:1 ../dgit-maint-merge.7.pod:1
22 #: ../dgit-maint-gbp.7.pod:1 ../dgit-maint-debrebase.7.pod:1
23 #: ../dgit-downstream-dsc.7.pod:1 ../dgit-sponsorship.7.pod:1
24 #: ../git-debrebase.1.pod:1 ../git-debrebase.5.pod:1
30 #: ../dgit.1:1470 ../dgit.7:23 ../dgit-user.7.pod:447
31 #: ../dgit-nmu-simple.7.pod:137 ../dgit-maint-native.7.pod:126
32 #: ../dgit-maint-merge.7.pod:491 ../dgit-maint-gbp.7.pod:136
33 #: ../dgit-maint-debrebase.7.pod:747 ../dgit-downstream-dsc.7.pod:352
34 #: ../dgit-sponsorship.7.pod:321 ../git-debrebase.1.pod:619
35 #: ../git-debrebase.5.pod:678
41 #: ../dgit.7:4 ../dgit-user.7.pod:27 ../dgit-nmu-simple.7.pod:35
47 #: ../dgit-user.7.pod:3
48 msgid "dgit-user - making and sharing changes to Debian packages, with git"
52 #: ../dgit-user.7.pod:5 ../dgit-maint-native.7.pod:5
53 #: ../dgit-maint-merge.7.pod:5 ../dgit-maint-gbp.7.pod:5
54 #: ../dgit-maint-debrebase.7.pod:5 ../dgit-downstream-dsc.7.pod:5
55 #: ../git-debrebase.1.pod:10 ../git-debrebase.5.pod:5
60 #: ../dgit-user.7.pod:7
62 "dgit lets you fetch the source code to every package on your system as if "
63 "your distro used git to maintain all of it."
67 #: ../dgit-user.7.pod:11
69 "You can then edit it, build updated binary packages (.debs) and install and "
70 "run them. You can also share your work with others."
74 #: ../dgit-user.7.pod:16
76 "This tutorial gives some recipes and hints for this. It assumes you have "
77 "basic familiarity with git. It does not assume any initial familiarity with "
78 "Debian's packaging processes."
82 #: ../dgit-user.7.pod:21
84 "If you are a package maintainer within Debian; a DM or DD; and/or a sponsee: "
85 "this tutorial is not for you. Try L<dgit-nmu-simple(7)>, L<dgit-maint-"
86 "*(7)>, or L<dgit(1)> and L<dgit(7)>."
90 #: ../dgit-user.7.pod:29
91 msgid "(These runes will be discussed later.)"
95 #: ../dgit-user.7.pod:33
98 " % dgit clone glibc jessie,-security\n"
100 " % curl 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=28250;mbox=yes;msg=89' | patch -p1 -u\n"
101 " % git commit -a -m 'Fix libc lost output bug'\n"
102 " % gbp dch -S --since=dgit/dgit/sid --ignore-branch --commit\n"
103 " % mk-build-deps --root-cmd=sudo --install\n"
104 " % dpkg-buildpackage -uc -b\n"
105 " % sudo dpkg -i ../libc6_*.deb\n"
110 #: ../dgit-user.7.pod:44
111 msgid "Occasionally:"
115 #: ../dgit-user.7.pod:48 ../dgit-user.7.pod:242
118 " % git clean -xdf\n"
119 " % git reset --hard\n"
124 #: ../dgit-user.7.pod:53
129 #: ../dgit-user.7.pod:57
133 " % dgit pull jessie,-security\n"
134 " % gbp dch -S --since=dgit/dgit/sid --ignore-branch --commit\n"
135 " % dpkg-buildpackage -uc -b\n"
136 " % sudo dpkg -i ../libc6_*.deb\n"
141 #: ../dgit-user.7.pod:65
142 msgid "FINDING THE RIGHT SOURCE CODE - DGIT CLONE"
146 #: ../dgit-user.7.pod:69
149 " % dgit clone glibc jessie,-security\n"
155 #: ../dgit-user.7.pod:74
157 "dgit clone needs to be told the source package name (which might be "
158 "different to the binary package name, which was the name you passed to \"apt-"
159 "get install\") and the codename or alias of the Debian release (this is "
160 "called the \"suite\")."
164 #: ../dgit-user.7.pod:80
165 msgid "Finding the source package name"
169 #: ../dgit-user.7.pod:82
171 "For many packages, the source package name is obvious. Otherwise, if you "
172 "know a file that's in the package, you can look it up with dpkg:"
176 #: ../dgit-user.7.pod:88
179 " % dpkg -S /lib/i386-linux-gnu/libc.so.6 \n"
180 " libc6:i386: /lib/i386-linux-gnu/libc.so.6\n"
181 " % dpkg -s libc6:i386\n"
183 " Status: install ok installed\n"
190 #: ../dgit-user.7.pod:98
192 "(In this example, libc6 is a \"multi-arch: allowed\" package, which means "
193 "that it exists in several different builds for different architectures. "
194 "That's where C<:i386> comes from.)"
198 #: ../dgit-user.7.pod:104
199 msgid "Finding the Debian release (the \"suite\")"
203 #: ../dgit-user.7.pod:106
205 "Internally, Debian (and derived) distros normally refer to their releases by "
206 "codenames. Debian also has aliases which refer to the current stable "
207 "release etc. So for example, at the time of writing Debian C<jessie> "
208 "(Debian 8) is Debian C<stable>; and the current version of Ubuntu is "
209 "C<yakkety> (Yakkety Yak, 16.10). You can specify either the codename "
210 "C<jessie> or the alias C<stable>. If you don't say, you get C<sid>, which "
211 "is Debian C<unstable> - the main work-in progress branch."
215 #: ../dgit-user.7.pod:117
216 msgid "If you don't know what you're running, try this:"
220 #: ../dgit-user.7.pod:121
223 " % grep '^deb' /etc/apt/sources.list\n"
224 " deb http://the.earth.li/debian/ jessie main non-free contrib\n"
231 #: ../dgit-user.7.pod:128
233 "For Debian, you should add C<,-security> to the end of the suite name, "
234 "unless you're on unstable or testing. Hence, in our example C<jessie> "
235 "becomes C<jessie,-security>. (Yes, with a comma.)"
239 #: ../dgit-user.7.pod:135
240 msgid "WHAT DGIT CLONE PRODUCES"
244 #: ../dgit-user.7.pod:137
245 msgid "What branches are there"
249 #: ../dgit-user.7.pod:139
251 "dgit clone will give you a new working tree, and arrange for you to be on a "
252 "branch named like C<dgit/jessie,-security> (yes, with a comma in the branch "
257 #: ../dgit-user.7.pod:143
259 "For each release (like C<jessie>) there is a tracking branch for the "
260 "contents of the archive, called C<remotes/dgit/dgit/jessie> (and similarly "
261 "for other suites). This can be updated with C<dgit fetch jessie>. This, "
262 "the I<remote suite branch>, is synthesized by your local copy of dgit. It "
263 "is fast forwarding."
267 #: ../dgit-user.7.pod:152
269 "Debian separates out the security updates, into C<*-security>. Telling dgit "
270 "C<jessie,-security> means that it should include any updates available in "
271 "C<jessie-security>. The comma notation is a request to dgit to track "
272 "jessie, or jessie-security if there is an update for the package there."
276 #: ../dgit-user.7.pod:158
278 "(You can also dgit fetch in a tree that wasn't made by dgit clone. If "
279 "there's no C<debian/changelog> you'll have to supply a C<-p>I<package> "
280 "option to dgit fetch.)"
284 #: ../dgit-user.7.pod:162
285 msgid "What kind of source tree do you get"
289 #: ../dgit-user.7.pod:164
291 "If the Debian package is based on some upstream release, the code layout "
292 "should be like the upstream version. You should find C<git grep> helpful to "
293 "find where to edit."
297 #: ../dgit-user.7.pod:168
299 "The package's Debian metadata and the scripts for building binary packages "
300 "are under C<debian/>. C<debian/control>, C<debian/changelog> and C<debian/"
301 "rules> are the starting points. The Debian Policy Manual has most of the in-"
302 "depth technical details."
306 #: ../dgit-user.7.pod:175
308 "For many Debian packages, there will also be some things in C<debian/patches/"
309 ">. It is best to ignore these. Insofar as they are relevant the changes "
310 "there will have been applied to the actual files, probably by means of "
311 "actual comments in the git history. The contents of debian/patches are "
312 "ignored when building binaries from dgitish git branches."
316 #: ../dgit-user.7.pod:185
318 "(For Debian afficionados: the git trees that come out of dgit are \"patches-"
319 "applied packaging branches without a .pc directory\".)"
323 #: ../dgit-user.7.pod:190
324 msgid "What kind of history you get"
328 #: ../dgit-user.7.pod:192
330 "If you're lucky, the history will be a version of, or based on, the Debian "
331 "maintainer's own git history, or upstream's git history."
335 #: ../dgit-user.7.pod:197
337 "But for many packages the real git history does not exist, or has not been "
338 "published in a dgitish form. So you may find that the history is a rather "
339 "short history invented by dgit."
343 #: ../dgit-user.7.pod:203
345 "dgit histories often contain automatically-generated commits, including "
346 "commits which make no changes but just serve to make a rebasing branch fast-"
347 "forward. This is particularly true of combining branches like C<jessie,-"
352 #: ../dgit-user.7.pod:210
354 "If the package maintainer is using git then after dgit clone you may find "
355 "that there is a useful C<vcs-git> remote referring to the Debian package "
356 "maintainer's repository for the package. You can see what's there with "
357 "C<git fetch vcs-git>. But use what you find there with care: Debian "
358 "maintainers' git repositories often have contents which are very confusing "
359 "and idiosyncratic. In particular, you may need to manually apply the "
360 "patches that are in debian/patches before you do anything else!"
364 #: ../dgit-user.7.pod:222 ../dgit-maint-gbp.7.pod:56
369 #: ../dgit-user.7.pod:224
370 msgid "Always commit before building"
374 #: ../dgit-user.7.pod:228
377 " % wget 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=28250;mbox=yes;msg=89' | patch -p1 -u\n"
378 " % git commit -a -m 'Fix libc lost output bug'\n"
383 #: ../dgit-user.7.pod:233
385 "Debian package builds are often quite messy: they may modify files which are "
386 "also committed to git, or leave outputs and temporary files not covered by "
391 #: ../dgit-user.7.pod:237
392 msgid "If you always commit, you can use"
396 #: ../dgit-user.7.pod:247
398 "to tidy up after a build. (If you forgot to commit, don't use those "
399 "commands; instead, you may find that you can use C<git add -p> to help "
400 "commit what you actually wanted to keep.)"
404 #: ../dgit-user.7.pod:252
406 "These are destructive commands which delete all new files (so you B<must> "
407 "remember to say C<git add>) and throw away edits to every file (so you "
408 "B<must> remember to commit)."
412 #: ../dgit-user.7.pod:257
413 msgid "Update the changelog (at least once) before building"
417 #: ../dgit-user.7.pod:261
420 " % gbp dch -S --since=dgit/dgit/sid --ignore-branch --commit\n"
425 #: ../dgit-user.7.pod:265
427 "The binaries you build will have a version number which ultimately comes "
428 "from the C<debian/changelog>. You want to be able to tell your binaries "
429 "apart from your distro's."
433 #: ../dgit-user.7.pod:270
435 "So you should update C<debian/changelog> to add a new stanza at the top, for "
440 #: ../dgit-user.7.pod:274
442 "This rune provides an easy way to do this. It adds a new changelog entry "
443 "with an uninformative message and a plausible version number (containing a "
444 "bit of your git commit id)."
448 #: ../dgit-user.7.pod:279
450 "If you want to be more sophisticated, the package C<dpkg-dev-el> has a good "
451 "Emacs mode for editing changelogs. Alternatively, you could edit the "
452 "changelog with another text editor, or run C<dch> or C<gbp dch> with "
453 "different options. Choosing a good version number is slightly tricky and a "
454 "complete treatment is beyond the scope of this tutorial."
458 #: ../dgit-user.7.pod:287
459 msgid "Actually building"
463 #: ../dgit-user.7.pod:291
466 " % mk-build-deps --root-cmd=sudo --install\n"
467 " % dpkg-buildpackage -uc -b\n"
472 #: ../dgit-user.7.pod:296
474 "dpkg-buildpackage is the primary tool for building a Debian source package. "
475 "C<-uc> means not to pgp-sign the results. C<-b> means build all binary "
476 "packages, but not to build a source package."
480 #: ../dgit-user.7.pod:302
485 #: ../dgit-user.7.pod:304
487 "You can build in an schroot chroot, with sbuild, instead of in your main "
488 "environment. (sbuild is used by the Debian build daemons.)"
492 #: ../dgit-user.7.pod:309
495 " % git clean -xdf\n"
496 " % sbuild -c jessie -A --no-clean-source \\\n"
497 " --dpkg-source-opts='-Zgzip -z1 --format=1.0 -sn'\n"
502 #: ../dgit-user.7.pod:315
504 "Note that this will seem to leave a \"source package\" (.dsc and .tar.gz) "
505 "in the parent directory, but that source package should not be used. It is "
506 "likely to be broken. For more information see Debian bug #868527."
510 #: ../dgit-user.7.pod:322
515 #: ../dgit-user.7.pod:324
516 msgid "Debian Jessie or older"
520 #: ../dgit-user.7.pod:328
523 " % sudo dpkg -i ../libc6_*.deb\n"
528 #: ../dgit-user.7.pod:332
530 "You can use C<dpkg -i> to install the .debs that came out of your package."
534 #: ../dgit-user.7.pod:335
536 "If the dependencies aren't installed, you will get an error, which can "
537 "usually be fixed with C<apt-get -f install>."
541 #: ../dgit-user.7.pod:339
542 msgid "Debian Stretch or newer"
546 #: ../dgit-user.7.pod:343
549 " % sudo apt install ../libc6_*.deb\n"
554 #: ../dgit-user.7.pod:347
559 #: ../dgit-user.7.pod:349
561 "If you're working on a library package and your system has multiple "
562 "architectures enabled, you may see something like this:"
566 #: ../dgit-user.7.pod:355
569 " dpkg: error processing package libpcre3-dev:amd64 (--configure):\n"
570 " package libpcre3-dev:amd64 2:8.39-3~3.gbp8f25f5 cannot be configured because libpcre3-dev:i386 is at a different version (2:8.39-2)\n"
575 #: ../dgit-user.7.pod:360
577 "The multiarch system used by Debian requires each package which is present "
578 "for multiple architectures to be exactly the same across all the "
579 "architectures for which it is installed."
583 #: ../dgit-user.7.pod:364
585 "The proper solution is to build the package for all the architectures you "
586 "have enabled. You'll need a chroot for each of the secondary "
587 "architectures. This is somewhat tiresome, even though Debian has excellent "
588 "tools for managing chroots. C<sbuild-debian-developer-setup> from the "
589 "package of the same name and C<sbuild-createchroot> from the C<sbuild> "
590 "package are good starting points."
594 #: ../dgit-user.7.pod:374
596 "Otherwise you could deinstall the packages of interest for those other "
597 "architectures with something like C<dpkg --remove libpcre3:i386>."
601 #: ../dgit-user.7.pod:378
603 "If neither of those are an option, your desperate last resort is to try "
604 "using the same version number as the official package for your own package. "
605 "(The version is controlled by C<debian/changelog> - see above.) This is not "
606 "ideal because it makes it hard to tell what is installed, and because it "
607 "will mislead and confuse apt."
611 #: ../dgit-user.7.pod:386
612 msgid "With the \"same number\" approach you may still get errors like"
616 #: ../dgit-user.7.pod:390
618 "trying to overwrite shared '/usr/include/pcreposix.h', which is different "
619 "from other instances of package libpcre3-dev"
623 #: ../dgit-user.7.pod:394
625 "but passing C<--force-overwrite> to dpkg will help - assuming you know what "
630 #: ../dgit-user.7.pod:397
631 msgid "SHARING YOUR WORK"
635 #: ../dgit-user.7.pod:399
637 "The C<dgit/jessie,-security> branch (or whatever) is a normal git branch. "
638 "You can use C<git push> to publish it on any suitable git server."
642 #: ../dgit-user.7.pod:402
644 "Anyone who gets that git branch from you will be able to build binary "
645 "packages (.deb) just as you did."
649 #: ../dgit-user.7.pod:406
651 "If you want to contribute your changes back to Debian, you should probably "
652 "send them as attachments to an email to the L<Debian Bug System|https://bugs."
653 "debian.org/> (either a followup to an existing bug, or a new bug). Patches "
654 "in C<git-format-patch> format are usually very welcome."
658 #: ../dgit-user.7.pod:413
659 msgid "Source packages"
663 #: ../dgit-user.7.pod:415
665 "The git branch is not sufficient to build a source package the way Debian "
666 "does. Source packages are somewhat awkward to work with. Indeed many "
667 "plausible git histories or git trees cannot be converted into a suitable "
668 "source package. So I recommend you share your git branch instead."
672 #: ../dgit-user.7.pod:423
674 "If a git branch is not enough, and you need to provide a source package but "
675 "don't care about its format/layout (for example because some software you "
676 "have consumes source packages, not git histories) you can use this recipe "
677 "to generate a C<3.0 (native)> source package, which is just a tarball with "
678 "accompanying .dsc metadata file:"
682 #: ../dgit-user.7.pod:434
685 " % echo '3.0 (native)' >debian/source/format\n"
686 " % git commit -m 'switch to native source format' debian/source/format\n"
687 " % dgit -wgf build-source\n"
692 #: ../dgit-user.7.pod:440
694 "If you need to provide a good-looking source package, be prepared for a lot "
695 "more work. You will need to read much more, perhaps starting with L<dgit-"
696 "nmu-simple(7)>, L<dgit-sponsorship(7)> or L<dgit-maint-*(7)>"
700 #: ../dgit-user.7.pod:449 ../dgit-maint-native.7.pod:128
701 #: ../dgit-maint-merge.7.pod:493 ../dgit-maint-gbp.7.pod:138
702 msgid "dgit(1), dgit(7)"