Issue #10: Add distro packaging (deb/rpm/apk/Arch) #61
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
keyop-go/nfq_forwarder!61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue10_add_packaging"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #10.
Fixes and completes the previously partial/broken
nfpms:block in.goreleaser.yaml:bindir(/usr/sbin->/usr/local/bin, matching every other hardcoded path in the Makefile/service file)descriptionapkandarchlinuxformats alongside the existingdeb/rpm(per the issue's "anything goreleaser can handle should be handled" - Nix is out of scope, nfpm has no Nix output at all)contents:to actually ship the bundlediptablesbinary, the systemd unit, sample config, and the web UI's PAM fileCapabilities are granted via a new postinstall scriptlet (
scripts/nfpm-postinstall.sh) run against the installed paths, not baked in at build time - nfpm has no native capability field, and capabilities are xattrs that don't reliably survive archive-based packaging.setcap's own package is declared as a runtime dependency per format. The build-timesudo setcaphooks are dropped as redundant (and to remove goreleaser's only dependency onsudo).nfq_forwarder.serviceandconfig.example.yamlmove into a newdocs/directory alongside a new packaging-focused README, all shipped as inert reference copies under/usr/share/doc/nfq_forwarder/- packages never touch systemd themselves, matching this project's--user-service design.nfq_forwarder.pamis the one file that does install to a live path (/etc/pam.d/nfq_forwarder), since it's dormant until actively used.Adds a
make packagetarget and fixes CI's mislabeled "build" job (previously just re-ranmake lint) to actually build and package, uploading the produced packages as job artifacts.Verified locally
go build ./...,make lint(golangci-lint + yamllint) cleanmake packagesucceeds withoutsudo, producing.deb/.rpm/.apk/.pkg.tar.zstdpkg-deb,rpm -qlp/--scripts) - correct destinations, correctlibcap2-bin/libcapdependency declared, postinstall script matches exactly (nosystemctlcalls anywhere)Still needs real-host verification (can't be done in this sandbox - see CLAUDE.md's Known issues)
.deb/.rpmon real Debian/RHEL hosts and confirmingsetcap -vshows both capability grants post-install.apk/Arch packages on real Alpine/Arch hosts, including confirming the exactlibcappackage name resolves on eachiptablespackage addition is sufficient formake packageto succeed in real GitLab CIapproved this merge request
added 1 commit
79a66053- Add tag-triggered GitLab release publishingCompare with previous version
added 1 commit
37d6d038- Fix GitLab release 404: don't use_job_token with a real access tokenCompare with previous version
mentioned in commit
b792f81ce2mentioned in issue #10
mentioned in commit
73a504ae43