ad6d9c
%global commit befb850dbc72b117ad6bebabee314e7d41b97183
ad6d9c
%global shortcommit %(c=%{commit}; echo ${c:0:7})
ad6d9c
ad6d9c
Name:		abrt-java-connector
ad6d9c
Version:	1.0.6
6d9473
Release:	12%{?dist}
ad6d9c
Summary:	JNI Agent library converting Java exceptions to ABRT problems
ad6d9c
ad6d9c
Group:		System Environment/Libraries
ad6d9c
License:	GPLv2+
ad6d9c
URL:		https://github.com/jfilak/abrt-java-connector
ad6d9c
Source0:	https://github.com/jfilak/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
ad6d9c
b35d98
#Patch0001:	0001-Update-the-spec-file.patch
b35d98
Patch0002:	0002-Encapsulate-all-jthread_map-calls-inside-critical-se.patch
b35d98
Patch0003:	0003-Add-thread-stress-test.patch
b35d98
Patch0004:	0004-Make-thread-stress-test-more-robust.patch
b35d98
Patch0005:	0005-Unify-reason-message-format.patch
b35d98
Patch0006:	0006-Adapt-tests-to-the-recent-changes-in-formats.patch
b35d98
Patch0007:	0007-Add-tests-for-reason-message-shortening.patch
b35d98
Patch0008:	0008-Fix-a-bug-in-testdriver.patch
b35d98
Patch0009:	0009-Add-support-for-changing-log-directory.patch
b35d98
Patch0010:	0010-Make-log-output-disabled-by-default.patch
b35d98
Patch0011:	0011-Add-support-for-journald-and-syslog.patch
b35d98
Patch0012:	0012-Completely-disable-logging-in-ThreadStressTest.patch
b35d98
Patch0013:	0013-Make-ThreadStressTest-configurable.patch
b35d98
Patch0014:	0014-Add-an-abstract-to-README.patch
b35d98
Patch0015:	0015-Check-error-codes-of-jvmti-functions.patch
b35d98
Patch0016:	0016-Use-the-last-frame-s-class-path-for-executable.patch
b35d98
Patch0017:	0017-Provide-Arch-specific-StressTest-configuration.patch
b35d98
Patch0018:	0018-Fix-arch-specific-outputs.patch
b35d98
#Patch0019:	0019-Update-the-spec-file.patch
b35d98
Patch0020:	0020-Use-the-main-class-URL-for-executable.patch
b35d98
Patch0021:	0021-Add-documentation-for-executable-option.patch
b35d98
Patch0022:	0022-Exception-callback-code-optimizations.patch
b35d98
Patch0023:	0023-Do-not-enter-critical-section-if-not-necessary.patch
b35d98
Patch0024:	0024-Do-not-report-exceptions-caught-by-native-methods.patch
b35d98
Patch0025:	0025-Update-the-missing-class-test.patch
b35d98
Patch0026:	0026-Surround-all-JNI-calls-in-try-catch-all-block.patch
b35d98
Patch0027:	0027-Do-not-ship-own-reporting-workflow-definitions.patch
b35d98
#Patch0028:	0028-Remove-the-workflow-files-from-the-spec-file.patch
b35d98
Patch0029:	0029-Speed-up-ExceptionCatch-event-callback.patch
b35d98
Patch0030:	0030-Add-an-utility-for-stack-trace-analysis.patch
b35d98
Patch0031:	0031-Hook-the-stack-trace-analysis-tool-in-post-create.patch
b35d98
#Patch0032:	0032-Add-abrt-action-analyze-java-to-the-spec-file.patch
b35d98
Patch0033:	0033-Add-test-for-analysis-tool.patch
b35d98
Patch0034:	0034-Use-satyr-for-calculation-of-the-duplicates-hashes.patch
b35d98
Patch0035:	0035-Add-a-manual-page-for-the-analysis-tool.patch
b35d98
#Patch0036:	0036-Add-the-analysis-tool-s-manual-page-to-the-spec-file.patch
b35d98
#Patch0037:	0037-Add-build-requires-for-the-analysis-tool.patch
b35d98
Patch0038:	0038-Speed-up-thread-start-end-processing.patch
b35d98
#Patch0039:	0039-Update-the-spec-file.patch
b35d98
Patch0040:	0040-Fix-a-pair-of-defects-uncovered-by-coverity.patch
b35d98
Patch0041:	0041-Make-sure-that-agent_onload-and-agent_onunload-are-p.patch
b35d98
Patch0042:	0042-Add-a-test-for-multiple-calls-of-Agent_OnLoad.patch
b35d98
Patch0043:	0043-Add-test-results-for-Linux-aarch64.patch
300a69
Patch0044:	0044-Add-test-results-for-Linux-ppc64le.patch
300a69
Patch0045:	0045-Update-Linux-aarch64-tests-for-rhel-7.1.patch
300a69
Patch0046:	0046-Install-the-agent-lib-to-non-arch-specific-directory.patch
300a69
#Patch0047:	0047-Update-the-spec-file.patch
6d9473
Patch0048:	0048-Clearly-state-that-tests-cannot-be-run-under-root.patch
6d9473
Patch0049:	0049-Update-tests-for-rhel-7.4.patch
6d9473
Patch0050:	0050-Fix-a-deadlock-in-RemoteTest.patch
6d9473
Patch0051:	0051-Support-test-suite-output-files-for-multiple-Java-ve.patch
6d9473
Patch0052:	0052-Adapt-the-test-suite-to-Java-1.8.patch
6d9473
Patch0053:	0053-Decrease-the-tested-memory-limits-because-of-failure.patch
6d9473
Patch0054:	0054-Adapt-the-arm-test-outputs-to-java-1.8.patch
6d9473
Patch0055:	0055-Update-the-test-results.patch
6d9473
Patch0056:	0056-Update-the-test-results.patch
6d9473
Patch0057:	0057-Disable-ClassNotFoundException-test-again.patch
6d9473
Patch0058:	0058-Update-test-results-in-run_test.log.in.patch
6d9473
Patch0059:	0059-add-test-outputs-for-java-1.7.patch
6d9473
Patch0060:	0060-Update-tests-for-rhel-7.4-for-java-1.7.patch
b35d98
b35d98
# git is need for '%%autosetup -S git' which automatically applies all the
b35d98
# patches above. Please, be aware that the patches must be generated
b35d98
# by 'git format-patch'
b35d98
BuildRequires:	git
b35d98
ad6d9c
BuildRequires:	cmake
b35d98
BuildRequires:	satyr-devel
ad6d9c
BuildRequires:	libreport-devel
b35d98
BuildRequires:	abrt-devel
ad6d9c
BuildRequires:	java-1.7.0-openjdk-devel
b35d98
BuildRequires:	systemd-devel
b35d98
BuildRequires:	gettext
b35d98
b35d98
Requires:	abrt >= 2.1.11-3
ad6d9c
ad6d9c
ad6d9c
%description
ad6d9c
JNI library providing an agent capable to process both caught and uncaught
ad6d9c
exceptions and transform them to ABRT problems
ad6d9c
ad6d9c
ad6d9c
%prep
b35d98
# http://www.rpm.org/wiki/PackagerDocs/Autosetup
b35d98
# Default '__scm_apply_git' is 'git apply && git commit' but this workflow
b35d98
# doesn't allow us to create a new file within a patch, so we have to use
b35d98
# 'git am' (see /usr/lib/rpm/macros for more details)
b35d98
%define __scm_apply_git(qp:m:) %{__git} am
b35d98
%autosetup -S git -n %{name}-%{commit}
ad6d9c
ad6d9c
ad6d9c
%build
ad6d9c
%cmake -DCMAKE_BUILD_TYPE=Release
ad6d9c
make %{?_smp_mflags}
ad6d9c
ad6d9c
ad6d9c
%install
ad6d9c
make install DESTDIR=%{buildroot}
ad6d9c
ad6d9c
%files
ad6d9c
%doc LICENSE README AUTHORS
ad6d9c
%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format_java.conf
ad6d9c
%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_formatdup_java.conf
ad6d9c
%config(noreplace) %{_sysconfdir}/libreport/events.d/java_event.conf
b35d98
%{_bindir}/abrt-action-analyze-java
b35d98
%{_mandir}/man1/abrt-action-analyze-java.1*
ad6d9c
%{_mandir}/man5/java_event.conf.5*
ad6d9c
%{_mandir}/man5/bugzilla_format_java.conf.5*
ad6d9c
%{_mandir}/man5/bugzilla_formatdup_java.conf.5*
ad6d9c
300a69
# Applications may use a single subdirectory under/usr/lib.
300a69
# http://www.pathname.com/fhs/pub/fhs-2.3.html#PURPOSE22
300a69
#
300a69
# Java does not support multilib.
300a69
# https://fedorahosted.org/fesco/ticket/961
300a69
%{_prefix}/lib/abrt-java-connector
ad6d9c
ad6d9c
%check
6d9473
# Run tests as root can broke your system.
6d9473
# Tests are trying to modify system files in order
6d9473
# to get permission denied exceptions.
6d9473
# https://bugzilla.redhat.com/show_bug.cgi?id=1259309
6d9473
if [ "_0" != "_$(id -u)" ]; then
6d9473
    make test || {
6d9473
        cat Testing/Temporary/LastTest.log
6d9473
        exit 69
6d9473
    }
6d9473
else
6d9473
    echo "Cannot run tests under root user.";
6d9473
    exit 1;
6d9473
fi
6d9473
ad6d9c
ad6d9c
ad6d9c
300a69
%changelog
6d9473
* Mon May 15 2017 Matej Habrnal <mhabrnal@redhat.com> - 1.0.6-12
6d9473
- Fix the tests cannot be run under root
6d9473
- Resolves: #1259309
6d9473
6d9473
* Tue May  9 2017 Matej Habrnal <mhabrnal@redhat.com> - 1.0.6-11
6d9473
- update test outputs to work with java-1.8.0-openjdk
6d9473
- Resolves: #1436776
6d9473
6d9473
* Tue Feb 14 2017 Matej Habrnal <mhabrnal@redhat.com> - 1.0.6-10
6d9473
- Clearly state that tests cannot be run under root
6d9473
- Resolves: #1259309
6d9473
300a69
* Thu Jul 02 2015 Jakub Filak <jfilak@redhat.com> - 1.0.6-9
300a69
- Install the library to /usr/lib/abrt-java-connector on all arches
300a69
- Resolves: #1238578
ad6d9c
300a69
* Mon Sep 22 2014 Jakub Filak <jfilak@redhat.com> - 1.0.6-8
300a69
- Adapt aarch64 test results to RHEL7.1
300a69
- Resolves: #1133406
ad6d9c
300a69
* Thu Aug 21 2014 Jakub Filak <jfilak@redhat.com> - 1.0.6-7
300a69
- Add test results for Linux-ppc64le
300a69
- Resolves: #1125469
ad6d9c
b35d98
* Tue Feb 11 2014 Jakub Filak <jfilak@redhat.com> - 1.0.6-6
b35d98
- Make sure that agent_onload and agent_onunload are processed only once
b35d98
- Add test results for Linux-aarch64
b35d98
- Resolves: #1044756, #1063322
b35d98
b35d98
* Fri Jan 31 2014 Jakub Filak <jfilak@redhat.com> - 1.0.6-5
b35d98
- Fix a pair of defects uncovered by covscan
b35d98
- Resolves: #1056584
b35d98
b35d98
* Tue Jan 28 2014 Daniel Mach <dmach@redhat.com> - 1.0.6-4
b35d98
- Mass rebuild 2014-01-24
b35d98
b35d98
* Wed Jan 22 2014 Jakub Filak <jfilak@redhat.com> - 1.0.6-3
b35d98
- Mark stack trace with remote paths as not-reportable
b35d98
- Do not provide own reporting workflows
b35d98
- Code optimization
b35d98
- Do not report exception caught by native functions
b35d98
- Use the last frame class path for executable
b35d98
- Gracefully handle JVMTI errors
b35d98
- Add an abstract to README
b35d98
- Add support for journald and syslog
b35d98
- Make log output disabled by default
b35d98
- Add support for changing log directory
b35d98
- Fix a race condition causing a crash of JVM
b35d98
- Related: #1051198
b35d98
- Resolves: #1051483, #1054720, #1054737, #1055581
b35d98
b35d98
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.6-2
b35d98
- Mass rebuild 2013-12-27
b35d98
ad6d9c
* Tue Oct 01 2013 Jakub Filak <jfilak@redhat.com> - 1.0.6-1
ad6d9c
- Fix a deadlock in GC start callback
ad6d9c
- Disable experimental features in production releases
ad6d9c
- Resolves: #1012827
ad6d9c
ad6d9c
* Tue Jul 30 2013 Jakub Filak <jfilak@redhat.com> - 1.0.5-1
ad6d9c
- Provide a proper configuration for libreport
ad6d9c
ad6d9c
* Thu Jul 18 2013 Jakub Filak <jfilak@redhat.com> - 1.0.4-1
ad6d9c
- Stop creating an empty log file
ad6d9c
- Resolves: #985776
ad6d9c
ad6d9c
* Tue Jul 16 2013 Jakub Filak <jfilak@redhat.com> - 1.0.3-1
ad6d9c
- Fix tests on arm
ad6d9c
ad6d9c
* Tue Jul 09 2013 Jakub Filak <jfilak@redhat.com> - 1.0.2-1
ad6d9c
- Do not crash on empty command line options
ad6d9c
ad6d9c
* Mon Jul 08 2013 Jakub Filak <jfilak@redhat.com> - 1.0.1-1
ad6d9c
- Fix tests on ppc and s390 on both 32 and 64 bit
ad6d9c
ad6d9c
* Thu Jun 27 2013 Jakub Filak <jfilak@redhat.com> - 1.0.0-1
ad6d9c
- Publicly releasable version
ad6d9c
ad6d9c
* Mon Jun 03 2013 Jakub Filak <jfilak@redhat.com> - 0.1.2-1
ad6d9c
- Start versioning library
ad6d9c
- Drop build dependency on abrt-devel
ad6d9c
ad6d9c
* Mon Jun 03 2013 Jakub Filak <jfilak@redhat.com> - 0.1.1-2
ad6d9c
- Provide ABRT configuration
ad6d9c
ad6d9c
* Mon Jun 03 2013 Jakub Filak <jfilak@redhat.com> - 0.1.1-1
ad6d9c
- New release
ad6d9c
ad6d9c
* Fri May 31 2013 Jakub Filak <jfilak@redhat.com> - 0.1.0-3
ad6d9c
- Build with the library name same as the package name
ad6d9c
ad6d9c
* Fri May 31 2013 Jakub Filak <jfilak@redhat.com> - 0.1.0-2
ad6d9c
- Build with ABRT enabled
ad6d9c
ad6d9c
* Fri May 31 2013 Jakub Filak <jfilak@redhat.com> - 0.1.0-1
ad6d9c
- Initial version