blackbox_exporter/blackbox_exporter.spec

54 lines
1.7 KiB
RPMSpec
Raw Normal View History

2021-08-05 19:47:42 +08:00
%define __debug_install_post %{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}" %{nil}
%define debug_package %{nil}
Name: blackbox_exporter
Version: 0.19.0
2023-03-30 16:44:01 +08:00
Release: 3
2021-08-05 19:47:42 +08:00
Summary: Prometheus blackbox prober exporter
License: Apache-2.0
Url: https://github.com/prometheus/blackbox_exporter
Source: https://github.com/prometheus/blackbox_exporter/archive/refs/tags/v%{version}.tar.gz
Source1: %{name}.service
Source2: vendor.tar.gz
2023-03-30 16:44:01 +08:00
Patch0: add-parameters-to-solve-the-strip.patch
2021-08-05 19:47:42 +08:00
BuildRequires: golang promu
Requires(pre): prometheus2
%description
The blackbox exporter allows blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP and ICMP.
%prep
%setup -q -n %{name}-%{version}
tar xvf %{SOURCE2} -C .
2023-03-30 16:44:01 +08:00
%patch0 -p1
2021-08-05 19:47:42 +08:00
%build
export GOFLAGS="-mod=vendor"
promu build
%install
mkdir -p %{buildroot}{%{_bindir},%{_unitdir},%{_sysconfdir}/prometheus}
install -m0755 %{name}-%{version} %{buildroot}%{_bindir}/%{name}
install -m0644 blackbox.yml %{buildroot}%{_sysconfdir}/prometheus/blackbox.yml
install -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
%post
2021-08-10 11:42:08 +08:00
%systemd_post %{name}.service
2021-08-05 19:47:42 +08:00
2021-08-10 11:42:08 +08:00
%preun
%systemd_preun %{name}.service
2021-08-05 19:47:42 +08:00
%files
%doc LICENSE README.md CONFIGURATION.md example.yml
%{_bindir}/*
%{_unitdir}/%{name}.service
%config(noreplace) %{_sysconfdir}/prometheus/blackbox.yml
%changelog
2023-03-30 16:44:01 +08:00
* Thu Mar 30 2023 wulei <wulei80@h-partners.com> - 0.23.0-3
- Add strip and pie
* Tue Aug 10 2021 huanghaitao <huanghaitao8@huawei.com> - 0.19.0-2
2021-08-10 11:42:08 +08:00
- Fix systemd macro spelling errors.
2021-08-05 19:47:42 +08:00
* Thu Aug 5 2021 huanghaitao <huanghaitao8@huawei.com> - 0.19.0-1
- package init