|
@@ -1,20 +1,30 @@
|
|
|
|
+%bcond_with systemd
|
|
|
|
+
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%define rundir /run
|
|
|
|
+%else
|
|
|
|
+%define rundir /var/run
|
|
|
|
+%endif
|
|
|
|
+
|
|
%define _prefix /usr
|
|
%define _prefix /usr
|
|
-%define _localstatedir /var/run
|
|
+%define _localstatedir %{rundir}
|
|
%define _sysconfdir /etc
|
|
%define _sysconfdir /etc
|
|
-%define _rundir /var/run/proftpd
|
|
+%define _rundir %{rundir}/proftpd
|
|
-%define tarballversion 1.3.6c
|
|
+%define tarballversion 1.3.7a
|
|
-%define origversion 1.3.6c
|
|
+%define origversion 1.3.7a
|
|
|
|
|
|
Summary: ProFTPd -- Professional FTP Server.
|
|
Summary: ProFTPd -- Professional FTP Server.
|
|
Summary(ja): ProFTPd -- プロフェッショナル FTP サーバ
|
|
Summary(ja): ProFTPd -- プロフェッショナル FTP サーバ
|
|
Name: proftpd
|
|
Name: proftpd
|
|
Epoch: 1
|
|
Epoch: 1
|
|
Version: %{origversion}
|
|
Version: %{origversion}
|
|
-Release: 1%{?_dist_release}
|
|
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
|
+Group: servers,internet
|
|
|
|
+Vendor: Project Vine
|
|
|
|
+Distribution: Vine Linux
|
|
|
|
+
|
|
License: GPL
|
|
License: GPL
|
|
-Group: System Environment/Daemons
|
|
|
|
URL: http://www.proftpd.org/
|
|
URL: http://www.proftpd.org/
|
|
-
|
|
|
|
Source0: https://github.com/proftpd/proftpd/archive/v%{origversion}.tar.gz#/%{name}-%{origversion}.tar.gz
|
|
Source0: https://github.com/proftpd/proftpd/archive/v%{origversion}.tar.gz#/%{name}-%{origversion}.tar.gz
|
|
Source1: proftpd.vine.conf
|
|
Source1: proftpd.vine.conf
|
|
Source2: ftpusers.vine
|
|
Source2: ftpusers.vine
|
|
@@ -26,10 +36,6 @@ Source5: welcome.msg
|
|
# auth
|
|
# auth
|
|
Patch201: proftpd-1.3.1-use-system-auth-instead-of-pam_pwdb.patch
|
|
Patch201: proftpd-1.3.1-use-system-auth-instead-of-pam_pwdb.patch
|
|
|
|
|
|
-# iconv patch (CharsetLocal/CharsetRemote)
|
|
|
|
-# Patch300: http://www.hakusan.tsg.ne.jp/tjkawa/software/misc/proftpd-iconv/pack/proftpd-1.3.0-iconv.patch.gz
|
|
|
|
-Patch300: proftpd-1.3.6b-iconv.patch
|
|
|
|
-
|
|
|
|
# fix build on recent kernel headers
|
|
# fix build on recent kernel headers
|
|
# Patch400: proftpd-1.3.1-umode.patch
|
|
# Patch400: proftpd-1.3.1-umode.patch
|
|
|
|
|
|
@@ -44,9 +50,6 @@ Requires: pam > 0.59
|
|
Obsoletes: wu-ftpd, anonftp
|
|
Obsoletes: wu-ftpd, anonftp
|
|
Provides: ftpserver
|
|
Provides: ftpserver
|
|
|
|
|
|
-Vendor: Project Vine
|
|
|
|
-Distribution: Vine Linux
|
|
|
|
-
|
|
|
|
%description
|
|
%description
|
|
ProFTPd is an enhanced FTP server with a focus toward simplicity,
|
|
ProFTPd is an enhanced FTP server with a focus toward simplicity,
|
|
security, and ease of configuration. It features a very Apache-like
|
|
security, and ease of configuration. It features a very Apache-like
|
|
@@ -63,7 +66,7 @@ anonymous FTP, パーミッションベースのディレクトリ可視性の
|
|
|
|
|
|
%package utils
|
|
%package utils
|
|
Summary: ProFTPD - Additional utilities
|
|
Summary: ProFTPD - Additional utilities
|
|
-Group: System Environment/Daemons
|
|
+Group: admin-tools
|
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
|
|
|
|
|
%description utils
|
|
%description utils
|
|
@@ -77,6 +80,10 @@ ProFTPD server:
|
|
* ftptop: show the current status of FTP sessions
|
|
* ftptop: show the current status of FTP sessions
|
|
* ftpwho: show the current process information for each FTP session
|
|
* ftpwho: show the current process information for each FTP session
|
|
|
|
|
|
|
|
+
|
|
|
|
+%debug_package
|
|
|
|
+
|
|
|
|
+
|
|
%prep
|
|
%prep
|
|
%setup -q -n %{name}-%{tarballversion}
|
|
%setup -q -n %{name}-%{tarballversion}
|
|
find . -type d -name CVS | xargs -r rm -frv
|
|
find . -type d -name CVS | xargs -r rm -frv
|
|
@@ -87,27 +94,30 @@ find . -type d -name CVS | xargs -r rm -frv
|
|
# use system-auth instead of pam_pwdb
|
|
# use system-auth instead of pam_pwdb
|
|
%patch201 -p1
|
|
%patch201 -p1
|
|
|
|
|
|
-# iconv patch (CharsetLocal/CharsetRemote)
|
|
|
|
-%patch300 -p1
|
|
|
|
-
|
|
|
|
# fix build on recent kernel headers
|
|
# fix build on recent kernel headers
|
|
# %patch400 -p0
|
|
# %patch400 -p0
|
|
|
|
|
|
# security fixes
|
|
# security fixes
|
|
|
|
|
|
|
|
+
|
|
%build
|
|
%build
|
|
# Disable stripping in order to get useful debuginfo packages
|
|
# Disable stripping in order to get useful debuginfo packages
|
|
%{__perl} -pi -e 's|"-s"|""|g' configure
|
|
%{__perl} -pi -e 's|"-s"|""|g' configure
|
|
|
|
|
|
%configure \
|
|
%configure \
|
|
--libexecdir="%{_libexecdir}/proftpd" \
|
|
--libexecdir="%{_libexecdir}/proftpd" \
|
|
- --localstatedir="%{_var}/run/proftpd" \
|
|
+ --localstatedir="%{rundir}/proftpd" \
|
|
|
|
+ --disable-strip \
|
|
--enable-ctrls \
|
|
--enable-ctrls \
|
|
--enable-facl \
|
|
--enable-facl \
|
|
--enable-dso \
|
|
--enable-dso \
|
|
--enable-nls \
|
|
--enable-nls \
|
|
--enable-ipv6 \
|
|
--enable-ipv6 \
|
|
- --with-modules=mod_readme:mod_auth_pam:mod_tls:mod_codeconv:mod_df:\
|
|
+ --enable-openssl \
|
|
|
|
+ --disable-pcre \
|
|
|
|
+ --disable-redis \
|
|
|
|
+ --enable-shadow \
|
|
|
|
+ --with-modules=mod_readme:mod_auth_pam:mod_tls:\
|
|
mod_ban:mod_dynmasq:mod_load:mod_ratio:mod_rewrite \
|
|
mod_ban:mod_dynmasq:mod_load:mod_ratio:mod_rewrite \
|
|
--with-shared=mod_ldap:mod_quotatab:mod_quotatab_file:mod_quotatab_ldap
|
|
--with-shared=mod_ldap:mod_quotatab:mod_quotatab_file:mod_quotatab_ldap
|
|
|
|
|
|
@@ -119,7 +129,7 @@ mod_ban:mod_dynmasq:mod_load:mod_ratio:mod_rewrite \
|
|
%install
|
|
%install
|
|
%{__rm} -rf %{buildroot}
|
|
%{__rm} -rf %{buildroot}
|
|
%{__make} install DESTDIR=%{buildroot} \
|
|
%{__make} install DESTDIR=%{buildroot} \
|
|
- rundir="%{_var}/run/proftpd" \
|
|
+ rundir="%{rundir}/proftpd" \
|
|
INSTALL_USER=`id -un` \
|
|
INSTALL_USER=`id -un` \
|
|
INSTALL_GROUP=`id -gn`
|
|
INSTALL_GROUP=`id -gn`
|
|
|
|
|
|
@@ -131,16 +141,28 @@ mkdir -p %{buildroot}%{_sysconfdir}/pam.d
|
|
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
|
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
|
%{__install} -m 644 contrib/dist/rpm/proftpd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/proftpd
|
|
%{__install} -m 644 contrib/dist/rpm/proftpd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/proftpd
|
|
|
|
|
|
-# init.d
|
|
|
|
-%{__install} -D -p -m 0755 %{SOURCE3} \
|
|
|
|
- %{buildroot}%{_sysconfdir}/rc.d/init.d/proftpd
|
|
|
|
-
|
|
|
|
%{__install} -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/proftpd.conf
|
|
%{__install} -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/proftpd.conf
|
|
%{__install} -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/ftpusers
|
|
%{__install} -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/ftpusers
|
|
%{__install} -D -p -m 0644 %{SOURCE5} %{buildroot}/%{_var}/ftp/welcome.msg
|
|
%{__install} -D -p -m 0644 %{SOURCE5} %{buildroot}/%{_var}/ftp/welcome.msg
|
|
|
|
|
|
touch %{buildroot}%{_sysconfdir}/ftpusers
|
|
touch %{buildroot}%{_sysconfdir}/ftpusers
|
|
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
|
+install -D -p -m 644 contrib/dist/rpm/proftpd.service \
|
|
|
|
+ %{buildroot}%{_unitdir}/proftpd.service
|
|
|
|
+install -D -p -m 644 contrib/dist/systemd/proftpd.socket \
|
|
|
|
+ %{buildroot}%{_unitdir}/proftpd.socket
|
|
|
|
+install -D -p -m 644 contrib/dist/systemd/proftpd@.service \
|
|
|
|
+ %{buildroot}%{_unitdir}/proftpd@.service
|
|
|
|
+install -d -m 755 %{buildroot}%{_tmpfilesdir}
|
|
|
|
+install -p -m 644 contrib/dist/rpm/proftpd-tmpfs.conf \
|
|
|
|
+ %{buildroot}%{_tmpfilesdir}/proftpd.conf
|
|
|
|
+%else
|
|
|
|
+# init.d
|
|
|
|
+%{__install} -D -p -m 0755 %{SOURCE3} \
|
|
|
|
+ %{buildroot}%{_sysconfdir}/rc.d/init.d/proftpd
|
|
|
|
+%endif
|
|
|
|
+
|
|
rm contrib/README.* || :
|
|
rm contrib/README.* || :
|
|
# eliminate executable bit in %doc
|
|
# eliminate executable bit in %doc
|
|
find doc/ sample-configurations/ -type f -perm +111 | xargs -r chmod -x
|
|
find doc/ sample-configurations/ -type f -perm +111 | xargs -r chmod -x
|
|
@@ -153,32 +175,56 @@ rm -f %{buildroot}%{_libexecdir}/proftpd/*.{la,a}
|
|
rm -rf %{buildroot}%{_includedir}/proftpd
|
|
rm -rf %{buildroot}%{_includedir}/proftpd
|
|
rm -rf %{buildroot}%{_libdir}/pkgconfig
|
|
rm -rf %{buildroot}%{_libdir}/pkgconfig
|
|
|
|
|
|
|
|
+# Find translations
|
|
|
|
+%find_lang proftpd
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+%clean
|
|
|
|
+rm -rf %{buildroot}
|
|
|
|
+
|
|
|
|
+
|
|
%preun
|
|
%preun
|
|
|
|
+%if %{with systemd}
|
|
|
|
+if [ $1 -eq 0 ]; then
|
|
|
|
+ systemctl --no-reload disable proftpd.service &>/dev/null || :
|
|
|
|
+ systemctl stop proftpd.service &>/dev/null || :
|
|
|
|
+fi
|
|
|
|
+%else
|
|
|
|
+if [ $1 = 0 -o -x /bin/systemctl ] ; then
|
|
|
|
+ /sbin/service proftpd stop &>/dev/null || :
|
|
|
|
+ /sbin/chkconfig --del proftpd || :
|
|
|
|
+fi
|
|
|
|
+%endif
|
|
if [ -d %{_rundir} ] ; then
|
|
if [ -d %{_rundir} ] ; then
|
|
rm -rf %{_rundir}/*
|
|
rm -rf %{_rundir}/*
|
|
fi
|
|
fi
|
|
|
|
|
|
-if [ $1 = 0 ] ; then
|
|
|
|
- /sbin/chkconfig --del proftpd
|
|
|
|
-fi
|
|
|
|
-
|
|
|
|
%postun
|
|
%postun
|
|
|
|
+%if %{with systemd}
|
|
|
|
+systemctl daemon-reload &>/dev/null || :
|
|
|
|
+if [ $1 -ge 1 ]; then
|
|
|
|
+ systemctl try-restart proftpd.service &>/dev/null || :
|
|
|
|
+fi
|
|
|
|
+%else
|
|
if [ $1 -ge 1 ]; then
|
|
if [ $1 -ge 1 ]; then
|
|
/sbin/service proftpd condrestart
|
|
/sbin/service proftpd condrestart
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
|
|
|
|
%post
|
|
%post
|
|
|
|
+%if %{with systemd}
|
|
|
|
+systemctl daemon-reload &>/dev/null || :
|
|
|
|
+systemctl preset proftpd.service &>/dev/null || :
|
|
|
|
+%else
|
|
/sbin/chkconfig --add proftpd
|
|
/sbin/chkconfig --add proftpd
|
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
|
-%clean
|
|
+%files -f proftpd.lang
|
|
-rm -rf %{buildroot}
|
|
|
|
-
|
|
|
|
-%files
|
|
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
%license COPYING
|
|
%license COPYING
|
|
%doc CREDITS INSTALL NEWS
|
|
%doc CREDITS INSTALL NEWS
|
|
-%doc README.{md,LDAP,PAM,modules}
|
|
+%doc README.{md,LDAP,modules}
|
|
%doc doc/*
|
|
%doc doc/*
|
|
%doc contrib/README contrib/xferstats.holger-preiss
|
|
%doc contrib/README contrib/xferstats.holger-preiss
|
|
%doc sample-configurations/
|
|
%doc sample-configurations/
|
|
@@ -194,10 +240,16 @@ rm -rf %{buildroot}
|
|
%{_var}/ftp/welcome.msg
|
|
%{_var}/ftp/welcome.msg
|
|
%dir %{_libexecdir}/proftpd/
|
|
%dir %{_libexecdir}/proftpd/
|
|
%{_libexecdir}/proftpd/mod_*
|
|
%{_libexecdir}/proftpd/mod_*
|
|
-%{_localedir}/*
|
|
|
|
-%dir %{_rundir}
|
|
|
|
%dir %{_var}/ftp
|
|
%dir %{_var}/ftp
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{_unitdir}/proftpd.service
|
|
|
|
+%{_unitdir}/proftpd.socket
|
|
|
|
+%{_unitdir}/proftpd@.service
|
|
|
|
+%{_tmpfilesdir}/proftpd.conf
|
|
|
|
+%else
|
|
%config %{_sysconfdir}/rc.d/init.d/proftpd
|
|
%config %{_sysconfdir}/rc.d/init.d/proftpd
|
|
|
|
+%dir %{_rundir}
|
|
|
|
+%endif
|
|
%config(noreplace) %{_sysconfdir}/pam.d/ftp
|
|
%config(noreplace) %{_sysconfdir}/pam.d/ftp
|
|
%config(noreplace) %{_sysconfdir}/proftpd.conf
|
|
%config(noreplace) %{_sysconfdir}/proftpd.conf
|
|
%config(noreplace) %{_sysconfdir}/ftpusers
|
|
%config(noreplace) %{_sysconfdir}/ftpusers
|
|
@@ -220,6 +272,11 @@ rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Thu Dec 24 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.7a-1
|
|
|
|
+- new upstream release.
|
|
|
|
+- added systemd support (disabled as default).
|
|
|
|
+- dropped Patch300.
|
|
|
|
+
|
|
* Sat Feb 22 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.6c-1
|
|
* Sat Feb 22 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.6c-1
|
|
- new upstream release.
|
|
- new upstream release.
|
|
|
|
|