From 96fc7c86927fbdfe01132837877436823429d87f1ee13b96c5fb578bd4621dd6 Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Thu, 8 Feb 2024 20:08:47 +0000 Subject: [PATCH] Accepting request 1145142 from home:michals - Use sysuser-tools to create user. - Remove fix-configure_ac.patch - Rebase disable-ip-test.patch OBS-URL: https://build.opensuse.org/request/show/1145142 OBS-URL: https://build.opensuse.org/package/show/network/ddclient?expand=0&rev=70 --- ddclient.changes | 11 ++++++++--- ddclient.spec | 14 ++++++++------ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ddclient.changes b/ddclient.changes index 84f0841..78e2f26 100644 --- a/ddclient.changes +++ b/ddclient.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 5 10:10:56 UTC 2024 - Michal Suchanek + +- Use sysuser-tools to create user. + ------------------------------------------------------------------- Thu Nov 23 17:05:39 UTC 2023 - Valentin Lefebvre @@ -42,8 +47,8 @@ Thu Nov 23 17:05:39 UTC 2023 - Valentin Lefebvre * Fixed issues with Hetzner zones * The OVH provider now ignores extra data returned * Merge multiple configs for the same hostname instead of use the last -- Remove fix-configure_ac.patch -- Rebase disable-ip-test.patch +- Remove fix-configure_ac.patch +- Rebase disable-ip-test.patch ------------------------------------------------------------------- Sun Jan 1 10:41:36 UTC 2023 - munix9@googlemail.com @@ -137,7 +142,7 @@ Tue May 18 14:43:16 UTC 2021 - Josef Möllers ------------------------------------------------------------------- Wed May 12 15:09:21 UTC 2021 - Josef Möllers - + - Use an extended regular expression in sed to change (/var)?/run. ------------------------------------------------------------------- diff --git a/ddclient.spec b/ddclient.spec index 43146a1..711c4aa 100644 --- a/ddclient.spec +++ b/ddclient.spec @@ -1,7 +1,7 @@ # # spec file for package ddclient # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -34,6 +34,7 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: curl BuildRequires: make +BuildRequires: sysuser-tools BuildRequires: perl(HTTP::Daemon) BuildRequires: perl(HTTP::Message::PSGI) BuildRequires: perl(IO::Socket::SSL) @@ -46,6 +47,7 @@ Requires(pre): shadow Recommends: perl-IO-Socket-SSL BuildArch: noarch %{?systemd_requires} +%sysusers_requires %description ddclient is a client requiring only Perl. Supported @@ -65,11 +67,13 @@ rm -f sample-etc_ddclient.conf.orig chmod a-x sample-* mkdir examples mv sample-* examples +echo u ddclient - '"DDClient User"' %{_localstatedir}/cache/%{name} /bin/false > system-user-ddclient.conf %build ./autogen %configure make +%sysusers_generate_pre system-user-ddclient.conf ddclient system-user-ddclient.conf %install %make_install @@ -84,15 +88,12 @@ install -d -m 755 %{buildroot}%{_fillupdir} install -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.%{name} install -d -m 755 %{buildroot}%{_localstatedir}/cache/%{name} install -d -m 755 %{buildroot}/run/%{name} +install -D -m 0644 system-user-ddclient.conf %{buildroot}%{_sysusersdir}/system-user-ddclient.conf %check make VERBOSE=1 check -%pre -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} +%pre -f ddclient.pre %service_add_pre %{name}.service %post @@ -116,5 +117,6 @@ getent passwd %{name} >/dev/null || \ %{_sbindir}/rc%{name} %{_fillupdir}/sysconfig.%{name} %dir %attr(700,%{name},root) %{_localstatedir}/cache/%{name} +%{_sysusersdir}/system-user-ddclient.conf %changelog