Add caller-controlled orig tarball assembly for externally-prepared source trees#27
Open
bjordiscollaku wants to merge 2 commits into
Open
Add caller-controlled orig tarball assembly for externally-prepared source trees#27bjordiscollaku wants to merge 2 commits into
bjordiscollaku wants to merge 2 commits into
Conversation
Add a new code path for 3.0 (quilt) packages that have no debian/gbp.conf (e.g. pkg-linux-qcom). In this case the source tree has been prepared externally and there is no pristine-tar branch or upstream tag available to reconstruct the orig tarball via gbp. When this condition is met, the script: 1. Creates the .orig.tar.gz directly from the source tree, excluding debian/ (the packaging overlay) and .git/ (version-control history), which are not part of the upstream source. 2. Invokes dpkg-buildpackage -S to produce the .dsc, .debian.tar.xz, and .changes files. The detection criterion — absence of debian/gbp.conf — is the canonical indicator that a quilt package is not managed by gbp. All existing gbp-managed quilt packages and native packages continue to use the existing code path unchanged. Signed-off-by: Bjordis Collaku <bcollaku@qti.qualcomm.com>
…emble-orig flag Previously, the script detected externally-assembled source trees by checking for the absence of debian/gbp.conf. This is a heuristic: generate-source-package should not be making packaging decisions based on the presence or absence of configuration files it does not own. Replace the implicit detection with an explicit DEBUSINE_ASSEMBLE_ORIG environment variable (default: false). When set to 'true', the script creates the .orig.tar.gz directly from the source tree (excluding debian/ and .git/) and invokes dpkg-buildpackage -S, bypassing gbp entirely. This places the decision with the caller, which has full knowledge of its own packaging structure and upstream tarball availability. The gbp.conf detection logic is removed entirely from this script. Signed-off-by: Bjordis Collaku <bcollaku@qti.qualcomm.com>
12381f1 to
1eabfae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
generate-source-packagehas no mechanism to handle source trees thatwere assembled externally and have no upstream tarball available via gbp
or pristine-tar. Attempting to build such a package causes
gbpto failwhen it cannot locate or reconstruct the orig tarball.
Solution
Add a
DEBUSINE_ASSEMBLE_ORIGenvironment variable (default: false).When set to
true, the script:.orig.tar.gzdirectly from the source tree, excludingdebian/(the packaging overlay) and.git/(version-control history)dpkg-buildpackage -Sto produce the.dsc,.debian.tar.xz,and
.changesfilesThe caller, which has full knowledge of its own packaging structure and
upstream tarball availability, sets this flag explicitly. All existing
gbp-managed paths are unchanged.
Rationale
Callers such as
pkg-linux-qcomassemble their source tree at CI timewith no upstream tarball available via gbp or pristine-tar. An explicit
flag makes the contract between caller and script unambiguous and avoids
encoding packaging decisions as heuristics inside this script.
Testing
Validated against
pkg-linux-qcom(3.0 (quilt)), kernel7.1.0-rc2-qcom-next-20260515, suitetrixie:The existing gbp-managed path was not exercised by this change and remains
unmodified.