blackbox_exporter/blackbox_exporter.spec

65 lines
1.9 KiB
RPMSpec
Raw Normal View History

2021-08-05 19:47:42 +08:00
%define debug_package %{nil}
2024-01-02 16:16:14 +08:00
2021-08-05 19:47:42 +08:00
Name: blackbox_exporter
2024-01-02 16:16:14 +08:00
Version: 0.24.0
Release: 1
2021-08-05 19:47:42 +08:00
Summary: Prometheus blackbox prober exporter
License: Apache-2.0
2023-01-31 10:09:22 +08:00
URL: https://github.com/prometheus/blackbox_exporter
2024-01-02 16:16:14 +08:00
Source0: https://github.com/prometheus/blackbox_exporter/archive/v%{version}/%{name}-%{version}.tar.gz
2021-08-05 19:47:42 +08:00
Source1: %{name}.service
2024-01-02 16:16:14 +08:00
# tar -xvf Source0
# run 'go mod vendor' in it
# tar -czvf blackbox_exporter-vendor.tar.gz vendor
Source2: blackbox_exporter-vendor.tar.gz
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 .
%patch0 -p1
2021-08-05 19:47:42 +08:00
%build
export GOFLAGS="-mod=vendor"
promu build
%install
2024-01-02 16:16:14 +08:00
install -D -m 0755 %{name}-%{version} %{buildroot}%{_bindir}/%{name}
install -D -m 0644 blackbox.yml %{buildroot}%{_sysconfdir}/prometheus/blackbox.yml
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
2021-08-05 19:47:42 +08:00
%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
2024-01-02 16:16:14 +08:00
* Tue Jan 02 2024 jiangxinyu <jiangxinyu@kylinos.cn> - 0.24.0-1
- Update package to version 0.24.0
* Fri Mar 10 2023 wulei <wulei80@h-partners.com> - 0.23.0-3
- Delete linkmode
* Thu Mar 02 2023 wulei <wulei80@h-partners.com> - 0.23.0-2
- Add strip and pie
2023-01-31 10:09:22 +08:00
* Tue Jan 31 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 0.23.0-1
- Update package to version 0.23.0
2022-06-08 14:16:04 +08:00
* 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