Drop-in config file support
Hello! Apologies if this has been raised before. I couldn't see anything in the current tracker, and the link to the historical tracker in the repo description is a dead link (at least for me)
I'd like to request support for /etc/pacman.conf.d
. It would differ from the existing /etc/pacman.d
in the sense that all files in this new /etc/pacman.conf.d
directory would be treated as if they were concatenated to the end of the main /etc/pacman.conf
.
Further, I'd request that there is also support for a /usr/share/pacman.conf.d
directory, which is also merged the same way.
Such a feature would make it much easier for someone who maintains a custom repository to provide it to users. They could, for example, create a simple AUR package that drops a /usr/share/pacman/conf.d/customrepo.conf
file to add their repository. That would also make it easier for such maintainers to update their repository (relocate it to a new URL, for example).
There's prior art for this. The yum/dnf equivalent of this is /etc/yum.repos.d
, and Debian has /etc/apt/repositories
.
My personal use case is thusly: I am working on producing some images that can boot Arch Linux ARM on Qualcomm MSM8916 devices. These devices are non-standard enough (special bootloader, downstream kernel with much patch-ification) such that it's entirely likely I'll need to maintain a small set of glue packages that aren't suitable for upstreaming in perpetuity.
When I was researching this topic, I realized that the need for such a thing already clearly exists in the ecosystem. Here's a couple of examples:
-
Arch Linux ARM ships an entire copy of the
pacman.conf
which only lightly differs from upstream. - DanctNix is also doing the same.
In both cases, it would likely be more ideal if they could simply drop a file into /usr/share/pacman/conf.d
to add/redefine the appropriate repositories. In doing so, it would reduce the packaging burden, and also (hopefully) reduce the ecosystem fragmentation.