From 5f222fa4d693edb8228806060472c5067b0988a9 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 13 Jan 2010 17:35:18 +0000 Subject: [PATCH] Add patch for Gnome bug #606874 (mktemp removed in glibc-2.11.90-8) --- evolution-2.29.5-mktemp.patch | 50 +++++++++++++++++++++++++++++++++++ evolution.spec | 5 ++++ 2 files changed, 55 insertions(+) create mode 100644 evolution-2.29.5-mktemp.patch diff --git a/evolution-2.29.5-mktemp.patch b/evolution-2.29.5-mktemp.patch new file mode 100644 index 0000000..526e242 --- /dev/null +++ b/evolution-2.29.5-mktemp.patch @@ -0,0 +1,50 @@ +diff --git a/e-util/e-mktemp.c b/e-util/e-mktemp.c +index 509b312..15b5668 100644 +--- a/e-util/e-mktemp.c ++++ b/e-util/e-mktemp.c +@@ -167,7 +167,7 @@ gchar * + e_mktemp (const gchar *template) + { + GString *path; +- gchar *ret; ++ gint fd; + + path = get_dir (TRUE); + if (!path) +@@ -179,10 +179,14 @@ e_mktemp (const gchar *template) + else + g_string_append (path, "unknown-XXXXXX"); + +- ret = mktemp (path->str); +- g_string_free(path, ret == NULL); ++ fd = g_mkstemp (path->str); + +- return ret; ++ if (fd != -1) { ++ close (fd); ++ g_unlink (path->str); ++ } ++ ++ return g_string_free (path, fd == -1); + } + + gint +@@ -226,7 +230,17 @@ e_mkdtemp (const gchar *template) + #ifdef HAVE_MKDTEMP + tmpdir = mkdtemp (path->str); + #else +- tmpdir = mktemp (path->str); ++ { ++ gint fd = g_mkstemp (path->str); ++ if (fd == -1) { ++ tmpdir = NULL; ++ } else { ++ close (fd); ++ tmpdir = path->str; ++ g_unlink (tmpdir); ++ } ++ } ++ + if (tmpdir) { + if (g_mkdir (tmpdir, S_IRWXU) == -1) + tmpdir = NULL; diff --git a/evolution.spec b/evolution.spec index 696a1cb..2dcbcaf 100644 --- a/evolution.spec +++ b/evolution.spec @@ -62,6 +62,9 @@ Patch11: evolution-2.5.4-fix-conduit-dir.patch # RH bug #176400 Patch12: evolution-2.9.1-im-context-reset.patch +# Gnome bug #606874 / RH bug #554643 +Patch13: evolution-2.29.5-mktemp.patch + ## Dependencies ### Requires(pre): GConf2 @@ -229,6 +232,7 @@ This package contains the plugin to import Microsoft Personal Storage Table %patch10 -p1 -b .ldaphack %patch11 -p1 -b .fix-conduit-dir %patch12 -p1 -b .im-context-reset +%patch13 -p1 -b .mktemp mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/lib @@ -677,6 +681,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Jan 12 2010 Milan Crha - 2.29.5-1.fc13 - Update to 2.29.5 +- Add patch for Gnome bug #606874 (mktemp removed in glibc-2.11.90-8) * Tue Dec 22 2009 Matthew Barnes - 2.29.4-2.fc13 - Update Scrollkeeper and Icon Cache scriptlets to conform to guidelines.