Skip to content

fix(packaging): avoid duplicate Debian systemd unit paths - #26837

Open
pront wants to merge 1 commit into
masterfrom
pront-fix-debian-systemd-unit
Open

pront wants to merge 1 commit into
masterfrom
pront-fix-debian-systemd-unit

Conversation

@pront

@pront pront commented Oct 23, 2026

Copy link
Copy Markdown
Member

Summary

After #26830 upgraded cargo-deb, Debian packages contain vector.service at both /lib/systemd/system/ and /usr/lib/systemd/system/: our explicit asset retains the old path while cargo-deb automatically adds the new one. On Debian 13, where /lib is a symlink to /usr/lib, upgrading from 0.60.0 fails with unable to open '/usr/lib/systemd/system/vector.service.dpkg-new': No such file or directory and leaves the service missing.

Remove the redundant explicit asset. The existing systemd-units configuration packages the service once at /usr/lib/systemd/system/vector.service.

References

Follow-up to #26830; related to #26812.

Vector configuration

Service startup and running-service upgrades used:

sources:
  metrics:
    type: internal_metrics
sinks:
  discard:
    type: blackhole
    inputs: [metrics]

How did you test this PR?

  • On a disposable Debian 13 amd64 EC2 instance with unattended-upgrades 2.12, reproduced the original 0.59.0-to-0.60.0 false conffile warning and confirmed direct dpkg installation succeeds. The pin-only candidate failed installation in all four tested config states.
  • With this fix, upgrades from 0.60.0 passed for pristine configs, modified defaults, deleted defaults, and a deleted example config. Each case checked conffile preservation, real Vector service startup, and purge cleanup.
  • Full unattended-upgrades runs against a local APT repository installed the fixed candidate with modified or deleted defaults and preserved local state. A deliberately changed packaged default correctly held the upgrade back for a genuine conffile conflict.
  • Fresh installation, reinstallation, and an upgrade with Vector already running passed; the running-service upgrade restarted Vector and preserved its customized YAML configuration.

Tests used the published Vector 0.60.0 executable repackaged as 0.61.0-1 with cargo-deb 3.6.2 and Debian metadata matching this branch. This validates packaging and service lifecycle; a fresh Vector build and other architectures/distributions were not tested. Cargo manifest parsing and diff checks passed.

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

@pront
pront requested a review from a team as a code owner October 23, 2026 21:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T21:52:14.701228Z 1642a30 PR opened
🔒 Security Review ✅ Completed 2026-10-23T21:52:18.080570Z 1642a30 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadoghq-integration datadoghq-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The retained systemd-units configuration supplies vector.service independently of the removed explicit asset, preserving service packaging while eliminating the duplicate path.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 1642a30

This branch has not been deployed

No deployments
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.

1 participant