From 1047bbf3299d9f0d2ec99bab8a4310922dd8ce7bfb4ad6e08d372cfa6a15a9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 18 Feb 2019 09:28:21 +0000 Subject: [PATCH] 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 --- ddclient.changes | 20 ++++++++++++------ ddclient.spec | 55 +++++++++++++++++++++--------------------------- 2 files changed, 37 insertions(+), 38 deletions(-) diff --git a/ddclient.changes b/ddclient.changes index c9a7a17..65de93f 100644 --- a/ddclient.changes +++ b/ddclient.changes @@ -1,7 +1,14 @@ +------------------------------------------------------------------- +Sat Feb 16 00:08:01 UTC 2019 - Jan Engelhardt + +- 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 -- Require perl-Data-Validate-IP +- Require perl-Data-Validate-IP ------------------------------------------------------------------- Thu Sep 13 12:51:46 UTC 2018 - Stefan Jakobs @@ -16,7 +23,7 @@ Thu Sep 13 12:51:46 UTC 2018 - Stefan Jakobs ------------------------------------------------------------------- Thu Nov 23 13:38:22 UTC 2017 - rbrown@suse.com -- Replace references to /var/adm/fillup-templates with new +- Replace references to /var/adm/fillup-templates with new %_fillupdir macro (boo#1069468) ------------------------------------------------------------------- @@ -48,7 +55,7 @@ Wed Jun 18 11:03:39 UTC 2014 - stefan.fent@suse.com - fix pidfile path in /etc/ddclient.conf and set ownership to ddclient - create user and group ddclient (bnc#881520) -- create /run/ddclient/ with user and group ddclient if not yet +- create /run/ddclient/ with user and group ddclient if not yet available in %pre ------------------------------------------------------------------- @@ -137,7 +144,7 @@ Mon Jan 9 15:25:09 UTC 2012 - chris@computersalat.de ------------------------------------------------------------------- Wed Oct 19 15:06:08 CEST 2011 - ro@suse.de -- remove leftover debug line in init script +- remove leftover debug line in init script ------------------------------------------------------------------- Sat Oct 15 10:34:17 CEST 2011 - ro@suse.de @@ -155,7 +162,7 @@ Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de Mon Aug 29 15:22:47 CEST 2011 - ro@suse.de - work on init-script so that start/status/stop at least work - (bnc#267306) + (bnc#267306) ------------------------------------------------------------------- Tue Sep 1 11:01:31 UTC 2009 - chris@computersalat.de @@ -329,7 +336,7 @@ Tue Mar 29 14:17:01 CEST 2005 - kssingvo@suse.de ------------------------------------------------------------------- Tue Feb 1 17:04:29 CET 2005 - kssingvo@suse.de -- new version 3.6.5: there was a bug in the linksys-ver2 +- new version 3.6.5: there was a bug in the linksys-ver2 ------------------------------------------------------------------- Thu Nov 4 11:45:06 CET 2004 - kssingvo@suse.de @@ -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 - first shot. - diff --git a/ddclient.spec b/ddclient.spec index ce05f6b..c25bf63 100644 --- a/ddclient.spec +++ b/ddclient.spec @@ -1,7 +1,7 @@ # # 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 # 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) # 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 Summary: A Perl Client to Update Dynamic DNS Entries -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Productivity/Networking/DNS/Utilities Version: 3.9.0 Release: 0 @@ -50,7 +50,7 @@ Requires: perl >= 5.004 Recommends: perl-IO-Socket-SSL %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 and dynamic updates, optimized updates for multiple addresses, MX, wild cards, abuse avoidance, retry for failed updates, and status updates to @@ -77,49 +77,42 @@ mv sample-* examples # nothing to do here (yet) %install -#%%{_sbindir}/groupadd -r %%{name} 2>/dev/null || : -#%%{_sbindir}/useradd -c "DDClient User" -d %%{_localstatedir}/cache/%%{name} \ -# -g %%{name} -r -s /bin/false %%{name} 2>/dev/null || : - -#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 +#%%make_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} -%{__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 -%{__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 # init script and config file %if 0%{?has_systemd} -%{__install} -D -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}.service -%{__install} -D -m 644 %{SOURCE3} %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf -%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} +install -D -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}.service +install -D -m 644 %{SOURCE3} %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} %else -%{__install} -D -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/init.d/%{name} -%{__ln_s} %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} +install -D -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/init.d/%{name} +ln -s %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} %endif -%{__install} -d -m 755 %{buildroot}%{_fillupdir} -%{__install} -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.%{name} -%{__install} -d -m 755 %{buildroot}/var/cache/%{name} +install -d -m 755 %{buildroot}%{_fillupdir} +install -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.%{name} +install -d -m 755 %{buildroot}/var/cache/%{name} %if 0%{?has_systemd} -%{__install} -d -m 755 %{buildroot}/run/%{name} +install -d -m 755 %{buildroot}/run/%{name} %else -%{__install} -d -m 755 %{buildroot}%{_localstatedir}/run/%{name} +install -d -m 755 %{buildroot}%{_localstatedir}/run/%{name} %endif %pre -if [[ -z $(%{_bindir}/getent group %{name} 2>/dev/null) ]]; then - %{_sbindir}/groupadd -r %{name} 2>/dev/null -fi -if [[ -z $(%{_bindir}/getent passwd %{name} 2>/dev/null) ]]; then +getent group %{name} >/dev/null || %{_sbindir}/groupadd -r %{name} +getent passwd %{name} >/dev/null || \ %{_sbindir}/useradd -c "DDClient User" -d %{_localstatedir}/cache/%{name} \ - -g %{name} -r -s /bin/false %{name} 2>/dev/null -fi + -g %{name} -r -s /bin/false %{name} %if 0%{?has_systemd} %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 -%{__install} -d -m 755 -o %{name} -g root %{_localstatedir}/run/%{name} +install -d -m 755 -o %{name} -g root %{_localstatedir}/run/%{name} %endif %post