# Description: Shadow password file utilities
# URL: http://pkg-shadow.alioth.debian.org/
# Maintainer: CRUX System Team, core-ports at crux dot nu
-# Arch Maintainer: CRUX-ARM System Team, devel@crux-arm.nu
+# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
# Depends on:
name=shadow
-version=4.1.4.2
-release=1
-source=(ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/$name-$version.tar.bz2 \
+version=4.5
+release=2
+source=(https://github.com/shadow-maint/shadow/releases/download/$version/shadow-$version.tar.xz
+ CVE-2018-7169.patch
pwck login.defs)
build() {
cd $name-$version
- cat > config.cache << EOF
-ac_cv_func_setpgrp_void=yes
-EOF
+
+ # https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/1729357
+ patch -p1 -i $SRC/CVE-2018-7169.patch
+
+ echo "ac_cv_func_setpgrp_void=yes" >> config.cache
+
+ # Fix first configure to point to the right place
+ sed "s|lt_sysroot=|lt_sysroot=$CLFS|g" -i aclocal.m4
+
./configure --build=$CHOST \
--host=$CTARGET \
--prefix=/usr \
--without-audit \
--cache-file=config.cache
+ # Forcing libtool to prioritize our sysroot
+ sed "s|lt_sysroot=|lt_sysroot=$CLFS|g" -i libtool
+
make
make DESTDIR=$PKG install