Commit 26abe888 authored by Markus Frosch's avatar Markus Frosch 📣

Fix lint, check and permissions

parent 2985df4b
Pipeline #2478 failed with stages
in 42 seconds
......@@ -33,7 +33,7 @@ Summary: Icinga DB
Group: System Environment/Daemons
License: GPLv2+
URL: https://%{provider_prefix}
Source0: %{name}-%{version}.tar.gz
Source0: https://%{import_path}/-/archive/%{commit}/%{repo}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
......@@ -45,8 +45,10 @@ BuildRequires: systemd
Requires(pre): shadow-utils
%if "%{_vendor}" == "suse"
Provides: user(icingadb)
Provides: group(icingadb)
%endif
%define configdir %{_sysconfdir}/%{name}
%define service %{name}.service
......@@ -68,13 +70,15 @@ pushd src/%{import_path}
popd
%check
export GOPATH=%{buildroot}/%{gopath}:%{gopath}
%if ! 0%{?gotest:1}
%global gotest %{?golang_scl_enable} go test
%endif
%gotest %{import_path}/...
export GOPATH=$(pwd):%{gopath}
pushd src/%{import_path}
%gotest .
popd
%install
install -d -m 0755 %{buildroot}%{_sbindir}
......@@ -103,11 +107,16 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root)
#%doc AUTHORS COPYING
#%%doc AUTHORS COPYING
%doc README.md
%{_sbindir}/icingadb
%{_unitdir}/%{service}
%defattr(0750,icingadb,icingadb,0640)
%defattr(0640,icingadb,icingadb,0750)
%dir %{configdir}
%config(noreplace) %{configdir}/config.ini
%changelog
* Mon Sep 24 2018 Markus Frosch <markus.frosch@icinga.com> 0.0.0-0
- Initial package
# Only for SUSE, but rpmlint complains on RedHat as well...
addFilter("W: unversioned-explicit-provides user\(icingadb\)")
addFilter("W: unversioned-explicit-provides group\(icingadb\)")
# we want secure permissions
addFilter("E: non-standard-dir-perm /etc/icingadb 0750L")
addFilter("E: non-readable /etc/icingadb/config.ini 0640L")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment