Rebuild for new rpmlib, disable the missing class test
Signed-off-by: Jakub Filak <jfilak@redhat.com>
This commit is contained in:
parent
5d7ff98eef
commit
c911ef24ab
8 changed files with 195 additions and 9 deletions
85
0006-Make-the-dependency-on-systemd-optional.patch
Normal file
85
0006-Make-the-dependency-on-systemd-optional.patch
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
From e078503fcd9f74ccdd7e6c50c45e5e715f2dcda8 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 4 Feb 2015 06:30:25 +0100
|
||||
Subject: [PATCH] Make the dependency on systemd optional
|
||||
|
||||
Closes #44
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/CMakeLists.txt | 16 +++++++++++++---
|
||||
src/abrt-checker.c | 7 ++++++-
|
||||
2 files changed, 19 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index a178dcd..1d31602 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -1,10 +1,17 @@
|
||||
find_package(JNI REQUIRED)
|
||||
include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
|
||||
|
||||
-pkg_check_modules(PC_JOURNALD REQUIRED libsystemd-journal)
|
||||
include_directories(${PC_LIBREPORT_INCLUDE_DIRS})
|
||||
include_directories(${PC_ABRT_INCLUDE_DIRS})
|
||||
-include_directories(${PC_JOURNALD_INCLUDE_DIRS})
|
||||
+
|
||||
+pkg_check_modules(PC_JOURNALD libsystemd-journal)
|
||||
+
|
||||
+if (PC_JOURNALD_FOUND)
|
||||
+ include_directories(${PC_JOURNALD_INCLUDE_DIRS})
|
||||
+ add_definitions(-DHAVE_SYSTEMD=1)
|
||||
+else()
|
||||
+ add_definitions(-DHAVE_SYSTEMD=0)
|
||||
+endif (PC_JOURNALD_FOUND)
|
||||
|
||||
set(AbrtChecker_SRCS configuration.c abrt-checker.c
|
||||
jthrowable_circular_buf.c jthread_map.c)
|
||||
@@ -19,6 +26,9 @@ set_target_properties(
|
||||
|
||||
target_link_libraries(AbrtChecker ${PC_LIBREPORT_LIBRARIES})
|
||||
target_link_libraries(AbrtChecker ${PC_ABRT_LIBRARIES})
|
||||
-target_link_libraries(AbrtChecker ${PC_JOURNALD_LIBRARIES})
|
||||
+
|
||||
+if (PC_JOURNALD_FOUND)
|
||||
+ target_link_libraries(AbrtChecker ${PC_JOURNALD_LIBRARIES})
|
||||
+endif (PC_JOURNALD_FOUND)
|
||||
|
||||
install(TARGETS AbrtChecker DESTINATION ${JNIAGENTLIB_INSTALL_DIR})
|
||||
diff --git a/src/abrt-checker.c b/src/abrt-checker.c
|
||||
index 930e485..56f2fa4 100644
|
||||
--- a/src/abrt-checker.c
|
||||
+++ b/src/abrt-checker.c
|
||||
@@ -39,9 +39,12 @@
|
||||
#include <linux/limits.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
-#include <systemd/sd-journal.h>
|
||||
#include <syslog.h>
|
||||
|
||||
+#if HAVE_SYSTEMD_JOURNAL
|
||||
+#include <systemd/sd-journal.h>
|
||||
+#endif
|
||||
+
|
||||
/* Shared macros and so on */
|
||||
#include "abrt-checker.h"
|
||||
|
||||
@@ -689,6 +692,7 @@ static void report_stacktrace(
|
||||
syslog(LOG_ERR, "%s\n%s", message, stacktrace);
|
||||
}
|
||||
|
||||
+#if HAVE_SYSTEMD_JOURNAL
|
||||
if (globalConfig.reportErrosTo & ED_JOURNALD)
|
||||
{
|
||||
VERBOSE_PRINT("Reporting stack trace to JournalD\n");
|
||||
@@ -698,6 +702,7 @@ static void report_stacktrace(
|
||||
NULL);
|
||||
|
||||
}
|
||||
+#endif
|
||||
|
||||
log_print("%s\n", message);
|
||||
|
||||
--
|
||||
2.4.6
|
||||
|
||||
|
|
@ -31,5 +31,5 @@ index a8dbf2e..2657b11 100644
|
|||
+
|
||||
+All build results are stored in ./bin directory.
|
||||
--
|
||||
1.9.3
|
||||
2.4.6
|
||||
|
||||
|
|
@ -48,5 +48,5 @@ index 56f2fa4..4e1a450 100644
|
|||
/*
|
||||
* Read executable name from the special file /proc/${PID}/exe
|
||||
--
|
||||
1.9.3
|
||||
2.4.6
|
||||
|
||||
|
|
@ -27,5 +27,5 @@ index 2e20217..8802256 100644
|
|||
$(OUT_DIR):
|
||||
mkdir -p $@ && cd $@ && cmake $$CMAKE_OPTS ../
|
||||
--
|
||||
1.9.3
|
||||
2.4.6
|
||||
|
||||
|
|
@ -126,5 +126,5 @@ index 3d83a66..efc6d8e 100644
|
|||
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
|
||||
2.4.6
|
||||
|
||||
36
0011-Clearly-state-that-tests-cannot-be-run-under-root.patch
Normal file
36
0011-Clearly-state-that-tests-cannot-be-run-under-root.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
From 81a744f1b18475221feaffc8da120628a4ab5da4 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Mon, 13 Jul 2015 15:36:20 +0200
|
||||
Subject: [PATCH] Clearly state that tests cannot be run under root
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
README | 4 ++++
|
||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 8802256..15df319 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -67,4 +67,4 @@ distclean:
|
||||
|
||||
.PHONY: check
|
||||
check: build
|
||||
- cd $(OUT_DIR) && make test
|
||||
+ if [ "_0" != "_$$(id -u)" ]; then cd $(OUT_DIR) && make test; else echo "Cannot run tests under root user."; exit 1; fi
|
||||
diff --git a/README b/README
|
||||
index 2657b11..30d0bef 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -141,3 +141,7 @@ $ make rpm
|
||||
$ make distclean
|
||||
|
||||
All build results are stored in ./bin directory.
|
||||
+
|
||||
+The `check' make target will fail if you run it under root user. There are some
|
||||
+test cases that try to generate 'File Access Denied' exceptions and the easiest
|
||||
+way to achieve that is to try to access a root's file.
|
||||
--
|
||||
2.4.6
|
||||
|
||||
59
0012-Disable-ClassNotFoundException-test-again.patch
Normal file
59
0012-Disable-ClassNotFoundException-test-again.patch
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
From 9acaea3944d8f6d64040302b523c8160fd15bcd7 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 29 Jul 2015 18:49:58 +0200
|
||||
Subject: [PATCH] Disable ClassNotFoundException test again
|
||||
|
||||
java-1.8.0-openjdk started catching the ClassNotFoundException and
|
||||
has the same behaviour as java-1.7.0-openjdk now.
|
||||
---
|
||||
test/CMakeLists.txt | 32 +++++++++++++++++---------------
|
||||
1 file changed, 17 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
|
||||
index 291e9a1..6c2a3f8 100644
|
||||
--- a/test/CMakeLists.txt
|
||||
+++ b/test/CMakeLists.txt
|
||||
@@ -187,23 +187,25 @@ _add_test_target(
|
||||
_add_test(run_bad_class 2)
|
||||
|
||||
# Disable for JVM-1.7, because it catches the ClassNotFoundException in a native method and exits gracefully
|
||||
-_add_test_target(
|
||||
- run_missing_class_test
|
||||
- MissingClassTest
|
||||
- PRE rm -f MissingClassTest.class
|
||||
- DEPENDS ${TEST_JAVA_TARGETS} ${JAR_TEST_PATH}
|
||||
- AGENT_OPTIONS executable=threadclass
|
||||
-)
|
||||
-_add_test(run_missing_class_test 2)
|
||||
-
|
||||
-# Disable for JVM-1.8, because missing class causes an uncaught exception
|
||||
-#add_custom_target(
|
||||
+# 2015-07-29: Disable for JVM-1.8, because java started catching the exception in a native method again
|
||||
+#_add_test_target(
|
||||
# run_missing_class_test
|
||||
-# COMMAND rm -f MissingClassTest.class && LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=output=run_missing_class.log MissingClassTest || test ! -e run_missing_class.log
|
||||
-# DEPENDS AbrtChecker ${TEST_JAVA_TARGETS}
|
||||
-# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
+# MissingClassTest
|
||||
+# PRE rm -f MissingClassTest.class
|
||||
+# DEPENDS ${TEST_JAVA_TARGETS} ${JAR_TEST_PATH}
|
||||
+# AGENT_OPTIONS executable=threadclass
|
||||
#)
|
||||
-#add_test(test_run_missing_class_test make run_missing_class_test)
|
||||
+#_add_test(run_missing_class_test 2)
|
||||
+
|
||||
+# Disable for JVM-1.8, because missing class causes an uncaught exception
|
||||
+# 2015-07-29: Enable for all versions, because this error has stopped causing an uncaught exception with JVM-1.8
|
||||
+add_custom_target(
|
||||
+ run_missing_class_test
|
||||
+ COMMAND rm -f MissingClassTest.class && LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=output=run_missing_class.log MissingClassTest || test ! -e run_missing_class.log
|
||||
+ DEPENDS AbrtChecker ${TEST_JAVA_TARGETS}
|
||||
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
+)
|
||||
+add_test(test_run_missing_class_test make run_missing_class_test)
|
||||
|
||||
_add_test_target(
|
||||
run_try_finally
|
||||
--
|
||||
2.4.6
|
||||
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Name: abrt-java-connector
|
||||
Version: 1.1.0
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: JNI Agent library converting Java exceptions to ABRT problems
|
||||
|
||||
Group: System Environment/Libraries
|
||||
|
|
@ -30,10 +30,13 @@ 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
|
||||
Patch0006: 0006-Make-the-dependency-on-systemd-optional.patch
|
||||
Patch0007: 0007-Update-README.patch
|
||||
Patch0008: 0008-Remove-function-malloc_readlink.patch
|
||||
Patch0009: 0009-Makefile-Adds-srpm-target.patch
|
||||
Patch0010: 0010-Update-the-test-results.patch
|
||||
Patch0011: 0011-Clearly-state-that-tests-cannot-be-run-under-root.patch
|
||||
Patch0012: 0012-Disable-ClassNotFoundException-test-again.patch
|
||||
|
||||
%description
|
||||
JNI library providing an agent capable to process both caught and uncaught
|
||||
|
|
@ -86,6 +89,9 @@ make test || {
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue Jul 28 2015 Jakub Filak <jfilak@redhat.com> - 1.1.0-6
|
||||
- Rebuilt for new rpmlib : https://lists.fedoraproject.org/pipermail/devel/2015-July/212672.html
|
||||
|
||||
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Reference in a new issue