Repository navigation
Merge the packaging, Docker and CI PRs from jwarnier onto 2.1.0 - #401
Merged
Merged
Conversation
Packages installed heplify to /usr/local/bin (nfpm.yaml) or /usr/bin (.goreleaser.yml). Use /usr/bin everywhere for packages and update the shipped systemd unit and init script. .goreleaser.yml referenced heplify.json/example.lua at the repo root instead of examples/, and did not ship the service files like nfpm.yaml. Also make /etc/init.d/heplify executable (0755). Fixes #364 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add postinstall/preremove/postremove scripts shared by the deb and rpm (nfpm and .goreleaser.yml): create the heplify system user, restrict heplify.json to root:heplify 0640, daemon-reload and try-restart on upgrade, stop and disable on removal, drop /var/lib/heplify on purge. Run the service as heplify with only CAP_NET_RAW and CAP_NET_ADMIN, sandbox it, use StateDirectory as working directory and order it after network-online.target. Fixes #366 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…se file Default DEBIAN_RELEASE to trixie (still overridable; libpcap0.8t64 with fallback to libpcap0.8). Run as the unprivileged heplify user with CAP_NET_RAW and CAP_NET_ADMIN as file capabilities. Add .dockerignore, BuildKit cache mounts and OCI labels. Replace docker/docker-compose.yml, which mounted a non-existent config directory, with docker/compose.yaml for 'docker compose'. Build the image for trixie and bookworm in CI. Fixes #368 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The formula was stuck at 2.0.17 and had no url on unsupported platforms. Bump it to 2.0.28, add depends_on arch/macos and a livecheck block, use a literal download URL, and add scripts/update_formula.sh to refresh the URL and sha256 from a release. Fixes #370 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Create the heplify home/state directory (0750) at install time instead of only when the service first starts. StateDirectory= stays in the unit (needed by ProtectSystem=strict) with StateDirectoryMode=0750. Refs #366 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Fixes #372 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Resolve and validate the version once and pass it through env instead of interpolating the tag into shell scripts. Tag the Docker image latest only for stable versions, honor the workflow_dispatch release input, drop the redundant release:published trigger, use least-privilege permissions per job and publish SHA256SUMS with the release assets. Pass the architecture to nfpm through ARCH instead of patching nfpm.yaml with sed. Fixes #374 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Fixes #376 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
/etc/systemd/system is reserved for local administration and takes precedence over vendor units. Install the packaged unit to /usr/lib/systemd/system (deb and rpm) and document drop-ins for local changes. Upgrading from earlier packages removes the old file. Refs #366 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs #366 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs #372 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Pin every action in ci.yml and release.yml to the commit of its current major tag (pinact), keeping the exact version in a comment. Dependabot (github-actions ecosystem) updates both the SHA and the comment. Refs #376 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add scripts/check_package.sh (contents/modes/owners, lintian, rpmlint, systemd-analyze verify, shellcheck) and a Package check workflow that builds the packages like the release and runs it. Known lintian and rpmlint findings are listed in scripts/package/ so only new errors fail. Fixes #381 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Describe the drop-ins for ReadWritePaths, ports below 1024 (CAP_NET_BIND_SERVICE) and files readable by the heplify user in the README package section, and add a privileged-ports note to the collector documentation. Refs #372 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add a homebrew job that runs scripts/update_formula.sh against the published darwin asset and pushes the updated formula to the default branch. Skipped on forks, pre-releases and versions not newer than the formula. The tag is validated as a plain stable version before use. Fixes #378 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…libc
Build the binary for the deb on Debian 12 (builder stage of the
Dockerfile) and link libc and libpcap dynamically, with
Depends: libc6 (>= 2.34), libpcap0.8 (>= 1.5.1). The build checks that
only those libraries are needed and that the declared libc floor covers
the symbols used. The rpm and the release binaries stay static.
nfpm.yaml takes the binary from ${BINARY} so one config builds both.
Fixes #383
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs #372 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Move every action to its latest release (pinact -u), pinned by commit SHA with the version in a comment: checkout v7.0.1, setup-go v7.0.0, cache v6.1.0, upload-artifact v7.0.2, download-artifact v8.0.2, docker/setup-buildx v4.4.1, docker/login v4.7.0, docker/build-push v7.4.0, softprops/action-gh-release v3.0.3. golangci-lint-action stays at v9.3.0 (already the latest). Refs #376 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Includes #365 and #367. Conflicts with 2.1.0 resolved: the unit runs as homer:homer (created by postinstall), keeps the 2.1.0 hardening (NET_BIND_SERVICE, syscall filter, MemoryDenyWriteExecute, LogsDirectory) and the packaging paths from #365. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgFoiWV1AwDuFaBTkenHNr
Conflicts with 2.1.0 resolved: the image runs as homer:homer with the NET_RAW/NET_BIND_SERVICE file capabilities from 2.1.0 (both in Docker's default set, so the binary also starts without cap_add), Go 1.26, and the CI image job also checks a default-capability start and the user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgFoiWV1AwDuFaBTkenHNr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgFoiWV1AwDuFaBTkenHNr
Adapted to the homer:homer user and to CAP_NET_BIND_SERVICE being granted by the unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgFoiWV1AwDuFaBTkenHNr
…kflow hardening) nfpm keeps the /usr/bin path and maintainer scripts from #365/#367 with the per-package binary from #384; the package check builds with the latest Go 1.26 patch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgFoiWV1AwDuFaBTkenHNr
Kept the Docker ecosystem from 2.1.0 in dependabot.yml and pinned the actions added in 2.1.0 (fuzz, security, package check) to the same SHAs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgFoiWV1AwDuFaBTkenHNr
The libpcap/linkage docs from #400 now reflect the dynamically linked .deb from #384; the README no longer says ports below 1024 need a drop-in (the unit grants CAP_NET_BIND_SERVICE). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgFoiWV1AwDuFaBTkenHNr
|
|
jwarnier
pushed a commit
to jwarnier/heplify
that referenced
this pull request
Nov 7, 2026
Its last commit (document local drop-ins in the unit header) is already in master in adapted form via sipcapture#401 (homer user, CAP_NET_BIND_SERVICE granted), so this records the merge without changing files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgFoiWV1AwDuFaBTkenHNr
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.
Requested by Alex · project thread
Summary
This PR brings in the nine open PRs from @jwarnier. All of them conflicted with master after 2.1.0. Each one is merged with a merge commit, so their commits and authorship are kept, and the conflicts are resolved in those merge commits:
.deb.Merging this with a merge commit (not squash) should mark those PRs as merged.
How conflicts with 2.1.0 were resolved
User:
homer:homereverywhere, following Run heplify as homer:homer in Docker and systemd #399.postinstallcreateshomer, or reuses an existing one.User=homer/Group=homer, withoutDynamicUser, since the package now creates the user.root:homerwith mode 0640.systemd unit: feat(packaging): maintainer scripts, dedicated user and hardened unit #367's header,
/usr/binpath and layout, plus the 2.1.0 hardening:CAP_NET_BIND_SERVICE;EPERM;MemoryDenyWriteExecute;UMask;LogsDirectory.The README and COLLECTOR docs no longer say that ports below 1024 need a drop-in.
Docker: feat(docker): default to Debian trixie, non-root image, working compose file #369's trixie base, cache mounts, OCI labels and
libpcap0.8t64fallback, with the 2.1.0 choices on top:NET_RAWandNET_BIND_SERVICE. Both are in Docker's default set, so the binary also starts withoutcap_add. Promiscuous mode still needs--user root --cap-add NET_ADMIN.The CI image job now also runs the image with default capabilities and checks that it runs as
homer.nfpm: the
/usr/binpath and maintainer scripts from fix(packaging): install binary to /usr/bin and repair .goreleaser.yml #365/feat(packaging): maintainer scripts, dedicated user and hardened unit #367, combined with the per-package${BINARY}from feat(deb): ship a dynamically linked binary using system libpcap and libc #384.Actions: pinned to the SHAs from ci: enable Dependabot updates and pin GitHub Actions by SHA #377, and the jobs added in 2.1.0 (fuzz, security, package check) are pinned to the same SHAs. The package check uses Go 1.26.x.
dependabot.ymlkeeps the Docker ecosystem from 2.1.0.Docs from feat(version): show libpcap version and linkage; document build matrix and NSS limit #400: the linkage table now shows the dynamically linked
.deb.Test plan
go build ./...,go vet ./...andgo test ./...pass. There are no Go changes beyond master.systemd-analyze verify examples/heplify.serviceis clean, apart from the missing binary in the sandbox.Generated by Claude Code