Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:tbadm
blackbox_exporter
blackbox_exporter.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File blackbox_exporter.spec of Package blackbox_exporter
# # spec file for package blackbox_exporter # # Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: blackbox_exporter Version: 0.25.0 Release: 0 Summary: Prometheus blackbox exporter License: Apache-2.0 URL: https://github.com/prometheus/blackbox_exporter Group: System/Monitoring Distribution: %{_repository} Source0: %{name}-%{version}.tar.gz Source1: vendor.tar.gz Source2: %{name}.sysconfig Source3: %{name}.service Source4: %{name}-sysusers.conf BuildRequires: golang-packaging BuildRequires: sysuser-shadow BuildRequires: sysuser-tools Requires(post): %fillup_prereq Provides: prometheus(%{name}) ExcludeArch: s390 %{?systemd_ordering} %sysusers_requires %if ! %{defined _fillupdir} %define _fillupdir /var/adm/fillup-templates %endif %description Prometheus blackbox exporter allows blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP, ICMP and gRPC. %prep %setup -q -n %{name}-%{version} # unpack project sources %setup -q -n %{name}-%{version} -T -D -a 1 # unpack go dependencies in vendor.tar.gz, which was prepared by the source services %build # build blackbox_exporter %{goprep} github.com/prometheus/blackbox_exporter go build \ -mod=vendor \ -buildmode=pie \ -ldflags="-w -s" \ -o %{name} %install # install blackbox_exporter config, service, binary install -Dm 0644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.%{name} install -Dm 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service install -Dm 0755 %{name} %{buildroot}%{_sbindir}/%{name} # create rc-symlink pushd %{buildroot}%{_sbindir} ln -s service rc%{name} popd # install system user install -Dm 0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/%{name}.conf %check # removing vendor folders, cause they are used just for compiling rm -rf vendor # now check can be run %make_build style %make_build check_license %pre %sysusers_create_package %{name} %{SOURCE4} %service_add_pre %{name}.service %post %service_add_post %{name}.service %fillup_only -n %{name} %preun %service_del_preun %{name}.service %postun %service_del_postun %{name}.service %files %doc *\.md %license LICENSE %{_sbindir}/%{name} %{_sbindir}/rc%{name} %{_fillupdir}/sysconfig.%{name} %{_unitdir}/%{name}.service %{_sysusersdir}/%{name}.conf %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor