[aur-general] upgrade of "conf.d/*.conf"-style packages containing example configs

J. Konrad Tegtmeier-Rottach jktr at mail.uni-paderborn.de
Thu May 31 20:00:46 UTC 2018


I've run into a general issue with software packages that use a
configuration directory, aggregate configs therein using a glob rule
on the filenames, and contain an example config.

An example is `community/consul`, which
  - globs for `/etc/consul.d/*.{hcl,json}`
  - contains `/etc/consul.d/example.json`

When I configure these types of software first I delete the example
file, and then place additional configs in that directory, with
everything working as expected.

Then an upgrade for that package rolls around, and the example config
is recreated. This usually means that as soon as the software reloads,
the recreated example config gets loaded, too, and the software tends
to fail or behave in byzantine ways.

After consulting the wiki about this [0], I had assumed that this is
the "original = X, current = Y, new = X" case and the example config
shouldn't be recreated, but it seems deletion isn't handled the same
as modification here. (.pacnew files aren't an issue since the glob
rule is in place)

What is the proper way to deal with these example configs?
Truncate them to force the XYX upgrade case, which seems hacky?
Set `NoUpgrade` [1] in the PKGBUILD, assuming this is applicable here?

I ask this here because my `aur/nomad-bin` package has this exact problem.


[0] https://wiki.archlinux.org/index.php/Pacman/Pacnew_and_Pacsave#.pacnew
[1] https://wiki.archlinux.org/index.php/Pacman#Skip_file_from_being_upgraded
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20180531/a1810636/attachment.asc>

More information about the aur-general mailing list