Skip to content

Debian package: conffile and example configurations are installed under /etc #25856

Description

@koen-serry

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

Summary

The Debian package appears to have two packaging issues:

  1. /etc/vector/vector.yaml is not marked as a Debian conffile, causing locally modified configurations to be overwritten during upgrades.
  2. Example configuration files are installed under /etc/vector/examples/ and marked as conffiles, even though they appear to be documentation rather than administrator-managed configuration.

Version

  • Vector: 0.57.0-1
  • Installation method: Official .deb package
  • Distribution: Ubuntu
  • Upgrade performed with:
sudo dpkg -i vector.deb

Issue 1: /etc/vector/vector.yaml is not a conffile

During an upgrade, my locally modified /etc/vector/vector.yaml was overwritten.

Inspecting the package metadata shows that vector.yaml is not listed as a Debian conffile:

$ cat control/conffiles
/etc/default/vector
/etc/vector/examples/docs_example.yaml
/etc/vector/examples/environment_variables.yaml
/etc/vector/examples/es_s3_hybrid.yaml
/etc/vector/examples/file_to_cloudwatch_metrics.yaml
/etc/vector/examples/file_to_prometheus.yaml
/etc/vector/examples/http_sink_custom_retry.yaml
/etc/vector/examples/prometheus_to_console.yaml
/etc/vector/examples/stdio.yaml
/etc/vector/examples/varint_framing_protobuf.yaml
/etc/vector/examples/wrapped_json.yaml

Since /etc/vector/vector.yaml is absent from DEBIAN/conffiles, dpkg treats it as a regular packaged file and replaces it during upgrades instead of preserving local modifications.

I believe this is a regression related to #18718.

Issue 2: Example configuration files under /etc

The package installs example configurations under /etc/vector/examples/ and marks them as conffiles.

From a Debian packaging perspective, these files seem more appropriate under a location such as:

  • /usr/share/doc/vector/examples/, or
  • /usr/share/vector/examples/

The /etc hierarchy is intended for host-specific administrator-managed configuration, while example files are static documentation/resources.

Currently the package preserves the example configuration files as conffiles but does not preserve the primary configuration file (/etc/vector/vector.yaml), which seems backwards.

Expected behavior

  • /etc/vector/vector.yaml should be listed as a Debian conffile so local modifications are preserved across upgrades.
  • Example configuration files should be installed under /usr/share/doc/vector/examples/ (or another appropriate location under /usr/share) instead of /etc, unless there is a specific reason for treating them as administrator-managed configuration.

Configuration


Version

0.57.0-1

Debug Output


Example Data

No response

Additional Context

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions