Accepting request 676610 from home:jengelh:branches:network

- Ensure neutrality of description.
- Do not ignore errors from useradd.
- Avoid %__-type macro indirection.

OBS-URL: https://build.opensuse.org/request/show/676610
OBS-URL: https://build.opensuse.org/package/show/network/ddclient?expand=0&rev=48
This commit is contained in:
Tomáš Chvátal 2019-02-18 09:28:21 +00:00 committed by Git OBS Bridge
parent 46d2962744
commit 1047bbf329
2 changed files with 37 additions and 38 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Feb 16 00:08:01 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Ensure neutrality of description.
- Do not ignore errors from useradd.
- Avoid %__-type macro indirection.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 1 07:26:04 UTC 2018 - obs@botter.cc Mon Oct 1 07:26:04 UTC 2018 - obs@botter.cc
@ -360,4 +367,3 @@ Tue Jan 14 17:08:21 CET 2003 - kssingvo@suse.de
Mon Oct 28 13:01:07 CET 2002 - kssingvo@suse.de Mon Oct 28 13:01:07 CET 2002 - kssingvo@suse.de
- first shot. - first shot.

View File

@ -1,7 +1,7 @@
# #
# spec file for package ddclient # spec file for package ddclient
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
@ -23,7 +23,7 @@
Name: ddclient Name: ddclient
Summary: A Perl Client to Update Dynamic DNS Entries Summary: A Perl Client to Update Dynamic DNS Entries
License: GPL-2.0+ License: GPL-2.0-or-later
Group: Productivity/Networking/DNS/Utilities Group: Productivity/Networking/DNS/Utilities
Version: 3.9.0 Version: 3.9.0
Release: 0 Release: 0
@ -50,7 +50,7 @@ Requires: perl >= 5.004
Recommends: perl-IO-Socket-SSL Recommends: perl-IO-Socket-SSL
%description %description
ddclient is a small full-featured client requiring only Perl. Supported ddclient is a client requiring only Perl. Supported
features include daemon operation, manual and automatic updates, static features include daemon operation, manual and automatic updates, static
and dynamic updates, optimized updates for multiple addresses, MX, wild and dynamic updates, optimized updates for multiple addresses, MX, wild
cards, abuse avoidance, retry for failed updates, and status updates to cards, abuse avoidance, retry for failed updates, and status updates to
@ -77,49 +77,42 @@ mv sample-* examples
# nothing to do here (yet) # nothing to do here (yet)
%install %install
#%%{_sbindir}/groupadd -r %%{name} 2>/dev/null || : #%%make_install
#%%{_sbindir}/useradd -c "DDClient User" -d %%{_localstatedir}/cache/%%{name} \ install -D -m 755 %{name} %{buildroot}%{_sbindir}/%{name}
# -g %%{name} -r -s /bin/false %%{name} 2>/dev/null || : install -D -m 600 examples/sample-etc_ddclient.conf %{buildroot}%{_sysconfdir}/%{name}.conf
#make DESTDIR=$RPM_BUILD_ROOT install
%{__install} -D -m 755 %{name} %{buildroot}%{_sbindir}/%{name}
%{__install} -D -m 600 examples/sample-etc_ddclient.conf %{buildroot}%{_sysconfdir}/%{name}.conf
%if 0%{?has_systemd} %if 0%{?has_systemd}
%{__sed} -i -e "s,/var/run/,/run/%{name}/," %{buildroot}%{_sysconfdir}/%{name}.conf sed -i -e "s,/var/run/,/run/%{name}/," %{buildroot}%{_sysconfdir}/%{name}.conf
%else %else
%{__sed} -i -e "s,/var/run/,/var/run/%{name}/," %{buildroot}%{_sysconfdir}/%{name}.conf sed -i -e "s,/var/run/,/var/run/%{name}/," %{buildroot}%{_sysconfdir}/%{name}.conf
%endif %endif
# init script and config file # init script and config file
%if 0%{?has_systemd} %if 0%{?has_systemd}
%{__install} -D -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}.service install -D -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}.service
%{__install} -D -m 644 %{SOURCE3} %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf install -D -m 644 %{SOURCE3} %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf
%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%else %else
%{__install} -D -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/init.d/%{name} install -D -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/init.d/%{name}
%{__ln_s} %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} ln -s %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
%endif %endif
%{__install} -d -m 755 %{buildroot}%{_fillupdir} install -d -m 755 %{buildroot}%{_fillupdir}
%{__install} -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.%{name} install -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.%{name}
%{__install} -d -m 755 %{buildroot}/var/cache/%{name} install -d -m 755 %{buildroot}/var/cache/%{name}
%if 0%{?has_systemd} %if 0%{?has_systemd}
%{__install} -d -m 755 %{buildroot}/run/%{name} install -d -m 755 %{buildroot}/run/%{name}
%else %else
%{__install} -d -m 755 %{buildroot}%{_localstatedir}/run/%{name} install -d -m 755 %{buildroot}%{_localstatedir}/run/%{name}
%endif %endif
%pre %pre
if [[ -z $(%{_bindir}/getent group %{name} 2>/dev/null) ]]; then getent group %{name} >/dev/null || %{_sbindir}/groupadd -r %{name}
%{_sbindir}/groupadd -r %{name} 2>/dev/null getent passwd %{name} >/dev/null || \
fi
if [[ -z $(%{_bindir}/getent passwd %{name} 2>/dev/null) ]]; then
%{_sbindir}/useradd -c "DDClient User" -d %{_localstatedir}/cache/%{name} \ %{_sbindir}/useradd -c "DDClient User" -d %{_localstatedir}/cache/%{name} \
-g %{name} -r -s /bin/false %{name} 2>/dev/null -g %{name} -r -s /bin/false %{name}
fi
%if 0%{?has_systemd} %if 0%{?has_systemd}
%service_add_pre %{name}.service %service_add_pre %{name}.service
%{__install} -d -m 755 -o %{name} -g root /run/%{name} install -d -m 755 -o %{name} -g root /run/%{name}
%else %else
%{__install} -d -m 755 -o %{name} -g root %{_localstatedir}/run/%{name} install -d -m 755 -o %{name} -g root %{_localstatedir}/run/%{name}
%endif %endif
%post %post