File: README.source

package info (click to toggle)
open-iscsi 2.1.11-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,888 kB
  • sloc: ansic: 49,790; perl: 2,481; sh: 2,247; makefile: 660; python: 622; yacc: 219; lex: 74
file content (96 lines) | stat: -rw-r--r-- 3,209 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Building from source
--------------------
Install “git-buildpackage” and “devscripts” then run the following:

  debcheckout --git-track '*' open-iscsi
  cd open-iscsi
  git branch -l | grep debian
  git checkout master
  gbp buildpackage

We recommend you use sbuild or pbuilder to make sure you build in a clean
environment. For pbuilder, use:

  gbp buildpackage --git-pbuilder

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

  gbp pq export

which will put you back into the debian branch 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 debian branch:

  git checkout master  # in case you aren't already on it

Fetch new git history from upstream:

  git remote add open-iscsi https://github.com/open-iscsi/open-iscsi.git
  git fetch open-iscsi [upstream-version-tag]

Now, to import a new upstream release into the existing branch,
ie. when updating from 2.1.8 to 2.1.9, do:

  gbp pq import --force
  gbp pq switch   # switch back to debian branch from patch-queue branch
  gbp import-orig --upstream-vcs-tag=2.1.9 ../tarballs/2.1.9.tar.gz
  gbp pq switch   # switch to patch-queue branch
  git rebase master

  gbp pq export

Note that our debian/gbp.conf disables patch numbers.

Also, don't forget to commit your newly generated patches!

  git add debian/patches
  git commit -v

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

  git remote add open-iscsi https://github.com/open-iscsi/open-iscsi.git
  git fetch open-iscsi -n

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

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

Finally, export and commit your newly generated debian/patches changes:
  gbp pq export
  git add debian/patches
  git commit -v

Modifying packaging files
-------------------------

When making changes to debian/ general "git-buildpackage conventions" apply.
Follow usual git conventions for commit message but also see "man gbp-dch"
META TAGS section.
Finally once you're done update debian/changelog using "gbp dch --auto"
and commit it.


(This README.source was adapted from systemd's file. Thanks!)