Bug 66457 - Update port: ftp/yafc resume coredump patch
Summary: Update port: ftp/yafc resume coredump patch
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jeremy Messenger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-10 13:40 UTC by Fredrik Lindberg
Modified: 2004-05-10 23:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fredrik Lindberg 2004-05-10 13:40:18 UTC
ftp/yafc 1.0 coredumps when attempting to resume a file

Fix: Port update, including patch

--- yafc port patch begin ---



--- yafc port patch end -----9Y59lBxUSRONNACdYREz5qMOabK85FLUDQ1NiO0Xp9x36Va6
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -ruN yafc.orig/Makefile yafc/Makefile
--- yafc.orig/Makefile	Mon May 10 14:06:59 2004
+++ yafc/Makefile	Mon May 10 14:08:03 2004
@@ -7,9 +7,12 @@
 
 PORTNAME=	yafc
 PORTVERSION=	1.0
+PORTREVISION=	1
 CATEGORIES=	ftp
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
+
+PATCHDIR=	files
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Yet another ftp client. Similar to ftp(1)
diff -ruN yafc.orig/files/patch-aa yafc/files/patch-aa
--- yafc.orig/files/patch-aa	Thu Jan  1 01:00:00 1970
+++ yafc/files/patch-aa	Mon May 10 13:28:19 2004
@@ -0,0 +1,24 @@
+diff -ruN src.orginal/get.c src/get.c
+--- src.orginal/get.c	Mon May 10 13:23:07 2004
++++ src/get.c	Mon May 10 13:23:37 2004
+@@ -279,7 +279,7 @@
+ 				e = xstrdup(ctime(&sb.st_mtime));
+ 				a = ask(ASKYES|ASKNO|ASKUNIQUE|ASKCANCEL|ASKALL|ASKRESUME,
+ 						ASKRESUME,
+-						_("Local file '%s' exists\nLocal: %ld bytes, %sRemote: %ld bytes, %sOverwrite?"),
++						_("Local file '%s' exists\nLocal: %lld bytes, %sRemote: %ld bytes, %sOverwrite?"),
+ 						shortpath(dest, 42, gvLocalHomeDir),
+ 						sb.st_size, e ? e : "unknown date",
+ 						ftp_filesize(fi->path), ctime(&ft));
+diff -ruN src.orginal/put.c src/put.c
+--- src.orginal/put.c	Mon May 10 13:23:07 2004
++++ src/put.c	Mon May 10 13:23:37 2004
+@@ -217,7 +217,7 @@
+ 				e = xstrdup(ctime(&sb->st_mtime));
+ 				a = ask(ASKYES|ASKNO|ASKUNIQUE|ASKCANCEL|ASKALL|ASKRESUME,
+ 						ASKRESUME,
+-						_("Remote file '%s' exists\nLocal: %ld bytes, %sRemote: %ld bytes, %sOverwrite?"),
++						_("Remote file '%s' exists\nLocal: %lld bytes, %sRemote: %ld bytes, %sOverwrite?"),
+ 						shortpath(dest, 42, ftp->homedir),
+ 						sb->st_size, e ? e : "unknown date",
+ 						ftp_filesize(f->path), ctime(&ft));
How-To-Repeat: yafc ftp.freebsd.org:/pub/FreeBSD/releases/i386/ISO-IMAGES/4.10>
yafc ftp.freebsd.org:/pub/FreeBSD/releases/i386/ISO-IMAGES/4.10> get 4.10-RC2-i386-miniinst.iso
/pub/FreeBSD/releases/i386/ISO-IMAGES/4.10/4.10-RC2-i386-miniinst.iso
  0.0% [				 ] 28.0kb/245.28Mb ETA 4:58:58 14.0kb/s

Now, Abort transfer

$ ls -al 4.10-RC2-i386-miniinst.iso
-rw-r--r--  1 root  wheel  499712 May 10 12:58 4.10-RC2-i386-miniinst.iso

Now, resume transfer

yafc ftp.freebsd.org:/pub/FreeBSD/releases/i386/ISO-IMAGES/4.10> get 4.10-RC2-i386-miniinst.iso
Segmentation fault (core dumped)

After patching this prompt appears instead 

Local file '4.10-RC2-i386-miniinst.iso' exists
Local: 28672 bytes, Mon May 10 13:39:56 2004
Remote: 257196032 bytes, Fri Apr 30 21:23:08 2004
Overwrite? [yncauR, ? for help]
Comment 1 Jeremy Messenger freebsd_committer freebsd_triage 2004-05-10 22:53:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mezz

I'll take this.
Comment 2 Jeremy Messenger freebsd_committer freebsd_triage 2004-05-10 23:54:13 UTC
State Changed
From-To: open->closed

Committed, thanks!