Skip to content

Instantly share code, notes, and snippets.

@bodik
Last active June 5, 2025 09:39
Show Gist options
  • Select an option

  • Save bodik/dc8f3d2ee6f2380059d081cad718eebc to your computer and use it in GitHub Desktop.

Select an option

Save bodik/dc8f3d2ee6f2380059d081cad718eebc to your computer and use it in GitHub Desktop.
Debian build packaging via GBP

Debian build packaging via GBP

Finally after years ;/

The critical part is to separate source code updates as quilt series with gbp pq but changes to debian/ directory keep as separate patches in the base branch (not being quilted) !

apt-get install build-essential devscripts
git clone salsa
apt-get build-dep rsyslog

# create debian (custom) patchset
git checkout debian/8.2102.0-2+deb11u1
git checkout -b debian/8.2102.0-2+deb11u1+rb3
git status

# unwind quilt serie to temporary branch
gbp pq import

# update source code (eg. README.bodik.md), do not modify `debian/` files
# rebase commits to any desired shape, each commit will finally end up as one quilt patch

# rewind commits back to quilt files
gbp pq export
# commit source code updates as quilt serie patchset
git commit

# update debian/ files separately
git commit

gbp buildpackage --git-export-dir=../build -us -uc --git-debian-branch=debian/8.2102.0-2+deb11u1+rb3

Notes

  • pristine-tar branch must be preset in local repo, not just as origin ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment