[Pkg-cups-devel] Bug#640939: Please test solution for Kerberos problem

Wolfgang Schweer wschweer at arcor.de
Mon Dec 10 19:23:36 UTC 2012


Control: tags 640939 - moreinfo - unreproducible + patch

thanks

[ cups source package 1.5.3-2.9, debian/cups.postinst ]

The attached patch seems to work for me. Please test it (as outlined in 
message #49 by Brian).

"-h localhost" was changed to "-h /var/run/cups/cups.sock" a while ago 
(15 Sep 2009: cups.postinst and init script).

Don't know if changing it back for cups.postinst would cause any 
problem -- my tests revealed none so far.

Wolfgang

-------------- next part --------------
--- cups.postinst	2012-12-07 12:50:28.000000000 +0100
+++ cups.postinst.working_copy	2012-12-10 16:15:14.000000000 +0100
@@ -212,7 +212,7 @@
 	for ppd in *.ppd; do
 	    [ -r "$ppd" ] || continue
 	    queue=${ppd%.ppd}
-	    lpstat -h /var/run/cups/cups.sock -p "$queue" >/dev/null 2>&1 || continue
+	    lpstat -h localhost -p "$queue" >/dev/null 2>&1 || continue
 	    nickname=`grep '\*NickName:' "$ppd" | cut -d '"' -f 2 | perl -p -e 's/\n$//' | perl -p -e "$gennicknameregexp" | perl -p -e 's/(\W)/\\\\$1/g'`
 	    lang=`grep '\*LanguageVersion:' "$ppd" | cut -d ' ' -f 2 | perl -e 'print lc(<>)' | perl -p -e 's/[\r\n]//gs'`
 	    ppdfound="0"
@@ -221,12 +221,12 @@
 	    tempfiles="$tempfiles $tmpfile2"
 	    cat $tmpfile1 | perl -p -e "$gennicknameregexp; s/\n*$/\n/s" | grep -E '^\S+\s+.*'"$nickname"'$' | cut -d ' ' -f 1 > $tmpfile2
 	    while read newppduri; do
-		[ "$ppdfound" = "0" ] && lpadmin -h /var/run/cups/cups.sock -p "$queue" -m $newppduri 2>/dev/null || continue
+		[ "$ppdfound" = "0" ] && lpadmin -h localhost -p "$queue" -m $newppduri 2>/dev/null || continue
 		newlang=`grep '\*LanguageVersion:' "$ppd" | cut -d ' ' -f 2 | perl -e 'print lc(<>)' | perl -p -e 's/[\r\n]//gs'`
 		[ "$newlang" = "$lang" ] && ppdfound="1"
 		[ "$newlang" = "english" ] && englishppduri="$newppduri"
 	    done < $tmpfile2
-	    [ "$ppdfound" = "0" ] && [ ! -z "$englishppduri" ] && lpadmin -h /var/run/cups/cups.sock -p "$queue" -m $englishppduri 2>/dev/null && ppdfound="1"
+	    [ "$ppdfound" = "0" ] && [ ! -z "$englishppduri" ] && lpadmin -h localhost -p "$queue" -m $englishppduri 2>/dev/null && ppdfound="1"
 	    [ "$ppdfound" = "1" ] && echo PPD for printer $queue updated >&2
 	done
 	return 0
@@ -237,14 +237,14 @@
 if which lpstat > /dev/null 2>&1 && \
 	which lpinfo > /dev/null 2>&1 && \
 	which lpadmin > /dev/null 2>&1 && \
-	LC_ALL=C lpstat -h /var/run/cups/cups.sock -r | grep -v not > /dev/null 2>&1; then
+	LC_ALL=C lpstat -h localhost -r | grep -v not > /dev/null 2>&1; then
 
 	tempfiles=
 	trap 'rm -f $tempfiles; exit 0' 0 HUP INT QUIT ILL ABRT PIPE TERM
 	tmpfile0=`mktemp -t updateppds.XXXXXX`
 	tempfiles="$tempfiles $tmpfile0"
 
-	lpinfo -h /var/run/cups/cups.sock -m > $tmpfile0
+	lpinfo -h localhost -m > $tmpfile0
 
 	if [ "$1" = configure ] ; then
 		# Update CUPS included drivers' queues
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-cups-devel/attachments/20121210/fc0ec4a4/attachment.pgp>


More information about the Pkg-cups-devel mailing list