From bcd156e12dd03e58079e21378a5fab120b520860 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 19 Sep 2022 12:19:37 +0200 Subject: [PATCH 1/3] shadow: Update version from 4.1.5.1 to 4.12.3 --- shadow.be0 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shadow.be0 b/shadow.be0 index 3b790af25..0fe778ab3 100755 --- a/shadow.be0 +++ b/shadow.be0 @@ -1,9 +1,10 @@ #!/usr/bin/env beesh -# BEE_VERSION shadow-4.1.5.1-3 +# BEE_VERSION shadow-4.12.3-0 + +#SRCURL[0]="https://github.com/shadow-maint/shadow/releases/download/${PKGVERSION}/shadow-${PKGVERSION}.tar.gz" +SRCURL[0]="https://beehive.molgen.mpg.de/533afc1c1c0a73be1545f453a2b3c779/shadow-4.12.3.tar.gz" -# dead SRCURL[0]="http://cdn.debian.net/debian/pool/main/s/shadow/shadow_${PKGVERSION}.orig.tar.gz" -SRCURL[0]="https://beehive.molgen.mpg.de/ae66de9953f840fb3a97f6148bc39a30/shadow_4.1.5.1.orig.tar.gz" # PATCHURL+=() From e3b87404322bd118c061d652afbb2c32ffe8a0e1 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 19 Sep 2022 13:13:23 +0200 Subject: [PATCH 2/3] shadow: Do fixups in mee_install instead of in mee_patch Do fixups (remove/rename) in mee_install instead of in mee_patch. This is easier to understand and doesn't depend on details of the build system. Leave out customization of etc/login.defs, because its going to be a sample anyway ( /etc/login.defs.sample ) Leave out removal of languages, because this is already done via --disable-nls Leave out removal of etc/default/useradd.conf, because this no longer exist in the current version The current version doesn't install man pages by default, so do this explcitly. --- shadow.be0 | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/shadow.be0 b/shadow.be0 index 0fe778ab3..1e4d8ae7b 100755 --- a/shadow.be0 +++ b/shadow.be0 @@ -16,24 +16,9 @@ SRCURL[0]="https://beehive.molgen.mpg.de/533afc1c1c0a73be1545f453a2b3c779/shadow # bee_extract "${@}" #} -mee_patch() { - bee_patch "${@}" - - sed -i src/Makefile.in \ - -e 's/groups$(EXEEXT) //' - - find man \ - -name Makefile.in \ - -exec sed -i {} -e 's/groups\.1 / /' \; - - sed -i man/Makefile.in \ - -e 's/ ko//' -e 's/ zh_CN zh_TW//' - - sed -i etc/login.defs \ - -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \ - -e 's@/var/spool/mail@/var/mail@' \ - -e 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' -} +#mee_patch() { +# bee_patch "${@}" +#} mee_configure() { bee_configure \ @@ -47,8 +32,18 @@ mee_configure() { mee_install() { bee_install - for i in login.defs default/useradd pam.d ; do - mv -v ${D}${SYSCONFDIR}/${i} ${D}${SYSCONFDIR}/${i}.sample - done + # I guess this is a bug in Makefile.am, because subdir "man" is + # only included with ENABLE_REGENERATE_MAN (--enable-man) + + ( cd man ; bee_install ) + + # Do not overwrite our configs + + mv ${D}${SYSCONFDIR}/login.defs ${D}${SYSCONFDIR}/login.defs.sample + mv ${D}${SYSCONFDIR}/pam.d ${D}${SYSCONFDIR}/pam.d.sample + + # we have the following from coreutils: + rm $D/usr/bin/groups + rm $D/usr/share/man/man1/groups.1 } From fba90eb9e17273ede58e5aaae901b290ca27c843 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 19 Sep 2022 13:45:21 +0200 Subject: [PATCH 3/3] shadow: Remove tools which don't work on Mariux --- shadow.be0 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/shadow.be0 b/shadow.be0 index 1e4d8ae7b..bffb7853b 100755 --- a/shadow.be0 +++ b/shadow.be0 @@ -46,4 +46,22 @@ mee_install() { rm $D/usr/bin/groups rm $D/usr/share/man/man1/groups.1 + + # Remove tools which do not work on Mariux + # Some of these are setuid root and have side effects + # (e.g. "passwd" happily adds a record to /etc/shadow) + + for tool in chgpasswd chpasswd groupadd groupdel groupmems groupmod \ + grpconv grpunconv logoutd newusers pwconv pwunconv \ + useradd userdel usermod vipw vigr; do + rm $D/usr/sbin/$tool + rm $D/usr/share/man/man8/$tool.8 + test -e $D/etc/pam.d.sample/$tool && rm $D/etc/pam.d.sample/$tool + done + + for tool in chage chfn chsh expiry gpasswd passwd; do + rm $D/usr/bin/$tool + rm $D/usr/share/man/man1/$tool.1 + test -e $D/etc/pam.d.sample/$tool && rm $D/etc/pam.d.sample/$tool + done }