From 18005cbd6a9d0cd9ab96144a27553cae486beabadb747f1070da12b45fae4020 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Thu, 22 Mar 2012 09:43:28 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/M17N/fontconfig?expand=0&rev=53 --- cloexec.patch | 66 +++++++++++++++++++++++++++++++++ fontconfig-2.9.0-doc.tar.bz2 | 3 -- fontconfig-doc-2.9.0.tar.bz2 | 4 +- fontconfig.spec | 4 +- conf.patch => simsun-conf.patch | 0 5 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 cloexec.patch delete mode 100644 fontconfig-2.9.0-doc.tar.bz2 rename conf.patch => simsun-conf.patch (100%) diff --git a/cloexec.patch b/cloexec.patch new file mode 100644 index 0000000..30a40ff --- /dev/null +++ b/cloexec.patch @@ -0,0 +1,66 @@ +Index: configure.in +=================================================================== +--- configure.in.orig ++++ configure.in +@@ -57,7 +57,9 @@ dnl ==================================== + + AC_CONFIG_HEADERS(config.h) + +-AC_PROG_CC ++AC_PROG_CC_STDC ++AC_USE_SYSTEM_EXTENSIONS ++AC_SYS_LARGEFILE + AC_PROG_INSTALL + AC_PROG_LN_S + AC_LIBTOOL_WIN32_DLL +@@ -119,7 +121,7 @@ AC_TYPE_PID_T + # Checks for library functions. + AC_FUNC_VPRINTF + AC_FUNC_MMAP +-AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48 random_r rand_r]) ++AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp mkostemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48 random_r rand_r]) + + # + # Checks for iconv +Index: src/fcatomic.c +=================================================================== +--- src/fcatomic.c.orig ++++ src/fcatomic.c +@@ -107,10 +107,14 @@ FcAtomicLock (FcAtomic *atomic) + #ifdef HAVE_LINK + strcpy ((char *) atomic->tmp, (char *) atomic->file); + strcat ((char *) atomic->tmp, TMP_NAME); ++#ifdef HAVE_MKOSTEMP ++ fd = mkostemp ((char *) atomic->tmp, O_CLOEXEC); ++#else + fd = mkstemp ((char *) atomic->tmp); ++#endif + if (fd < 0) + return FcFalse; +- f = fdopen (fd, "w"); ++ f = fdopen (fd, "we"); + if (!f) + { + close (fd); +Index: src/fccache.c +=================================================================== +--- src/fccache.c.orig ++++ src/fccache.c +@@ -216,7 +216,7 @@ FcDirCacheOpenFile (const FcChar8 *cache + if (FcStat (cache_file, file_stat) < 0) + return -1; + #endif +- fd = open((char *) cache_file, O_RDONLY | O_BINARY); ++ fd = open((char *) cache_file, O_RDONLY | O_BINARY | O_CLOEXEC); + if (fd < 0) + return fd; + #ifndef _WIN32 +@@ -963,7 +963,7 @@ FcDirCacheWrite (FcCache *cache, FcConfi + if (!FcAtomicLock (atomic)) + goto bail3; + +- fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT | O_BINARY, 0666); ++ fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT | O_BINARY | O_CLOEXEC, 0666); + if (fd == -1) + goto bail4; + diff --git a/fontconfig-2.9.0-doc.tar.bz2 b/fontconfig-2.9.0-doc.tar.bz2 deleted file mode 100644 index 1f7007f..0000000 --- a/fontconfig-2.9.0-doc.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0b84f9ec432e74a0192c4aaef6130a8302af29d0cb72fbbd8098f11d8b902d7b -size 85466 diff --git a/fontconfig-doc-2.9.0.tar.bz2 b/fontconfig-doc-2.9.0.tar.bz2 index 17a104d..1f7007f 100644 --- a/fontconfig-doc-2.9.0.tar.bz2 +++ b/fontconfig-doc-2.9.0.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1dd089cb6b8c4ed487f8a7c5cfae5b2a81e771128eceab746858fd46da6ed333 -size 82793 +oid sha256:0b84f9ec432e74a0192c4aaef6130a8302af29d0cb72fbbd8098f11d8b902d7b +size 85466 diff --git a/fontconfig.spec b/fontconfig.spec index 35e7b45..cbdabf2 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -67,9 +67,10 @@ Source14: suse-bitmaps.conf Source16: local.conf Source20: local.conf.instsys Source30: 29-liberation-aliases.conf -Patch0: conf.patch +Patch0: simsun-conf.patch Patch1: make-check.patch Patch2: usr-share-doc-packages.patch +Patch3: cloexec.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -111,6 +112,7 @@ accepts font patterns and returns the nearest matching font. %patch0 -p1 -b .fonts.conf %patch1 -p1 %patch2 -p1 +%patch3 %build autoreconf -fiv diff --git a/conf.patch b/simsun-conf.patch similarity index 100% rename from conf.patch rename to simsun-conf.patch