Article View: linux.debian.bugs.dist
Article #2071Bug#1152018: git-buildpackage: gbp import-orig: support bootstrapping packages with upstream debian/ directories
From: Christopher Obbard
Date: Sun, 25 Oct 2026 18:20
Date: Sun, 25 Oct 2026 18:20
111 lines
5374 bytes
5374 bytes
Package: git-buildpackage
Version: 0.9.43
Severity: wishlist
X-Debbugs-Cc: obbardc@debian.org
Dear Maintainer,
When bootstrapping a new Debian packaging repository with gbp import-orig (and
by this I mean importing an orig tarball into an empty repository); an upstream
tarball containing a debian/ directory results in that directory being imported
into both the upstream and Debian packaging branches.
I think this is a sensible default. However, I don't see any straightforward
way to bootstrap a repository without upstream's debian/ directory being included
on the newly-created packaging branch while keeping upstream's debian/ directory
on the upstream branch.
For example, in an empty Git repository and a dummy upstream orig tarball:
gbp import-orig \
--debian-branch=master \
--upstream-branch=upstream \
--pristine-tar \
--upstream-version=1.0.0 \
../dummy_v1.0.0.tar.gz
The debian/ directory from the orig tarball appears in both branches.
--merge-mode=replace does not change anything, neither does --upstream-vcs-tag,
both of which I was expecting.
Currently I work around this with: --filter='debian/*', but there are
at least two issues:
- debian/ directory is removed from the upstream tree
- gbp passes --filters straight to GNU tar as --exclude. By default tar
matches the pattern at all depth so debian/* matches every debian/
directory in the tree. Perhaps this belongs in its own bug?
Would it make sense to introduce an explicit bootstrap option for gbp
import-orig, allowing the initial import to create an independent Debian
packaging branch without copying upstream's debian/ directory?
For example:
gbp import-orig \
--bootstrap \
--debian-branch=master \
--upstream-branch=upstream \
--pristine-tar \
--upstream-version=1.0.0 \
../v1.0.0.tar.gz
The intended behaviour would be:
- Preserve the complete upstream source tree on the upstream branch, including
debian/.
- Create the initial Debian packaging branch without the contents of debian/
from the upstream.
- Preserve the original upstream tarball through pristine-tar.
- Allow subsequent imports to preserve the independently maintained Debian
packaging using the existing --merge-mode=replace behaviour.
I was thinking it could be implemented as an extension of the existing merge
modes, rather than introducing a separate bootstrap mechanism.
I am happy to propose a PR on Salsa if we can come to some kind of
agreement?
Cheers!
-- System Information:
Debian Release: forky/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: arm64
Kernel: Linux 7.2.7+deb14-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages git-buildpackage depends on:
ii devscripts 2.26.13
ii git 1:2.55.0-1
ii man-db 2.13.1-1
ii python3 3.14.8-1
ii python3-dateutil 3.0.0-2
ii python3-yaml 6.0.3-1+b1
ii sensible-utils 0.0.26
Versions of packages git-buildpackage recommends:
ii cowbuilder 0.91
ii pbuilder 0.231.3
ii pristine-tar 1.50+nmu3
ii python3-requests 2.34.2-1
ii sbuild 0.91.10
Versions of packages git-buildpackage suggests:
ii python3-notify2 0.3.1-3
ii sudo 1.9.17p2-9
ii unzip 6.0-31
-- no debconf information
Technical Details
Message-ID:
<NSaZ4-7PIx-45@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Christopher Obbard <chris.obbard@oss.qualcomm.com> Newsgroups: linux.debian.bugs.dist Subject: Bug#1152018: git-buildpackage: gbp import-orig: support bootstrapping packages with upstream debian/ directories Date: Sun, 25 Oct 2026 19:20:02 +0100 Message-ID: <NSaZ4-7PIx-45@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Sun Oct 25 18:12:47 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.65 Reply-To: Christopher Obbard <chris.obbard@oss.qualcomm.com>, 1152018@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: obbardc@debian.org, agx@sigxcpu.org X-Debian-Pr-Message: report 1152018 X-Debian-Pr-Package: git-buildpackage X-Debian-Pr-Source: git-buildpackage Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: reportbug 13.2.0+nmu1 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1998781 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 111 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sun, 25 Oct 2026 13:50:28 +0000 X-Original-Message-ID: <179293622893.3021622.15110187837079578002.reportbug@nox>