From 688e347c224ac7541506731075f28c65d21d5eab Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Wed, 27 May 2020 00:05:39 +0000 Subject: [PATCH] import prometheus-simpleclient-java-0.6.0-5.el8 --- .gitignore | 1 + .prometheus-simpleclient-java.metadata | 1 + SPECS/prometheus-simpleclient-java.spec | 127 ++++++++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 .gitignore create mode 100644 .prometheus-simpleclient-java.metadata create mode 100644 SPECS/prometheus-simpleclient-java.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..41fc4fa --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/parent-0.6.0.tar.gz diff --git a/.prometheus-simpleclient-java.metadata b/.prometheus-simpleclient-java.metadata new file mode 100644 index 0000000..547e54a --- /dev/null +++ b/.prometheus-simpleclient-java.metadata @@ -0,0 +1 @@ +8e5c2c4cc0625c29e7995bfecb534b263922af46 SOURCES/parent-0.6.0.tar.gz diff --git a/SPECS/prometheus-simpleclient-java.spec b/SPECS/prometheus-simpleclient-java.spec new file mode 100644 index 0000000..a87a30c --- /dev/null +++ b/SPECS/prometheus-simpleclient-java.spec @@ -0,0 +1,127 @@ +%global version_id parent +%global upstream_name client_java + +Name: prometheus-simpleclient-java +Version: 0.6.0 +Release: 5%{?dist} +Summary: Prometheus JVM Client + +License: ASL 2.0 and CC0 +URL: https://github.com/prometheus/client_java/ + +Source0: https://github.com/prometheus/client_java/archive/%{version_id}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: maven-local +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(junit:junit) + +%description +Prometheus instrumentation library for JVM applications. + +%package tests +Summary: Tests jar for %{name} + +%description tests +This package contains %{summary}. + +%prep +%setup -q -n %{upstream_name}-%{version_id}-%{version} + +# Remove included jar files +find . -name \*.jar -print0 | xargs -0 rm + +# Only build the following artefacts as these are actually dependencies +# of prometheus_jmxexporter +# +# io.prometheus:simpleclient +# io.prometheus:simpleclient_hotspot +# io.prometheus:simpleclient_httpserver +# io.prometheus:simpleclient_common +for m in simpleclient_caffeine \ + simpleclient_dropwizard \ + simpleclient_graphite_bridge \ + simpleclient_hibernate \ + simpleclient_guava \ + simpleclient_log4j \ + simpleclient_log4j2 \ + simpleclient_logback \ + simpleclient_pushgateway \ + simpleclient_servlet \ + simpleclient_spring_web \ + simpleclient_spring_boot \ + simpleclient_jetty \ + simpleclient_jetty_jdk8 \ + simpleclient_vertx \ + benchmark; do +%pom_disable_module $m +done + +# Remove test dependencies for hotspot +%pom_remove_dep io.prometheus:simpleclient_servlet simpleclient_hotspot +%pom_remove_dep org.mockito:mockito-core simpleclient_hotspot +%pom_remove_dep org.eclipse.jetty:jetty-servlet simpleclient_hotspot +# Remove test dependencies for httpserver +%pom_remove_dep org.assertj:assertj-core simpleclient_httpserver + +# Don't depend on obsolete sonatype-oss-parent +# See: https://github.com/prometheus/client_java/pull/497 +%pom_xpath_remove pom:project/pom:parent + +# Remove tests which wouldn't compile with removed deps +for i in $(find simpleclient_hotspot/src/test/java/io/prometheus/client/hotspot -name \*.java); do + if ! echo $i | grep -q -E 'VersionInfoExportsTest\.java|MemoryAllocationExportsTest\.java'; then + rm $i + fi +done +rm -rf simpleclient_httpserver/src/test/java + +for i in simpleclient simpleclient_hotspot simpleclient_httpserver simpleclient_common; do +%pom_xpath_inject pom:project ' + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + + test-jar + + + + + + ' $i +%mvn_package io.prometheus:$i:jar:tests:%{version} tests +done + +%build +%mvn_build -j + +%install +%mvn_install + +%files -f .mfiles +%license LICENSE +%doc NOTICE + +%files tests -f .mfiles-tests + +%changelog +* Tue Oct 08 2019 Severin Gehwolf - 0.6.0-5 +- Add CC0 in License tag + +* Mon Oct 07 2019 Severin Gehwolf - 0.6.0-4 +- Rebuild + +* Thu Oct 03 2019 Severin Gehwolf - 0.6.0-3 +- Add tests sub-package. + +* Thu Oct 03 2019 Severin Gehwolf - 0.6.0-2 +- Enable some tests during build. + +* Mon Aug 12 2019 Severin Gehwolf - 0.6.0-1 +- Initial package. +