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

Bruno Pagani bruno.n.pagani at gmail.com
Thu May 31 20:57:08 UTC 2018

Le 31/05/2018 à 22:00, J. Konrad Tegtmeier-Rottach via aur-general a écrit :

> Hi,
> 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?

Whether a deleted file should count as a modified one for this regard, I
don’t know but I would say so. Will leave that to pacman devs.

However, as a workaround you should rather use NoExtract than NoUpgrade.
Unless you actually want to see the new example file of course.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20180531/8d0c4bbd/attachment.asc>

More information about the aur-general mailing list