Skip to content

Merge the packaging, Docker and CI PRs from jwarnier onto 2.1.0 - #401

Merged
adubovikov merged 29 commits into
masterfrom
claude/project-thread-3cj3kl
Nov 6, 2026
Merged

adubovikov merged 29 commits into
masterfrom
claude/project-thread-3cj3kl

Conversation

@adubovikov

Copy link
Copy Markdown
Member

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:

Merging this with a merge commit (not squash) should mark those PRs as merged.

How conflicts with 2.1.0 were resolved

Test plan

  • go build ./..., go vet ./... and go test ./... pass. There are no Go changes beyond master.
  • systemd-analyze verify examples/heplify.service is clean, apart from the missing binary in the sandbox.
  • All workflow files parse as YAML.
  • I couldn't check the pinned action SHAs from the sandbox. CI on this PR exercises them.

Generated by Claude Code

jwarnier and others added 29 commits October 29, 2026 11:42
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>
checkout v7.0.1, setup-go v7.0.0, cache v6.1.0 (same pins as #377).

Refs #381

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Pinned by SHA, v7.0.1 (same pin as #377).

Refs #368

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ew job

Pinned by SHA, v7.0.1 (same pin as #377).

Refs #378

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
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ jwarnier
❌ claude
You have signed the CLA already but the status is still pending? Let us recheck it.

@adubovikov adubovikov self-assigned this Nov 6, 2026
@adubovikov
adubovikov merged commit 2bad808 into master Nov 6, 2026
11 of 12 checks passed
@adubovikov
adubovikov deleted the claude/project-thread-3cj3kl branch November 6, 2026 20:22
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants