README.source 2.65 KB
Newer Older
1 2 3
Building from source
--------------------
Install “git-buildpackage” and run the following steps:
4

5 6 7
  gbp-clone git+ssh://git.debian.org/git/pkg-systemd/systemd.git
  cd systemd
  git-buildpackage
8

9
We recommend you use pbuilder to make sure you build in a clean environment:
10 11

  git-buildpackage --git-pbuilder
12 13 14 15 16 17 18 19 20 21 22 23 24 25

Patch handling
--------------
The official form of modifications to the upstream source are quilt patches in
debian/patches/, like most Debian packages do. You are welcome to use quilt to
add or modify patches, but you might prefer using a git commit based approach.
gbp-pq provides that by synthesizing a "patch-queue/<branch>" local branch
which represents each quilt patch as git commit. You create this with

  gbp-pq import --force

Then you are in the patch-queue branch and can git log, commit, cherry-pick
upstream commits, rebase, etc. there. After you are done, run

26
  gbp-pq export
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61

which will put you back into master and update debian/patches/ (including
series). You need to git add etc. new patches, add a changelog and other
packaging changes, and then debcommit as usual.

Rebasing patches to a new upstream version
------------------------------------------
gbp-pq's "rebase" command does not work very conveniently as it fails on merge
conflicts. First, ensure you are in the master branch:

  git checkout master  # in case you aren't already

Now, do one of

 (1) To import a new upstream release into the existing master branch for unstable,
do:

  gbp-pq import --force
  gbp-pq switch   # switch back to master from patch-queue/master
  git-import-orig [...]
  gbp-pq switch   # switch to patch-queue/master
  git rebase master

 (2) To import a new upstream release into a new branch for Debian experimental, do:

  git branch experimental
  git checkout experimental
  editor debian/gbp.conf  # set "debian-branch=experimental"
  git-import-orig [...]
  git branch patch-queue/experimental patch-queue/master
  git checkout patch-queue/experimental
  git rebase experimental

Now resolve all the conflicts, skip obsolete patches, etc. When you are done, run

62 63 64
  gbp-pq export

Note that our debian/gbp.conf disables patch numbers.
65 66 67 68 69 70 71

Cherry-picking upstream patches
-------------------------------
You can add the systemd upstream branch as an additional remote to the Debian
packaging branch. Call it "fdo" or "systemd" or similar to avoid confusing it
with the already existing "upstream" branch from git-buildpackage:

72 73
  git remote add fdo git://anongit.freedesktop.org/systemd/systemd
  git fetch fdo -n
74 75 76 77 78 79 80

Now you can look at the upstream log and cherry-pick patches into the
patch-queue branch:

  gbp-pq import --force
  git log fdo/master
  git cherry-pick 123DEADBEEF