Leitfaden Für Debian-Betreuer
Total Page:16
File Type:pdf, Size:1020Kb
Leitfaden für DebianBetreuer Osamu Aoki, Helge Kreutzmann, and Mechtilde Stehmann August 27, 2021 Leitfaden für DebianBetreuer by Osamu Aoki, Helge Kreutzmann, and Mechtilde Stehmann Copyright © 20142020 Osamu Aoki Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ”Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ”AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IM PLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Diese Anleitung wurde mit den nachfolgenden Dokumenten als Referenz erstellt: • »Making a Debian Package (AKA the Debmake Manual)«, Copyright © 1997 Jaldhar Vyas. • »The NewMaintainer’s Debian Packaging Howto«, Copyright © 1997 Will Lowe. • »DebianLeitfaden für Neue Paketbetreuer«, Copyright © 19982002 Josip Rodin, 20052017 Osamu Aoki, 2010 Craig Small und 2010 Raphaël Hertzog. Die neuste Version dieser Anleitung sollte • im Paket debmakedoc und • auf der DebianDokumentationsWebsite verfügbar sein. i Contents 1 Überblick 1 2 Voraussetzungen 3 2.1 Leute bei Debian ........................................... 3 2.2 Wie Sie beitragen können ....................................... 3 2.3 Soziale Dynamik von Debian ..................................... 4 2.4 Technische Erinnerungen ....................................... 4 2.5 DebianDokumentation ........................................ 5 2.6 Hilfequellen .............................................. 5 2.7 Archivsituation ............................................ 6 2.8 Wege, beizutragen ........................................... 7 2.9 Neue Beitragende und Betreuer .................................... 8 3 Werkzeugeinrichtung 10 3.1 EMailAdresse ............................................ 10 3.2 MC .................................................. 10 3.3 Git ................................................... 11 3.4 Quilt .................................................. 11 3.5 Devscripts ............................................... 12 3.6 sbuild ................................................. 12 3.7 gitbuildpackage ........................................... 13 3.8 HTTPProxy ............................................. 14 3.9 Privates DebianDepot ........................................ 14 3.10 Virtual machines ........................................... 14 3.11 Local network with virtual machines ................................. 14 4 Einfaches Beispiel 15 4.1 Packaging tarball ........................................... 15 4.2 Gesamtbild .............................................. 15 4.3 Was ist Debmake? ........................................... 16 4.4 Was ist Debuild? ........................................... 17 4.5 Schritt 1: Holen der Quellen der Originalautoren .......................... 17 4.6 Schritt 2: Mit Debmake erstellte Vorlagendateien .......................... 18 4.7 Schritt 3: Anpassung der Vorlagendateien .............................. 22 4.8 Schritt 4: Paketbau mit debuild .................................... 24 4.9 Schritt 3 (alternativ): Änderungen der Quellen der Originalautoren ................. 27 4.9.1 Patch durch diff u ...................................... 27 4.9.2 Patch durch Dquilt ...................................... 28 4.9.3 Patch durch dpkgsource commit .............................. 29 5 Grundlagen 31 5.1 Arbeitsablauf des Paketierens ..................................... 31 5.1.1 Das Paket debhelper ..................................... 33 5.2 Historical perspective of Debian packaging practices ........................ 33 5.3 Future perspective on Debian packaging practices .......................... 34 5.4 Paketname und version ........................................ 35 5.5 Natives DebianPaket ......................................... 36 5.6 debian/rules .............................................. 36 5.6.1 dh ............................................... 37 5.6.2 Einfache debian/rules ..................................... 37 5.6.3 Angepasste debian/rules ................................... 38 5.6.4 Variablen für debian/rules .................................. 38 5.6.5 Reproduzierbares Bauen ................................... 39 5.7 debian/control ............................................. 39 ii CONTENTS 5.7.1 Aufteilung eines DebianBinärpakets ............................ 40 5.7.1.1 debmake b .................................... 40 5.7.1.2 Pakettrennungsszenarien und beispiele ...................... 41 5.7.1.3 Der Bibliothekspaketname ............................ 41 5.7.2 Substvar ........................................... 42 5.7.3 biNMUsicher ........................................ 42 5.8 debian/changelog ........................................... 43 5.9 debian/copyright ........................................... 44 5.10 debian/patches/* ........................................... 44 5.10.1 dpkgsource x ........................................ 46 5.10.2 dquilt und dpkgsource .................................... 46 5.11 debian/upstream/signingkey.asc ................................... 46 5.12 debian/watch und DFSG ....................................... 47 5.13 Weitere debian/*Dateien ....................................... 47 5.14 Anpassung der DebianPaketierung ................................. 51 5.15 Aufzeichnen im VCS (standard) ................................... 52 5.16 Aufzeichnen im VCS (Alternative) .................................. 52 5.17 Pakete ohne irrelevante Inhalte bauen ................................ 53 5.17.1 Korrektur durch debian/rules clean .............................. 53 5.17.2 Korrektur mittels VCS .................................... 54 5.17.3 Korrektur durch extenddiffignore ............................. 54 5.17.4 Korrektur durch tarignore .................................. 54 5.18 Bausysteme der Originalautoren ................................... 55 5.18.1 Autotools ........................................... 55 5.18.2 CMake ............................................ 56 5.18.3 Meson ............................................. 56 5.18.4 Python Distutils ........................................ 56 5.19 Fehlersuchinformationen ....................................... 57 5.19.1 Neue dbgsymPakete (Stretch 9.0 und danach) ....................... 57 5.20 Bibliothekspaket ........................................... 57 5.20.1 Bibliothekssymbole ..................................... 58 5.20.2 Bibliotheksübergänge .................................... 59 5.21 Debconf ................................................ 59 5.22 Multiarch ............................................... 60 5.22.1 The multiarch library path .................................. 60 5.22.2 The multiarch header file path ................................ 61 5.22.3 The multiarch *.pc file path ................................. 61 5.23 Compiler hardening .......................................... 62 5.24 Continuous integration ........................................ 62 5.25 Other new requirements ........................................ 62 5.26 Bootstrapping ............................................. 62 5.27 Bug reports .............................................. 62 6 DebmakeOptionen 64 6.1 AbkürzungsOptionen (a, i) ..................................... 64 6.1.1 PythonModul ........................................ 64 6.2 Snapshot upstream tarball (d, t) ................................... 65 6.3 debmake cc .............................................. 65 6.4 debmake k .............................................. 65 6.5 debmake j .............................................. 66 6.6 debmake x .............................................. 67 6.7 debmake P .............................................. 67 6.8 debmake T .............................................. 67 iii CONTENTS 7 Tipps 68 7.1 Debdiff ................................................ 68 7.2 Dget .................................................. 68 7.3 Debc .................................................. 68 7.4 Piuparts ................................................ 68 7.5 debsign ................................................ 69 7.6 dput .................................................. 69 7.7 bts ................................................... 69 7.8 gitbuildpackage ........................................... 69 7.8.1 gbp importdscs debsnap .................................. 70 7.8.2 Upstream git repository .................................... 70 7.9 dgit .................................................. 71 7.9.1 Snapshot upstream tarball (alternative git deborig approach) ............. 71 7.10 chroot ................................................. 71 7.11 New Debian revision ......................................... 73 7.12 New upstream release ........................................