summaryrefslogtreecommitdiff
path: root/gbp.mdwn
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-01-09 10:16:36 +0100
committerGuido Günther <agx@sigxcpu.org>2015-01-13 07:58:25 +0100
commit087036ff7eeb173ed65080f1ae562cad2067be4d (patch)
tree9ea481538e51bd14c0d88ce3fc8daa1bc7d49c84 /gbp.mdwn
Initial commitHEADmaster
Diffstat (limited to 'gbp.mdwn')
-rw-r--r--gbp.mdwn358
1 files changed, 358 insertions, 0 deletions
diff --git a/gbp.mdwn b/gbp.mdwn
new file mode 100644
index 0000000..6e45a23
--- /dev/null
+++ b/gbp.mdwn
@@ -0,0 +1,358 @@
+---
+title: Debian Pakete in Git entwickeln
+tags: [Debian, Git]
+author: Guido Günther <agx@sigxcpu.org>
+rights: (c) 2014 Guido Günther, CC BY-SA
+...
+
+# Warum
+
+* Versionskontrolle
+* Mehrere Branches: experimental, sid, stable, backports
+* Arbeit im Team
+
+---
+
+# Warum II
+
+Erleichterung wiederkehrender Aufgaben
+
+* Bestehendes Debian Paket importieren - um mal schnell was zu ändern
+* ändern, bauen, testen, ändern, bauen, testen, ändern, ...
+* Neue Upstream Version importieren
+* debian/changelog schreiben
+* Patches hinzufügen, aktualisieren, entfernen
+
+---
+
+# Die Werkzeuge
+
+* git-buildpackage
+* git
+* cowdancer aka cowbuilder
+* pristine-tar
+
+<div class="notes">
+gbp benutzt jede Menge andere Tools:
+dpkg-buildpackage, debuild, cowbuilder, ...
+</div>
+
+---
+
+# gbp supercommand
+
+* buildpackage - Bauen von Paketen
+* import-orig - Upstream Tarball importieren
+* import-dsc - Debian Paket importieren
+* config - gbp Konfiguration anzeigen
+
+<div class="notes">
+Die wichtigsten Tools
+</div>
+
+---
+
+# gbp supercommand II
+
+* dch - Changelog generieren
+* pq - Patches managen
+* import-dscs - mehrere Versionen importieren
+
+<div class="notes">
+Sollte man kennen, erleichtern das Leben
+</div>
+
+---
+
+# gbp supercommand III
+
+* clone - Git Repository clonen
+* pull - Git Repository aktualsieren
+* create-remote-repo - Remote repository erzeugen
+
+* (import-srpm)
+* (pq-rpm)
+
+<div class="notes">
+ * Eher selten
+ * RPM support
+</div>
+
+---
+
+# Layout
+
+![Gbp Branches](branches.png)
+
+<div class="notes">
+* Packaging Branch, Uptream Branch, Tags
+</div>
+
+---
+
+# Layout
+
+* Packaging Branch - pro Debian Release
+* Upstream Branch
+* pristine-tar Branch - ein mal pro Repository
+
+![pristine-tar](pristine_tar.png)
+
+---
+
+# Vorbereitungen
+
+---
+
+## Konfiguration
+
+ cat <<EOF > ~/.gbp.conf
+ [DEFAULT]
+ sign-tags = True
+ keyid = 0xB999CDB58C8DDBD2
+ pristine-tar = True
+
+ [buildpackage]
+ postbuild = lintian $GBP_CHANGES_FILE
+ cleaner = /bin/true
+ pbuilder = True
+ EOF
+
+---
+
+## Konfiguration II
+
+* /etc/git-buildpackage/gbp.conf
+* ~/.gbp.conf
+* Im Repsitory
+ * .gbp.conf
+ * debian/gbp.conf
+ * .git/gbp.conf
+* Anzeigen mit
+
+ gbp config <command>
+
+---
+
+## Chroots erstellen
+
+ git-pbuilder create
+ DIST=wheezy git-pbuilder create
+ DIST=wheezy-backports git-pbuilder create
+
+---
+
+# Wie anfangen?
+
+## Mit bestehendem Paket
+
+ gbp import-dsc python-dateutil_1.4.3-2.dsc
+ gbp import-dsc --download http://.../python-dateutil_1.4.3-2.dsc
+ gbp import-dsc --download python-dateutil
+
+---
+
+# Debian Paket bauen
+
+ gbp buildpackge [--git-ignore-new]
+
+---
+
+## Der Ablauf
+
+* Repository aufräumen
+* Orig Tarball erstellen (von Tag)
+* Builder aufrufen
+* Hooks aufrufen
+
+---
+
+![gbp buildpackage](gbp-buildpackage.png)
+
+---
+
+# Neue Upstream Version importieren
+
+---
+
+## Aus Tarball
+
+ gbp import-orig python-dateutil_1.4.3.orig.tar.gz
+ gbp import-orig --uscan
+
+---
+
+# Upstream benutzt Git
+
+* Debian Branch erstellen
+
+ gbp checkout -b debian/sid
+
+* Konfiguration anpassen
+
+ [DEFAULT]
+ debian-branch = debian/sid
+ upstream-tag = v%(version)s
+ upstream-branch = master
+
+* ``gbp import-orig`` entfällt
+* sonst alles beim alten
+
+---
+
+## Neue Upstream Version paketieren
+
+ gbp checkout debian/sid
+ git merge v1.0.0
+ gbp dch --snapshot --auto
+ gbp buildpackage --git-pristinte-tar-commit
+
+---
+
+# ChangeLogs
+
+---
+
+## Commit Message
+
+ commit a629df279795cd703b1815f3363541256ddbab6a
+ Author: Guido Günther <agx@sigxcpu.org>
+ Date: Sat May 10 10:48:41 2014 +0200
+
+ Set safer env vars
+
+ We can't expect to have a $HOME and we don't want to default to anything
+ than the test driver.
+
+ Closes: #734975, #738383
+
+## debian/changelog
+ * [a629df2] Set safer env vars. We can't expect to have a $HOME and we don't
+ want to default to anything than the test driver.
+ (Closes: #734975, #738383)
+
+---
+
+## Konfiguration
+
+ cat <<EOF >> ~/.gbp.conf
+
+ [dch]
+ meta = True
+ id-length = 7
+ full = True
+ git-author = True
+ multimaint-merge = True
+ EOF
+
+---
+
+## Changlogs erstellen
+
+ gbp dch --snapshot --auto
+ gbp dch --release --auto
+
+---
+
+# Patches
+
+---
+
+## Das Konzept
+
+* Debian Source Format 3.0 (quilt)
+ * hat Patches in debian/patches
+ * werden während des Builds angewendet
+
+ cat <<EOF >> debian/source/local-options
+ unapply-patches
+ EOF
+
+* "``gbp pq import``" importiert diese in Git Branch
+* "``gbp pq export``" exportiert diese wieder
+
+<div class="notes">
+* Am Beispiel von libvirt vorführen
+* --commit
+* drop
+* gbp pq apply --topic=foo <patch>
+</div>
+
+---
+
+### Vorteile
+* orientiert sich stark an der Arbeit mit Quilt
+* patches leicht an Upstream mailbar
+* Upstream Sourcen immer unmodifiziert
+* Patches leicht kategorisierbar (Gbp-Pq: Topic topic)
+
+### Nachteile
+* Upstream kann nicht einfach cherry-picken
+* Bei Merges muss man PQ selber pflegen
+
+---
+
+## Konfiguration
+
+ cat <<EOF >> ~/.gbp.conf
+
+ [pq]
+ patch-numbers = False
+ EOF
+
+---
+
+## Alternativen
+
+* Gepatchter Packaging Branch
+
+ cat <<EOF >> debian/source/local-options
+ auto-commit
+ single-debian-patch
+
+ cat <<EOF >> debian/.gitignore
+ patches/
+
+ * dpkg-source packt alle Änderungen zum Upsteam-Tarball in
+ ``debian/patches/debian-changes``
+
+* Alternative Tools: git-dpm, TopGit, TNT
+
+---
+
+# Bestehende Historie importieren
+
+ gbp import-dscs --debsnap python-libvirt
+ gbp import-dscs path/to/*.dsc
+
+---
+
+# Debugging
+
+* alle Log-Meldungen von gbp beginnen mit 'gbp:'
+* --[git]-verbose
+* gbp config im Repository ausführen
+* gbp <command> --help
+
+---
+
+# Weitere Tools
+
+* gitpkg
+* git-dpm
+* dgit
+
+![Popcon VC build tools](popcon-vc-build-tools.png)
+
+---
+
+# Fragen? Kommentare?
+
+
+* Website: [https://honk.sigxcpu.org/piki/projects/git-buildpackage/]()
+* Manual: [http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.html]()
+* Mailing Liste: [http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage]()
+* [https://wiki.debian.org/GitPackagingWorkflow]()
+* [https://wiki.debian.org/GitPackaging]()
+* [https://wiki.debian.org/git-pbuilder]()
+