Bug#950788: /usr/share/man/man5/sysctl.d.5.gz: sysctl.d.5 man page has confusing directory order

2020-02-06 Thread Craig Small
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  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.
>
>
>
>


Bug#950788: /usr/share/man/man5/sysctl.d.5.gz: sysctl.d.5 man page has confusing directory order

2020-02-06 Thread Michael Biebl
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.





signature.asc
Description: OpenPGP digital signature


Bug#950788: /usr/share/man/man5/sysctl.d.5.gz: sysctl.d.5 man page has confusing directory order

2020-02-06 Thread 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.

 - Craig

-- Package-specific info:

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.3.0-3-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_AU:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages systemd depends on:
ii  adduser  3.118
ii  libacl1  2.2.53-5
ii  libapparmor1 2.13.3-7
ii  libaudit11:2.8.5-2+b1
ii  libblkid12.34-0.1
ii  libc62.29-6
ii  libcap2  1:2.27-1
ii  libcryptsetup12  2:2.2.2-1
ii  libgcrypt20  1.8.5-3
ii  libgnutls30  3.6.11.1-2
ii  libgpg-error01.36-7
ii  libidn2-02.2.0-2
ii  libip4tc21.8.4-1
ii  libkmod2 26-3
ii  liblz4-1 1.9.2-2
ii  liblzma5 5.2.4-1+b1
ii  libmount12.34-0.1
ii  libpam0g 1.3.1-5
ii  libpcre2-8-0 10.34-7
ii  libseccomp2  2.4.2-2
ii  libselinux1  3.0-1
ii  libsystemd0  244-3
ii  mount2.34-0.1
ii  util-linux   2.34-0.1

Versions of packages systemd recommends:
ii  dbus  1.12.16-2

Versions of packages systemd suggests:
ii  policykit-10.105-26
pn  systemd-container  

Versions of packages systemd is related to:
pn  dracut   
ii  initramfs-tools  0.135
ii  udev 244-3

-- Configuration Files:
/etc/systemd/logind.conf changed [not included]

-- no debconf information