[packages/java-jna] override JNA tmpdir for tests
jajcus
jajcus at pld-linux.org
Tue Oct 27 12:47:21 CET 2015
commit 6b7011f3628e591b28ec32e136bc3fa00d10a720
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Tue Oct 27 12:42:57 2015 +0100
override JNA tmpdir for tests
JNA tmpdir defaults to /tmp and JNA won't work if it is mounted noexec.
The same is true for every application using JNA.
java-jna.spec | 2 ++
jna-tmpdir.patch | 12 ++++++++++++
2 files changed, 14 insertions(+)
---
diff --git a/java-jna.spec b/java-jna.spec
index d8ca411..23da09e 100644
--- a/java-jna.spec
+++ b/java-jna.spec
@@ -18,6 +18,7 @@ Source0: https://github.com/java-native-access/jna/archive/%{version}/jna-%{vers
# we package libjnidispatch.so as normal native library instead
Patch0: jna-nonative.patch
Patch1: jna-soname.patch
+Patch2: jna-tmpdir.patch
URL: https://github.com/java-native-access/jna/
%if %(locale -a | grep -q '^en_US$'; echo $?)%(locale -a | grep -q '^en_US\.UTF-8$'; echo $?)
BuildRequires: glibc-localedb-all
@@ -56,6 +57,7 @@ ani kod natywny.
%setup -q -n jna-%{version}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%{__rm} -r dist/* lib/native/*.jar
diff --git a/jna-tmpdir.patch b/jna-tmpdir.patch
new file mode 100644
index 0000000..3e059db
--- /dev/null
+++ b/jna-tmpdir.patch
@@ -0,0 +1,12 @@
+diff -dur jna-4.2.1.orig/build.xml jna-4.2.1/build.xml
+--- jna-4.2.1.orig/build.xml 2015-10-27 12:39:07.000000000 +0100
++++ jna-4.2.1/build.xml 2015-10-27 12:39:38.000000000 +0100
+@@ -929,6 +929,8 @@
+ <sysproperty key="jna.protected" value="true"/>
+ <sysproperty key="jna.builddir" file="${build}"/>
+ <sysproperty key="jna.nativedir" file="${build.native}"/>
++ <sysproperty key="java.io.tmpdir" file="${build}/tmp"/>
++ <sysproperty key="jna.tmpdir" file="${build}/tmp"/>
+ <jvmarg value="${vmopt.arch}"/>
+ <classpath><path refid="test.runpath"/></classpath>
+ <formatter type="brief" usefile="false"/>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/java-jna.git/commitdiff/6b7011f3628e591b28ec32e136bc3fa00d10a720
More information about the pld-cvs-commit
mailing list