Add patch for Gnome bug #606874 (mktemp removed in glibc-2.11.90-8)
This commit is contained in:
parent
6dd9ff6dda
commit
5f222fa4d6
50
evolution-2.29.5-mktemp.patch
Normal file
50
evolution-2.29.5-mktemp.patch
Normal file
@ -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;
|
@ -62,6 +62,9 @@ Patch11: evolution-2.5.4-fix-conduit-dir.patch
|
|||||||
# RH bug #176400
|
# RH bug #176400
|
||||||
Patch12: evolution-2.9.1-im-context-reset.patch
|
Patch12: evolution-2.9.1-im-context-reset.patch
|
||||||
|
|
||||||
|
# Gnome bug #606874 / RH bug #554643
|
||||||
|
Patch13: evolution-2.29.5-mktemp.patch
|
||||||
|
|
||||||
## Dependencies ###
|
## Dependencies ###
|
||||||
|
|
||||||
Requires(pre): GConf2
|
Requires(pre): GConf2
|
||||||
@ -229,6 +232,7 @@ This package contains the plugin to import Microsoft Personal Storage Table
|
|||||||
%patch10 -p1 -b .ldaphack
|
%patch10 -p1 -b .ldaphack
|
||||||
%patch11 -p1 -b .fix-conduit-dir
|
%patch11 -p1 -b .fix-conduit-dir
|
||||||
%patch12 -p1 -b .im-context-reset
|
%patch12 -p1 -b .im-context-reset
|
||||||
|
%patch13 -p1 -b .mktemp
|
||||||
|
|
||||||
mkdir -p krb5-fakeprefix/include
|
mkdir -p krb5-fakeprefix/include
|
||||||
mkdir -p krb5-fakeprefix/lib
|
mkdir -p krb5-fakeprefix/lib
|
||||||
@ -677,6 +681,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%changelog
|
%changelog
|
||||||
* Tue Jan 12 2010 Milan Crha <mcrha@redhat.com> - 2.29.5-1.fc13
|
* Tue Jan 12 2010 Milan Crha <mcrha@redhat.com> - 2.29.5-1.fc13
|
||||||
- Update to 2.29.5
|
- 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 <mbarnes@redhat.com> - 2.29.4-2.fc13
|
* Tue Dec 22 2009 Matthew Barnes <mbarnes@redhat.com> - 2.29.4-2.fc13
|
||||||
- Update Scrollkeeper and Icon Cache scriptlets to conform to guidelines.
|
- Update Scrollkeeper and Icon Cache scriptlets to conform to guidelines.
|
||||||
|
Loading…
Reference in New Issue
Block a user