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