Hi Michael, 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.
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. I must admit I'm not too familiar with the systemd code, but that's how I read it. If that's the case, then I think there are three problems here: * The systemd sysctl.d.6 man page is incorrect and really each previous directory can override any directory after it (this bug #950788) * procps sysctl config files shipped by Debian should be in /usr/lib (procps bug #915797) * procps sysctl should swap the order of /etc and /run so /etc comes first and overrides things in /run like systemd sysctl does. Does that seem right to you? I'll make the necessary changes in procps if so. - Craig 1: https://salsa.debian.org/systemd-team/systemd/blob/debian/master/src/basic/def.h#L44 2: https://salsa.debian.org/debian/procps/blob/master/sysctl.c#L624 3: https://salsa.debian.org/systemd-team/systemd/blob/debian/master/src/basic/conf-files.c#L23 On Thu, 6 Feb 2020 at 23:15, Michael Biebl <bi...@debian.org> wrote: > Hi Craig > > Am 06.02.20 um 12:31 schrieb Craig Small: > > Package: systemd > > Version: 244-3 > > Severity: minor > > File: /usr/share/man/man5/sysctl.d.5.gz > > > > The sysctl.d.5 man page says this: > > > > 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 > > 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/. > > > > OK, so we have 4 directories. > > Anything in /etc overrides anything in the other 3. > > > > But files in /run? They override.. /usr? > > Is this supposed to mean /usr/local/lib? > > Does that mean /run does NOT override files in /lib ? > > > > I think the man page used to say /usr/local/lib and /usr/lib and it was > > (badly) saying both directories under /usr > > > > Maybe.. I'm not really sure what way to interpret this. > > I suppose this is a result of > > https://salsa.debian.org/systemd-team/systemd/blob/debian/master/debian/rules#L200 > doing some incorrect replacements. > > Replace /lib with /usr/lib and it will make more sense, I guess. > > I guess we have to fine-tune the sed expression. > > > >