diff --git a/proftpd.changes b/proftpd.changes index 6a691d8..5f2ddba 100644 --- a/proftpd.changes +++ b/proftpd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jul 29 01:12:53 UTC 2013 - crrodriguez@opensuse.org + +- Improve systemd service file +- use upstream tmpfiles.d file. related to [bnc#811793] +- Use /run instead of /var/run + ------------------------------------------------------------------- Wed May 1 20:35:19 UTC 2013 - chris@computersalat.de diff --git a/proftpd.conf.tmpfile b/proftpd.conf.tmpfile deleted file mode 100644 index 3e19e7d..0000000 --- a/proftpd.conf.tmpfile +++ /dev/null @@ -1 +0,0 @@ -d /var/run/proftpd 0755 root root ~ - diff --git a/proftpd.service b/proftpd.service index 7412fa7..a6bcc05 100644 --- a/proftpd.service +++ b/proftpd.service @@ -1,6 +1,6 @@ [Unit] Description=ProFTPd FTP server -After=network.target remote-fs.target +After=systemd-user-sessions.service network.target nss-lookup.target local-fs.target remote-fs.target [Service] ExecStart=/usr/sbin/proftpd --nodaemon diff --git a/proftpd.spec b/proftpd.spec index 87e9a96..35760c0 100644 --- a/proftpd.spec +++ b/proftpd.spec @@ -30,7 +30,6 @@ Source1: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz.a Source11: %{name}.init Source12: %{name}.passwd Source13: %{name}.service -Source14: %{name}.conf.tmpfile Source15: %{name}.keyring #PATCH-FIX-openSUSE: pam, logrotate, xinet Patch100: %{name}-dist.patch @@ -151,7 +150,11 @@ export CXXFLAGS="$CFLAGS" --bindir=%{_sbindir} \ --libexecdir=%{_libdir}/%{name} \ --sysconfdir=%{_sysconfdir}/%{name} \ +%if 0%{?has_systemd} + --localstatedir=/run/%{name} \ +%else --localstatedir=%{_localstatedir}/run/%{name} \ +%endif --enable-sendfile \ --enable-ctrls \ --enable-dso \ @@ -189,7 +192,7 @@ export CXXFLAGS="$CFLAGS" %if 0%{?has_systemd} %{__install} -D -m 0644 %{S:13} %{buildroot}%{_unitdir}/%{name}.service # systemd need to create a tmp dir: /var/run/proftpd -%{__install} -D -m 0644 %{S:14} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf +install -D -m 0644 contrib/dist/rpm/proftpd-tmpfs.conf %{buildroot}%{_prefix}/lib/tmpfiles.d/proftpd.conf %endif %find_lang %{name} @@ -271,7 +274,9 @@ fi %config(noreplace) %{_sysconfdir}/%{name}/dhparams.pem %{_sysconfdir}/init.d/%{name} %dir %attr(0750,ftp,ftp) %{_localstatedir}/log/%{name} +%if ! 0%{?has_systemd} %ghost %{_localstatedir}/run/%{name} +%endif %{_sbindir}/* %{_mandir}/man?/* %dir %attr(0755,root,root) %{_libdir}/%{name}/ @@ -283,7 +288,7 @@ fi %exclude %{_libdir}/%{name}/mod_sql_sqlite.so %if 0%{?has_systemd} %{_unitdir}/%{name}.service -%config %{_sysconfdir}/tmpfiles.d/%{name}.conf +%{_prefix}/lib/tmpfiles.d/proftpd.conf %endif %files devel