shadow uses a copy of m4 from gtk-doc so we need to apply the same
fix as in 407db7b0196417296677f2a4ef929bb092ec382b.
Also patch it to use the correct DocBook version.
With #36556, a check was introduced to make sure the user and group
names do not exceed their respective maximum length. This is in part
because systemd also enforces that length, but only at runtime.
So in general it's a good idea to catch as much as we can during
evaluation time, however the maximum length of the group name was set to
16 characters according groupadd(8).
The maximum length of the group names however is a compile-time option
and even systemd allows more than 16 characters. In the mentioned pull
request (#36556) there was already a report that this has broken
evaluation for people out there.
I have also checked what other distributions are doing and they set the
length to either 31 characters or 32 characters, the latter being more
common.
Unfortunately there is a difference between the maximum length enforced
by the shadow package and systemd, both for user name lengths and group
name lengths. However, systemd enforces both length to have a maximum of
31 characters and I'm not sure if this is intended or just a off-by-one
error in systemd.
Nevertheless, I choose 32 characters simply to bring it in par with the
maximum user name length.
For the NixOS assertion however, I use a maximum length of 31 to make
sure that nobody accidentally creates services that contain group names
that systemd considers invalid because of a length of 32 characters.
Signed-off-by: aszlig <aszlig@nix.build>
Closes: #38548
Cc: @vcunat, @fpletz, @qknight
The `groups.1.gz` collides with one from coreutils. The code to fix this
was already present in expression, but wrongly assumes that share/man/man1
directory will be copied to `man` output after `installPhase`.
It turned out, that man directory is set at configure step, so we should
remove file from `man` output.
prevented the nscd cache from being properly invalidated after a
change, so that e.g. `useradd x; id x' would fail.
svn path=/nixpkgs/trunk/; revision=22599
coreutils:
- Don't remove variables such as $PATH and $SHELL from the calling
environment (from upstream).
- When su is invoked with command line arguments for the shell
(e.g. "su - -c 'cmd'"), set argv[0] in the shell to "-su" or
"-<basename>" (as determined by the SU_NAME option in
/etc/login.defs). This is necessary to make Bash compiled with
the NON_INTERACTIVE_LOGIN_SHELLS option to read startup files.
- Don't set $PATH to /bin:/usr/bin but inherit the $PATH of the
caller.
svn path=/nixpkgs/trunk/; revision=22140