<div dir="ltr"><div dir="ltr">Hi Michael,<div>  I had a look at the systemd source code.  My aim is to make sure the procps sysctl and the systemd sysctl behave the same way. The first problem is we have a different order of things (/etc vs /run) so I looked at the manual page first. </div><div><br></div><div>It looks like a lot of systemd programs have a standard set of directories they check[1] which is different from what sysctl uses[2]. However, the manual page implies there are two groups of directories and some override others. From what I can see from the configuration file handling of systemd[3] there is no "special" set and it is a matter of what directory comes first. In other words, /usr/local/lib overrides /usr/lib (or /lib depending) but the manual page doesn't say that.</div><div><br></div><div>I must admit I'm not too familiar with the systemd code, but that's how I read it.</div><div><br></div><div>If that's the case, then I think there are three problems here:</div><div>* The systemd sysctl.d.6 man page is incorrect and really each previous directory can override any directory after it (this bug #950788)</div><div>* procps sysctl config files shipped by Debian should be in /usr/lib (procps bug #915797)</div><div>* procps sysctl should swap the order of /etc and /run so /etc comes first and overrides things in /run like systemd sysctl does.</div><div><br></div><div>Does that seem right to you? I'll make the necessary changes in procps if so.</div><div><br></div><div> - Craig</div><div><br></div><div>1: <a href="https://salsa.debian.org/systemd-team/systemd/blob/debian/master/src/basic/def.h#L44">https://salsa.debian.org/systemd-team/systemd/blob/debian/master/src/basic/def.h#L44</a></div><div>2: <a href="https://salsa.debian.org/debian/procps/blob/master/sysctl.c#L624">https://salsa.debian.org/debian/procps/blob/master/sysctl.c#L624</a></div><div>3: <a href="https://salsa.debian.org/systemd-team/systemd/blob/debian/master/src/basic/conf-files.c#L23">https://salsa.debian.org/systemd-team/systemd/blob/debian/master/src/basic/conf-files.c#L23</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 6 Feb 2020 at 23:15, Michael Biebl <<a href="mailto:biebl@debian.org">biebl@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Craig<br>
<br>
Am 06.02.20 um 12:31 schrieb Craig Small:<br>
> Package: systemd<br>
> Version: 244-3<br>
> Severity: minor<br>
> File: /usr/share/man/man5/sysctl.d.5.gz<br>
> <br>
> The sysctl.d.5 man page says this:<br>
> <br>
>       Configuration files are read from directories in /etc/, /run/, /usr/local/lib/, and /lib/, in order of precedence. Each configuration file in these configuration directories shall be named in the<br>
>       style of filename.conf. Files in /etc/ override files with the same name in /run/, /usr/local/lib/, and /lib/. Files in /run/ override files with the same name under /usr/.<br>
> <br>
> OK, so we have 4 directories.<br>
> Anything in /etc overrides anything in the other 3.<br>
> <br>
> But files in /run? They override.. /usr?<br>
> Is this supposed to mean /usr/local/lib?<br>
> Does that mean /run does NOT override files in /lib ?<br>
> <br>
> I think the man page used to say /usr/local/lib and /usr/lib and it was<br>
> (badly) saying both directories under /usr<br>
> <br>
> Maybe.. I'm not really sure what way to interpret this.<br>
<br>
I suppose this is a result of<br>
<a href="https://salsa.debian.org/systemd-team/systemd/blob/debian/master/debian/rules#L200" rel="noreferrer" target="_blank">https://salsa.debian.org/systemd-team/systemd/blob/debian/master/debian/rules#L200</a><br>
doing some incorrect replacements.<br>
<br>
Replace /lib with /usr/lib and it will make more sense, I guess.<br>
<br>
I guess we have to fine-tune the sed expression.<br>
<br>
<br>
<br>
</blockquote></div></div>