This GitLab instance will be migrated to before 2020-06-01 and will lose the shared runners, setup your own runners if needed.

Commit 750ca753 authored by Vermeeren's avatar Vermeeren

readme: greatly improve setup doc

Based upon what I have been using locally for a while now.
parent 6c7ef31b
......@@ -89,26 +89,99 @@ private key. To force signing with your own OpenPGP identity or key fingerprint
add the below to `~/.devscripts`.
DEBUILD_LINTIAN_OPTS='-i -I --show-overrides'
DEBSIGN_MAINT='Firstname Lastname'
### cowbuilder / pbuilder
Install `cowbuilder` and/or `pbuilder`, `cowbuilder` is recommended as it is
more efficient.
more efficient. Also install `eatmydata` to speed up building by disabling
`fsync()` et al during building.
Finally set the default build options and distribution in `/etc/pbuilderrc`.
Option `-sa` forces creation of the source `.orig.tar.gz`.
# Local
Now add hook files, so lintian runs after building and you get a shell when an
errors occurs.
File `/var/cache/pbuilder/hooks/B90lintian`
set -e
apt-get -y --allow-downgrades install lintian
echo "+++ lintian output +++"
su -c "lintian -i -I --show-overrides /tmp/buildd/*.changes; :" -l pbuilder
echo "+++ end of lintian output +++"
File `/var/cache/pbuilder/hooks/C10shell`
set -e
apt-get -y --allow-downgrades install vim bash mc
# invoke shell if build fails
cd /tmp/buildd/*/debian/..
/bin/bash < /dev/tty > /dev/tty 2> /dev/tty
Run `sudo cowbuilder create` to build the initial rootfs. Later `sudo cowbuilder
update` can keep it up-to-date. Refer to `cowbuilder(8)` for more details.
### quilt
The far majority of packages use the quilt utility to manage patches. In debian
packages patches are stored under `debian/patches` instead of standard quilt's
`patches`. Create `~/.quiltrc-dpkg`.
while [ ! -d $d/debian -a `readlink -e $d` != / ];
do d=$d/..; done
if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then
# if in Debian packaging tree with unset $QUILT_PATCHES
QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto"
QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi
Finally, create an alias in your shell rc.
alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
# note: zsh does not require the below complete line
complete -F _quilt_completion $_quilt_complete_opt dquilt
### git-buildpackage
Many packages that are maintained in git use git-buildpackage to automate common
task. Usually per-package configuration is stored in `debian/gbp.conf`. Because
we use pbuilder/cowbuilder create the `~/.gbp.conf` with the following contents.
builder = git-pbuilder -sa -i -I
color = auto
### reprepro
Configuration of `reprepro` is not needed, as it is included in this repository
......@@ -133,7 +206,8 @@ tarball. For example `uscan --download-current-version`.
### Modifying the package
Do whatever needs to be done. For patches specifically, usually the easiest way
it to use change sources in-tree and run `dpkg-source --commit`.
it to use change sources in-tree and run `dpkg-source --commit`. You can also
use (d)quilt directly.
### Bumping the package version
......@@ -177,11 +251,11 @@ Building is as easy as running `sudo cowbuilder build sourcepkg.dsc`. For
cowbuilder/pbuilder specifically the result will end up in
Sign the binary package by running `debsign` on the `.changes` file.
Sign the binary package by running ``, included in this repository.
### Adding the packages to the repo
Simply run `reprepro include binarypkg.changes`
Simply run ``, included in this repository.
Finally run `` to sync the local repository to the archive on Note that syncing is a primitive sync and not additive!
......@@ -189,6 +263,10 @@ This means managing the actual repo should be done from a single machine, or by
syncing the `db`, `dists` and `pool` folders. A more serious repo uses incoming
queues which does not have this problem.
To clear the locally built packages run ``. Note that you need to
`chown root:$USER` and `chmod 775` the result directory locally to avoid needing
root to remove the built packages.
## Submitting patches upstream
If the fix is proper and for a legitimate issue that exists in an official
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment