[pulseaudio-discuss] [PATCH v2 1/2] conf-parser: add support for .d directories
Arun Raghavan
arun at accosted.net
Mon Dec 7 01:23:31 PST 2015
On 07-Dec-2015 1:13 pm, "David Henningsson" <david.henningsson at canonical.com>
wrote:
>
>
>
> On 2015-12-04 13:46, Tanu Kaskinen wrote:
>>
>> On Fri, 2015-12-04 at 09:29 -0300, Felipe Sateler wrote:
>>>
>>> On 4 December 2015 at 02:58, Tanu Kaskinen <tanuk at iki.fi> wrote:
>>>>
>>>> + * If use_dot_d is true, then before parsing the file named by the
filename
>>>> + * argument, the function will parse all files ending with ".conf" in
>>>> + * alphabetical order from a directory whose name is filename + ".d",
if such
>>>> + * directory exists.
>>>
>>>
>>> This is opposite to how other software (eg systemd) work: first the
>>> main file is read, and then the .d/*.conf files are read to override
>>> the configurations.
>>>
>>> So if a distro default has an uncommented line, the .d should override
>>> that line. This would allow (in the future) to extend the search path
>>> to /usr/share/pulseaudio, and ship the defaults (uncommented) there.
>>> Then local configuration can be done via dropin files.
>>
>>
>> All advice given to users so far has been to modify the main files,
>> because nothing else has existed. If users put their changes to the
>> main files and distros put their changes to the .d files, that will be
>> compatible with existing advice on the internet.
>
>
> As an additional data point, I looked at pam
(/etc/security/limits.{conf|.d/*.conf}, which (if I'm reading the code
correctly) does the same as systemd, i e, /etc/security/limits.conf being
the default, and then /etc/security/limits.d/*.conf overriding that.
>
> If the config file has been given explicitly (not a problem for us now,
but would be if we ever replace default.pa with this), then the .d files
are skipped.
>
> My opinion: In the long term, I think it would be a bigger advantage to
be consistent with other common software, compared to the advantage of
being compatible with existing advice. We could also add a comment saying
this in the main .conf file.
>
> Hence we end up with the following order:
>
> /etc/pulse/daemon.conf
> /etc/pulse/daemon.d/*.conf
> ~/.config/pulse/daemon.conf
> ~/.config/pulse/daemon.d/*.conf
>
> ...current documentation states that "If the version in the user's home
> directory does not exist the global configuration file is loaded.", or
put it in another way, we skip loading the global file completely if the
user specific file is present. Is this desired behavior or should we merge
all four files in priority order?
I agree, and think we should merge rather than expect a full override.
Cheers,
Arun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20151207/c5a754c5/attachment.html>
More information about the pulseaudio-discuss
mailing list