commit 9f8cc66f60318049bfff535b962289bb8e92e2df Author: Adam Samalik Date: Mon May 8 10:58:44 2023 +0200 import sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b456dde --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/parent-0.6.0.tar.gz diff --git a/prometheus-simpleclient-java.spec b/prometheus-simpleclient-java.spec new file mode 100644 index 0000000..a87a30c --- /dev/null +++ b/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. + diff --git a/sources b/sources new file mode 100644 index 0000000..6279df6 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (parent-0.6.0.tar.gz) = 4b204e31dd83924a6dcde2594d696e8bba5712100a503e3add91c62cc3bf1c8edd192dd4c90208494225ec34625e3511cc1781dcca341e9b3e7ef9af439d603c