aboutsummaryrefslogtreecommitdiffstats
path: root/ftp/spegla
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2006-03-23 18:36:38 +0800
committerhrs <hrs@FreeBSD.org>2006-03-23 18:36:38 +0800
commitb4abf2e79b808639e2a2c9f39afd205f9c75f878 (patch)
treea617807357ed77544d9dce8f11046deb5e75ce2d /ftp/spegla
parent5ba993f19c02443917bf4cef4abad47b5422190d (diff)
downloadfreebsd-ports-gnome-b4abf2e79b808639e2a2c9f39afd205f9c75f878.tar.gz
freebsd-ports-gnome-b4abf2e79b808639e2a2c9f39afd205f9c75f878.tar.zst
freebsd-ports-gnome-b4abf2e79b808639e2a2c9f39afd205f9c75f878.zip
- Fix reply code handling for USER command and bump PORTREVISION.
According to STD 9 (RFC 959), 230 reply code can be returned just after that command. While the upstream has been informed it is unlikely to roll out the next release including this fix in the near future. - Make portlint(1) happy. - Take maintainership.
Diffstat (limited to 'ftp/spegla')
-rw-r--r--ftp/spegla/Makefile16
-rw-r--r--ftp/spegla/files/patch-jftp.c35
-rw-r--r--ftp/spegla/pkg-plist9
3 files changed, 45 insertions, 15 deletions
diff --git a/ftp/spegla/Makefile b/ftp/spegla/Makefile
index 31fa2865c9d0..07544307d1bc 100644
--- a/ftp/spegla/Makefile
+++ b/ftp/spegla/Makefile
@@ -8,15 +8,15 @@
PORTNAME= spegla
PORTVERSION= 1.1p4
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= ftp ipv6
-MASTER_SITES= ftp://subzero.campus.luth.se/pub/spegla/
-# ftp://ftp.luth.se/pub/unix/mirror/
+MASTER_SITES= ftp://subzero.campus.luth.se/pub/spegla/ \
+ ftp://ftp.luth.se/pub/unix/mirror/
PATCH_SITES= http://www.imasy.or.jp/~ume/ipv6/
PATCHFILES= ${DISTNAME}-ipv6-20020129-3.diff.gz
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= hrs@FreeBSD.org
COMMENT= A mirror program for FTP sites (written in C)
MAKE_ARGS= MANDIR=${MAN1PREFIX}/man/man
@@ -30,11 +30,11 @@ post-extract:
.endfor
pre-install:
- @${MKDIR} ${PREFIX}/share/examples/spegla
+ @${MKDIR} ${EXAMPLESDIR}
post-install:
- ${INSTALL_DATA} ${WRKSRC}/freebsd.org ${PREFIX}/share/examples/spegla
- ${INSTALL_DATA} ${WRKSRC}/spegla.conf ${PREFIX}/share/examples/spegla
- ${INSTALL_SCRIPT} ${WRKSRC}/spegla.sh ${PREFIX}/share/examples/spegla
+ ${INSTALL_DATA} ${WRKSRC}/freebsd.org ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/spegla.conf ${EXAMPLESDIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/spegla.sh ${EXAMPLESDIR}
.include <bsd.port.mk>
diff --git a/ftp/spegla/files/patch-jftp.c b/ftp/spegla/files/patch-jftp.c
index 7add9fc77920..5f966968e17a 100644
--- a/ftp/spegla/files/patch-jftp.c
+++ b/ftp/spegla/files/patch-jftp.c
@@ -1,5 +1,5 @@
---- jftp.c.orig Fri Mar 19 03:47:12 2004
-+++ jftp.c Fri Mar 19 03:47:57 2004
+--- jftp.c.orig Thu Mar 23 17:34:21 2006
++++ jftp.c Thu Mar 23 17:39:39 2006
@@ -40,6 +40,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -50,7 +50,36 @@
}
if(islongtext) {
size = sizeof(c->ftp_buf);
-@@ -980,7 +998,7 @@
+@@ -455,17 +473,22 @@
+ c->ftp_resp = JFTP_ERR;
+ return -1;
+ }
+- if (ftp_req(c, "user %s", c->ftp_user_name) < 0 || c->ftp_resp != 331) {
++ if (ftp_req(c, "user %s", c->ftp_user_name) < 0
++ || (c->ftp_resp != 331 && c->ftp_resp != 230)) {
+ E_LOGX_1(0, "Username %s: failed", c->ftp_user_name);
+ FD_CLOSE(c->ftp_com);
+ c->ftp_resp = JFTP_ERR;
+ return -1;
+ }
+- if (ftp_req(c, "pass %s", c->ftp_password) < 0 || c->ftp_resp != 230) {
+- E_LOGX(0, "Password xxxxx: failed");
+- FD_CLOSE(c->ftp_com);
+- c->ftp_resp = JFTP_ERR;
+- return -1;
++ /* USER command can respond 230 immediately in some cases */
++ if (c->ftp_resp != 230) {
++ if (ftp_req(c, "pass %s", c->ftp_password) < 0
++ || c->ftp_resp != 230) {
++ E_LOGX(0, "Password xxxxx: failed");
++ FD_CLOSE(c->ftp_com);
++ c->ftp_resp = JFTP_ERR;
++ return -1;
++ }
+ }
+ c->ftp_resp = 0;
+ if (ftp_req(c, "TYPE I") < 0 || c->ftp_resp != 200) {
+@@ -980,7 +1003,7 @@
/* Late versions of wu-ftpd does some kind of recursive
* listing if only a '.' is given as directory.
*/
diff --git a/ftp/spegla/pkg-plist b/ftp/spegla/pkg-plist
index 8416f8d4dab0..f07214e6f073 100644
--- a/ftp/spegla/pkg-plist
+++ b/ftp/spegla/pkg-plist
@@ -1,5 +1,6 @@
+@comment $FreeBSD$
bin/spegla
-share/examples/spegla/freebsd.org
-share/examples/spegla/spegla.conf
-share/examples/spegla/spegla.sh
-@dirrm share/examples/spegla
+%%EXAMPLESDIR%%/freebsd.org
+%%EXAMPLESDIR%%/spegla.conf
+%%EXAMPLESDIR%%/spegla.sh
+@dirrm %%EXAMPLESDIR%%