diff --git a/proftpd-1.3.0a-open.patch b/proftpd-1.3.0a-open.patch new file mode 100644 index 0000000..efb2185 --- /dev/null +++ b/proftpd-1.3.0a-open.patch @@ -0,0 +1,53 @@ +diff -Naupr proftpd-1.3.0a.orig/src/fsio.c proftpd-1.3.0a/src/fsio.c +--- proftpd-1.3.0a.orig/src/fsio.c 2006-03-22 23:10:34.000000000 +0100 ++++ proftpd-1.3.0a/src/fsio.c 2007-08-08 19:23:39.000000000 +0200 +@@ -2450,7 +2450,7 @@ pr_fh_t *pr_fsio_open_canon(const char * + fs = fs->fs_next; + + pr_log_debug(DEBUG9, "FS: using %s open()", fs->fs_name); +- fh->fh_fd = fs->open(fh, deref, flags); ++ fh->fh_fd = (fs->open)(fh, deref, flags); + + if (fh->fh_fd == -1) { + destroy_pool(fh->fh_pool); +@@ -2490,7 +2490,7 @@ pr_fh_t *pr_fsio_open(const char *name, + fs = fs->fs_next; + + pr_log_debug(DEBUG9, "FS: using %s open()", fs->fs_name); +- fh->fh_fd = fs->open(fh, name, flags); ++ fh->fh_fd = (fs->open)(fh, name, flags); + + if (fh->fh_fd == -1) { + destroy_pool(fh->fh_pool); +diff -Naupr proftpd-1.3.0a.orig/src/netio.c proftpd-1.3.0a/src/netio.c +--- proftpd-1.3.0a.orig/src/netio.c 2004-10-09 22:46:22.000000000 +0200 ++++ proftpd-1.3.0a/src/netio.c 2007-08-08 19:20:36.000000000 +0200 +@@ -367,22 +367,22 @@ pr_netio_stream_t *pr_netio_open(pool *p + if (strm_type == PR_NETIO_STRM_CTRL) { + nstrm->strm_type = PR_NETIO_STRM_CTRL; + nstrm->strm_mode = mode; +- return ctrl_netio ? ctrl_netio->open(nstrm, fd, mode) : +- core_ctrl_netio->open(nstrm, fd, mode); ++ return ctrl_netio ? (ctrl_netio->open)(nstrm, fd, mode) : ++ (core_ctrl_netio->open)(nstrm, fd, mode); + } + + if (strm_type == PR_NETIO_STRM_DATA) { + nstrm->strm_type = PR_NETIO_STRM_DATA; + nstrm->strm_mode = mode; +- return data_netio ? data_netio->open(nstrm, fd, mode) : +- core_data_netio->open(nstrm, fd, mode); ++ return data_netio ? (data_netio->open)(nstrm, fd, mode) : ++ (core_data_netio->open)(nstrm, fd, mode); + } + + if (strm_type == PR_NETIO_STRM_OTHR) { + nstrm->strm_type = PR_NETIO_STRM_OTHR; + nstrm->strm_mode = mode; +- return othr_netio ? othr_netio->open(nstrm, fd, mode) : +- core_othr_netio->open(nstrm, fd, mode); ++ return othr_netio ? (othr_netio->open)(nstrm, fd, mode) : ++ (core_othr_netio->open)(nstrm, fd, mode); + } + + destroy_pool(nstrm->strm_pool); diff --git a/proftpd.logrotate b/proftpd.logrotate index 06514c1..22cc420 100644 --- a/proftpd.logrotate +++ b/proftpd.logrotate @@ -1,16 +1,10 @@ -/var/log/xferlog { +/var/log/proftpd/*.log /var/log/xferlog { compress missingok + notifempty + sharedscripts postrotate - test -f /var/lock/subsys/proftpd && /usr/bin/killall -HUP proftpd - endscript -} - -/var/log/proftpd/*.log { - compress - missingok - postrotate - test -f /var/lock/subsys/proftpd && /usr/bin/killall -HUP proftpd + test -f /var/lock/subsys/proftpd && /usr/bin/killall -HUP proftpd || : endscript } diff --git a/proftpd.spec b/proftpd.spec index 224fff4..6bda950 100644 --- a/proftpd.spec +++ b/proftpd.spec @@ -1,8 +1,8 @@ Summary: Flexible, stable and highly-configurable FTP server Name: proftpd Version: 1.3.0a -Release: 5%{?dist} -License: GPL +Release: 8%{?dist} +License: GPLv2+ Group: System Environment/Daemons URL: http://www.proftpd.org/ Source0: ftp://ftp.proftpd.org/distrib/source/proftpd-%{version}.tar.bz2 @@ -17,6 +17,7 @@ Patch1: proftpd-1.3.0-ctrls-restart.patch Patch2: proftpd-1.3.0-cmdbufsize.patch Patch3: proftpd-1.3.0-mod_tls.patch Patch4: proftpd-1.3.0a-ctrls-bug2867.patch +Patch5: proftpd-1.3.0a-open.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: pam >= 0.59 Requires(post): /sbin/chkconfig @@ -72,6 +73,7 @@ Module to add PostgreSQL support to the ProFTPD FTP server. %patch2 -p1 -b .cmdbufsize %patch3 -p0 -b .mod_tls %patch4 -p0 -b .ctrls-bug2867 +%patch5 -p1 -b .open %build @@ -159,7 +161,7 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/proftpd %config(noreplace) %{_sysconfdir}/logrotate.d/proftpd %{_sysconfdir}/rc.d/init.d/proftpd -%{_mandir}/*/* +%{_mandir}/man?/* %{_bindir}/* %dir %{_libexecdir}/proftpd/ %{_libexecdir}/proftpd/mod_quotatab.so @@ -194,6 +196,15 @@ fi %changelog +* Sun Aug 12 2007 Matthias Saou 1.3.0a-8 +- Fix logrotate entry to silence error when proftpd isn't running (#246392). + +* Mon Aug 6 2007 Matthias Saou 1.3.0a-7 +- Include patch to fix "open" calls with recent glibc. + +* Mon Aug 6 2007 Matthias Saou 1.3.0a-6 +- Update License field. + * Fri Jun 15 2007 Matthias Saou 1.3.0a-5 - Remove _smp_mflags to (hopefully) fix build failure.