Skip to content

Commit

Permalink
shadow: Do fixups in mee_install instead of in mee_patch
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
donald committed Sep 19, 2022
1 parent bcd156e commit e3b8740
Showing 1 changed file with 16 additions and 21 deletions.
37 changes: 16 additions & 21 deletions shadow.be0
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
}

0 comments on commit e3b8740

Please sign in to comment.