1 From 2af563cb1ff3fc84549d58b64325be9606684c43 Mon Sep 17 00:00:00 2001
2 From: David Runge <dvzrv@archlinux.org>
3 Date: Sat, 5 Nov 2022 23:40:18 +0100
4 Subject: [PATCH 1/4] Disable replaced tools and man pages
6 man/Makefile.am, man/*/Makefile.am:
7 Disable man pages for chfn, chsh, login, logoutd, newgrp, nologin, vigr,
8 vipw and su as they are either no longer used or replaced by util-linux.
11 Set usbindir to use bin instead of sbin, as Arch Linux is a /usr and bin
13 Remove the use of login, nologin, chfn, chsh, logoutd, vipw and vigr, as
14 they are either not used or replaced by util-linux.
15 Move newgrp to replace sg (instead of it being a symlink).
17 man/Makefile.am | 19 ++-----------------
18 man/cs/Makefile.am | 8 ++------
19 man/da/Makefile.am | 8 +-------
20 man/de/Makefile.am | 11 +----------
21 man/fi/Makefile.am | 5 +----
22 man/fr/Makefile.am | 11 +----------
23 man/hu/Makefile.am | 6 +-----
24 man/id/Makefile.am | 2 --
25 man/it/Makefile.am | 11 +----------
26 man/ja/Makefile.am | 10 +---------
27 man/ko/Makefile.am | 8 +-------
28 man/pl/Makefile.am | 7 +------
29 man/ru/Makefile.am | 11 +----------
30 man/sv/Makefile.am | 8 +-------
31 man/tr/Makefile.am | 3 ---
32 man/uk/Makefile.am | 11 +----------
33 man/zh_CN/Makefile.am | 11 +----------
34 man/zh_TW/Makefile.am | 4 ----
35 src/Makefile.am | 18 +++++++-----------
36 19 files changed, 24 insertions(+), 148 deletions(-)
38 diff --git a/man/Makefile.am b/man/Makefile.am
39 index 4382df60..078db349 100644
42 @@ -8,10 +8,8 @@ endif
53 @@ -27,12 +25,8 @@ man_MANS = \
66 @@ -44,9 +38,7 @@ man_MANS = \
77 @@ -74,10 +66,8 @@ endif
88 @@ -92,12 +82,9 @@ man_XMANS = \
101 @@ -109,14 +96,12 @@ man_XMANS = \
117 diff --git a/man/cs/Makefile.am b/man/cs/Makefile.am
118 index 3b2be0ce..50290f4a 100644
119 --- a/man/cs/Makefile.am
120 +++ b/man/cs/Makefile.am
121 @@ -13,14 +13,10 @@ man_MANS = \
132 EXTRA_DIST = $(man_MANS) \
138 diff --git a/man/da/Makefile.am b/man/da/Makefile.am
139 index a3b09224..e45bef66 100644
140 --- a/man/da/Makefile.am
141 +++ b/man/da/Makefile.am
142 @@ -3,16 +3,10 @@ mandir = @mandir@/da
144 # 2012.01.28 - activate manpages with more than 50% translated messages
160 diff --git a/man/de/Makefile.am b/man/de/Makefile.am
161 index 3cd302ee..dee3e2a1 100644
162 --- a/man/de/Makefile.am
163 +++ b/man/de/Makefile.am
164 @@ -3,10 +3,8 @@ mandir = @mandir@/de
175 @@ -22,12 +20,8 @@ man_MANS = \
188 @@ -36,13 +30,10 @@ man_MANS = \
203 diff --git a/man/fi/Makefile.am b/man/fi/Makefile.am
204 index 26a1a848..f02b92f3 100644
205 --- a/man/fi/Makefile.am
206 +++ b/man/fi/Makefile.am
218 # passwd.1 (https://bugs.launchpad.net/ubuntu/+bug/384024)
219 diff --git a/man/fr/Makefile.am b/man/fr/Makefile.am
220 index 230d2126..1955e94a 100644
221 --- a/man/fr/Makefile.am
222 +++ b/man/fr/Makefile.am
223 @@ -3,10 +3,8 @@ mandir = @mandir@/fr
234 @@ -22,12 +20,8 @@ man_MANS = \
247 @@ -36,13 +30,10 @@ man_MANS = \
262 diff --git a/man/hu/Makefile.am b/man/hu/Makefile.am
263 index e659aef1..ae80da49 100644
264 --- a/man/hu/Makefile.am
265 +++ b/man/hu/Makefile.am
282 EXTRA_DIST = $(man_MANS)
284 diff --git a/man/id/Makefile.am b/man/id/Makefile.am
285 index 21f3dbe9..6d10b930 100644
286 --- a/man/id/Makefile.am
287 +++ b/man/id/Makefile.am
296 EXTRA_DIST = $(man_MANS)
297 diff --git a/man/it/Makefile.am b/man/it/Makefile.am
298 index 94460aac..ecf5bd18 100644
299 --- a/man/it/Makefile.am
300 +++ b/man/it/Makefile.am
301 @@ -3,10 +3,8 @@ mandir = @mandir@/it
312 @@ -22,12 +20,8 @@ man_MANS = \
325 @@ -36,13 +30,10 @@ man_MANS = \
340 diff --git a/man/ja/Makefile.am b/man/ja/Makefile.am
341 index ffb75a98..b88c490a 100644
342 --- a/man/ja/Makefile.am
343 +++ b/man/ja/Makefile.am
344 @@ -3,9 +3,7 @@ mandir = @mandir@/ja
354 @@ -18,10 +16,7 @@ man_MANS = \
365 @@ -30,13 +25,10 @@ man_MANS = \
380 diff --git a/man/ko/Makefile.am b/man/ko/Makefile.am
381 index c269f0bb..9616cb3e 100644
382 --- a/man/ko/Makefile.am
383 +++ b/man/ko/Makefile.am
397 # newgrp.1 must be updated
400 diff --git a/man/pl/Makefile.am b/man/pl/Makefile.am
401 index 724d25f3..fa6675b9 100644
402 --- a/man/pl/Makefile.am
403 +++ b/man/pl/Makefile.am
404 @@ -4,7 +4,6 @@ mandir = @mandir@/pl
405 # 2012.01.28 - activate manpages with more than 50% translated messages
412 @@ -16,14 +15,10 @@ man_MANS = \
428 diff --git a/man/ru/Makefile.am b/man/ru/Makefile.am
429 index 8a776a87..29e1b843 100644
430 --- a/man/ru/Makefile.am
431 +++ b/man/ru/Makefile.am
432 @@ -3,10 +3,8 @@ mandir = @mandir@/ru
443 @@ -22,12 +20,8 @@ man_MANS = \
456 @@ -36,13 +30,10 @@ man_MANS = \
471 diff --git a/man/sv/Makefile.am b/man/sv/Makefile.am
472 index e64b7bc8..fbb2a716 100644
473 --- a/man/sv/Makefile.am
474 +++ b/man/sv/Makefile.am
475 @@ -3,7 +3,6 @@ mandir = @mandir@/sv
476 # 2012.01.28 - activate manpages with more than 50% translated messages
483 @@ -16,18 +15,13 @@ man_MANS = \
503 diff --git a/man/tr/Makefile.am b/man/tr/Makefile.am
504 index 8d8b9166..4fe3632a 100644
505 --- a/man/tr/Makefile.am
506 +++ b/man/tr/Makefile.am
507 @@ -2,15 +2,12 @@ mandir = @mandir@/tr
523 diff --git a/man/uk/Makefile.am b/man/uk/Makefile.am
524 index 30c86272..82dc3a82 100644
525 --- a/man/uk/Makefile.am
526 +++ b/man/uk/Makefile.am
527 @@ -3,10 +3,8 @@ mandir = @mandir@/uk
538 @@ -22,12 +20,8 @@ man_MANS = \
551 @@ -36,13 +30,10 @@ man_MANS = \
565 man5/login.access.5 \
566 diff --git a/man/zh_CN/Makefile.am b/man/zh_CN/Makefile.am
567 index e9d8f2c2..c2e6cdfd 100644
568 --- a/man/zh_CN/Makefile.am
569 +++ b/man/zh_CN/Makefile.am
570 @@ -3,10 +3,8 @@ mandir = @mandir@/zh_CN
581 @@ -22,12 +20,8 @@ man_MANS = \
594 @@ -36,13 +30,10 @@ man_MANS = \
609 diff --git a/man/zh_TW/Makefile.am b/man/zh_TW/Makefile.am
610 index c36ed2c7..26696b67 100644
611 --- a/man/zh_TW/Makefile.am
612 +++ b/man/zh_TW/Makefile.am
614 mandir = @mandir@/zh_TW
629 diff --git a/src/Makefile.am b/src/Makefile.am
630 index a1a2e4e3..53cd7953 100644
631 --- a/src/Makefile.am
632 +++ b/src/Makefile.am
633 @@ -3,7 +3,7 @@ EXTRA_DIST = \
636 ubindir = ${prefix}/bin
637 -usbindir = ${prefix}/sbin
638 +usbindir = ${prefix}/bin
642 @@ -24,9 +24,9 @@ AM_CPPFLAGS = \
643 # and installation would be much simpler (just two directories,
644 # $prefix/bin and $prefix/sbin, no install-data hacks...)
646 -bin_PROGRAMS = groups login
647 -sbin_PROGRAMS = nologin
648 -ubin_PROGRAMS = faillog lastlog chage chfn chsh expiry gpasswd newgrp passwd
649 +bin_PROGRAMS = groups
651 +ubin_PROGRAMS = faillog lastlog chage expiry gpasswd newgrp passwd
653 ubin_PROGRAMS += newgidmap newuidmap
655 @@ -43,22 +43,20 @@ usbin_PROGRAMS = \
670 # id and groups are from gnu, sulogin from sysvinit
671 noinst_PROGRAMS = id sulogin
675 -suidubins = chage chfn chsh expiry gpasswd newgrp
676 +suidubins = chage expiry gpasswd newgrp
680 @@ -131,18 +129,16 @@ sulogin_LDADD = $(LDADD) $(LIBCRYPT) $(LIBECONF)
681 useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) -ldl
682 userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBECONF) -ldl
683 usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) -ldl
684 -vipw_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF)
687 $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
688 - ln -sf newgrp $(DESTDIR)$(ubindir)/sg
689 - ln -sf vipw $(DESTDIR)$(usbindir)/vigr
690 set -e; for i in $(suidbins); do \
691 chmod $(suidperms) $(DESTDIR)$(bindir)/$$i; \
693 set -e; for i in $(suidubins); do \
694 chmod $(suidperms) $(DESTDIR)$(ubindir)/$$i; \
696 + mv -v $(DESTDIR)$(ubindir)/newgrp $(DESTDIR)$(ubindir)/sg
697 set -e; for i in $(suidusbins); do \
698 chmod $(suidperms) $(DESTDIR)$(usbindir)/$$i; \