summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--orc-subdir.patch48
-rw-r--r--orc.spec12
2 files changed, 57 insertions, 3 deletions
diff --git a/orc-subdir.patch b/orc-subdir.patch
new file mode 100644
index 0000000..5386a7a
--- /dev/null
+++ b/orc-subdir.patch
@@ -0,0 +1,48 @@
+From 8bc69ba508e2ec6e573ba197d0f20b1a39a1c920 Mon Sep 17 00:00:00 2001
+From: Fabian Deutsch <fabian.deutsch@gmx.de>
+Date: Tue, 4 Oct 2011 13:28:38 +0200
+Subject: [PATCH] Use a subdirectory for temporary files.
+
+This allows the a better integration with selinux, as the rule can use the path name and doesn't need globbing.
+
+Signed-off-by: Fabian Deutsch <fabian.deutsch@gmx.de>
+---
+ orc/orccodemem.c | 18 +++++++++++++++++-
+ 1 files changed, 17 insertions(+), 1 deletions(-)
+
+diff --git a/orc/orccodemem.c b/orc/orccodemem.c
+index f470be5..e125faa 100644
+--- a/orc/orccodemem.c
++++ b/orc/orccodemem.c
+@@ -193,11 +193,27 @@ orc_code_chunk_free (OrcCodeChunk *chunk)
+ #ifdef HAVE_CODEMEM_MMAP
+ int
+ orc_code_region_allocate_codemem_dual_map (OrcCodeRegion *region,
+- const char *dir, int force_unlink)
++ const char *basedir, int force_unlink)
+ {
+ int fd;
+ int n;
+ char *filename;
++ char *dir;
++ struct stat stat_p;
++
++ dir = malloc (strlen (basedir) + strlen ("/.orc"));
++ sprintf (dir, "%s/.orc", basedir);
++
++ stat (dir, &stat_p);
++ if (!S_ISDIR (stat_p.st_mode))
++ {
++ n = mkdir (dir, S_IRWXU);
++ if (n < 0)
++ {
++ ORC_WARNING ("failed to create subdir");
++ return FALSE;
++ }
++ }
+
+ filename = malloc (strlen ("/orcexec..") +
+ strlen (dir) + 6 + 1);
+--
+1.7.6.4
+
diff --git a/orc.spec b/orc.spec
index 1c0c891..9ee8b78 100644
--- a/orc.spec
+++ b/orc.spec
@@ -1,6 +1,6 @@
Name: orc
Version: 0.4.16
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The Oil Run-time Compiler
Group: System Environment/Libraries
@@ -13,6 +13,8 @@ BuildRequires: gtk-doc, libtool
Patch1: orc-no-nopl.patch
Patch2: orc-no-nopw.patch
+# Upstream bug: https://bugs.freedesktop.org/show_bug.cgi?id=41446
+Patch3: orc-subdir.patch
%description
Orc is a library and set of tools for compiling and executing
@@ -54,8 +56,9 @@ The Orc compiler, to produce optimized code.
%prep
%setup -q
-%patch1 -p1
-%patch2 -p1
+%patch1 -p1 -b .nopl
+%patch2 -p1 -b .nopw
+%patch3 -p1 -b .subdir
autoreconf -vif
@@ -119,6 +122,9 @@ make check
%changelog
+* Sun Oct 16 2011 Fabian Deutsch <fabiand@fedoraproject.org> - 0.4.16-3
+- Add Fedora specific patch for tempfiles in subdirs
+
* Sun Oct 16 2011 Daniel Drake <dsd@laptop.org> - 0.4.16-2
- Add upstream patches to fix gstreamer crash on Geode (#746185)