# HG changeset patch # User Yasumasa Suenaga # Date 1499764501 -32400 # Node ID 5ee1c4138b6165d4528a962ff62cc73c91308675 # Parent 7c9a56ccbb500c83ebcaec3390638c7adee2756e Bug 3419: Provide FXAnalyzer RPM package for Fedora Reviewed-by: ykubota https://github.com/HeapStats/heapstats/pull/108 diff -r 7c9a56ccbb50 -r 5ee1c4138b61 ChangeLog --- a/ChangeLog Mon Jul 10 21:29:28 2017 +0900 +++ b/ChangeLog Tue Jul 11 18:15:01 2017 +0900 @@ -1,3 +1,7 @@ +2017-07-11 Yasumasa Suenaga + + * Bug 3419: Provide FXAnalyzer RPM package for Fedora + 2017-07-10 Yasumasa Suenaga * Bug 3418: [TEST] GCWatcher and SnapShotProcessor tests might hang diff -r 7c9a56ccbb50 -r 5ee1c4138b61 Makefile.am --- a/Makefile.am Mon Jul 10 21:29:28 2017 +0900 +++ b/Makefile.am Tue Jul 11 18:15:01 2017 +0900 @@ -3,8 +3,8 @@ MVN = @MVN@ JAVA_HOME = @JDK_DIR@ -ANALYZER_DIR = $(srcdir)/analyzer/fx/target/heapstats-analyzer-$(PACKAGE_VERSION)-bin/heapstats-analyzer-$(PACKAGE_VERSION) -CLI_DIR = $(srcdir)/analyzer/cli/target/heapstats-cli-$(PACKAGE_VERSION)-bin/heapstats-cli-$(PACKAGE_VERSION) +ANALYZER_DIR = $(srcdir)/analyzer/fx/target/heapstats-analyzer-*-bin/heapstats-analyzer-* +CLI_DIR = $(srcdir)/analyzer/cli/target/heapstats-cli-*-bin/heapstats-cli-* .PHONY: $(SUBDIRS) analyzer @@ -36,8 +36,9 @@ $(INSTALL_DATA) $(ANALYZER_DIR)/lib/jgraphx.jar $(DESTDIR)/$(libexecdir)/lib $(INSTALL_DATA) $(CLI_DIR)/heapstats-cli.jar $(DESTDIR)/$(libexecdir) $(INSTALL_PROGRAM) $(srcdir)/analyzer/cli/heapstats-cli $(DESTDIR)/$(bindir) + $(INSTALL_PROGRAM) $(srcdir)/analyzer/fx/heapstats-analyzer $(DESTDIR)/$(bindir) uninstall-local: rm -fR $(DESTDIR)/$(libexecdir)/lib - $(RM) $(DESTDIR)/$(libexecdir)/THIRD_PARTY_README $(DESTDIR)/$(libexecdir)/filterDefine.xsd $(DESTDIR)/$(libexecdir)/heapstats* $(DESTDIR)/$(bindir)/heapstats-cli + $(RM) $(DESTDIR)/$(libexecdir)/THIRD_PARTY_README $(DESTDIR)/$(libexecdir)/filterDefine.xsd $(DESTDIR)/$(libexecdir)/heapstats* $(DESTDIR)/$(bindir)/heapstats-cli $(DESTDIR)/$(bindir)/heapstats-analyzer diff -r 7c9a56ccbb50 -r 5ee1c4138b61 Makefile.in --- a/Makefile.in Mon Jul 10 21:29:28 2017 +0900 +++ b/Makefile.in Tue Jul 11 18:15:01 2017 +0900 @@ -98,7 +98,8 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = analyzer/cli/heapstats-cli +CONFIG_CLEAN_FILES = analyzer/cli/heapstats-cli \ + analyzer/fx/heapstats-analyzer CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -159,7 +160,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/./m4/compile \ $(top_srcdir)/./m4/config.guess $(top_srcdir)/./m4/config.sub \ $(top_srcdir)/./m4/install-sh $(top_srcdir)/./m4/missing \ - $(top_srcdir)/analyzer/cli/heapstats-cli.in ./m4/compile \ + $(top_srcdir)/analyzer/cli/heapstats-cli.in \ + $(top_srcdir)/analyzer/fx/heapstats-analyzer.in ./m4/compile \ ./m4/config.guess ./m4/config.sub ./m4/depcomp ./m4/install-sh \ ./m4/missing AUTHORS COPYING ChangeLog INSTALL NEWS README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -322,8 +324,8 @@ ACLOCAL_AMFLAGS = -I ./m4 SUBDIRS = agent mbean JAVA_HOME = @JDK_DIR@ -ANALYZER_DIR = $(srcdir)/analyzer/fx/target/heapstats-analyzer-$(PACKAGE_VERSION)-bin/heapstats-analyzer-$(PACKAGE_VERSION) -CLI_DIR = $(srcdir)/analyzer/cli/target/heapstats-cli-$(PACKAGE_VERSION)-bin/heapstats-cli-$(PACKAGE_VERSION) +ANALYZER_DIR = $(srcdir)/analyzer/fx/target/heapstats-analyzer-*-bin/heapstats-analyzer-* +CLI_DIR = $(srcdir)/analyzer/cli/target/heapstats-cli-*-bin/heapstats-cli-* all: all-recursive .SUFFIXES: @@ -362,6 +364,8 @@ $(am__aclocal_m4_deps): analyzer/cli/heapstats-cli: $(top_builddir)/config.status $(top_srcdir)/analyzer/cli/heapstats-cli.in cd $(top_builddir) && $(SHELL) ./config.status $@ +analyzer/fx/heapstats-analyzer: $(top_builddir)/config.status $(top_srcdir)/analyzer/fx/heapstats-analyzer.in + cd $(top_builddir) && $(SHELL) ./config.status $@ # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -811,10 +815,11 @@ $(INSTALL_DATA) $(ANALYZER_DIR)/lib/jgraphx.jar $(DESTDIR)/$(libexecdir)/lib $(INSTALL_DATA) $(CLI_DIR)/heapstats-cli.jar $(DESTDIR)/$(libexecdir) $(INSTALL_PROGRAM) $(srcdir)/analyzer/cli/heapstats-cli $(DESTDIR)/$(bindir) + $(INSTALL_PROGRAM) $(srcdir)/analyzer/fx/heapstats-analyzer $(DESTDIR)/$(bindir) uninstall-local: rm -fR $(DESTDIR)/$(libexecdir)/lib - $(RM) $(DESTDIR)/$(libexecdir)/THIRD_PARTY_README $(DESTDIR)/$(libexecdir)/filterDefine.xsd $(DESTDIR)/$(libexecdir)/heapstats* $(DESTDIR)/$(bindir)/heapstats-cli + $(RM) $(DESTDIR)/$(libexecdir)/THIRD_PARTY_README $(DESTDIR)/$(libexecdir)/filterDefine.xsd $(DESTDIR)/$(libexecdir)/heapstats* $(DESTDIR)/$(bindir)/heapstats-cli $(DESTDIR)/$(bindir)/heapstats-analyzer # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -r 7c9a56ccbb50 -r 5ee1c4138b61 analyzer/fx/heapstats-analyzer.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/analyzer/fx/heapstats-analyzer.in Tue Jul 11 18:15:01 2017 +0900 @@ -0,0 +1,16 @@ +#!/bin/sh + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libexecdir=@libexecdir@ + +ANALYZER_JAR="$libexecdir/heapstats-analyzer.jar" + +if test -x $JAVA_HOME/bin/java; then + $JAVA_HOME/bin/java $JAVA_OPTS -jar $ANALYZER_JAR $@ +elif test -z "$JAVA_HOME"; then + echo "Set \$JAVA_HOME to run heapstats-analyzer" +else + echo "Set \$JAVA_HOME correctly to run heapstats-analyzer" +fi + diff -r 7c9a56ccbb50 -r 5ee1c4138b61 analyzer/fx/pom.xml --- a/analyzer/fx/pom.xml Mon Jul 10 21:29:28 2017 +0900 +++ b/analyzer/fx/pom.xml Tue Jul 11 18:15:01 2017 +0900 @@ -141,6 +141,7 @@ lib/jgraphx.jar + heapstats-analyzer diff -r 7c9a56ccbb50 -r 5ee1c4138b61 configure --- a/configure Mon Jul 10 21:29:28 2017 +0900 +++ b/configure Tue Jul 11 18:15:01 2017 +0900 @@ -8664,7 +8664,7 @@ # end of configure attacher --------------------------------------------------- -ac_config_files="$ac_config_files Makefile agent/Makefile agent/src/Makefile agent/src/heapstats-engines/Makefile agent/attacher/Makefile agent/attacher/heapstats-attacher agent/src/iotracer/Makefile mbean/Makefile mbean/native/Makefile analyzer/cli/heapstats-cli" +ac_config_files="$ac_config_files Makefile agent/Makefile agent/src/Makefile agent/src/heapstats-engines/Makefile agent/attacher/Makefile agent/attacher/heapstats-attacher agent/src/iotracer/Makefile mbean/Makefile mbean/native/Makefile analyzer/cli/heapstats-cli analyzer/fx/heapstats-analyzer" ac_config_files="$ac_config_files agent/heapstats.conf" @@ -9478,6 +9478,7 @@ "mbean/Makefile") CONFIG_FILES="$CONFIG_FILES mbean/Makefile" ;; "mbean/native/Makefile") CONFIG_FILES="$CONFIG_FILES mbean/native/Makefile" ;; "analyzer/cli/heapstats-cli") CONFIG_FILES="$CONFIG_FILES analyzer/cli/heapstats-cli" ;; + "analyzer/fx/heapstats-analyzer") CONFIG_FILES="$CONFIG_FILES analyzer/fx/heapstats-analyzer" ;; "agent/heapstats.conf") CONFIG_FILES="$CONFIG_FILES agent/heapstats.conf" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; diff -r 7c9a56ccbb50 -r 5ee1c4138b61 configure.ac --- a/configure.ac Mon Jul 10 21:29:28 2017 +0900 +++ b/configure.ac Tue Jul 11 18:15:01 2017 +0900 @@ -402,7 +402,7 @@ # end of configure attacher --------------------------------------------------- -AC_CONFIG_FILES([Makefile agent/Makefile agent/src/Makefile agent/src/heapstats-engines/Makefile agent/attacher/Makefile agent/attacher/heapstats-attacher agent/src/iotracer/Makefile mbean/Makefile mbean/native/Makefile analyzer/cli/heapstats-cli]) +AC_CONFIG_FILES([Makefile agent/Makefile agent/src/Makefile agent/src/heapstats-engines/Makefile agent/attacher/Makefile agent/attacher/heapstats-attacher agent/src/iotracer/Makefile mbean/Makefile mbean/native/Makefile analyzer/cli/heapstats-cli analyzer/fx/heapstats-analyzer]) AC_CONFIG_FILES([agent/heapstats.conf]) AC_OUTPUT diff -r 7c9a56ccbb50 -r 5ee1c4138b61 specs/heapstats.spec --- a/specs/heapstats.spec Mon Jul 10 21:29:28 2017 +0900 +++ b/specs/heapstats.spec Tue Jul 11 18:15:01 2017 +0900 @@ -12,6 +12,11 @@ #Patch0: none Buildroot: /var/tmp/heapstats +# Check OpenJFX supported platform +%if %{?fedora:%{fedora}}%{!?fedora:0} >= 26 +%define WITH_ANALYZER 1 +%endif + # Requires for running Requires: pcre >= 6 @@ -23,20 +28,38 @@ BuildRequires: binutils-devel BuildRequires: autoconf BuildRequires: automake -BuildRequires: maven + +%if 0%{?WITH_ANALYZER:1} +BuildRequires: java-1.8.0-openjdk-openjfx-devel +%endif %package cli Summary: HeapStats CLI Group: Development/Tools BuildArch: noarch +%if 0%{?WITH_ANALYZER:1} +%package analyzer +Summary: HeapStats Analyzer +Group: Development/Tools +BuildArch: noarch +Requires: java-1.8.0-openjdk-openjfx +Requires: heapstats-cli +%endif + %description A lightweight monitoring JVMTI agent for Java HotSpot VM. -Copyright (C) 2011-2016 Nippon Telegraph and Telephone Corporation. +Copyright (C) 2011-2017 Nippon Telegraph and Telephone Corporation. %description cli Commandline analysis tool for HeapStats. -Copyright (C) 2011-2016 Nippon Telegraph and Telephone Corporation. +Copyright (C) 2011-2017 Nippon Telegraph and Telephone Corporation. + +%if 0%{?WITH_ANALYZER:1} +%description analyzer +HeapStats GUI Analyzer +Copyright (C) 2011-2017 Nippon Telegraph and Telephone Corporation. +%endif %prep %setup -q -n heapstats-2.0 @@ -56,30 +79,40 @@ --enable-optimize \ --without-gcov \ --disable-profile -make agent mbean RPM_OPT_FLAGS="$RPM_OPT_FLAGS" -mvn -am -pl analyzer/cli package + +%if 0%{?WITH_ANALYZER:1} + make +%else + make agent mbean RPM_OPT_FLAGS="$RPM_OPT_FLAGS" + mvn -am -pl analyzer/cli package +%endif %install rm -rf $RPM_BUILD_ROOT -mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/heapstats -cd agent -make install DESTDIR=${RPM_BUILD_ROOT} -cd ../mbean -make install DESTDIR=${RPM_BUILD_ROOT} -cd ../ mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d/ echo "%{_libdir}/heapstats" \ >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/heapstats-agent.conf mkdir -p $RPM_BUILD_ROOT/usr/share/snmp/mibs/ cp ./agent/mib/HeapStatsMibs.txt $RPM_BUILD_ROOT/usr/share/snmp/mibs/ -# We do not privide FX analyzer. -# So we install CLI analyzer manually. -mkdir -p ${RPM_BUILD_ROOT}/%{_libexecdir}/heapstats -cp -fR ./analyzer/cli/target/heapstats-cli-*-bin/heapstats-cli-*/* \ +%if 0%{?WITH_ANALYZER:1} + make install DESTDIR=${RPM_BUILD_ROOT} +%else + mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/heapstats + cd agent + make install DESTDIR=${RPM_BUILD_ROOT} + cd ../mbean + make install DESTDIR=${RPM_BUILD_ROOT} + cd ../ + + # We do not privide FX analyzer. + # So we install CLI analyzer manually. + mkdir -p ${RPM_BUILD_ROOT}/%{_libexecdir}/heapstats + cp -fR ./analyzer/cli/target/heapstats-cli-*-bin/heapstats-cli-*/* \ ${RPM_BUILD_ROOT}%{_libexecdir}/heapstats/ -cp -f ./analyzer/cli/heapstats-cli ${RPM_BUILD_ROOT}%{_bindir} -chmod a+x ${RPM_BUILD_ROOT}%{_bindir}/heapstats-cli + cp -f ./analyzer/cli/heapstats-cli ${RPM_BUILD_ROOT}%{_bindir} + chmod a+x ${RPM_BUILD_ROOT}%{_bindir}/heapstats-cli +%endif %post /sbin/ldconfig @@ -121,8 +154,19 @@ %{_libexecdir}/heapstats/lib/heapstats-mbean.jar %{_libexecdir}/heapstats/lib/heapstats-jmx-helper.jar +%if 0%{?WITH_ANALYZER:1} +%files analyzer +/usr/bin/heapstats-analyzer +%{_libexecdir}/heapstats/heapstats-analyzer.jar +%{_libexecdir}/heapstats/THIRD_PARTY_README +%{_libexecdir}/heapstats/filterDefine.xsd +%{_libexecdir}/heapstats/heapstats.properties +%{_libexecdir}/heapstats/lib/jgraphx.jar +%endif %changelog +* Tue Jul 11 2017 Yasumasa Suenaga +- Add Analyzer package. * Tue Feb 09 2016 KUBOTA Yuji - Set version to 2.0.trunk * Thu Oct 22 2015 Yasumasa Suenaga