SHA256
1
0
forked from pool/proftpd

Accepting request 226496 from home:computersalat:devel:network

fix for fix for bnc#844183

OBS-URL: https://build.opensuse.org/request/show/226496
OBS-URL: https://build.opensuse.org/package/show/network/proftpd?expand=0&rev=27
This commit is contained in:
Christian Wittmer 2014-03-17 19:33:45 +00:00 committed by Git OBS Bridge
parent cdc617c408
commit 112d012264
4 changed files with 15 additions and 16 deletions

View File

@ -1,10 +1,10 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Mar 14 21:35:47 UTC 2014 - chris@computersalat.de Mon Mar 17 18:38:53 UTC 2014 - chris@computersalat.de
- fix for bnc#844183 - fix for bnc#844183
* proftpd fails to start due to missing /run/proftpd * proftpd fails to start due to missing /run/proftpd
was created by 'init' file before start, somehow missed to add - add own tmpfiles.d file
to systemd service file * proftpd.tmpfile
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 3 20:48:44 UTC 2013 - chris@computersalat.de Thu Oct 3 20:48:44 UTC 2013 - chris@computersalat.de

View File

@ -3,7 +3,6 @@ Description=ProFTPd FTP server
After=systemd-user-sessions.service network.target nss-lookup.target local-fs.target remote-fs.target After=systemd-user-sessions.service network.target nss-lookup.target local-fs.target remote-fs.target
[Service] [Service]
ExecStartPre=-/usr/bin/install -d /run/proftpd
ExecStart=/usr/sbin/proftpd --nodaemon ExecStart=/usr/sbin/proftpd --nodaemon
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID

View File

@ -30,6 +30,7 @@ Source1: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz.a
Source11: %{name}.init Source11: %{name}.init
Source12: %{name}.passwd Source12: %{name}.passwd
Source13: %{name}.service Source13: %{name}.service
Source14: %{name}.tmpfile
Source15: %{name}.keyring Source15: %{name}.keyring
#PATCH-FIX-openSUSE: pam, logrotate, xinet #PATCH-FIX-openSUSE: pam, logrotate, xinet
Patch100: %{name}-dist.patch Patch100: %{name}-dist.patch
@ -194,8 +195,8 @@ export CXXFLAGS="$CFLAGS"
%if 0%{?has_systemd} %if 0%{?has_systemd}
%{__install} -D -m 0644 %{S:13} %{buildroot}%{_unitdir}/%{name}.service %{__install} -D -m 0644 %{S:13} %{buildroot}%{_unitdir}/%{name}.service
# systemd need to create a tmp dir: /var/run/proftpd # systemd need to create a tmp dir: /run/proftpd
install -D -m 0644 contrib/dist/rpm/proftpd-tmpfs.conf %{buildroot}%{_prefix}/lib/tmpfiles.d/proftpd.conf %{__install} -D -m 0644 %{S:14} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
%endif %endif
%find_lang %{name} %find_lang %{name}
@ -219,14 +220,13 @@ install -D -m 0644 contrib/dist/rpm/proftpd-tmpfs.conf %{buildroot}%{_prefix}/li
%post %post
# on `rpm -ivh` PARAM is 1 # on `rpm -ivh` PARAM is 1
# on `rpm -Uvh` PARAM is 2 # on `rpm -Uvh` PARAM is 2
#if [ "$1" = "1" ]; then
# #%{__sed} -i "s,\(.*disable.*=\ \)no,\1yes," %{_sysconfdir}/xinetd.d/%{name}
# %{__sed} -i -e "s/@HOST@/$(hostname -s)/" %{_sysconfdir}/%{name}/%{name}.conf
#fi
%{fillup_and_insserv -f proftpd}
%if 0%{?has_systemd} %if 0%{?has_systemd}
%service_add_post %{name}.service %service_add_post %{name}.service
%{__install} -d /run/%{name}
%else
%{fillup_and_insserv -f proftpd}
%{__install} -d %{_localstatedir}/run/%{name}
%endif %endif
%postun %postun
@ -277,9 +277,6 @@ fi
%config(noreplace) %{_sysconfdir}/%{name}/dhparams.pem %config(noreplace) %{_sysconfdir}/%{name}/dhparams.pem
%{_sysconfdir}/init.d/%{name} %{_sysconfdir}/init.d/%{name}
%dir %attr(0750,ftp,ftp) %{_localstatedir}/log/%{name} %dir %attr(0750,ftp,ftp) %{_localstatedir}/log/%{name}
%if ! 0%{?has_systemd}
%ghost %{_localstatedir}/run/%{name}
%endif
%{_sbindir}/* %{_sbindir}/*
%{_mandir}/man?/* %{_mandir}/man?/*
%dir %attr(0755,root,root) %{_libdir}/%{name}/ %dir %attr(0755,root,root) %{_libdir}/%{name}/
@ -291,7 +288,8 @@ fi
%exclude %{_libdir}/%{name}/mod_sql_sqlite.so %exclude %{_libdir}/%{name}/mod_sql_sqlite.so
%if 0%{?has_systemd} %if 0%{?has_systemd}
%{_unitdir}/%{name}.service %{_unitdir}/%{name}.service
%{_prefix}/lib/tmpfiles.d/proftpd.conf %{_prefix}/lib/tmpfiles.d/%{name}.conf
%ghost %dir /run/%{name}
%endif %endif
%files devel %files devel

2
proftpd.tmpfile Normal file
View File

@ -0,0 +1,2 @@
# proFTPD needs a DIR
d /run/proftpd 0755 root root -