Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7bc4e40
fix(debian): preserve vector.yaml as a conffile
koen-serry Jul 17, 2026
2d71eb2
Merge branch 'master' into fix-debian-conffiles
koen-serry Jul 17, 2026
985902b
fix(debian): preserve pre-existing vector.yaml when it becomes a conf…
koen-serry Jul 20, 2026
a1bc7cb
Merge branch 'master' into fix-debian-conffiles
koen-serry Jul 20, 2026
80f61b8
fix(debian): add rm_conffile transitions for /etc/vector/examples/*.yaml
thomasqueirozb Jul 22, 2026
657e319
fix(debian): use 0.57.0-1 as rm_conffile prior-version
thomasqueirozb Jul 22, 2026
bbd27f3
fix(debian): treat obsolete vector.yaml conffile entry as untracked
thomasqueirozb Jul 22, 2026
0c54b36
Merge branch 'master' into fix-debian-conffiles
pront Jul 29, 2026
621d6e9
Merge branch 'master' into fix-debian-conffiles
koen-serry Aug 22, 2026
8ec1d43
fix(debian): complete conffile transitions in postrm and guard foreig…
koen-serry Sep 21, 2026
ce5c026
Merge branch 'master' of https://github.com/vectordotdev/vector into …
koen-serry Sep 21, 2026
d99827a
chore(changelog): add missing trailing newline to fragment
koen-serry Sep 21, 2026
72c871a
fix(debian): preserve obsolete configs and migrate recent examples
pront Sep 22, 2026
1b4bf55
Merge branch 'master' into fix-debian-conffiles
koen-serry Sep 22, 2026
5cc4668
Merge branch 'master' of https://github.com/vectordotdev/vector into …
koen-serry Sep 23, 2026
675b0f7
chore(changelog): separate authors line from fragment body
koen-serry Oct 1, 2026
82180de
Merge remote-tracking branch 'upstream/master' into fix-debian-conffiles
koen-serry Oct 3, 2026
7a02b19
Merge remote-tracking branch 'upstream/master' into fix-debian-conffiles
koen-serry Oct 8, 2026
77eb212
fix(debian): split out the vector.yaml conffile change
koen-serry Oct 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ conf-files = ["/etc/default/vector"]
assets = [
["target/release/vector", "/usr/bin/", "755"],
["config/vector.yaml", "/usr/share/vector/examples/vector.yaml", "644"],
["config/examples/*", "/etc/vector/examples/", "644"],
["config/examples/*", "/usr/share/doc/vector/examples/", "644"],
Comment thread
thomasqueirozb marked this conversation as resolved.
["distribution/systemd/vector.service", "/lib/systemd/system/vector.service", "644"],
["distribution/systemd/vector.default", "/etc/default/vector", "600"],
["licenses/*", "/usr/share/vector/licenses/", "644"],
Expand Down
13 changes: 13 additions & 0 deletions changelog.d/deb_examples_relocation.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Debian example configurations moved out of /etc/vector {#deb-examples-relocation}

## Summary

The Debian package now installs its example configurations to `/usr/share/doc/vector/examples/` instead of `/etc/vector/examples/`. Examples are documentation rather than administrator-managed configuration, so `/etc` was the wrong location for them.

## Migration

No action is required for most users. The examples are not read by Vector; they are reference material only, and the new copies are installed automatically on upgrade.

Because the old paths were dpkg conffiles, the upgrade removes unmodified copies from `/etc/vector/examples/` and leaves any file you edited in place, so local changes are never discarded silently. If you edited an example and want to keep it, move it somewhere outside `/etc/vector/examples/`; if you referenced one from your own configuration with a path under `/etc/vector/examples/`, update that path to `/usr/share/doc/vector/examples/`.

authors: koenserry
23 changes: 23 additions & 0 deletions distribution/debian/scripts/postinst
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
#!/bin/sh
set -e

# Complete the rm_conffile transition started in preinst; see preinst for context.
for _example_conffile in \
docs_example.yaml \
environment_variables.yaml \
es_s3_hybrid.yaml \
file_to_cloudwatch_metrics.yaml \
file_to_prometheus.yaml \
http_sink_custom_retry.yaml \
prometheus_to_console.yaml \
stdio.yaml \
varint_framing_protobuf.yaml \
wrapped_json.yaml \
namespacing/sinks/es_cluster.yaml \
namespacing/sinks/s3_archives.yaml \
namespacing/sources/apache_logs.yaml \
namespacing/transforms/apache_parser.yaml \
namespacing/transforms/apache_sample.yaml \
namespacing/vector.yaml
do
dpkg-maintscript-helper rm_conffile \
"/etc/vector/examples/$_example_conffile" 0.59.0-1~ vector -- "$@"
done

# Add Vector to adm group to read /var/logs
usermod --append --groups adm vector || true

Expand Down
30 changes: 30 additions & 0 deletions distribution/debian/scripts/postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh
set -e

# Complete the rm_conffile transition started in preinst; see preinst for
# context. dpkg-maintscript-helper requires rm_conffile to be called from
# preinst, postinst *and* postrm so that aborted upgrades restore the files
# it moved aside and purges clean up its backups.
for _example_conffile in \
docs_example.yaml \
environment_variables.yaml \
es_s3_hybrid.yaml \
file_to_cloudwatch_metrics.yaml \
file_to_prometheus.yaml \
http_sink_custom_retry.yaml \
prometheus_to_console.yaml \
stdio.yaml \
varint_framing_protobuf.yaml \
wrapped_json.yaml \
namespacing/sinks/es_cluster.yaml \
namespacing/sinks/s3_archives.yaml \
namespacing/sources/apache_logs.yaml \
namespacing/transforms/apache_parser.yaml \
namespacing/transforms/apache_sample.yaml \
namespacing/vector.yaml
do
dpkg-maintscript-helper rm_conffile \
"/etc/vector/examples/$_example_conffile" 0.59.0-1~ vector -- "$@"
done

#DEBHELPER#
24 changes: 24 additions & 0 deletions distribution/debian/scripts/preinst
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
#!/bin/sh
set -e

# /etc/vector/examples/*.yaml move to /usr/share/doc/vector/examples/ in
# v0.59.0. Remove unmodified copies from earlier versions on upgrade.
for _example_conffile in \
docs_example.yaml \
environment_variables.yaml \
es_s3_hybrid.yaml \
file_to_cloudwatch_metrics.yaml \
file_to_prometheus.yaml \
http_sink_custom_retry.yaml \
prometheus_to_console.yaml \
stdio.yaml \
varint_framing_protobuf.yaml \
wrapped_json.yaml \
namespacing/sinks/es_cluster.yaml \
namespacing/sinks/s3_archives.yaml \
namespacing/sources/apache_logs.yaml \
namespacing/transforms/apache_parser.yaml \
namespacing/transforms/apache_sample.yaml \
namespacing/vector.yaml
do
dpkg-maintscript-helper rm_conffile \
"/etc/vector/examples/$_example_conffile" 0.59.0-1~ vector -- "$@"
done

# Add vector:vector user & group
id --user vector >/dev/null 2>&1 || \
useradd --system --shell /sbin/nologin --home-dir /var/lib/vector --user-group \
Expand Down
6 changes: 6 additions & 0 deletions scripts/verify-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ vector --version || (echo "vector --version failed" && exit 1)
test -f /etc/default/vector || (echo "/etc/default/vector doesn't exist" && exit 1)
test ! -e /etc/vector/vector.yaml || (echo "/etc/vector/vector.yaml should not be installed by default" && exit 1)
test -f /usr/share/vector/examples/vector.yaml || (echo "/usr/share/vector/examples/vector.yaml doesn't exist" && exit 1)
case "$package" in
*.deb)
test ! -d /etc/vector/examples || (echo "examples should not be installed under /etc/vector/examples" && exit 1)
test -f /usr/share/doc/vector/examples/stdio.yaml || (echo "/usr/share/doc/vector/examples/ examples missing" && exit 1)
;;
esac

mkdir -p /etc/vector
echo "FOO=bar" > /etc/default/vector
Expand Down
Loading