curlftpfs: new package
PATCH 1/1 curlftpfs: new package
From: Richard Braun <rbraun@>
--- package/Config.in | 1 + package/curlftpfs/Config.in | 17 ++++++ .../curlftpfs-000-fix-CURLOPT_INFILESIZE.patch | 13 ++++ ...curlftpfs-001-free_ftpfs_file-memleak-fix.patch | 14 +++++ .../curlftpfs-002-nocache-memleak-fix.patch | 59 ++++++++++++++++++++ .../curlftpfs/curlftpfs-003-configureac-fix.patch | 31 ++++++++++ package/curlftpfs/curlftpfs.mk | 14 +++++ 7 files changed, 149 insertions(+), 0 deletions(-) create mode 100644 package/curlftpfs/Config.in create mode 100644 package/curlftpfs/curlftpfs-000-fix-CURLOPT_INFILESIZE.patch create mode 100644 package/curlftpfs/curlftpfs-001-free_ftpfs_file-memleak-fix.patch create mode 100644 package/curlftpfs/curlftpfs-002-nocache-memleak-fix.patch create mode 100644 package/curlftpfs/curlftpfs-003-configureac-fix.patch create mode 100644 package/curlftpfs/curlftpfs.mk
package/Config.in +1 -0
@@ -523,6 +523,7 @@ source "package/ctorrent/Config.in" source "package/cifs-utils/Config.in" source "package/conntrack-tools/Config.in" source "package/cups/Config.in" +source "package/curlftpfs/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/dhcp/Config.in" endif
package/curlftpfs/Config.in new file +17 -0
@@ -0,0 +1,17 @@ +config BR2_PACKAGE_CURLFTPFS + bool "curlftpfs (FUSE)" + select BR2_PACKAGE_LIBFUSE + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBCURL + depends on BR2_LARGEFILE + depends on BR2_USE_WCHAR # glib2 + help + CurlFtpFS is a filesystem for accessing FTP hosts based on FUSE + and libcurl. + +comment "curlftpfs requires a toolchain with LARGEFILE and WCHAR support" + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR
package/curlftpfs/curlftpfs-000-fix-CURLOPT_INFILESIZE.patch new file +13 -0
@@ -0,0 +1,13 @@ +Borrowed from the curlftpfs_0.9.2-5 Debian package. + +CURLOPT_INFILESIZE does not support -1 arg. This fix bug #556012. +--- curlftpfs-0.9.2/ftpfs.c.old 2009-12-13 14:12:25.000000000 +0100 ++++ curlftpfs-0.9.2/ftpfs.c 2009-12-13 14:12:32.000000000 +0100 +@@ -503,7 +503,6 @@ + + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_URL, fh->full_path); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_UPLOAD, 1); +- curl_easy_setopt_or_die(fh->write_conn, CURLOPT_INFILESIZE, -1); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READFUNCTION, write_data_bg); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READDATA, fh); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_LOW_SPEED_LIMIT, 1);
package/curlftpfs/curlftpfs-001-free_ftpfs_file-memleak-fix.patch new file +14 -0
@@ -0,0 +1,14 @@ +Borrowed from the curlftpfs_0.9.2-5 Debian package. + +Fix a memory leak. See Bug #587250. +--- a/ftpfs.c 2008-04-30 01:05:47.000000000 +0200 ++++ a/ftpfs.c.slesimple 2010-01-01 22:12:10.000000000 +0100 +@@ -615,6 +615,8 @@ static void free_ftpfs_file(struct ftpfs + sem_destroy(&fh->data_need); + sem_destroy(&fh->data_written); + sem_destroy(&fh->ready); ++ if (fh->buf.size) { buf_free(&fh->buf); } ++ if (fh->stream_buf.size) { buf_free(&fh->stream_buf); } + free(fh); + } +
package/curlftpfs/curlftpfs-002-nocache-memleak-fix.patch new file +59 -0
59 lines not on this page · raw message
package/curlftpfs/curlftpfs-003-configureac-fix.patch new file +31 -0
@@ -0,0 +1,31 @@ +*** curlftpfs-0.9.2/configure.ac.old 2012-10-30 17:25:55.000000000 +0400 +--- curlftpfs-0.9.2/configure.ac 2012-10-30 17:23:01.000000000 +0400 +*************** if test "$libcurl_protocol_FTP" != yes; +*** 19,25 **** + fi + + CFLAGS="$CFLAGS -Wall -W -Wno-sign-compare -D_REENTRANT $GLIB_CFLAGS $FUSE_CFLAGS $LIBCURL_CPPFLAGS" +! LIBS="$GLIB_LIBS $FUSE_LIBS $LIBCURL" + + have_fuse_opt_parse=no + AC_CHECK_FUNC([fuse_opt_parse], [have_fuse_opt_parse=yes]) +--- 19,25 ---- + fi + + CFLAGS="$CFLAGS -Wall -W -Wno-sign-compare -D_REENTRANT $GLIB_CFLAGS $FUSE_CFLAGS $LIBCURL_CPPFLAGS" +! LIBS="$GLIB_LIBS $FUSE_LIBS $LIBCURL -lpthread" + + have_fuse_opt_parse=no + AC_CHECK_FUNC([fuse_opt_parse], [have_fuse_opt_parse=yes]) +*************** AC_STRUCT_TM +*** 46,54 **** + + # Checks for library functions. + AC_FUNC_CHOWN +- AC_FUNC_MALLOC + AC_FUNC_MKTIME +- AC_FUNC_REALLOC + AC_FUNC_SELECT_ARGTYPES + AC_FUNC_STRFTIME + AC_FUNC_UTIME_NULL +--- 46,52 ----
package/curlftpfs/curlftpfs.mk new file +14 -0
@@ -0,0 +1,14 @@ +############################################################# +# +# curlftpfs +# +############################################################# + +CURLFTPFS_VERSION = 0.9.2 +CURLFTPFS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/curlftpfs/$(CURLFTPFS_VERSION) +CURLFTPFS_DEPENDENCIES = \ + libglib2 libfuse openssl libcurl \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) \ + $(if $(BR2_ENABLE_LOCALE),,libiconv) + +$(eval $(autotools-package))
Signature · 1 line
1.7.2.5
PATCH 1/1 curlftpfs: new package
Here is my fix to Richard Braun patch, so it now builds ok on my
configuration.
I've also opened issues for this problem on curlftpfs project bugtracker:
https://sourceforge.net/tracker/?func=detail&aid=3581895&group_id=160565&atid=816357
https://sourceforge.net/tracker/?func=detail&aid=3581869&group_id=160565&atid=816357
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121030/8d16c800/attachment.html>
PATCH 1/1 curlftpfs: new package
In reply to Alexander VarninQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Alexander" == Alexander Varnin <[email protected]> writes:
Alexander> From: Richard Braun <rbraun@>
Alexander> Signed-off-by: Richard Braun <rbraun@...> Alexander> Signed-off-by: Alexander Varnin <[email protected]>
Committed with minor changes, see below.
Alexander> diff --git a/package/Config.in b/package/Config.in Alexander> index 85904fb..f11cd9d 100644
Alexander> --- a/package/Config.in
Alexander> +++ b/package/Config.in
Alexander> @@ -523,6 +523,7 @@ source "package/ctorrent/Config.in"
Alexander> source "package/cifs-utils/Config.in" Alexander> source "package/conntrack-tools/Config.in" Alexander> source "package/cups/Config.in"
Alexander> +source "package/curlftpfs/Config.in"
We now have a filesystem menu, so I've moved it there.
Alexander> +++ b/package/curlftpfs/Config.in
Alexander> @@ -0,0 +1,17 @@
Alexander> +config BR2_PACKAGE_CURLFTPFS
Alexander> + bool "curlftpfs (FUSE)"
Alexander> + select BR2_PACKAGE_LIBFUSE
Alexander> + select BR2_PACKAGE_LIBGLIB2
Alexander> + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
Alexander> + select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
libintl is gone, so I've removed that.
Alexander> + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
Alexander> + select BR2_PACKAGE_OPENSSL
Alexander> + select BR2_PACKAGE_LIBCURL
Alexander> + depends on BR2_LARGEFILE
Alexander> + depends on BR2_USE_WCHAR # glib2
I've added the dependencies of libfuse (threads + mmu).
Alexander> + help
Alexander> + CurlFtpFS is a filesystem for accessing FTP hosts based on FUSE
Alexander> + and libcurl.
Alexander> +
And the upstream URL.
Alexander> +comment "curlftpfs requires a toolchain with LARGEFILE and WCHAR support"
Alexander> + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR
And adjusted this to match.
Alexander> diff --git a/package/curlftpfs/curlftpfs-003-configureac-fix.patch b/package/curlftpfs/curlftpfs-003-configureac-fix.patch
It's not clear to me what this patch tries to do, the package doesn't use it as AUTORECONF isn't set to yes and it builds ok without it here, so I've dropped it.
Alexander> diff --git a/package/curlftpfs/curlftpfs.mk b/package/curlftpfs/curlftpfs.mk
Alexander> new file mode 100644
Alexander> index 0000000..9e77eb0
Alexander> --- /dev/null
Alexander> +++ b/package/curlftpfs/curlftpfs.mk
Alexander> @@ -0,0 +1,14 @@
Alexander> +#############################################################
Alexander> +#
Alexander> +# curlftpfs
Alexander> +#
Alexander> +#############################################################
Alexander> +
Alexander> +CURLFTPFS_VERSION = 0.9.2
Alexander> +CURLFTPFS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/curlftpfs/$(CURLFTPFS_VERSION)
I've updated this to a dowloads.sourceforge.net URL.
Alexander> +CURLFTPFS_DEPENDENCIES = \
Alexander> + libglib2 libfuse openssl libcurl \
Alexander> + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) \
And dropped libintl.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 curlftpfs: new package
Quoted 1 line · Peter Korsgaard
Committed with minor changes, see below.
Thanks for taking care of it :).
Quoted 3 lines
It's not clear to me what this patch tries to do, the package doesn't use it as AUTORECONF isn't set to yes and it builds ok without it here, so I've dropped it.
IIRC, it was related to libintl/gettext and libglib2. If it now builds fine without it, I take it the upstream issue has been cleanly fixed and the patch is very likely useless now.
Signature · 1 line
Richard Braun