]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
shadow: use update-alternatives to handle su.1 and nologin.8
authorSid-Ali <sidali.teir@cysec.com>
Fri, 6 Dec 2024 07:47:33 +0000 (08:47 +0100)
committerSteve Sakoman <steve@sakoman.com>
Wed, 11 Dec 2024 21:03:27 +0000 (13:03 -0800)
commita12be809144cbca43576d15c0f0f1781eeaf5a27
tree9baea44b0e7f55dbd2ec992b61936627725c955c
parent82b1c8fb497f74bbc67cc6763116fa96267acc4a
shadow: use update-alternatives to handle su.1 and nologin.8

This patch fixes the following error at do_rootfs:

  update-alternatives: Error: not linking
  /PATH/TO/rootfs/usr/share/man/man1/su.1
  to /usr/share/man/man1/su.1.util-linux since
  /PATH/TO/rootfs/usr/share/man/man1/su.1
  exists and is not a link

  update-alternatives: Error: not linking
  /PATH/TO/rootfs/usr/share/man/man8/nologin.8
  to /usr/share/man/man8/nologin.8.util-linux since
  /PATH/TO/rootfs/usr/share/man/man8/nologin.8
  exists and is not a link

The problem can be reproduced by adding the following lines to local.conf
and then building an image:

  EXTRA_IMAGE_FEATURES:append = " doc-pkgs"
  IMAGE_INSTALL:append = " shadow util-linux"

su.1 and nologin.8 are handled by update-alternatives in util-linux recipe, so
do it in shadow recipe too.

Signed-off-by: Sid-Ali Teir <sidali.teir@cysec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 198c4582c6391ac87c49e09882189235c44b60e9)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-extended/shadow/shadow.inc