Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8adeae6a4
ℹ️ 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".
|
recheck |
f8adeae to
2c38729
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c387292de
ℹ️ 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".
| section = "admin" | ||
| maintainer-scripts = "distribution/debian/scripts/" | ||
| conf-files = ["/etc/default/vector"] | ||
| conf-files = ["/etc/vector/vector.yaml", "/etc/default/vector"] |
There was a problem hiding this comment.
Avoid converting an unowned config directly into a conffile
For Debian installations created since 0.56, administrators were instructed to create /etc/vector/vector.yaml themselves while the package did not own that path. On upgrade, adding a different package-owned conffile at the same path makes dpkg request a conffile decision; interactive upgrades now require action, and noninteractive dpkg -i can fail on EOF unless callers explicitly supply --force-confold or --force-confnew (which dpkg --force-help documents as the options that avoid prompting). The new verification only reinstalls a version that already registered the conffile, so it does not exercise this migration. Add an upgrade-safe transition that preserves the formerly unowned file without prompting.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f3051a3c9
ℹ️ 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".
| if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then | ||
| if [ -e "$VECTOR_CONF" ] && [ ! -L "$VECTOR_CONF" ]; then | ||
| if ! dpkg-query -W -f='${Conffiles}' vector 2>/dev/null | grep -qF " $VECTOR_CONF "; then | ||
| cp -a "$VECTOR_CONF" "$VECTOR_CONF_BACKUP" |
There was a problem hiding this comment.
Move the original config aside before unpacking
On an upgrade from a post-0.56 package where an administrator created this previously untracked path, cp -a leaves the original at the new conffile destination, so dpkg still opens its conffile prompt before postinst can restore the backup. In the Debian verification workflow, the plain dpkg -i then exits on EOF in a noninteractive runner; dpkg --force-help describes confold/confnew as the options that avoid prompting. Fresh evidence after the earlier review is that this newly added copy operation does not remove the destination that triggers the prompt; move the original aside before unpacking instead, with failure-safe restoration.
Useful? React with 👍 / 👎.
| ["distribution/debian/vector.yaml", "/etc/vector/vector.yaml", "644"], | ||
| ["config/vector.yaml", "/usr/share/vector/examples/vector.yaml", "644"], | ||
| ["config/examples/*", "/etc/vector/examples/", "644"], | ||
| ["config/examples/*", "/usr/share/vector/examples/", "644"], |
There was a problem hiding this comment.
Remove the obsolete example conffiles during upgrade
For existing Debian installations, changing this asset destination does not remove the former /etc/vector/examples/* conffiles: dpkg retains them and marks them obsolete, leaving stale examples and the old directory in place indefinitely despite the migration claiming they moved. dpkg-maintscript-helper --help explicitly describes rm_conffile as removing an obsolete conffile and requiring calls from preinst, postinst, and postrm; add that transition for the previously shipped example files and exercise an actual old-package upgrade rather than only a clean install.
Useful? React with 👍 / 👎.
Summary
/etc/vector/vector.yamlas a Debian conffile using an inert placeholder configuration, preserving local edits across upgrades./etc/vector/vector.yamlto/usr/share/vector/examples/vector.yamlso fresh installs do not ship an active configuration under/etc./etc/vector/examples/to/usr/share/vector/examples/.scripts/verify-install.shwith static.debcontrol-file checks and package-specific runtime assertions.dummy_logsdoes not reappear in the shipped/etc/vector/vector.yaml.yash1262.RPM packaging is unchanged because it already uses the correct layout.
Fixes #25856.
Related to #18718.
Test plan
.debstatic checks against a built package:/etc/vector/vector.yamlis listed inDEBIAN/conffiles./etc/default/vectorremains listed as a conffile./etc/vector/examples/*files are listed as conffiles..debruntime checks:/etc/vector/vector.yamlexists at the canonical path./etc/vector/vector.yamlis inert and does not containdummy_logs./etc/vector/examples/is absent./usr/share/vector/examples/vector.yamlis present..rpmruntime checks continue to pass.config/vector.yamldirectly and are unaffected by this change.Migration
Users or scripts referencing example configurations under
/etc/vector/examples/must update those paths to/usr/share/vector/examples/.