mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 12:37:25 +01:00
f2486abeab
* Just download LIKWID to get the headers * Remove perl-Data-Dumper from BuildRequires, only required by LIKWID build
76 lines
2.3 KiB
RPMSpec
76 lines
2.3 KiB
RPMSpec
Name: cc-metric-collector
|
|
Version: %{VERS}
|
|
Release: 1%{?dist}
|
|
Summary: Metric collection daemon from the ClusterCockpit suite
|
|
|
|
License: MIT
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
BuildRequires: go-toolset
|
|
BuildRequires: systemd-rpm-macros
|
|
# for header downloads
|
|
BuildRequires: wget
|
|
|
|
Provides: %{name} = %{version}
|
|
|
|
%description
|
|
Metric collection daemon from the ClusterCockpit suite
|
|
|
|
%global debug_package %{nil}
|
|
|
|
%prep
|
|
%autosetup
|
|
|
|
|
|
%build
|
|
make
|
|
|
|
|
|
%install
|
|
install -Dpm 0750 %{name} %{buildroot}%{_sbindir}/%{name}
|
|
install -Dpm 0600 config.json %{buildroot}%{_sysconfdir}/%{name}/%{name}.json
|
|
install -Dpm 0600 collectors.json %{buildroot}%{_sysconfdir}/%{name}/collectors.json
|
|
install -Dpm 0600 sinks.json %{buildroot}%{_sysconfdir}/%{name}/sinks.json
|
|
install -Dpm 0600 receivers.json %{buildroot}%{_sysconfdir}/%{name}/receivers.json
|
|
install -Dpm 0600 router.json %{buildroot}%{_sysconfdir}/%{name}/router.json
|
|
install -Dpm 0644 scripts/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
|
|
install -Dpm 0600 scripts/%{name}.config %{buildroot}%{_sysconfdir}/default/%{name}
|
|
install -Dpm 0644 scripts/%{name}.sysusers %{buildroot}%{_sysusersdir}/%{name}.conf
|
|
|
|
|
|
%check
|
|
# go test should be here... :)
|
|
|
|
%pre
|
|
%sysusers_create_package scripts/%{name}.sysusers
|
|
|
|
%post
|
|
%systemd_post %{name}.service
|
|
|
|
%preun
|
|
%systemd_preun %{name}.service
|
|
|
|
%files
|
|
# Binary
|
|
%attr(-,clustercockpit,clustercockpit) %{_sbindir}/%{name}
|
|
# Config
|
|
%dir %{_sysconfdir}/%{name}
|
|
%attr(0600,clustercockpit,clustercockpit) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.json
|
|
%attr(0600,clustercockpit,clustercockpit) %config(noreplace) %{_sysconfdir}/%{name}/collectors.json
|
|
%attr(0600,clustercockpit,clustercockpit) %config(noreplace) %{_sysconfdir}/%{name}/sinks.json
|
|
%attr(0600,clustercockpit,clustercockpit) %config(noreplace) %{_sysconfdir}/%{name}/receivers.json
|
|
%attr(0600,clustercockpit,clustercockpit) %config(noreplace) %{_sysconfdir}/%{name}/router.json
|
|
# Systemd
|
|
%{_unitdir}/%{name}.service
|
|
%{_sysconfdir}/default/%{name}
|
|
%{_sysusersdir}/%{name}.conf
|
|
|
|
%changelog
|
|
* Thu Mar 03 2022 Thomas Gruber - 0.3
|
|
- Add clustercockpit user installation
|
|
* Mon Feb 14 2022 Thomas Gruber - 0.2
|
|
- Add component specific configuration files
|
|
- Add %attr to config files
|
|
* Mon Nov 22 2021 Thomas Gruber - 0.1
|
|
- Initial spec file
|