new: migrate more packages

This commit is contained in:
ngn
2024-07-30 02:57:37 +03:00
parent 0ffdf01794
commit 1a08fbc0a7
159 changed files with 985 additions and 109 deletions

3
src/shadow/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.cache/
dist/
root/

2
src/shadow/changes.md Normal file
View File

@ -0,0 +1,2 @@
# 4.15.3
First version

4
src/shadow/chpasswd Normal file
View File

@ -0,0 +1,4 @@
#%PAM-1.0
auth sufficient pam_rootok.so
account required pam_permit.so
password include system-auth

6
src/shadow/login Normal file
View File

@ -0,0 +1,6 @@
#%PAM-1.0
auth requisite pam_nologin.so
auth include system-login
account include system-login
session include system-login
password include system-login

62
src/shadow/pkg.sh Normal file
View File

@ -0,0 +1,62 @@
# general info
NAME="shadow"
DESC="Necessary programs for converting UNIX password files to the shadow password format"
VERSION="4.15.3"
# required files
FILES=(
"https://github.com/shadow-maint/shadow/releases/download/${VERSION}/shadow-${VERSION}.tar.gz"
"chpasswd"
"login"
)
HASHES=(
"d02439810e1743255187a7e6d790ade232daef26ca24bdb859057ec27056ee57"
"a955ecbd82a801102fad756bb98dca778c1eba14a3367c601d6237b75642c36b"
"7dc12d8126161031ec7446edfe354971077cb10f0c1e2fdbaaf1c945738ff39b"
)
# install and build depends
DEPENDS=(
"acl" "attr" "audit"
"glibc" "libxcrypt" "linux-pam"
)
BUILD=("libxslt")
PACKAGE(){
tar xf "${NAME}-${VERSION}.tar.gz"
cd "${NAME}-${VERSION}"
autoreconf -fiv
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 / /' {} \;
sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD YESCRYPT:' \
-e 's:/var/spool/mail:/var/mail:' \
-e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
-i etc/login.defs
install -dm755 "${ROOTDIR}/usr/bin"
touch "${ROOTDIR}/usr/bin/passwd"
./configure --sysconfdir=/etc \
--disable-static \
--with-{b,yes}crypt \
--with-libpam \
--without-libbsd \
--enable-man \
--with-libpam \
--disable-account-tools-setuid \
--with-group-name-max-length=32
make
make DESTDIR="${ROOTDIR}" exec_prefix=/usr install
make DESTDIR="${ROOTDIR}" -C man install
install -m644 "${ROOTDIR}/login" "${ROOTDIR}/etc/pam.d/login"
install -m644 "${ROOTDIR}/chpasswd" "${ROOTDIR}/etc/pam.d/chpasswd"
cd .. && rm -r "${NAME}-${VERSION}"
}