diff --git a/system-config-printer-cupspk-fileget-tmp.patch b/system-config-printer-cupspk-fileget-tmp.patch new file mode 100644 index 0000000..a62e110 --- /dev/null +++ b/system-config-printer-cupspk-fileget-tmp.patch @@ -0,0 +1,29 @@ +diff -up system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp system-config-printer-1.2.2/asyncpk1.py +--- system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp 2010-05-07 15:19:03.000000000 +0100 ++++ system-config-printer-1.2.2/asyncpk1.py 2010-05-13 13:00:57.759093485 +0100 +@@ -153,7 +153,10 @@ class _WriteToTmpFile: + def __init__ (self, kwds, reply_handler, error_handler): + self._reply_handler = reply_handler + self._error_handler = error_handler +- (tmpfd, tmpfname) = tempfile.mkstemp () ++ ++ # Create the temporary file in /tmp to ensure that ++ # cups-pk-helper-mechanism is able to write to it. ++ (tmpfd, tmpfname) = tempfile.mkstemp (dir="/tmp") + os.close (tmpfd) + self._filename = tmpfname + debugprint ("Created tempfile %s" % tmpfname) +diff -up system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp system-config-printer-1.2.2/cupspk.py +--- system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp 2010-04-15 00:11:33.000000000 +0100 ++++ system-config-printer-1.2.2/cupspk.py 2010-05-13 13:00:57.760093336 +0100 +@@ -385,7 +385,9 @@ class Connection: + filename = None + + if (not use_pycups) and (fd != None or file_object != None): +- (tmpfd, tmpfname) = tempfile.mkstemp() ++ # Create the temporary file in /tmp to ensure that ++ # cups-pk-helper-mechanism is able to write to it. ++ (tmpfd, tmpfname) = tempfile.mkstemp(dir="/tmp") + os.close (tmpfd) + + pk_args = (resource, tmpfname) diff --git a/system-config-printer.spec b/system-config-printer.spec index 98573af..a3a5b4f 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -7,7 +7,7 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.2.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -18,6 +18,7 @@ Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch +Patch2: system-config-printer-cupspk-fileget-tmp.patch Patch100: system-config-printer-pycups-build.patch Patch101: pycups-add-getJobs-requested-attrs.patch @@ -82,6 +83,10 @@ printers. # Don't require epydoc. %patch1 -p1 -b .no-epydoc +# cups-pk-helper FileGet method requires directory it can write to +# (bug #587744). +%patch2 -p1 -b .cupspk-fileget-tmp + pushd pycups-%{pycups_version} # Fixed pycups build with new distutils. @@ -209,6 +214,10 @@ rm -rf %buildroot exit 0 %changelog +* Thu May 13 2010 Tim Waugh - 1.2.2-2 +- cups-pk-helper FileGet method requires directory it can write to + (bug #587744). + * Fri May 7 2010 Tim Waugh - 1.2.2-1 - Updated to 1.2.2: - Check we are connected to the local server for server firewall