Try out goreleaser for creating packages for dnst and dnst-ldnsutils#169
Draft
mozzieongit wants to merge 10 commits intomainfrom
Draft
Try out goreleaser for creating packages for dnst and dnst-ldnsutils#169mozzieongit wants to merge 10 commits intomainfrom
mozzieongit wants to merge 10 commits intomainfrom
Conversation
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.
In our effort to move to a new release process I tried out goreleaser, which works quite well. We can build packages (incl. meta packages like dnst-ldnsutils), cross-compile for different architectures (limited to this list, but includes the usual targets and covers our needs), sign using gpg (which also allows us to use smart cards for signing).
Here is a successful attempt of using Goreleaser to create packages for dnst (and dnst-ldnsutils).
The
pkg/generate-man-pages.shscript usesuvto setup the python environment quickly and builds the man pages for packaging.Run goreleaser:
goreleaser release --clean --snapshot(optionally with--verbose)For testing a release locally (without the requirement for the current commit to be tagged and a clean worktree) you can use the
--snapshotflag for goreleaser.Files generated by goreleaser (without
--snapshot, with--snapshotwould insertSNAPSHOT-commitinto the version):Docker images would be automatically published, but as I'm only testing, they
get added to my docker image store:
Notable differences:
Dependencies:
With Goreleaser we have to specify the dependencies manually.
cargo-generate-rpmgenerates them automatically using/usr/lib/rpm/find-requires, which usesrpmdepsand its internal dependency generator.cargo-debgenerates them usingdpkg-shlibdeps.Dependencies generated vs manual
Generated for RPM:
Manual:
Generated for DEB: