Packages for Bullseye

    Building from Git

      Invoking lintian after build

      Build for release

      Integrating upstream release

      Branches

      Backports

    Security bugs and uploads

    Building existing package from source

    Files in debian directory

      compat

       rules

        systemd

      source/format

      watch

    Manipulating bugs through email

      Mark bug as confirmed

      Change title of the bug

      Other versions

      Add usertags for Bug squashing party

    pbuilder

    Quilt

      Import existing patch

      Update patch

      Remove patch

    Review contents of a package

    Debugging

      Debconf

    Resources

Packages for Bullseye

Binary uploads are no longer allowed for Bullseye, so you need to do source-only uploads.

Building from Git

More information in the Debian Wiki.

gbp buildpackage

Invoking lintian after build

gbp buildpackage --git-postbuild='lintian -i $GBP_CHANGES_FILE'

This can be also configured in the configuration file ~/.gbp.conf:

[DEFAULT]
postbuild=lintian -i $GBP_CHANGES_FILE

Note: -i shows detailed information about the lintian warnings and errors.

Build for release

gbp buildpackage --git-pristine-tar --git-tag --changes-option=-S

Integrating upstream release

Import the sources:

gbp import-orig --uscan

If you use a DFSG repacked source:

gbp import-orig --uscan --pristine-tar --filter-pristine-tar

Also you need to make sure that you enter the appropriate upstream version at the prompt:

gbp:info: Launching uscan...
uscan: Newest version of sympa on remote site is 6.2.22, local version is 6.2.20~dfsg
 (mangled local version is 6.2.20)
uscan:    => Newer package available from
      https://github.com/sympa-community/sympa/archive/6.2.22.tar.gz
gbp:info: using ../sympa_6.2.22.orig.tar.gz
What is the upstream version? [6.2.22] 6.2.22~dfsg

Update changelog:

dch

Build:

gbp buildpackage

Branches

Dedicated branches are used for backports and also for bug fix releases while working on packaging a new upstream release.

It is recommended to use the release in the branch name, e.g. debian/buster or debian/buster-backports.

If you build from a dedicated branch, you need to tell that to gbp:

gbp buildpackage --git-debian-branch=debian/buster

Backports

Create a dedicated branch if you start a backport.

git checkout -b debian/stretch-backports

Otherwise update the branch:

git checkout debian/stretch-backports
git merge debian/6.2.24_dfsg-1

Resolve conflict in debian/changelog.

Build the package.

Security bugs and uploads

Reference: https://www.debian.org/doc/manuals/developers-reference/pkgs.html#handling-security-related-bugs

Building existing package from source

Install apt-src:

apt-get install apt-src

Ensure that you have the proper sources.

Retrieve source code

apt-src install sympa

Install build dependencies

sudo apt-get build-dep foobar
debuild -b -uc -us

Files in debian directory

compat

Specifies the debhelper compatibility level.

We recommend to use 13 as this level is supported in buster-backports.

You also need a corresponding entry in the control file:

Build-Depends: debhelper (>= 13), ...

rules

systemd

Installing systemd services where the main service triggers start of the other services through Wants directive:

override_dh_installsystemd:
    dh_installsystemd --name sympa sympa.service
    dh_installsystemd --no-start --name sympa-bounced sympa-bounced.service
    dh_installsystemd --no-start --name sympa-archived sympa-archived.service
    dh_installsystemd --no-start --name sympa-bulk sympa-bulk.service
    dh_installsystemd --no-start --name sympa-task_manager sympa-task_manager.service

source/format

Indicates the source format.

Contents for regular package:

3.0 (quilt)

Contents for native package:

3.0 (native)

watch

Contains specification for detecting new upstream releases.

Can be tested as follows:

uscan --no-download --verbose

Reference: https://wiki.debian.org/debian/watch

Manipulating bugs through email

Replace xxxxxx with the actual bug number in the following examples and send these in the body of an email to control@bugs.debian.org.

Reference: https://www.debian.org/Bugs/server-control

To close a bug, you can write an email to xxxxxx-done@bugs.debian.org. It is recommended to add a pseudo header with the package version that fixed the bug:

Version: 6.2.18~dfsg-1

Mark bug as confirmed

tags xxxxxx + confirmed

Change title of the bug

retitle xxxxxx Foo is not Bar

Other versions

found 939636 6.2.40~dfsg-2

Add usertags for Bug squashing party

user debian-release@lists.debian.org
usertag xxxxxx  + bsp-2018-12-ch-bern

pbuilder

Setup pbuilder for a specific distribution:

DIST=jessie git-pbuilder create

Building for a specific distribution:

gbp buildpackage --git-pbuilder --git-dist=jessie

Quilt

How to use quilt to manage patches in Debian packages

Import existing patch

quilt import ~/downloads/tls1.3.patch

Update patch

Upstream changed a patch which already exists in debian/series.

In order to update the patch, follow this example:

$ quilt push backtick-syntax-1087.diff
Applying patch backtick-syntax-1087.diff
patching file src/lib/Conf.pm

Now at patch backtick-syntax-1087.diff
$ git checkout src/lib/Conf.pm
Updated 1 path from the index
$ patch -p 1 < backtick-syntax-1087.diff
patching file src/lib/Conf.pm
$ quilt refresh
Refreshed patch backtick-syntax-1087.diff
$ quilt pop
Removing patch backtick-syntax-1087.diff
Restoring src/lib/Conf.pm

No patches applied
$ git add debian/patches/backtick-syntax-1087.diff
$ git commit -m "Update backtick-syntax patch from upstream."
[master 36760b9] Update backtick-syntax patch from upstream.
 1 file changed, 6 insertions(+), 8 deletions(-)

Remove patch

You can remove your patch tls1.3.patch in case it has been incorporated into a new upstream release.

quilt delete -r tls1.3.patch

Example for corresponding git commit:

git add debian/patches
git commit -m "Remove TLS1.3 compatibility fix which is included in the 1.0.48 release."

Review contents of a package

dpkg -c /home/racke/build/debaux/debaux_0.1.11-1_all.deb

Debugging

Debconf

You can set the environment variable DEBCONF_DEBUG in order to debug the interaction with Debconf during package installation.

export DEBCONF_DEBUG=developer

Resources

Debian Building Tutorial

DFSG Licenses