Commit 8d28a9d0 authored by Henrik Triem's avatar Henrik Triem
Browse files

Fix list of services provided

parent 4eef25f8
[Unit] [Unit]
Description=Redis for Icinga Description=Redis for Icinga
After=network.target After=network.target
PartOf=icinga-redis.target
[Service] [Service]
Type=notify Type=notify
User=icinga-redis User=icinga-redis
Group=icinga-redis Group=icinga-redis
PrivateTmp=true PrivateTmp=true
PIDFile=/var/run/icinga-redis/%i.pid PIDFile=/var/run/icinga-redis/redis.pid
ExecStart=/usr/sbin/icinga-redis-server /etc/icinga-redis/%i.conf ExecStart=/usr/sbin/icinga-redis-server /etc/icinga-redis/redis.conf
LimitNOFILE=10240 LimitNOFILE=10240
Restart=on-failure Restart=on-failure
[Install] [Install]
WantedBy=multi-user.target icinga-redis.target WantedBy=multi-user.target
...@@ -32,13 +32,13 @@ Group: Productivity/Databases/Servers ...@@ -32,13 +32,13 @@ Group: Productivity/Databases/Servers
URL: https://redis.io URL: https://redis.io
Source0: http://download.redis.io/releases/redis-%{version}.tar.gz Source0: http://download.redis.io/releases/redis-%{version}.tar.gz
Source1: %{src_name}.logrotate Source1: %{src_name}.logrotate
Source2: %{src_name}.target #Source2: %%{src_name}.target
Source3: %{src_name}@.service Source3: %{src_name}.service
Source4: %{src_name}.tmpfiles.d Source4: %{src_name}.tmpfiles.d
Source5: README.SUSE Source5: README.SUSE
Source6: %{src_name}.sysctl Source6: %{src_name}.sysctl
Source7: %{src_name}-sentinel@.service #Source7: %%{src_name}-sentinel@.service
Source8: %{src_name}-sentinel.target #Source8: %%{src_name}-sentinel.target
# PATCH-FIX-OPENSUSE -- openSUSE-style init script # PATCH-FIX-OPENSUSE -- openSUSE-style init script
Patch0: %{src_name}-initscript.patch Patch0: %{src_name}-initscript.patch
# PATCH-MISSING-TAG -- See https://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See https://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
...@@ -46,6 +46,7 @@ Patch1: %{src_name}-conf.patch ...@@ -46,6 +46,7 @@ Patch1: %{src_name}-conf.patch
Patch2: %{src_name}-enable-bactrace-on-x86-ia64-and_arm32_only.patch Patch2: %{src_name}-enable-bactrace-on-x86-ia64-and_arm32_only.patch
Patch3: %{src_name}-disable_integration_logging.patch Patch3: %{src_name}-disable_integration_logging.patch
Patch4: reproducible.patch Patch4: reproducible.patch
Patch5: icinga-server-port.patch
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: procps BuildRequires: procps
BuildRequires: tcl BuildRequires: tcl
...@@ -72,6 +73,7 @@ different kind of sorting abilities. ...@@ -72,6 +73,7 @@ different kind of sorting abilities.
%patch3 %patch3
%endif %endif
%patch4 -p1 %patch4 -p1
%patch5 -p1
%build %build
export HOST=OBS # for reproducible builds export HOST=OBS # for reproducible builds
...@@ -99,14 +101,14 @@ ln -sfv ../sbin/%{name}-server %{buildroot}%{_sbindir}/%{name}-che ...@@ -99,14 +101,14 @@ ln -sfv ../sbin/%{name}-server %{buildroot}%{_sbindir}/%{name}-che
ln -sfv ../sbin/%{name}-server %{buildroot}%{_sbindir}/%{name}-sentinel ln -sfv ../sbin/%{name}-server %{buildroot}%{_sbindir}/%{name}-sentinel
perl -p -i -e 's|daemonize yes|daemonize no|g' %{name}.conf perl -p -i -e 's|daemonize yes|daemonize no|g' %{name}.conf
install -Dm 0640 redis.conf %{buildroot}%{_conf_dir}/default.conf.example install -Dm 0640 redis.conf %{buildroot}%{_conf_dir}/redis.conf
#install -Dm 0660 sentinel.conf %{buildroot}%{_conf_dir}/sentinel.conf.example #install -Dm 0660 sentinel.conf %{buildroot}%{_conf_dir}/sentinel.conf
# some sysctl stuff # some sysctl stuff
install -Dm 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysctl.d/00-%{name}.conf install -Dm 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysctl.d/00-%{name}.conf
install -Dm 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} install -Dm 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
install -Dm 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.target #install -Dm 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.target
install -Dm 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}@.service install -Dm 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
install -Dm 0644 %{SOURCE4} %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf install -Dm 0644 %{SOURCE4} %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf
#install -Dm 0644 %{SOURCE7} %{buildroot}%{_unitdir}/%{name}-sentinel@.service #install -Dm 0644 %{SOURCE7} %{buildroot}%{_unitdir}/%{name}-sentinel@.service
#install -Dm 0644 %{SOURCE8} %{buildroot}%{_unitdir}/%{name}-sentinel.target #install -Dm 0644 %{SOURCE8} %{buildroot}%{_unitdir}/%{name}-sentinel.target
...@@ -130,18 +132,18 @@ getent group %{name} >/dev/null || %{_sbindir}/groupadd -r %{name} || : ...@@ -130,18 +132,18 @@ getent group %{name} >/dev/null || %{_sbindir}/groupadd -r %{name} || :
getent passwd %{name} >/dev/null || \ getent passwd %{name} >/dev/null || \
%{_sbindir}/useradd -g %{name} -s /bin/false -r \ %{_sbindir}/useradd -g %{name} -s /bin/false -r \
-c "User for %{name} key-value store" -d %{_data_dir} %{name} || : -c "User for %{name} key-value store" -d %{_data_dir} %{name} || :
%service_add_pre %{name}.target redis@.service redis-sentinel.target redis-sentinel@.service %service_add_pre %{name}.service
%post %post
systemd-tmpfiles --create %{_libexecdir}/tmpfiles.d/%{name}.conf || true systemd-tmpfiles --create %{_libexecdir}/tmpfiles.d/%{name}.conf || true
%service_add_post %{name}.target redis@.service redis-sentinel.target redis-sentinel@.service %service_add_post %{name}.service
echo "See %{_docdir}/%{name}/README.SUSE to continue" echo "See %{_docdir}/%{name}/README.SUSE to continue"
%preun %preun
%service_del_preun icinga-redis.target icinga-redis@.service icinga-redis-sentinel.target icinga-redis-sentinel@.service %service_del_preun %{name}.service
%postun %postun
%service_del_postun icinga-redis.target icinga-redis@.service icinga-redis-sentinel.target icigna-redis-sentinel@.service %service_del_postun %{name}.service
%files %files
%license COPYING %license COPYING
...@@ -152,8 +154,8 @@ echo "See %{_docdir}/%{name}/README.SUSE to continue" ...@@ -152,8 +154,8 @@ echo "See %{_docdir}/%{name}/README.SUSE to continue"
%{_sbindir}/%{name}-* %{_sbindir}/%{name}-*
%{_sbindir}/rc%{name} %{_sbindir}/rc%{name}
%{_libexecdir}/tmpfiles.d/%{name}.conf %{_libexecdir}/tmpfiles.d/%{name}.conf
%{_unitdir}/%{name}@.service %{_unitdir}/%{name}.service
%{_unitdir}/%{name}.target #%%{_unitdir}/%%{name}.target
#%%{_unitdir}/%%{name}-sentinel@.service #%%{_unitdir}/%%{name}-sentinel@.service
#%%{_unitdir}/%%{name}-sentinel.target #%%{_unitdir}/%%{name}-sentinel.target
%doc README.SUSE %doc README.SUSE
......
Supports Markdown
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