remove malloc_readlink and update the test results
Related to #1185626 Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
This commit is contained in:
parent
3eb02af67e
commit
aa598bf868
5 changed files with 259 additions and 2 deletions
35
0006-Update-README.patch
Normal file
35
0006-Update-README.patch
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
From 64b07c73452ed3b0d0d4e978fad61940ae12d362 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 11 Mar 2015 13:21:43 +0100
|
||||
Subject: [PATCH] Update README
|
||||
|
||||
---
|
||||
README | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/README b/README
|
||||
index a8dbf2e..2657b11 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -126,3 +126,18 @@ Example7:
|
||||
|
||||
|
||||
$ java -agentlib:abrt-java-connector=conffile=/etc/foo/example.conf $MyClass
|
||||
+
|
||||
+
|
||||
+Building from sources
|
||||
+---------------------
|
||||
+
|
||||
+This project uses CMake build system but a Makefile for GNU Make, which defines
|
||||
+all the targets you usually need to run, is also provided.
|
||||
+
|
||||
+$ make build
|
||||
+$ make run
|
||||
+$ make check
|
||||
+$ make rpm
|
||||
+$ make distclean
|
||||
+
|
||||
+All build results are stored in ./bin directory.
|
||||
--
|
||||
1.9.3
|
||||
|
||||
52
0007-Remove-function-malloc_readlink.patch
Normal file
52
0007-Remove-function-malloc_readlink.patch
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
From f5f7f625ff489bf0e68f4b99503188b7006807ce Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||
Date: Fri, 13 Mar 2015 16:11:01 +0100
|
||||
Subject: [PATCH] Remove function malloc_readlink
|
||||
|
||||
The same function was added to the libreport so there was a conflict between
|
||||
them.
|
||||
|
||||
Related to #1185626
|
||||
|
||||
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||
---
|
||||
src/abrt-checker.c | 23 -----------------------
|
||||
1 file changed, 23 deletions(-)
|
||||
|
||||
diff --git a/src/abrt-checker.c b/src/abrt-checker.c
|
||||
index 56f2fa4..4e1a450 100644
|
||||
--- a/src/abrt-checker.c
|
||||
+++ b/src/abrt-checker.c
|
||||
@@ -1039,29 +1039,6 @@ static void get_thread_name(
|
||||
}
|
||||
|
||||
|
||||
-/*
|
||||
- * Read executable name from link /proc/${PID}/exe
|
||||
- */
|
||||
-static char* malloc_readlink(const char *linkname)
|
||||
-{
|
||||
- char buf[PATH_MAX + 1];
|
||||
- int len;
|
||||
-
|
||||
- len = readlink(linkname, buf, sizeof(buf)-1);
|
||||
- if (len >= 0)
|
||||
- {
|
||||
- buf[len] = '\0';
|
||||
- char *p = malloc(strlen(buf) + 1);
|
||||
- if (p)
|
||||
- {
|
||||
- strcpy(p, buf);
|
||||
- }
|
||||
- return p;
|
||||
- }
|
||||
- return NULL;
|
||||
-}
|
||||
-
|
||||
-
|
||||
|
||||
/*
|
||||
* Read executable name from the special file /proc/${PID}/exe
|
||||
--
|
||||
1.9.3
|
||||
|
||||
31
0008-Makefile-Adds-srpm-target.patch
Normal file
31
0008-Makefile-Adds-srpm-target.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
From cde55c7b8e2bc35c1eb38dd96dc1606d1adbff2b Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||
Date: Fri, 13 Mar 2015 16:17:25 +0100
|
||||
Subject: [PATCH] Makefile: Adds srpm target
|
||||
|
||||
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||
---
|
||||
Makefile | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 2e20217..8802256 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -46,6 +46,13 @@ rpm: dist
|
||||
$(PKG_DIR)/abrt-java-connector.spec > $(OUT_DIR)/abrt-java-connector.spec && \
|
||||
rpmbuild $(RPM_DIRS) $(RPM_FLAGS) -ba $(OUT_DIR)/abrt-java-connector.spec
|
||||
|
||||
+.PHONY: srpm
|
||||
+srpm: dist
|
||||
+ sed -e 's/global commit .*$$/global commit '"$$(git log -1 --format=%H)"'/' \
|
||||
+ -e 's/%{?dist}/.'"$$(git log -1 --format=%h)%{?dist}"'/' \
|
||||
+ $(PKG_DIR)/abrt-java-connector.spec > $(OUT_DIR)/abrt-java-connector.spec && \
|
||||
+ rpmbuild $(RPM_DIRS) $(RPM_FLAGS) -bs $(OUT_DIR)/abrt-java-connector.spec
|
||||
+
|
||||
# Make sure the output dir is created
|
||||
$(OUT_DIR):
|
||||
mkdir -p $@ && cd $@ && cmake $$CMAKE_OPTS ../
|
||||
--
|
||||
1.9.3
|
||||
|
||||
130
0009-Update-the-test-results.patch
Normal file
130
0009-Update-the-test-results.patch
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
From 00bc0bad7dd7ce80ce8882d0adcf363aa719f5c5 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||
Date: Fri, 13 Mar 2015 16:18:20 +0100
|
||||
Subject: [PATCH] Update the test results
|
||||
|
||||
Updated:
|
||||
Linux-aarch64/run_test.log.in
|
||||
Linux-ppc64/run_test.log.in
|
||||
Linux-ppc64le/run_test.log.in
|
||||
|
||||
Related to #1185626
|
||||
|
||||
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||
---
|
||||
test/outputs/Linux-aarch64/run_test.log.in | 15 +++++++++------
|
||||
test/outputs/Linux-ppc64/run_test.log.in | 15 +++++++++------
|
||||
test/outputs/Linux-ppc64le/run_test.log.in | 15 +++++++++------
|
||||
3 files changed, 27 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/test/outputs/Linux-aarch64/run_test.log.in b/test/outputs/Linux-aarch64/run_test.log.in
|
||||
index 4ec6544..6456cd3 100644
|
||||
--- a/test/outputs/Linux-aarch64/run_test.log.in
|
||||
+++ b/test/outputs/Linux-aarch64/run_test.log.in
|
||||
@@ -1,22 +1,25 @@
|
||||
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
|
||||
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open0()
|
||||
Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory)
|
||||
- at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at java.io.FileInputStream.<init>(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
executable: @CMAKE_BINARY_DIR@/test/Test.class
|
||||
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
|
||||
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open0()
|
||||
Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
|
||||
- at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at java.io.FileInputStream.<init>(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
executable: @CMAKE_BINARY_DIR@/test/Test.class
|
||||
-Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.open()
|
||||
+Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.open0()
|
||||
Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
|
||||
- at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
+ at java.io.FileOutputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
+ at java.io.FileOutputStream.open(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
at java.io.FileOutputStream.<init>(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
at java.io.FileOutputStream.<init>(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
diff --git a/test/outputs/Linux-ppc64/run_test.log.in b/test/outputs/Linux-ppc64/run_test.log.in
|
||||
index 3d83a66..efc6d8e 100644
|
||||
--- a/test/outputs/Linux-ppc64/run_test.log.in
|
||||
+++ b/test/outputs/Linux-ppc64/run_test.log.in
|
||||
@@ -1,22 +1,25 @@
|
||||
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.<init>()
|
||||
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
|
||||
Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory)
|
||||
- at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at java.io.FileInputStream.<init>(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
executable: @CMAKE_BINARY_DIR@/test/Test.class
|
||||
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.<init>()
|
||||
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
|
||||
Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
|
||||
- at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at java.io.FileInputStream.<init>(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
executable: @CMAKE_BINARY_DIR@/test/Test.class
|
||||
-Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.<init>()
|
||||
+Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.open()
|
||||
Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
|
||||
- at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
+ at java.io.FileOutputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
+ at java.io.FileOutputStream.open(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
at java.io.FileOutputStream.<init>(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
at java.io.FileOutputStream.<init>(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
diff --git a/test/outputs/Linux-ppc64le/run_test.log.in b/test/outputs/Linux-ppc64le/run_test.log.in
|
||||
index 3d83a66..efc6d8e 100644
|
||||
--- a/test/outputs/Linux-ppc64le/run_test.log.in
|
||||
+++ b/test/outputs/Linux-ppc64le/run_test.log.in
|
||||
@@ -1,22 +1,25 @@
|
||||
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.<init>()
|
||||
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
|
||||
Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory)
|
||||
- at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at java.io.FileInputStream.<init>(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
executable: @CMAKE_BINARY_DIR@/test/Test.class
|
||||
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.<init>()
|
||||
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
|
||||
Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
|
||||
- at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
+ at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at java.io.FileInputStream.<init>(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
|
||||
at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
executable: @CMAKE_BINARY_DIR@/test/Test.class
|
||||
-Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.<init>()
|
||||
+Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.open()
|
||||
Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
|
||||
- at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
+ at java.io.FileOutputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
+ at java.io.FileOutputStream.open(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
at java.io.FileOutputStream.<init>(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
at java.io.FileOutputStream.<init>(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
|
||||
at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class]
|
||||
--
|
||||
1.9.3
|
||||
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Name: abrt-java-connector
|
||||
Version: 1.1.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: JNI Agent library converting Java exceptions to ABRT problems
|
||||
|
||||
Group: System Environment/Libraries
|
||||
|
|
@ -13,7 +13,7 @@ Source0: https://github.com/jfilak/%{name}/archive/%{commit}/%{name}-%{version}-
|
|||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: satyr-devel
|
||||
BuildRequires: libreport-devel
|
||||
BuildRequires: libreport-devel >= 2.4.0
|
||||
BuildRequires: abrt-devel
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: systemd-devel
|
||||
|
|
@ -30,6 +30,10 @@ Patch0002: 0002-Adapt-the-arm-test-outputs-to-java-1.8.patch
|
|||
Patch0003: 0003-Add-java-1.8-test-outputs-for-aarch-ppc-and-s390.patch
|
||||
Patch0004: 0004-Update-Linux-aarch64-test-outputs.patch
|
||||
Patch0005: 0005-Update-the-test-results.patch
|
||||
Patch0006: 0006-Update-README.patch
|
||||
Patch0007: 0007-Remove-function-malloc_readlink.patch
|
||||
Patch0008: 0008-Makefile-Adds-srpm-target.patch
|
||||
Patch0009: 0009-Update-the-test-results.patch
|
||||
|
||||
%description
|
||||
JNI library providing an agent capable to process both caught and uncaught
|
||||
|
|
@ -82,6 +86,11 @@ make test || {
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon Mar 16 2015 Matej Habrnal <mhabrnal@redhat.com> - 1.1.0-4
|
||||
- Make the dependency on systemd optional
|
||||
- Update the test results
|
||||
- Resolves: #1185626
|
||||
|
||||
* Tue Nov 04 2014 Jakub Filak <jfilak@redhat.com> - 1.1.0-3
|
||||
- Update the test results for armv7l
|
||||
|
||||
|
|
|
|||
Reference in a new issue