Accepting request 206487 from network

Made required changes. sysvinit script is broken according to rpmlint (log 12.2 )
I can't fix it as I don't know sysvinit scripts (forwarded request 204930 from posophe)

OBS-URL: https://build.opensuse.org/request/show/206487
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ddclient?expand=0&rev=36
This commit is contained in:
Stephan Kulow 2013-11-12 08:50:02 +00:00 committed by Git OBS Bridge
commit 327b3e60b8
4 changed files with 64 additions and 12 deletions

1
ddclient-tmpfiles.conf Normal file
View File

@ -0,0 +1 @@
d /var/run/ddclient 0755 ddclient ddclient -

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Oct 27 15:12:09 UTC 2013 - p.drouand@gmail.com
- Improve systemd support for openSUSE >= 12.3
-------------------------------------------------------------------
Thu May 16 13:23:40 UTC 2013 - seife+obs@b1-systems.com

15
ddclient.service Normal file
View File

@ -0,0 +1,15 @@
[Unit]
Description=A Perl Client Used To Update Dynamic DNS
After=network.target nss-lookup.target
[Service]
User=ddclient
Group=ddclient
Type=forking
PIDFile=/run/ddclient/ddclient.pid
EnvironmentFile=-/etc/sysconfig/ddclient
ExecStartPre=/bin/touch /var/cache/ddclient/ddclient.cache
ExecStart=/usr/sbin/ddclient $DDCLIENT_OPTIONS
[Install]
WantedBy=multi-user.target

View File

@ -24,13 +24,16 @@ Version: 3.8.1
Release: 0
Url: http://ddclient.sourceforge.net/
Source0: http://switch.dl.sourceforge.net/sourceforge/ddclient/%{name}-%{version}.tar.bz2
Source1: rc.ddclient
Source1: %{name}.service
Source2: %{name}.sysconfig
Source3: %{name}-tmpfiles.conf
Source4: rc.%{name}
Patch0: %{name}-3.8.1-config.patch
Patch1: %{name}-3.8.1-update_nic.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %fillup_prereq
BuildRequires: pkgconfig(systemd)
Requires(pre): %fillup_prereq
Requires: perl >= 5.004
%{?systemd_requires}
Recommends: perl-IO-Socket-SSL
%description
@ -63,32 +66,60 @@ mv sample-ddclient-wrapper.sh examples
%install
#make DESTDIR=$RPM_BUILD_ROOT install
%{__mkdir_p} $RPM_BUILD_ROOT%{_sbindir}
%{__mkdir_p} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d
%{__install} -m 755 %{name} $RPM_BUILD_ROOT%{_sbindir}/
%{__install} -m 644 sample-etc_ddclient.conf $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}.conf
%{__mkdir_p} %{buildroot}%{_sbindir}
%{__mkdir_p} %{buildroot}%{_sysconfdir}
%if 0%{?suse_version} >=1230
%{__mkdir_p} %{buildroot}%{_unitdir}
%{__mkdir_p} %{buildroot}%{_libexecdir}/tmpfiles.d
%else
%{__mkdir_p} %{buildroot}%{_sysconfdir}/init.d
%endif
%{__install} -m 755 %{name} %{buildroot}%{_sbindir}/
%{__install} -m 644 sample-etc_ddclient.conf %{buildroot}%{_sysconfdir}/%{name}.conf
# init script and config file
%{__install} -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/%{name}
%{__ln_s} %{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT%{_sbindir}/rc%{name}
%{__install} -d -m 755 $RPM_BUILD_ROOT/var/adm/fillup-templates
%{__install} -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.%{name}
%{__install} -d -m 755 $RPM_BUILD_ROOT/var/cache/%{name}
%if 0%{?suse_version} >=1230
%{__install} -m 755 %{SOURCE1} %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf
%{__install} -m 755 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service
%{__ln_s} %{_unitdir}/%{name}.service %{buildroot}%{_sbindir}/rc%{name}
%else
%{__install} -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{name}
%{__ln_s} %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
%endif
%{__install} -d -m 755 %{buildroot}/var/adm/fillup-templates
%{__install} -m 644 %{SOURCE2} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name}
%{__install} -d -m 755 %{buildroot}/var/cache/%{name}
%post
%{fillup_only}
%if 0%{?suse_version} >=1230
%service_add_post %{name}.service
%endif
%preun
%if 0%{?suse_version} >=1230
%service_del_preun %{name}.service
%else
%stop_on_removal ddclient
%endif
%postun
%if 0%{?suse_version} >=1230
%service_del_postun %{name}.service
%else
%restart_on_update ddclient
%insserv_cleanup
%endif
%files
%defattr(-, root, root)
%doc COPY* README* sample* examples
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/%{name}.conf
%if 0%{?suse_version} >=1230
%config %attr(0755,root,root) %{_unitdir}/%{name}.service
%config %attr(0644,root,root) %{_libexecdir}/tmpfiles.d/ddclient.conf
%else
%config %attr(0755,root,root) /etc/init.d/%{name}
%endif
%{_sbindir}/%{name}
%{_sbindir}/rc%{name}
/var/adm/fillup-templates/sysconfig.%{name}