diff options
| author | Sid-Ali <sidali.teir@cysec.com> | 2024-12-06 08:47:33 +0100 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-12-17 12:58:11 -0800 |
| commit | dd6b2448aadf21393af5ba97d1b2afb12bb33140 (patch) | |
| tree | e581f5399a48b78456dd3bf09192cd5eb859e0fe /meta | |
| parent | ae130b042f8d8f1bad16921b006b71086ecce4f0 (diff) | |
| download | poky-dd6b2448aadf21393af5ba97d1b2afb12bb33140.tar.gz | |
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.
(From OE-Core rev: a12be809144cbca43576d15c0f0f1781eeaf5a27)
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>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-extended/shadow/shadow.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc index 171d6e27c3..6ba5a9c7f1 100644 --- a/meta/recipes-extended/shadow/shadow.inc +++ b/meta/recipes-extended/shadow/shadow.inc | |||
| @@ -200,10 +200,12 @@ ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw" | |||
| 200 | ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr" | 200 | ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr" |
| 201 | ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin" | 201 | ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin" |
| 202 | 202 | ||
| 203 | ALTERNATIVE:${PN}-doc = "chfn.1 chsh.1 groups.1" | 203 | ALTERNATIVE:${PN}-doc = "chfn.1 chsh.1 groups.1 su.1 nologin.8" |
| 204 | ALTERNATIVE_LINK_NAME[chfn.1] = "${mandir}/man1/chfn.1" | 204 | ALTERNATIVE_LINK_NAME[chfn.1] = "${mandir}/man1/chfn.1" |
| 205 | ALTERNATIVE_LINK_NAME[chsh.1] = "${mandir}/man1/chsh.1" | 205 | ALTERNATIVE_LINK_NAME[chsh.1] = "${mandir}/man1/chsh.1" |
| 206 | ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1" | 206 | ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1" |
| 207 | ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1" | ||
| 208 | ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8" | ||
| 207 | 209 | ||
| 208 | ALTERNATIVE:${PN}-base = "newgrp groups login su" | 210 | ALTERNATIVE:${PN}-base = "newgrp groups login su" |
| 209 | ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login" | 211 | ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login" |
