## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.6.0 %global shortname prometheus # https://github.com/prometheus/prometheus %global goipath github.com/prometheus/prometheus Version: 2.32.1 %gometa %global common_description %{expand: The Prometheus monitoring system and time series database.} %global golicenses LICENSE NOTICE %global godocs docs CODE_OF_CONDUCT.md CONTRIBUTING.md\\\ MAINTAINERS.md SECURITY.md CHANGELOG.md README.md\\\ RELEASE.md Name: %{goname} Release: %autorelease Summary: Prometheus monitoring system and time series database # Upstream license specification: Apache-2.0 License: ASL 2.0 URL: %{gourl} Source0: %{gosource} # git clone https://github.com/prometheus/prometheus # cd prometheus # git checkout v%%{version} # go mod vendor # tar -czvf ../vendor-%%{version}.tar.gz vendor/ Source10: vendor-%{version}.tar.gz # unzip Source0 # run 'make assets' in it # rm -rf web/ui/react-app # tar czvf ../web-ui-2.32.1.tar.gz web/ui Source20: web-ui-%{version}.tar.gz Source1: %{shortname}.service Source2: %{shortname}.sysusers Source3: %{shortname}.yml Source4: %{shortname}.conf Source5: %{shortname}.logrotate Source6: README.consoles # Debian patch for default settings Patch0: defaults-paths.patch BuildRequires: systemd-rpm-macros Requires(pre): shadow-utils %description %{common_description} %prep %goprep -k %setup -q -T -D -a 10 -n prometheus-%{version} %setup -q -T -D -a 20 -n prometheus-%{version} %patch0 -p1 %build export BUILDTAGS="netgo builtinassets" LDFLAGS="-X github.com/prometheus/common/version.Version=%{version} \ -X github.com/prometheus/common/version.Revision=%{release} \ -X github.com/prometheus/common/version.Branch=tarball \ -X github.com/prometheus/common/version.BuildDate=$(date -u -d@$SOURCE_DATE_EPOCH +%%Y%%m%%d) " for cmd in cmd/* ; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -Dpm0644 %{S:2} %{buildroot}%{_sysusersdir}/%{shortname}.conf install -Dpm0644 %{S:1} %{buildroot}%{_unitdir}/%{shortname}.service install -Dpm0644 %{S:4} %{buildroot}%{_sysconfdir}/default/%{shortname} install -Dpm0644 %{S:3} %{buildroot}%{_sysconfdir}/prometheus/prometheus.yml install -Dpm0644 %{S:5} %{buildroot}%{_sysconfdir}/logrotate.d/prometheus mkdir -vp %{buildroot}%{_sysconfdir}/prometheus/consoles install -Dpm0644 %{S:6} %{buildroot}%{_sysconfdir}/prometheus/consoles/README.consoles mkdir -vp %{buildroot}%{_sysconfdir}/prometheus/console_libraries install -Dpm0644 %{S:6} %{buildroot}%{_sysconfdir}/prometheus/console_libraries/README.consoles mkdir -vp %{buildroot}%{_sharedstatedir}/prometheus # Build man pages. mkdir -vp %{buildroot}/%{_mandir}/man1/ %{buildroot}%{_bindir}/%{shortname} --help-man > \ %{buildroot}/%{_mandir}/man1/%{shortname}.1 %{buildroot}%{_bindir}/promtool --help-man > \ %{buildroot}/%{_mandir}/man1/promtool.1 sed -i '/^ /d; /^.SH "NAME"/,+1c.SH "NAME"\nprometheus \\- The Prometheus monitoring server' \ %{buildroot}/%{_mandir}/man1/%{shortname}.1 sed -i '/^ /d; /^.SH "NAME"/,+1c.SH "NAME"\npromtool \\- Tooling for the Prometheus monitoring system' \ %{buildroot}/%{_mandir}/man1/promtool.1 %pre %sysusers_create_compat %{SOURCE2} %post %systemd_post %{shortname}.service %preun %systemd_preun %{shortname}.service %postun %systemd_postun_with_restart %{shortname}.service %files %license LICENSE NOTICE %doc docs CODE_OF_CONDUCT.md CONTRIBUTING.md MAINTAINERS.md SECURITY.md %doc CHANGELOG.md README.md RELEASE.md %{_bindir}/* %dir %{_sysconfdir}/prometheus/ %dir %{_sysconfdir}/prometheus/consoles %dir %{_sysconfdir}/prometheus/console_libraries %config(noreplace) %{_sysconfdir}/prometheus/prometheus.yml %config(noreplace) %{_sysconfdir}/default/%{shortname} %config(noreplace) %{_sysconfdir}/logrotate.d/prometheus %{_sysconfdir}/prometheus/consoles/README.consoles %{_sysconfdir}/prometheus/console_libraries/README.consoles %{_mandir}/man1/%{shortname}.1* %{_mandir}/man1/promtool.1* %{_unitdir}/prometheus.service %{_sysusersdir}/prometheus.conf %dir %attr(0755,prometheus,prometheus) %{_sharedstatedir}/prometheus %changelog ## START: Generated by rpmautospec * Fri Jan 28 2022 Robert-André Mauchin - 2.32.1-3 - Remove mistake in service file * Fri Jan 21 2022 Robert-André Mauchin - 2.32.1-2 - Convert for EPEL9 * Sun Jan 16 2022 Robert-André Mauchin - 2.32.1-1 - Update to 2.32.1 Close: rhbz#2008820 Close: rhbz#2019206 Close: rhbz#2008986 * Sat Oct 02 2021 Robert-André Mauchin - 2.30.0-2 - Revert service file changes * Mon Sep 20 2021 Robert-André Mauchin - 2.30.0-1 - Update to 2.30.0 Close: rhbz1928323, rhbz#2005296 * Thu Jul 22 2021 Fedora Release Engineering - 2.24.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jun 15 17:51:49 CEST 2021 Robert-André Mauchin - 2.24.1-6 - Add systemd-sysusers as Requires - Fix: rhbz#1972026 * Sun Mar 28 18:57:11 CEST 2021 Robert-André Mauchin - 2.24.1-5 - Add ExecReload to service file * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2.24.1-4 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. * Tue Jan 26 22:05:24 CET 2021 Robert-André Mauchin - 2.24.1-3 - Set default settings in main.go - Embedded assets in the binary - Added a logrotate file - Fix: rhbz#1902496 * Tue Jan 26 2021 Fedora Release Engineering - 2.24.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Thu Jan 21 19:43:35 CET 2021 Robert-André Mauchin - 2.24.1-1 - Update to 2.24.1 - Close: rhbz#1918532 * Thu Jan 7 17:40:17 CET 2021 Robert-André Mauchin - 2.24.0-1 - Update to 2.24.0 - Close: rhbz#1911731 * Sat Dec 05 22:54:14 CET 2020 Robert-André Mauchin - 2.23.0-2 - Add new React based UI - Fix rhbz#1902496 * Thu Dec 03 13:12:59 CET 2020 Robert-André Mauchin - 2.23.0-1 - Update to 2.23.0 - Add configuration - Close rhbz#1866613 - Fix rhbz#1894089 - Fix rhbz#1902496 * Sat Aug 01 2020 Fedora Release Engineering - 2.20.0-2 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Thu Jul 30 22:32:01 CEST 2020 Robert-André Mauchin - 2.20.0-1 - Update to 2.20.0 * Mon Jul 27 2020 Fedora Release Engineering - 2.11.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Feb 17 2020 Elliott Sales de Andrade - 2.11.0-4 - Rebuilt for GHSA-jf24-p9p9-4rjh * Wed Jan 29 2020 Fedora Release Engineering - 2.11.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Jul 25 2019 Fedora Release Engineering - 2.11.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Tue Jul 09 19:29:38 CEST 2019 Robert-André Mauchin - 2.11.0-1 - Release 2.11.0 * Tue Jul 09 2019 Elliott Sales de Andrade - 2.9.2-2 - Add Obsoletes for old names * Wed May 15 03:08:50 CEST 2019 Robert-André Mauchin - 2.9.2-1 - Release 2.9.2 * Fri Feb 01 2019 Fedora Release Engineering - 1.8.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 1.8.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Feb 07 2018 Fedora Release Engineering - 1.8.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Tue Oct 10 2017 Jan Chaloupka - 1.8.0-1 - Update to 1.8.0 resolves: #1495180 * Tue Aug 22 2017 Jan Chaloupka - 0.15.0-8 - Polish the spec file * Wed Aug 02 2017 Fedora Release Engineering - 0.15.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 0.15.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 0.15.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Jul 21 2016 Fedora Release Engineering - 0.15.0-4 - https://fedoraproject.org/wiki/Changes/golang1.7 * Mon Feb 22 2016 Fedora Release Engineering - 0.15.0-3 - https://fedoraproject.org/wiki/Changes/golang1.6 * Wed Feb 03 2016 Fedora Release Engineering - 0.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jul 23 2015 jchaloup - 0.15.0-1 - Update to 0.15.0 resolves: #1246058 * Wed Jun 17 2015 Fedora Release Engineering - 0.13.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed May 13 2015 jchaloup - 0.13.3-2 - Add debug info related: #1190426 * Tue May 12 2015 jchaloup - 0.13.3-1 - Update to 0.13.3 related: #1190426 * Sat May 09 2015 jchaloup - 0.13.2-1 - Update to 0.13.2 related: #1190426 * Sat Feb 07 2015 jchaloup - 0-0.1.git4e6a807 - First package for Fedora resolves: #1190426 ## END: Generated by rpmautospec