From edda1acba2cb6f0cd95aabe5960f4c3576efc81f Mon Sep 17 00:00:00 2001 From: EnumDev Date: Mon, 12 May 2025 16:44:12 +0300 Subject: [PATCH] Update package version to 4.17.4 --- check-version.sh | 12 ++++++++++++ pkg.info | 8 ++++---- source-files/login.defs | 7 +------ source.sh | 31 ++++++++++++++++--------------- 4 files changed, 33 insertions(+), 25 deletions(-) create mode 100644 check-version.sh diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..0740973 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="shadow-maint/shadow" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name') + +# Get version number from tag name +VERSION=$(echo "$TAG_NAME" | rev | cut -d'-' -f1 | rev) + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index 6bd03d2..8fcd280 100644 --- a/pkg.info +++ b/pkg.info @@ -1,10 +1,10 @@ name: shadow description: Password and account management tool suite -version: 4.14.5 -revision: 3 +version: 4.17.4 url: https://github.com/shadow-maint/shadow/ license: BSD-3-Clause architecture: any -depends: ["glibc","libxcrypt","pam","cracklib","libpwquality"] -make_depends: ["acl","attr","bash","binutils","coreutils","diffutils","findutils","gawk","gcc","gettext","glibc","grep","libcap","libxcrypt","make","sed"] +depends: ["acl","attr","glibc","libbsd","libxcrypt","pam"] +make_depends: ["docbook-xsl-nons","itstool","libcap","libxslt"] type: source +keep: ["etc/login.defs"] diff --git a/source-files/login.defs b/source-files/login.defs index 5a5655e..1411cc9 100644 --- a/source-files/login.defs +++ b/source-files/login.defs @@ -227,11 +227,6 @@ PASS_WARN_AGE 7 # # SU_WHEEL_ONLY no -# -# If compiled with cracklib support, sets the path to the dictionaries -# -# CRACKLIB_DICTPATH /var/cache/cracklib/cracklib_dict - # # Min/max values for automatic uid selection in useradd(8) # @@ -334,7 +329,7 @@ CHFN_RESTRICT rwh # Note: If you use PAM, it is recommended to use a value consistent with # the PAM modules configuration. # -# ENCRYPT_METHOD YESCRYPT +ENCRYPT_METHOD YESCRYPT # # Only works if ENCRYPT_METHOD is set to SHA256 or SHA512. diff --git a/source.sh b/source.sh index 3943df8..d3af709 100644 --- a/source.sh +++ b/source.sh @@ -15,22 +15,18 @@ prepare() { # The build function is executed in the source directory # This function is used to compile the source code build() { + # Disable installation of groups binary as coreutils provides a better alternative sed -i 's/groups$(EXEEXT) //' src/Makefile.in + + # Disable installation of man pages found in man-pages package 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 - mkdir -p "$BPM_OUTPUT"/usr/bin - touch "$BPM_OUTPUT"/usr/bin/passwd + ./configure --sysconfdir=/etc \ --disable-static \ - --enable-logind=no \ --with-{b,yes}crypt \ - --without-libbsd \ + --with-libbsd \ --with-group-name-max-length=32 make } @@ -39,12 +35,17 @@ build() { # This function is used to move the compiled files into the output directory package() { make DESTDIR="$BPM_OUTPUT" exec_prefix=/usr pamdir= install + + # Install man pages make -C man DESTDIR="$BPM_OUTPUT" install-man - mkdir -p "$BPM_OUTPUT"/etc/pam.d - for file in ../pam.d/*; do - cp "$file" "$BPM_OUTPUT"/etc/pam.d - done + + # Install pam configuration files + install -d "$BPM_OUTPUT"/etc/pam.d + install -Dm644 "$BPM_WORKDIR"/pam.d/* -t "$BPM_OUTPUT"/etc/pam.d/ + + # Install login.defs configuration file cp ../login.defs "$BPM_OUTPUT"/etc/login.defs - mkdir -p "$BPM_OUTPUT"/usr/share/licenses/shadow - cp COPYING "$BPM_OUTPUT"/usr/share/licenses/shadow/COPYING + + # Install package license + install -Dm644 COPYING "$BPM_OUTPUT"/usr/share/licenses/shadow/COPYING }