-
Notifications
You must be signed in to change notification settings - Fork 82
Extend default debian/gbp.conf with extra security config tips #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -341,8 +341,42 @@ func writeDebianGbpConf(dir string, dep14, pristineTar bool) error { | |
fmt.Fprintf(f, "dist = DEP14\n") | ||
} | ||
if pristineTar { | ||
fmt.Fprintf(f, "pristine-tar = True\n") | ||
} | ||
fmt.Fprintf(f, ` | ||
# Enable pristine-tar to exactly reproduce orig tarballs | ||
pristine-tar = True | ||
|
||
`) | ||
} | ||
|
||
// Additional text to the template which is useful for 99% of the go packages | ||
fmt.Fprint(f, ` | ||
# Lax requirement to use branch name 'debian/latest' so that git-buildpackage | ||
# will always build using the currently checked out branch as the Debian branch. | ||
# This makes it easier for contributors to work with feature and bugfix | ||
# branches. | ||
ignore-branch = True | ||
|
||
# The Debian packaging git repository may also host actual upstream tags and | ||
# branches, typically named 'main' or 'master'. Configure the upstream tag | ||
# format below, so that 'gbp import-orig' will run correctly, and link tarball | ||
# import branch ('upstream/latest') with the equivalent upstream release tag, | ||
# showing a complete audit trail of what upstream released and what was imported | ||
# into Debian. | ||
# | ||
# TODO: Most Go packages have tags of form 'v1.0.0', but must be double-checked. | ||
upstream-vcs-tag = v%(version%~%-)s | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Otherwise I think this change is fine, but given that I don't think it might be universally followed by upstreams, maybe it should be marked with a FIXME, and/or commented out by default. I'd end the last sentence with a dot though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Maybe also this line should be commented if we detect that there are no tags yet (the same way it is done in the watch file). |
||
|
||
# If upstream publishes tarball signatures, git-buildpackage will by default | ||
# import and use the them. Change this to 'on' to make 'gbp import-orig' abort | ||
# if the signature is not found or is not valid. | ||
# | ||
# Most Go packages don't publish signatures for the tarball releases, so this is | ||
# not enabled by default. | ||
#upstream-signatures = on | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is a good change, and commenting it out by default seems like the safest option, indeed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For full benefits of signature checking we also need to use pristine-tar that allows bit-for-bit identical tarballs and thus signature checking for tracing the source code supply-chain. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Err, no. The tarball does not need to be stored in pristine-tar at all for the signatures to be useful. The tarball along their signatures are going to be stored in the archive, tied with the uploader signature and handed over to the archive signatures later on, there's full traceability of all this in place already. |
||
|
||
# Ensure the Debian maintainer signs git tags automatically. | ||
sign-tags = True | ||
ottok marked this conversation as resolved.
Show resolved
Hide resolved
|
||
`) | ||
return nil | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also goes against the current team workflow, and tries to sneak it in and encourage using
debian/latest
which I've already argued (see debian-devel for example), is a bad default in the Debian context. Introducing yet a different workflow in the team when we should be consolidating on the existing one, would make working on the go packages more painful.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
ignore-branch = True
is simply a flag to make it easier to build branches with various names, for example using namebugfix/123456-arm64-build-error
. It has nothing to do withdebian/latest
. It is very common for people to use multiple different branch names for bugfixes and features, and submit those branches as Merge Requests on Salsa. Once merged, the branch can be deleted.