From eeb9a39dcee6af68851c8c94d79222d18e42ef5e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Nov 29 2004 17:59:53 +0000 Subject: - Copied "ext" patch over from xpdf RPM package. --- diff --git a/cups-ext.patch b/cups-ext.patch new file mode 100644 index 0000000..878a492 --- /dev/null +++ b/cups-ext.patch @@ -0,0 +1,50 @@ +--- cups-1.1.22/pdftops/gfile.cxx.ext 2003-11-19 18:17:03.000000000 +0000 ++++ cups-1.1.22/pdftops/gfile.cxx 2004-11-29 17:58:13.250694162 +0000 +@@ -487,32 +487,14 @@ + char *s; + int fd; + +- if (ext) { +-#if HAVE_MKSTEMPS +- if ((s = getenv("TMPDIR"))) { +- *name = new GString(s); +- } else { +- *name = new GString("/tmp"); +- } +- (*name)->append("/XXXXXX")->append(ext); +- fd = mkstemps((*name)->getCString(), strlen(ext)); +-#else +- if (!(s = tmpnam(NULL))) { +- return gFalse; +- } ++#if HAVE_MKSTEMP ++ if ((s = getenv("TMPDIR"))) { + *name = new GString(s); +- (*name)->append(ext); +- fd = open((*name)->getCString(), O_WRONLY | O_CREAT | O_EXCL, 0600); +-#endif + } else { +-#if HAVE_MKSTEMP +- if ((s = getenv("TMPDIR"))) { +- *name = new GString(s); +- } else { +- *name = new GString("/tmp"); +- } +- (*name)->append("/XXXXXX"); +- fd = mkstemp((*name)->getCString()); ++ *name = new GString("/tmp"); ++ } ++ (*name)->append("/XXXXXX"); ++ fd = mkstemp((*name)->getCString()); + #else // HAVE_MKSTEMP + if (!(s = tmpnam(NULL))) { + return gFalse; +@@ -520,7 +502,7 @@ + *name = new GString(s); + fd = open((*name)->getCString(), O_WRONLY | O_CREAT | O_EXCL, 0600); + #endif // HAVE_MKSTEMP +- } ++ + if (fd < 0 || !(*f = fdopen(fd, mode))) { + delete *name; + return gFalse; diff --git a/cups.spec b/cups.spec index 35fd158..40a4617 100644 --- a/cups.spec +++ b/cups.spec @@ -23,6 +23,7 @@ Patch0: cups-1.1.15-initscript.patch Patch1: cups-1.1.14-doclink.patch Patch2: cups-1.1.16-system-auth.patch Patch3: cups-1.1.17-backend.patch +Patch4: cups-ext.patch Patch6: cups-1.1.17-pdftops.patch Patch7: cups-logfileperm.patch Patch8: cups-1.1.17-rcp.patch @@ -106,6 +107,7 @@ lpd emulation. %patch1 -p1 -b .doclink %patch2 -p1 -b .system-auth %patch3 -p1 -b .backend +%patch4 -p1 -b .ext %patch6 -p1 -b .pdftops %patch7 -p1 -b .logfileperm %patch8 -p1 -b .rcp @@ -365,6 +367,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/cups/daemon/cups-lpd %changelog +* Mon Nov 29 2004 Tim Waugh +- Copied "ext" patch over from xpdf RPM package. + * Mon Nov 22 2004 Tim Waugh 1:1.1.22-2 - Fixed cups-lpd file mode (bug #137325). - Convert all man pages to UTF-8 (bug #107118). Patch from Miloslav Trmac.