# HG changeset patch # User Severin Gehwolf # Date 1474375463 -7200 # Node ID fc1a3e0a8cf461bf2bb342f015e1b2455b12fac0 # Parent 04da543b538a5aa37b4de65d429441f5b27297f1 [RPM] Desktop integration and merge from downstream. Reviewed-by: jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2016-September/021018.html PR3177 diff -r 04da543b538a -r fc1a3e0a8cf4 distribution/packaging/fedora/thermostat.spec --- a/distribution/packaging/fedora/thermostat.spec Tue Sep 20 10:03:56 2016 +0200 +++ b/distribution/packaging/fedora/thermostat.spec Tue Sep 20 14:44:23 2016 +0200 @@ -64,7 +64,11 @@ %global javax_servlet_bundle_version 3.1.0 %global javax_servlet_bsn javax.servlet-api %global jgraphx_bundle_version 3.5.0 - %global jetty_version 9.4.0 + # xmvn-subst in rawhide and later fedoras support + # in reactor symlinking. See RHBZ#1226251 + %global xmvn_subst_args -R %{buildroot} . + %global jetty_version 9.4.0.M0 + %global tomcat_version 8 %else @@ -96,7 +100,9 @@ %global javax_servlet_bundle_version 3.0.0 %global javax_servlet_bsn javax.servlet %global jgraphx_bundle_version 3.1.2 - %global jetty_version 9.0.3.v20130506 + %global xmvn_subst_args . + %global jetty_version 9.0.3.v20130506 + %global tomcat_version 7 %endif @@ -133,6 +139,7 @@ %global system_logdir %{_root_localstatedir}/log/%{pkg_name} %global system_statedir %{_root_localstatedir}/run/%{pkg_name} %global system_sbindir %{_root_sbindir} + %global thermostat_desktop_app_name "'Thermostat (from SCL)'" %if 0%{?is_rhel_6} %global system_initrddir %{_root_sysconfdir}/rc.d/init.d/ %endif @@ -146,6 +153,7 @@ %global system_cachedir %{_localstatedir}/cache/%{pkg_name} %global system_logdir %{_localstatedir}/log/%{pkg_name} %global system_statedir %{_localstatedir}/run/%{pkg_name} + %global thermostat_desktop_app_name Thermostat } # system java dir definition (non-scl) %global system_javadir %{system_root_datadir}/java @@ -246,10 +254,12 @@ # is 4.3 OSGi spec. Patch2: 0002_shared_osgi_spec_fixes.patch +%{?scl: %if 0%{?non_bootstrap_build} # Work-around xmvn-subst limitation BuildRequires: %{?scl_prefix}thermostat-webapp = %{version} %endif +} # RHEL 6 does not have virtual provides java-devel >= 1.7 %if 0%{?is_rhel_6} @@ -471,9 +481,9 @@ %pom_add_dep "org.apache.lucene:lucene-core:%{lucene_version}" vm-heap-analysis/distribution # Fix up artifact names for jgraphx %pom_remove_dep "org.tinyjee.jgraphx:jgraphx" -%pom_add_dep "com.mxgraph:jgraphx:3.1.2.0" +%pom_add_dep "com.mxgraph:jgraphx:%{jgraphx_bundle_version}.0" %pom_remove_dep "org.tinyjee.jgraphx:jgraphx" thread/client-swing -%pom_add_dep "com.mxgraph:jgraphx:3.1.2.0" thread/client-swing +%pom_add_dep "com.mxgraph:jgraphx:%{jgraphx_bundle_version}.0" thread/client-swing # httpclient %pom_remove_dep org.apache.httpcomponents:httpclient-osgi web/client %pom_add_dep org.apache.httpcomponents:httpclient:4.4.0 web/client @@ -637,7 +647,10 @@ %mvn_build -f -- -Dthermostat.home=%{thermostat_home} \ -Dthermostat.system.user=thermostat \ -Dthermostat.system.group=thermostat \ + -Dthermostat.desktop.app.name=%{thermostat_desktop_app_name} \ -Dnetty.version=%{netty_bundle_version}.Final \ + -Dtomcat=%{tomcat_version} \ + -Dpkg_name=%{pkg_name} \ -Dcommons-logging.version=%{logging_bundle_version} \ -Dcommons-collections.version=%{collections_bundle_version} \ -Dcommons-codec.osgi-version=%{codec_bundle_version} \ @@ -655,7 +668,7 @@ -Dlucene.osgi-version=%{lucene_version} \ -Dosgi.compendium.bundle.symbolic-name=org.osgi.compendium \ -Dosgi.compendium.osgi-version=4.1.0 \ - -Djgraphx.osgi.version=%{jgraphx_bundle_version} \ + -Djgraphx.osgi.version=%{jgraphx_bundle_version}.0 \ -Djetty.javax.servlet.osgi.version=%{javax_servlet_bundle_version} \ -Djavax.servlet.bsn=%{javax_servlet_bsn} \ -Djetty.version=%{jetty_version} @@ -692,9 +705,11 @@ mkdir -p %{buildroot}%{_unitdir} %endif # Thermostat icon lives there -mkdir -p %{buildroot}%{_datarootdir}/icons/hicolor/scalable/apps -# Thermostat desktop lives there -mkdir -p %{buildroot}%{_datarootdir}/applications +mkdir -p %{buildroot}%{system_root_datadir}/icons/hicolor/scalable/apps +# Thermostat desktop file lives there +mkdir -p %{buildroot}%{system_root_datadir}/applications +# Thermostat app data file lives there +mkdir -p %{buildroot}%{system_root_datadir}/appdata # Example config files are in docdir mkdir -p %{buildroot}%{_docdir}/%{pkg_name} # Man page @@ -758,6 +773,11 @@ mkdir -p %{buildroot}%{system_root_datadir}/bash-completion/completions install -pm 644 distribution/target/packaging/bash-completion/thermostat-completion %{buildroot}%{system_root_datadir}/bash-completion/completions/%{pkg_name} +# install files needed for proper desktop integration +install -m 0644 distribution/target/packaging/desktop/%{pkg_name}.desktop %{buildroot}%{system_root_datadir}/applications/%{name}.desktop +install -m 0644 distribution/target/packaging/icons/256px.svg %{buildroot}%{system_root_datadir}/icons/hicolor/scalable/apps/%{name}.svg +install -m 0644 distribution/target/packaging/desktop/%{pkg_name}.appdata.xml %{buildroot}%{system_root_datadir}/appdata/%{name}.appdata.xml + rm -rf distribution/target/image/bin/%{pkg_name}.orig # Remove developer setup things. rm distribution/target/image/bin/thermostat-devsetup @@ -770,13 +790,13 @@ # Replace jars with symlinks to installed libs pushd %{buildroot}%{thermostat_home}/libs - xmvn-subst . + xmvn-subst %{xmvn_subst_args} popd # Do the same for thermostat plugin dirs pushd %{buildroot}%{thermostat_home}/plugins for plugin_name in $(ls); do pushd $plugin_name - xmvn-subst . + xmvn-subst %{xmvn_subst_args} popd done popd @@ -856,7 +876,7 @@ # Replace jars with symlinks pushd %{buildroot}%{thermostat_catalina_base}/webapps/%{pkg_name}/WEB-INF/lib - xmvn-subst . + xmvn-subst %{xmvn_subst_args} popd # Remove tools.jar (coming from the JVM). We also don't need jzlib.jars. @@ -953,7 +973,7 @@ # Install but don't activate %systemd_post %{?scl_prefix}%{pkg_name}-storage.service # Required for icon cache (i.e. Thermostat icon) -/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +/bin/touch --no-create %{system_root_datadir}/icons/hicolor &>/dev/null || : %post webapp # install but don't activate @@ -967,14 +987,14 @@ %postun # Required for icon cache (i.e. Thermostat icon) if [ $1 -eq 0 ] ; then - /bin/touch --no-create %{_datadir}/icons/hicolor &> /dev/null - /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + /bin/touch --no-create %{system_root_datadir}/icons/hicolor &> /dev/null + /usr/bin/gtk-update-icon-cache %{system_root_datadir}/icons/hicolor &>/dev/null || : fi %systemd_postun %{?scl_prefix}%{pkg_name}-storage.service %posttrans # Required for icon cache (i.e. Thermostat icon) -/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +/usr/bin/gtk-update-icon-cache %{system_root_datadir}/icons/hicolor &>/dev/null || : %files -f .mfiles %doc LICENSE @@ -1003,6 +1023,10 @@ # be installed %dir %{system_root_datadir}/bash-completion/completions %dir %{system_root_datadir}/bash-completion +# Own desktop related files +%{system_root_datadir}/applications/%{name}.desktop +%{system_root_datadir}/icons/hicolor/scalable/apps/%{name}.svg +%{system_root_datadir}/appdata/%{name}.appdata.xml %config(noreplace) %{_sysconfdir}/%{pkg_name}/plugins.d %config(noreplace) %{_sysconfdir}/%{pkg_name}/ssl.properties %config %{_sysconfdir}/%{pkg_name}/commands diff -r 04da543b538a -r fc1a3e0a8cf4 distribution/packaging/shared/desktop/thermostat.appdata.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/distribution/packaging/shared/desktop/thermostat.appdata.xml Tue Sep 20 14:44:23 2016 +0200 @@ -0,0 +1,73 @@ + + + + ${pkg_name}.desktop + CC-BY-SA-3.0 + GPL-2.0-with-classpath-exception + Thermostat + ${pkg_name} + Serviceability and Monitoring for OpenJDK + +

Thermostat is an instrumentation tool for the Hotspot JVM, + with support for monitoring multiple JVM instances on multiple hosts, + optionally in a cloud environment. +

+

+ The name Thermostat is intended as a play on words: Thermostat is to Hotspot much as IcedTea is to Java.

+
+ + + http://icedtea.classpath.org/thermostat/img/screenshot1.png + Examine memory regions and their sizes + + + http://icedtea.classpath.org/thermostat/img/screenshot2.png + Visualize thread states + + + http://icedtea.classpath.org/thermostat/img/screenshot3.png + Dump, browse and search the Java heap + + + http://icedtea.classpath.org/thermostat + sgehwolf@redhat.com + + HiDpiIcon + +
diff -r 04da543b538a -r fc1a3e0a8cf4 distribution/packaging/shared/desktop/thermostat.desktop --- a/distribution/packaging/shared/desktop/thermostat.desktop Tue Sep 20 10:03:56 2016 +0200 +++ b/distribution/packaging/shared/desktop/thermostat.desktop Tue Sep 20 14:44:23 2016 +0200 @@ -1,7 +1,7 @@ [Desktop Entry] Version=1.0 Type=Application -Name=Thermostat +Name=${thermostat.desktop.app.name} Comment=A monitoring and serviceability tool for OpenJDK -Exec=${thermostat.home}/bin/thermostat gui -Icon=thermostat +Exec=${thermostat.home}/bin/thermostat local +Icon=${pkg_name} diff -r 04da543b538a -r fc1a3e0a8cf4 pom.xml --- a/pom.xml Tue Sep 20 10:03:56 2016 +0200 +++ b/pom.xml Tue Sep 20 14:44:23 2016 +0200 @@ -139,6 +139,8 @@ under when run via systemd. --> thermostat thermostat + Thermostat + thermostat ${thermostat.build.directory}/${project.build.finalName} /usr/share/java @@ -584,4 +586,4 @@ http://icedtea.classpath.org/hg/thermostat - \ No newline at end of file +