- major bugfix release to gftp-2.0.19

Improvements to the networking code, fixes for several segfaults, i18n
fixes, and 38 updated or new translations.
- IPv6 is still disabled (thanks to sthen@ for confirming it still
doesn't work properly...) ; any taker to fix it, be my guest
This commit is contained in:
ajacoutot 2008-12-01 16:09:01 +00:00
parent bb79fcdfbc
commit 8e927ce3dd
14 changed files with 169 additions and 171 deletions

View File

@ -1,16 +1,15 @@
# $OpenBSD: Makefile,v 1.16 2008/06/12 21:58:11 sthen Exp $
# $OpenBSD: Makefile,v 1.17 2008/12/01 16:09:01 ajacoutot Exp $
COMMENT= multithreaded gtk2 file transfer client
DISTNAME= gftp-2.0.18
PKGNAME= ${DISTNAME}p10
DISTNAME= gftp-2.0.19
CATEGORIES= net
HOMEPAGE= http://gftp.seul.org/
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# GPL
# GPLv2
PERMIT_PACKAGE_CDROM= yes
PERMIT_PACKAGE_FTP= yes
PERMIT_DISTFILES_CDROM= yes
@ -21,8 +20,6 @@ MASTER_SITES= ${HOMEPAGE} \
WANTLIB= readline c m ncurses util
EXTRACT_SUFX= .tar.bz2
CONFIGURE_STYLE=gnu
CONFIGURE_ENV= CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
@ -34,17 +31,20 @@ CONFIGURE_ARGS= --with-readline \
FLAVORS= no_x11
FLAVOR?=
MODULES= devel/gettext
BUILD_DEPENDS= ::devel/bison
.if ${FLAVOR:L:Mno_x11}
BUILD_DEPENDS= ::devel/gettext
LIB_DEPENDS= glib.>=1::devel/glib
CONFIGURE_ARGS+=--disable-gtkport --disable-gtk20
.else
USE_X11= Yes
MODULES= devel/gettext
LIB_DEPENDS= gtk-x11-2.0.>=600.10,gdk_pixbuf-2.0.>=600.0,gdk-x11-2.0.>=600.0::x11/gtk+2
RUN_DEPENDS+= :desktop-file-utils-*:devel/desktop-file-utils
WANTLIB+= X11 Xau Xcursor Xdmcp Xext Xfixes Xi Xinerama Xrandr \
Xcomposite Xdamage pixman-1 \
Xcomposite Xdamage pixman-1 gio-2.0 \
Xrender atk-1.0 cairo expat fontconfig freetype \
glib-2.0 glitz gmodule-2.0 gobject-2.0 gthread-2.0 \
pango-1.0 pangocairo-1.0 pangoft2-1.0 png pthread z

View File

@ -1,5 +1,5 @@
MD5 (gftp-2.0.18.tar.bz2) = RLGUQtBvbcaMchHWYCnYJg==
RMD160 (gftp-2.0.18.tar.bz2) = Dg2uqFQ66CKyVjVkc2AZM2KiZI0=
SHA1 (gftp-2.0.18.tar.bz2) = wkaPH/H+l4pfqzoZjlE1WPO0j1o=
SHA256 (gftp-2.0.18.tar.bz2) = gUXhjR7fE+jLbNemm7ad5cRjBwhpl3VWVEiPuCgtOKI=
SIZE (gftp-2.0.18.tar.bz2) = 1374850
MD5 (gftp-2.0.19.tar.gz) = TAyrSzXoZm9YkrAhJScKIQ==
RMD160 (gftp-2.0.19.tar.gz) = 4/XC+pbyGsbtrF7vtCv9jhzHeB8=
SHA1 (gftp-2.0.19.tar.gz) = prxhAISIIg8VgNyQI343BJlhGss=
SHA256 (gftp-2.0.19.tar.gz) = 7vxHrlGwEaJBKHTw3waDl62F2WAMGswC4i1d89mmAHQ=
SIZE (gftp-2.0.19.tar.gz) = 2691419

View File

@ -0,0 +1,57 @@
$OpenBSD: patch-configure,v 1.1 2008/12/01 16:09:01 ajacoutot Exp $
--- configure.orig Sun Nov 30 22:37:09 2008
+++ configure Mon Dec 1 13:46:57 2008
@@ -10916,13 +10916,13 @@ fi
;;
esac
- { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: checking for pthread_create in -pthread" >&5
+echo $ECHO_N "checking for pthread_create in -pthread... $ECHO_C" >&6; }
if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+LIBS="-pthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10978,7 +10978,7 @@ fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
if test $ac_cv_lib_pthread_pthread_create = yes; then
- PTHREAD_LIBS="-lpthread"
+ PTHREAD_LIBS="-pthread"
fi
@@ -12909,13 +12909,13 @@ fi
else
# Some library is needed. Try libpthread and libc_r.
- { echo "$as_me:$LINENO: checking for pthread_kill in -lpthread" >&5
-echo $ECHO_N "checking for pthread_kill in -lpthread... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: checking for pthread_kill in -pthread" >&5
+echo $ECHO_N "checking for pthread_kill in -pthread... $ECHO_C" >&6; }
if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+LIBS="-pthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -12972,8 +12972,8 @@ fi
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_kill" >&6; }
if test $ac_cv_lib_pthread_pthread_kill = yes; then
gl_have_pthread=yes
- LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
- LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+ LIBTHREAD=-pthread LTLIBTHREAD=-pthread
+ LIBMULTITHREAD=-pthread LTLIBMULTITHREAD=-pthread
fi
if test -z "$gl_have_pthread"; then

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-docs_sample_gftp_gftprc,v 1.1 2006/08/12 15:17:04 naddy Exp $
--- docs/sample.gftp/gftprc.orig Thu Aug 10 21:56:56 2006
+++ docs/sample.gftp/gftprc Thu Aug 10 21:57:03 2006
@@ -80,7 +80,7 @@ trans_blksize=20480
$OpenBSD: patch-docs_sample_gftp_gftprc,v 1.2 2008/12/01 16:09:01 ajacoutot Exp $
--- docs/sample.gftp/gftprc.orig Thu Jan 24 14:56:55 2008
+++ docs/sample.gftp/gftprc Mon Dec 1 17:03:43 2008
@@ -83,7 +83,7 @@ trans_blksize=20480
default_protocol=FTP
# Enable IPv6 support

View File

@ -0,0 +1,39 @@
$OpenBSD: patch-lib_charset-conv_c,v 1.1 2008/12/01 16:09:01 ajacoutot Exp $
--- lib/charset-conv.c.orig Mon Dec 1 14:44:42 2008
+++ lib/charset-conv.c Mon Dec 1 14:48:34 2008
@@ -230,7 +230,7 @@ gftp_filename_from_utf8 (gftp_request * request, const
#else
char *
-gftp_string_to_utf8 (gftp_request * request, const char *str, size_t dest_len)
+gftp_string_to_utf8 (gftp_request * request, const char *str, size_t *dest_len)
{
return (NULL);
}
@@ -238,22 +238,22 @@ gftp_string_to_utf8 (gftp_request * request, const cha
char *
gftp_string_from_utf8 (gftp_request * request, int force_local, const char *str,
- size_t dest_len)
+ size_t *dest_len)
{
return (NULL);
}
char *
-gftp_filename_to_utf8 (gftp_request * request, const char *str, size_t dest_len)
+gftp_filename_to_utf8 (gftp_request * request, const char *str, size_t *dest_len)
{
return (NULL);
}
char *
-gftp_filename_from_utf8 (gftp_request * request, int force_local,
- const char *str, size_t dest_len)
+gftp_filename_from_utf8 (gftp_request * request, const char *str,
+ size_t *dest_len)
{
return (NULL);
}

View File

@ -1,14 +1,10 @@
$OpenBSD: patch-lib_fsplib_fsplib_c,v 1.2 2007/11/06 12:14:18 ajacoutot Exp $
--- lib/fsplib/fsplib.c.orig Wed Jan 19 03:03:45 2005
+++ lib/fsplib/fsplib.c Tue Nov 6 13:07:12 2007
@@ -27,6 +27,14 @@ use of this software.
$OpenBSD: patch-lib_fsplib_fsplib_c,v 1.3 2008/12/01 16:09:01 ajacoutot Exp $
--- lib/fsplib/fsplib.c.orig Mon Dec 1 13:51:47 2008
+++ lib/fsplib/fsplib.c Mon Dec 1 13:51:55 2008
@@ -32,6 +32,10 @@ use of this software.
#include "fsplib.h"
#include "lock.h"
+#ifndef ENOMSG
+# define ENOMSG EINVAL
+#endif
+
+#ifndef ENOTSUP
+# define ENOTSUP EINVAL
+#endif
@ -16,48 +12,3 @@ $OpenBSD: patch-lib_fsplib_fsplib_c,v 1.2 2007/11/06 12:14:18 ajacoutot Exp $
/* ************ Internal functions **************** */
/* builds filename in packet output buffer, appends password if needed */
@@ -612,7 +620,7 @@ int fsp_readdir_r(FSP_DIR *dir,struct dirent *entry, s
entry->d_reclen = fentry.reclen;
strncpy(entry->d_name,fentry.name,MAXNAMLEN);
- if (fentry.namlen > MAXNAMLEN)
+ if (fentry.namlen >= MAXNAMLEN)
{
entry->d_name[MAXNAMLEN + 1 ] = '\0';
#ifdef HAVE_NAMLEN
@@ -680,9 +688,19 @@ int fsp_readdir_native(FSP_DIR *dir,FSP_RDENTRY *entry
/* skip file date and file size */
dir->dirpos += 9;
/* read file name */
- entry->name[255 + 1] = '\0';
+ entry->name[255] = '\0';
strncpy(entry->name,(char *)( dir->data + dir->dirpos ),MAXNAMLEN);
+ /* check for ASCIIZ encoded filename */
+ if (memchr(dir->data + dir->dirpos,0,dir->datasize - dir->dirpos) != NULL)
+ {
namelen = strlen( (char *) dir->data+dir->dirpos);
+ }
+ else
+ {
+ /* \0 terminator not found at end of filename */
+ *result = NULL;
+ return 0;
+ }
/* skip over file name */
dir->dirpos += namelen +1;
@@ -709,12 +727,12 @@ int fsp_readdir_native(FSP_DIR *dir,FSP_RDENTRY *entry
struct dirent * fsp_readdir(FSP_DIR *dirp)
{
- static struct dirent entry;
+ static dirent_workaround entry;
struct dirent *result;
if (dirp == NULL) return NULL;
- if ( fsp_readdir_r(dirp,&entry,&result) )
+ if ( fsp_readdir_r(dirp,&entry.dirent,&result) )
return NULL;
else
return result;

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-lib_fsplib_fsplib_h,v 1.1 2007/11/06 12:14:18 ajacoutot Exp $
--- lib/fsplib/fsplib.h.orig Tue Nov 6 13:07:24 2007
+++ lib/fsplib/fsplib.h Tue Nov 6 13:08:21 2007
@@ -1,6 +1,7 @@
#ifndef _FSPLIB_H
#define _FSPLIB_H 1
#include <time.h>
+#include <stddef.h>
/* The FSP v2 protocol support library - public interface */
/*
@@ -137,6 +138,13 @@ typedef struct FSP_FILE {
int bufpos; /* position in buffer */
unsigned int pos; /* position of next packet */
} FSP_FILE;
+
+
+typedef union dirent_workaround {
+ struct dirent dirent;
+ char fill[offsetof (struct dirent, d_name) + MAXNAMLEN + 1];
+} dirent_workaround;
+
/* function prototypes */

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-lib_local_c,v 1.2 2007/11/06 12:14:18 ajacoutot Exp $
--- lib/local.c.orig Wed Feb 2 02:24:51 2005
+++ lib/local.c Tue Nov 6 13:05:08 2007
@@ -372,7 +372,7 @@ local_get_file_size (gftp_request * request, const cha
static int
local_chdir (gftp_request * request, const char *directory)
{
- char tempstr[255];
+ char tempstr[PATH_MAX];
g_return_val_if_fail (request != NULL, GFTP_EFATAL);
g_return_val_if_fail (request->protonum == GFTP_LOCAL_NUM, GFTP_EFATAL);

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-lib_options_h,v 1.2 2007/11/06 12:14:18 ajacoutot Exp $
--- lib/options.h.orig Wed Jan 19 02:49:17 2005
+++ lib/options.h Tue Nov 6 13:05:08 2007
@@ -137,7 +137,7 @@ gftp_config_vars gftp_global_config_vars[] =
$OpenBSD: patch-lib_options_h,v 1.3 2008/12/01 16:09:01 ajacoutot Exp $
--- lib/options.h.orig Wed Jan 10 02:24:51 2007
+++ lib/options.h Mon Dec 1 17:03:43 2008
@@ -149,7 +149,7 @@ gftp_config_vars gftp_global_config_vars[] =
N_("This specifies the default protocol to use"), GFTP_PORT_ALL, NULL},
#if defined (HAVE_GETADDRINFO) && defined (HAVE_GAI_STRERROR)
{"enable_ipv6", N_("Enable IPv6 support"),

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-lib_protocols_c,v 1.1 2008/12/01 16:09:01 ajacoutot Exp $
--- lib/protocols.c.orig Tue Mar 4 13:28:42 2008
+++ lib/protocols.c Mon Dec 1 14:54:31 2008
@@ -459,9 +459,11 @@ gftp_get_next_file (gftp_request * request, const char
if (ret >= 0 && fle->file != NULL)
{
+#if GLIB_MAJOR_VERSION > 1
if (g_utf8_validate (fle->file, -1, NULL))
fle->filename_utf8_encoded = 1;
else
+#endif
{
utf8 = gftp_filename_to_utf8 (request, fle->file, &destlen);
if (utf8 != NULL)

View File

@ -1,37 +0,0 @@
$OpenBSD: patch-lib_sshv2_c,v 1.2 2007/11/06 12:14:18 ajacoutot Exp $
--- lib/sshv2.c.orig Tue Jan 4 14:32:11 2005
+++ lib/sshv2.c Tue Nov 6 13:05:08 2007
@@ -1867,31 +1867,13 @@ sshv2_put_file (gftp_request * request, const char *fi
}
-#ifdef G_HAVE_GINT64
-
-static gint64
-sshv2_hton64 (gint64 val)
-{
-#if G_BYTE_ORDER != G_BIG_ENDIAN
- return (GINT64_TO_BE (val));
-#else
- return (val);
-#endif
-}
-
-#endif
-
-
static void
sshv2_setup_file_offset (sshv2_params * params, char *buf)
{
guint32 hinum, lownum;
#ifdef G_HAVE_GINT64
- gint64 offset;
-
- offset = sshv2_hton64 (params->offset);
- lownum = offset >> 32;
- hinum = (guint32) offset;
+ lownum = htonl((guint32) params->offset);
+ hinum = htonl(params->offset >> 32);
#else
hinum = 0;
lownum = htonl (params->offset);

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_text_gftp-text_c,v 1.2 2007/11/06 12:14:18 ajacoutot Exp $
--- src/text/gftp-text.c.orig Tue Jan 25 02:11:00 2005
+++ src/text/gftp-text.c Tue Nov 6 13:05:08 2007
@@ -185,7 +185,12 @@ gftp_text_ask_question (const char *question, int echo
else
infd = stdin;
+#if GLIB_MAJOR_VERSION > 1
locale_question = g_locale_from_utf8 (question, -1, NULL, NULL, NULL);
+#else
+ locale_question = NULL;
+#endif
+
if (locale_question != NULL)
{
printf ("%s%s%s ", GFTPUI_COMMON_COLOR_BLUE, locale_question,

View File

@ -1,6 +1,5 @@
@comment $OpenBSD: PFRAG.no-no_x11,v 1.2 2007/07/13 08:09:44 ajacoutot Exp $
bin/gftp-gtk
share/applications/
@comment $OpenBSD: PFRAG.no-no_x11,v 1.3 2008/12/01 16:09:01 ajacoutot Exp $
@bin bin/gftp-gtk
share/applications/gftp.desktop
@exec %D/bin/update-desktop-database
@unexec %D/bin/update-desktop-database

View File

@ -1,6 +1,6 @@
@comment $OpenBSD: PLIST,v 1.3 2007/07/13 08:09:44 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.4 2008/12/01 16:09:01 ajacoutot Exp $
bin/gftp
bin/gftp-text
@bin bin/gftp-text
@man man/man1/gftp.1
share/gftp/
share/gftp/COPYING
@ -13,8 +13,13 @@ share/gftp/doc.xpm
share/gftp/dotdot.xpm
share/gftp/down.xpm
share/gftp/exe.xpm
share/gftp/gftp-16x16.png
share/gftp/gftp-22x22.png
share/gftp/gftp-24x24.png
share/gftp/gftp-32x32.png
share/gftp/gftp-48x48.png
share/gftp/gftp-logo.xpm
share/gftp/gftp-mini-logo.xpm
share/gftp/gftp-scalable.svg
share/gftp/gftp.xpm
share/gftp/gftprc
share/gftp/img.xpm
@ -49,6 +54,9 @@ share/locale/ca/LC_MESSAGES/gftp.mo
share/locale/cs/LC_MESSAGES/gftp.mo
share/locale/da/LC_MESSAGES/gftp.mo
share/locale/de/LC_MESSAGES/gftp.mo
share/locale/dz/
share/locale/dz/LC_MESSAGES/
share/locale/dz/LC_MESSAGES/gftp.mo
share/locale/el/LC_MESSAGES/gftp.mo
share/locale/en_CA/
share/locale/en_CA/LC_MESSAGES/
@ -60,11 +68,20 @@ share/locale/es/LC_MESSAGES/gftp.mo
share/locale/fi/LC_MESSAGES/gftp.mo
share/locale/fr/LC_MESSAGES/gftp.mo
share/locale/ga/LC_MESSAGES/gftp.mo
share/locale/gl/LC_MESSAGES/gftp.mo
share/locale/gu/
share/locale/gu/LC_MESSAGES/
share/locale/gu/LC_MESSAGES/gftp.mo
share/locale/he/LC_MESSAGES/gftp.mo
share/locale/hr/LC_MESSAGES/gftp.mo
share/locale/hu/LC_MESSAGES/gftp.mo
share/locale/it/LC_MESSAGES/gftp.mo
share/locale/ja/LC_MESSAGES/gftp.mo
share/locale/ko/LC_MESSAGES/gftp.mo
share/locale/lt/
share/locale/lt/LC_MESSAGES/
share/locale/lt/LC_MESSAGES/gftp.mo
share/locale/lv/LC_MESSAGES/gftp.mo
share/locale/mk/
share/locale/mk/LC_MESSAGES/
share/locale/mk/LC_MESSAGES/gftp.mo
@ -74,8 +91,14 @@ share/locale/ml/LC_MESSAGES/gftp.mo
share/locale/ms/
share/locale/ms/LC_MESSAGES/
share/locale/ms/LC_MESSAGES/gftp.mo
share/locale/nb/LC_MESSAGES/gftp.mo
share/locale/ne/
share/locale/ne/LC_MESSAGES/
share/locale/ne/LC_MESSAGES/gftp.mo
share/locale/nl/LC_MESSAGES/gftp.mo
share/locale/no/LC_MESSAGES/gftp.mo
share/locale/oc/
share/locale/oc/LC_MESSAGES/
share/locale/oc/LC_MESSAGES/gftp.mo
share/locale/pa/
share/locale/pa/LC_MESSAGES/
share/locale/pa/LC_MESSAGES/gftp.mo
@ -84,6 +107,9 @@ share/locale/pt/LC_MESSAGES/gftp.mo
share/locale/pt_BR/LC_MESSAGES/gftp.mo
share/locale/ro/LC_MESSAGES/gftp.mo
share/locale/ru/LC_MESSAGES/gftp.mo
share/locale/rw/
share/locale/rw/LC_MESSAGES/
share/locale/rw/LC_MESSAGES/gftp.mo
share/locale/sk/LC_MESSAGES/gftp.mo
share/locale/sq/
share/locale/sq/LC_MESSAGES/
@ -102,6 +128,7 @@ share/locale/th/LC_MESSAGES/gftp.mo
share/locale/tr/LC_MESSAGES/gftp.mo
share/locale/uk/LC_MESSAGES/gftp.mo
share/locale/zh_CN/LC_MESSAGES/gftp.mo
share/locale/zh_HK/LC_MESSAGES/gftp.mo
share/locale/zh_TW/LC_MESSAGES/gftp.mo
share/pixmaps/
share/pixmaps/gftp.png