[ddclient] Fix FTBFS and various other issues
Paul Howarth
pghmcfc at fedoraproject.org
Sat Aug 10 15:22:21 UTC 2013
commit 8451f69a80a63dabdb1ba0ecc7438eccab443510
Author: Paul Howarth <paul at city-fan.org>
Date: Sat Aug 10 16:21:19 2013 +0100
Fix FTBFS and various other issues
- BR: systemd-units for %{_unitdir} macro definition (fixes FTBFS #992118)
- Put tmpfiles config in %{_tmpfilesdir}, not under /etc
- Package installation creates %{_localstatedir}/run/%{name} (#909272, #957355)
- Service files are not executable
- Require perl(Digest::SHA1) (#909258)
- Wait for name resolution to be available before starting (#905553)
ddclient.service | 4 ++--
ddclient.spec | 27 ++++++++++++++++++++-------
2 files changed, 22 insertions(+), 9 deletions(-)
---
diff --git a/ddclient.service b/ddclient.service
index 5ab0547..3bdd806 100644
--- a/ddclient.service
+++ b/ddclient.service
@@ -1,6 +1,6 @@
[Unit]
Description=A Perl Client Used To Update Dynamic DNS
-After=syslog.target network.target
+After=syslog.target network.target nss-lookup.target
[Service]
User=ddclient
@@ -12,4 +12,4 @@ ExecStartPre=/bin/touch /var/cache/ddclient/ddclient.cache
ExecStart=/usr/sbin/ddclient $DDCLIENT_OPTIONS
[Install]
-WantedBy=multi-user.target
\ No newline at end of file
+WantedBy=multi-user.target
diff --git a/ddclient.spec b/ddclient.spec
index 2394fd9..4ef6094 100644
--- a/ddclient.spec
+++ b/ddclient.spec
@@ -1,7 +1,10 @@
+# This macro only defined by default around Fedora 18 time
+%{!?_tmpfilesdir:%global _tmpfilesdir %{_prefix}/lib/tmpfiles.d}
+
Summary: Client to update dynamic DNS host entries
Name: ddclient
Version: 3.8.1
-Release: 7%{?dist}
+Release: 8%{?dist}
License: GPLv2+
Group: System Environment/Daemons
URL: http://ddclient.sourceforge.net/
@@ -12,6 +15,7 @@ Source3: ddclient.sysconfig
Source4: ddclient.NetworkManager
Source5: ddclient-tmpfiles.conf
BuildArch: noarch
+BuildRequires: systemd-units
Requires(pre): shadow-utils
#Requires(post): /sbin/chkconfig
#Requires(preun): /sbin/service, /sbin/chkconfig
@@ -19,6 +23,7 @@ Requires(pre): shadow-utils
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
+Requires: perl(Digest::SHA1)
Requires: perl(IO::Socket::SSL)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -53,7 +58,7 @@ mkdir -p $RPM_BUILD_ROOT%{_unitdir}
install -p -m 755 %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
install -p -m 600 sample-etc_ddclient.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rwtab.d/%{name}
-install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
+install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
%if 0%{?fedora}%{?rhel} > 4
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d
@@ -65,8 +70,8 @@ touch $RPM_BUILD_ROOT%{_localstatedir}/cache/%{name}/%{name}.cache
# Correct permissions for later usage in %doc
chmod 644 sample-*
-mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
-install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
+mkdir -p %{buildroot}%{_tmpfilesdir}
+install -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
%clean
rm -rf $RPM_BUILD_ROOT
@@ -130,10 +135,18 @@ fi
%{_sbindir}/%{name}
%attr(0700,%{name},%{name}) %dir %{_localstatedir}/cache/%{name}/
%attr(0600,%{name},%{name}) %ghost %{_localstatedir}/cache/%{name}/%{name}.cache
-%ghost %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}/
-%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
+%attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}/
+%{_tmpfilesdir}/%{name}.conf
%changelog
+* Sat Aug 10 2013 Paul Howarth <paul at city-fan.org> - 3.8.1-8
+- BR: systemd-units for %%{_unitdir} macro definition (fixes FTBFS #992118)
+- Put tmpfiles config in %%{_tmpfilesdir}, not under /etc
+- Package installation creates %%{_localstatedir}/run/%%{name} (#909272, #957355)
+- Service files are not executable
+- Require perl(Digest::SHA1) (#909258)
+- Wait for name resolution to be available before starting (#905553)
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.8.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
@@ -202,7 +215,7 @@ fi
- Fix sysconfig/ddclient permissions.
- Drop non-useful samples.
-* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 3.6.3-5
+* Wed Apr 6 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 3.6.3-5
- rebuilt
* Mon Apr 05 2004 Toshio Kuratomi <toshio[+]tiki-lounge.com> - 0:3.6.3-0.fdr.4.fc1
More information about the scm-commits
mailing list