Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rpm-icingadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
packaging
rpm-icingadb
Commits
777beae3
Commit
777beae3
authored
Sep 24, 2018
by
Markus Frosch
📣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add SUSE packaging support
parent
38f5d95b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
+41
-2
icingadb.spec
icingadb.spec
+37
-2
rpmlint/icingadb.conf
rpmlint/icingadb.conf
+4
-0
No files found.
icingadb.spec
View file @
777beae3
...
...
@@ -10,7 +10,14 @@
%global commit f10596b960b05a492f4524c123a2522d4626a6e0
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global golang_min_version 1.10
%if "%{_vendor}" == "suse"
%global golang_pkg go
%else # suse
%global golang_pkg golang
%global golang_scl go-toolset-7
%endif # suse
%if 0%{?golang_scl:1}
%global golang_scl_prefix %{golang_scl}-
...
...
@@ -30,13 +37,17 @@ Version: 0.0.0.%{shortcommit}
Release: %{revision}%{?dist}
Summary: Icinga DB
Group: System Environment/Daemons
%if "%{_vendor}" == "suse"
License: GPL-2.0-or-later
%else
License: GPLv2+
%endif # suse
URL: https://%{provider_prefix}
Source0: https://%{import_path}/-/archive/%{commit}/%{repo}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
BuildRequires: %{?golang_scl_prefix}
golang >= 1.10
BuildRequires: %{?golang_scl_prefix}
%{golang_pkg} >= %{golang_min_version}
BuildRequires: git
%{?systemd_requires}
...
...
@@ -47,7 +58,7 @@ Requires(pre): shadow-utils
%if "%{_vendor}" == "suse"
Provides: user(icingadb)
Provides: group(icingadb)
%endif
%endif
# suse
%define configdir %{_sysconfdir}/%{name}
%define service %{name}.service
...
...
@@ -88,18 +99,38 @@ install -m 0755 icingadb %{buildroot}%{_sbindir}/
install -m 0644 etc/config_production.ini %{buildroot}%{configdir}/config.ini
install -m 0644 etc/%{service} %{buildroot}%{_unitdir}/
%if "%{_vendor}" == "suse"
ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
%endif # suse
%pre
getent group icingadb >/dev/null || groupadd -r icingadb
getent passwd icingadb >/dev/null || useradd -r -g icingadb -d / -s /sbin/nologin -c 'Icinga DB' icingadb
%if "%{_vendor}" == "suse"
%service_add_pre %{service}
%endif # suse
%post
%if "%{_vendor}" == "suse"
%service_add_post %{service}
%else # suse
%systemd_post %{service}
%endif # suse
%preun
%if "%{_vendor}" == "suse"
%service_del_preun %{service}
%else # suse
%systemd_preun %{service}
%endif # suse
%postun
%if "%{_vendor}" == "suse"
%service_del_postun %{service}
%else # suse
%systemd_postun %{service}
%endif # suse
%clean
rm -rf %{buildroot}
...
...
@@ -111,6 +142,10 @@ rm -rf %{buildroot}
%{_sbindir}/icingadb
%{_unitdir}/%{service}
%if "%{_vendor}" == "suse"
%{_sbindir}/rc%{name}
%endif # suse
%defattr(0640,icingadb,icingadb,0750)
%dir %{configdir}
...
...
rpmlint/icingadb.conf
View file @
777beae3
...
...
@@ -5,3 +5,7 @@ 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"
)
# we want our daemon user
addFilter
(
"W: non-standard-uid /etc/icingadb.* icingadb"
)
addFilter
(
"W: non-standard-gid /etc/icingadb.* icingadb"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment