qLinux
… a distribution study
<< Prev gcc
Next >> Pkg-config
Reference: 8.25. Shadow-4.9. Apply a patch to fix the build system:
patch -Np1 -i shadow-4.9-bld-20220303.patch
Disable program  group 
and man pages like in the book:
sed -i 's/groups$(EXEEXT) //' src/Makefile.in find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \; find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \; find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;
Make some default improvements in  login.defs 
(this is different as in the book): (: todo: /var/log and more)
sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \ -e 's:/var/spool/mail:/qlnx/var/mail:' \ -e '/PATH=/s|=.*$|="/exec:/qlnx/bin"|g' \ -e 's|/etc/|/qlnx/etc/|g' \ -e 's|/var/log/|/qlnx/log/|g' \ -i etc/login.defs
Fix a programming error:
sed -e "224s/rounds/min_rounds/" -i libmisc/salt.c
Do not  touch /usr/bin/passwd 
like in the book. Instead apply a patch which fixes (hopefully) all locations in the sources:
patch -Np1 -i shadow-4.9-src-20220314.patch
The patch doesn't touch the install locations pre-defined in  shadow.spec.in 
.
./configure --prefix=/qlnx \ --sysconfdir=/qlnx/etc \ --includedir=/qlnx/inc \ --with-group-name-max-length=32
Fix the newly created file  libtool 
:
sed -i 's|/dev/null|/qlnx/dev/null|g' libtool
Unfortunately we have to fix some wrong locations in  config.h 
after configure. Apply a patch to do it:
shadow-4.9-qlnx-3-20220314.patch
Build and install shadow:
make make install
This installs the admin executables in  /qlnx/sbin 
. We do this temporarily, because it makes the next command to change the access mode easier:
chmod 0750 /qlnx/sbin/*
Last move the files in  /qlnx/sbin 
to their final location and remove the directory:
mv -v /qlnx/sbin/* /qlnx/bin rmdir /qlnx/sbin
sbin: chgpasswd groupadd groupmems grpck grpunconv newusers pwck pwunconv userdel vigr chpasswd groupdel groupmod grpconv logoutd nologin pwconv useradd usermod vipw
<< Prev gcc
        
Next >> Pkg-config