diff --git a/.gitignore b/.gitignore index c284ae6..cae593d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ ddclient-3.8.0.tar.bz2 /ddclient-3.8.3.tar.bz2 /ddclient-3.9.0.tar.gz /ddclient-3.9.1.tar.gz +/ddclient-3.10.0.tar.gz +/ddclient-3.11.1.tar.gz +/ddclient-3.11.2.tar.gz +/ddclient-4.0.0.tar.gz diff --git a/ddclient-tmpfiles.conf b/ddclient-tmpfiles.conf index 881d82f..6eed278 100644 --- a/ddclient-tmpfiles.conf +++ b/ddclient-tmpfiles.conf @@ -1 +1 @@ -d /var/run/ddclient 0755 ddclient ddclient - +d /run/ddclient 0755 ddclient ddclient - diff --git a/ddclient.NetworkManager b/ddclient.NetworkManager index 9ce54f1..fe7c614 100644 --- a/ddclient.NetworkManager +++ b/ddclient.NetworkManager @@ -4,7 +4,7 @@ export LC_ALL=C if [ "$2" = "down" ]; then /sbin/ip route ls | grep -q '^default' || { - [ -f /var/run/ddclient/ddclient.pid ] && /usr/bin/systemctl stop ddclient.service || : + [ -f /run/ddclient/ddclient.pid ] && /usr/bin/systemctl stop ddclient.service || : } && { :; } fi diff --git a/ddclient.service b/ddclient.service index 6c9d0c2..0ccec5a 100644 --- a/ddclient.service +++ b/ddclient.service @@ -1,15 +1,14 @@ [Unit] -Description=A Perl Client Used To Update Dynamic DNS +Description=Dynamic DNS Update Client After=syslog.target network-online.target nss-lookup.target [Service] User=ddclient Group=ddclient -Type=forking -PIDFile=/var/run/ddclient/ddclient.pid +Type=exec EnvironmentFile=-/etc/sysconfig/ddclient ExecStartPre=/bin/touch /var/cache/ddclient/ddclient.cache -ExecStart=/usr/sbin/ddclient $DDCLIENT_OPTIONS +ExecStart=/usr/sbin/ddclient $DDCLIENT_OPTIONS --foreground [Install] WantedBy=multi-user.target diff --git a/ddclient.spec b/ddclient.spec index d7bffdb..e64e7d9 100644 --- a/ddclient.spec +++ b/ddclient.spec @@ -1,11 +1,12 @@ %global cachedir %{_localstatedir}/cache/ddclient -%global rundir %{_localstatedir}/run/ddclient +%global rundir %{_rundir}/ddclient Summary: Client to update dynamic DNS host entries Name: ddclient -Version: 3.9.1 -Release: 1%{?dist} -License: GPLv2+ +Version: 4.0.0 +Release: 5%{?dist} +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later URL: https://ddclient.net/ Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: ddclient.rwtab @@ -16,13 +17,30 @@ Source5: ddclient-tmpfiles.conf BuildArch: noarch +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: make BuildRequires: perl-generators +BuildRequires: perl(Sys::Hostname) +BuildRequires: perl(version) BuildRequires: systemd -Requires(pre): shadow-utils Requires(post): systemd Requires(preun): systemd Requires(postun): systemd +# For tests +BuildRequires: iproute +BuildRequires: perl(HTTP::Daemon) +BuildRequires: perl(HTTP::Daemon::SSL) +BuildRequires: perl(HTTP::Message::PSGI) +BuildRequires: perl(HTTP::Request) +BuildRequires: perl(HTTP::Response) +BuildRequires: perl(IO::Socket::INET6) +BuildRequires: perl(Test::MockModule) +BuildRequires: perl(Test::TCP) +BuildRequires: perl(Test::Warnings) +BuildRequires: perl(Time::HiRes) + Requires: perl(Data::Validate::IP) Requires: perl(Digest::SHA1) Requires: perl(IO::Socket::INET6) @@ -40,23 +58,25 @@ updates for multiple addresses, MX, wildcards, abuse avoidance, retrying the failed updates and sending update status to syslog and through e-mail. %prep -%setup -q -# Move pid file location for running as non-root. -sed -e 's|/var/run/ddclient.pid|%{rundir}/%{name}.pid|' \ - -i sample-etc_ddclient.conf +%autosetup -p 1 # Send less mail by default, eg. not on every shutdown. -sed -e 's|^mail=|#mail=|' -i sample-etc_ddclient.conf -# Backwards compatibility from pre-3.6.6-1 -sed -e 's|/etc/ddclient/|%{_sysconfdir}/|' -i %{name} +sed -e 's|^mail=|#mail=|' -i ddclient.conf.in +./autogen + +# Create a sysusers.d config file +cat >ddclient.sysusers.conf < /dev/null || %{_sbindir}/groupadd -r %{name} -getent passwd %{name} > /dev/null || %{_sbindir}/useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin -c "Dynamic DNS Client" %{name} -exit 0 %post %systemd_post %{name}.service @@ -99,7 +121,7 @@ fi %files %license COPYING COPYRIGHT -%doc README* RELEASENOTE ChangeLog Changelog.old sample-etc_ppp_ip-up.local +%doc README* ChangeLog.md sample-etc_ppp_ip-up.local %doc sample-etc_dhclient-exit-hooks sample-etc_cron.d_ddclient %doc sample-ddclient-wrapper.sh sample-etc_dhcpc_dhcpcd-eth0.exe @@ -117,9 +139,77 @@ fi %attr(0700,%{name},%{name}) %dir %{cachedir} %attr(0600,%{name},%{name}) %ghost %{cachedir}/%{name}.cache %ghost %attr(0755,%{name},%{name}) %dir %{rundir} +%{_sysusersdir}/ddclient.conf %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 4.0.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Tue Apr 01 2025 Scott Talbert - 4.0.0-4 +- Switch systemd service to use exec and remove pid file (#2355909) + +* Tue Mar 25 2025 Scott Talbert - 4.0.0-3 +- Restore expected ddclient.conf dir to pre-4.0 location (#2354194) + +* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 4.0.0-2 +- Add sysusers.d config file to allow rpm to create users/groups automatically + +* Wed Jan 22 2025 Scott Talbert - 4.0.0-1 +- Update to new upstream release 4.0.0 (#2334061) + +* Wed Jan 22 2025 Scott Talbert - 3.11.2-7 +- Fix FTBFS with newer autoconf + +* Thu Jan 16 2025 Fedora Release Engineering - 3.11.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Jul 25 2024 Miroslav Suchý - 3.11.2-5 +- convert license to SPDX + +* Wed Jul 17 2024 Fedora Release Engineering - 3.11.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jan 24 2024 Fedora Release Engineering - 3.11.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 3.11.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Nov 29 2023 Scott Talbert - 3.11.2-1 +- Update to new upstream release 3.11.2 (#2251294) + +* Sat Nov 18 2023 Scott Talbert - 3.11.1-1 +- Update to new upstream release 3.11.1 (#2244514) + +* Thu Sep 14 2023 kenneth topp - 3.10.0-1 +- Update to new upstream release 3.10.0 + +* Thu Jan 19 2023 Fedora Release Engineering - 3.9.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 3.9.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 3.9.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 3.9.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 3.9.1-5 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + +* Tue Jan 26 2021 Fedora Release Engineering - 3.9.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Sep 12 2020 Scott Talbert - 3.9.1-3 +- Move pidfile from /var/run to /run (#1876265) + +* Mon Jul 27 2020 Fedora Release Engineering - 3.9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jan 31 2020 Scott Talbert - 3.9.1-1 - Update to new upstream release 3.9.1 (#1796923) diff --git a/sources b/sources index a2a5237..76f2cf8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ddclient-3.9.1.tar.gz) = a8a4d6cb94e4239a7b7b4fc7d9ebef703cbd6c45fc3394b644694a053b5b8aa8d109410b5b8b3676a5f30b18474d24c7feb16c65c30b28bd7d941d8a214b1346 +SHA512 (ddclient-4.0.0.tar.gz) = 095723aa43c4f08d7e3aa46c0bc47e753fdcbcb2cd0ac5f77cd687f98694985ad70e2f6509c05aaa232d0412fcb0aef8bb07a6d9e4302130ab1db047c14e1e86