Skip to content

fix(packaging): use sysconfig environment file in RPMs (#26076) - #26121

Open
inflatador wants to merge 2 commits into
vectordotdev:masterfrom
inflatador:codex/fix-rpm-environment-file
Open

fix(packaging): use sysconfig environment file in RPMs (#26076)#26121
inflatador wants to merge 2 commits into
vectordotdev:masterfrom
inflatador:codex/fix-rpm-environment-file

Conversation

@inflatador

Copy link
Copy Markdown

In RHEL-based Linux distros, service specific environment variable files typically live in /etc/sysconfig (as opposed to /etc/default in Debian).

Vector's RPM currently uses the Debian path in its systemd unit file, which can lead to config not being loaded properly. Avoid this by switching to the RHEL convention.

References

Closes: #26076

Vector configuration

N/A

How did you test this PR?

  1. Install the RPM on a RHEL-based OS (I used Fedora 44)
  2. Copy /etc/default/vector to /etc/sysconfig/vector
  3. Create a systemd override at /etc/systemd/system/vector.service.d/vector-envvars.conf with the following content:
[Service]
EnvironmentFile=-
EnvironmentFile=-/etc/sysconfig/vector

4)Reload systemd systemctl daemon-reload
5) Restart the vector server systemctl restart vector.service
6) Verify the service starts cleanly systemctl status vector.service
7)Verify the service is using your override systemctl cat vector.service

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

Y

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

…26076)

In RHEL-based Linux distros, service specific environment variable files
typically live in /etc/sysconfig (as opposed to /etc/default in Debian).

Vector's RPM currently uses the Debian path in its systemd unit file,
which can lead to config not being loaded properly. Avoid this
by switching to the RHEL convention.
@inflatador
inflatador requested a review from a team as a code owner August 15, 2026 15:46
@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot added the domain: releasing Anything related to releasing Vector label Aug 15, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0411cef8ea

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread distribution/rpm/vector.spec
Comment thread distribution/rpm/vector.spec
@inflatador

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: releasing Anything related to releasing Vector

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RPM package uses Debian environment file paths in systemd unit file

1 participant