diff --git a/pkg.info b/pkg.info index 940a729..530a859 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: cups description: An open-source printing system version: 2.4.15 -revision: 2 +revision: 3 url: https://openprinting.github.io/cups/ license: Apache2 with LLVM-exception and BSD-3-Clause and Zlib and BSD-2-Clause architecture: any @@ -31,7 +31,6 @@ split_packages: - etc/cups/classes.conf - etc/cups/cups-files.conf - etc/cups/subscriptions.conf - - etc/pam.d/cups depends: - acl - avahi diff --git a/post_update.sh b/post_update.sh new file mode 100644 index 0000000..4615bf4 --- /dev/null +++ b/post_update.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Exit if directory does not exist +[ -d /etc/cups ] || exit 0 + +# Fix ownership of files in /etc/cups +[ `stat -c '%g' /etc/cups` != 209 ] && chown -R 0:209 /etc/cups + +# Ensure script exits cleanly +exit 0 diff --git a/source.sh b/source.sh index aa4640a..6d90d1b 100644 --- a/source.sh +++ b/source.sh @@ -35,9 +35,11 @@ package_cups() { # Remove SysV files rm -r "$BPM_OUTPUT"/etc/rc.d + # Fix unknown directive error + sed -i 's/^IdleExitTimeout/#&/' "$BPM_OUTPUT"/etc/cups/cupsd.conf + # Create default cups client config - install -d "$BPM_OUTPUT"/etc/cups - echo "ServerName /run/cups/cups.sock" > "$BPM_OUTPUT"/etc/cups/client.conf + echo "ServerName /run/cups/cups.sock" | install -Dm644 -g 209 /dev/stdin "$BPM_OUTPUT"/etc/cups/client.conf # Install sysusesrs install -Dm644 "$BPM_WORKDIR"/sysusers "$BPM_OUTPUT"/usr/lib/sysusers.d/cups.conf