rpms/system-config-printer/devel system-config-printer-cupspk-fileget-tmp.patch, NONE, 1.1 system-config-printer.spec, 1.392, 1.393

Tim Waugh twaugh at fedoraproject.org
Thu May 13 12:21:14 UTC 2010


Author: twaugh

Update of /cvs/pkgs/rpms/system-config-printer/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv1099

Modified Files:
	system-config-printer.spec 
Added Files:
	system-config-printer-cupspk-fileget-tmp.patch 
Log Message:
* Thu May 13 2010 Tim Waugh <twaugh at redhat.com> - 1.2.2-2
- cups-pk-helper FileGet method requires directory it can write to
  (bug #587744).


system-config-printer-cupspk-fileget-tmp.patch:
 asyncpk1.py |    5 ++++-
 cupspk.py   |    4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

--- NEW FILE system-config-printer-cupspk-fileget-tmp.patch ---
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)


Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/devel/system-config-printer.spec,v
retrieving revision 1.392
retrieving revision 1.393
diff -u -p -r1.392 -r1.393
--- system-config-printer.spec	7 May 2010 15:52:23 -0000	1.392
+++ system-config-printer.spec	13 May 2010 12:21:13 -0000	1.393
@@ -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/py
 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 <twaugh at redhat.com> - 1.2.2-2
+- cups-pk-helper FileGet method requires directory it can write to
+  (bug #587744).
+
 * Fri May  7 2010 Tim Waugh <twaugh at redhat.com> - 1.2.2-1
 - Updated to 1.2.2:
   - Check we are connected to the local server for server firewall



More information about the scm-commits mailing list