[aur-dev][PATCH] config: allow reading both the proto file and the modified config
lfleischer at archlinux.org
Sat Apr 14 14:04:58 UTC 2018
On Thu, 12 Apr 2018 at 19:44:15, Eli Schwartz wrote:
> This change allows aurweb configuration to be done via either:
> - copying config.proto to config and modifying values
> - creating a new config only containing modified values, next to a
> config.proto containing unmodified values
> The motivation for this change is to enable ansible configuration by
> storing only changed values, and deferring to config.proto otherwise.
> If a config.proto file does not exist next to /etc/aurweb/config or
> $AUR_CONFIG, it is ignored and *all* values are expected to live in the
> modified config file.
> Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
> aurweb/config.py | 4 ++++
> web/lib/confparser.inc.php | 8 +++++++-
> 2 files changed, 11 insertions(+), 1 deletion(-)
Thanks, I like the idea. However, I think it would be better to make
both the path to the defaults file and the path to the configuration
file itself configurable (i.e. add a new environment variable
AUR_CONFIG_DEFAULTS). By default, /etc/aurweb/config.defaults and
/etc/aurweb/config could be used.
More information about the aur-dev