🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Christopher Obbard Sun, 25 Oct 2026 18:20
Bug#1152018: git-buildpackage: gbp import-orig: support bootstrapping packages with upstream debian/ directories
#2071
Author: Christopher Obbard
Date: Sun, 25 Oct 2026 18:20
111 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads