Skip to contentSkip to conversation

curlftpfs: new package

PATCH New Richard Braun 3 participants 8 messages Jul 21, 2012 – Jul 30, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 curlftpfs: new package

---
 package/Config.in              |    1 +
 package/curlftpfs/Config.in    |   17 +++++++++++++++++
 package/curlftpfs/curlftpfs.mk |   14 ++++++++++++++
 3 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 package/curlftpfs/Config.in
 create mode 100644 package/curlftpfs/curlftpfs.mk
package/Config.in +1 -0
index f664b8e..edcf55c 100644
@@ -169,6 +169,7 @@ menu "Hardware handling"
 source "package/acpid/Config.in"
 source "package/cdrkit/Config.in"
 source "package/cramfs/Config.in"
+source "package/curlftpfs/Config.in"
 source "package/dbus/Config.in"
 source "package/dbus-glib/Config.in"
 source "package/dbus-python/Config.in"
package/curlftpfs/Config.in new file +17 -0
new file mode 100644
index 0000000..23c7547
@@ -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.mk new file +14 -0
new file mode 100644
index 0000000..9e77eb0
@@ -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
#1 lore raw

PATCH 1/1 curlftpfs: new package

Le Sat, 21 Jul 2012 17:27:18 +0200,
Richard Braun <[email protected]> a ?crit :

package/Config.in menu "Hardware handling" · line 175

Quoted 8 lines
package/Config.in +1 -0
@@ -169,6 +169,7 @@ menu "Hardware handling"
 source "package/acpid/Config.in"
 source "package/cdrkit/Config.in"
 source "package/cramfs/Config.in"
+source "package/curlftpfs/Config.in"
 source "package/dbus/Config.in"
 source "package/dbus-glib/Config.in"
 source "package/dbus-python/Config.in"

This "Hardware handling" menu is becoming quite crazy. curlftpfs clearly has nothing to do with Hardware handling (and many other things in there).

Even "cramfs" for example is not quite Hardware handling related. Maybe we should put more things in the "System tools" menu, or create a "Filesystems tools" menu or something. Suggestions welcome.

Otherwise, looks good.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 curlftpfs: new package

Quoted 3 lines · Thomas Petazzoni

Even "cramfs" for example is not quite Hardware handling related. Maybe we should put more things in the "System tools" menu, or create a "Filesystems tools" menu or something. Suggestions welcome.

Replace "or" with "and" and it looks good enough for me.

Signature · 1 line
Richard Braun
#3 lore raw

PATCH v2 1/1 curlftpfs: new package

---
 package/Config.in              |    1 +
 package/curlftpfs/Config.in    |   17 +++++++++++++++++
 package/curlftpfs/curlftpfs.mk |   14 ++++++++++++++
 3 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 package/curlftpfs/Config.in
 create mode 100644 package/curlftpfs/curlftpfs.mk
package/Config.in +1 -0
index f664b8e..8b0188b 100644
@@ -521,6 +521,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
new file mode 100644
index 0000000..23c7547
@@ -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.mk new file +14 -0
new file mode 100644
index 0000000..9e77eb0
@@ -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
#4 lore raw

PATCH v3 1/1 curlftpfs: new package

---
 package/Config.in                                  |    1 +
 package/curlftpfs/Config.in                        |   17 ++++++
 .../curlftpfs-000-fix-CURLOPT_INFILESIZE.patch     |   11 ++++
 ...curlftpfs-001-free_ftpfs_file-memleak-fix.patch |   13 +++++
 .../curlftpfs-002-nocache-memleak-fix.patch        |   58 ++++++++++++++++++++
 package/curlftpfs/curlftpfs.mk                     |   14 +++++
 6 files changed, 114 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.mk
package/Config.in +1 -0
index f664b8e..8b0188b 100644
@@ -521,6 +521,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
new file mode 100644
index 0000000..23c7547
@@ -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 +11 -0
new file mode 100644
index 0000000..bd14184
@@ -0,0 +1,11 @@
+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 +13 -0
new file mode 100644
index 0000000..e341b81
@@ -0,0 +1,13 @@
+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 +58 -0

58 lines not on this page · raw message

package/curlftpfs/curlftpfs.mk new file +14 -0
new file mode 100644
index 0000000..9e77eb0
@@ -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
#5 lore raw

PATCH v3 1/1 curlftpfs: new package

Hello,

Le Mon, 30 Jul 2012 16:09:08 +0200,
Richard Braun <[email protected]> a ?crit :

Quoted 5 lines
 package/Config.in                                  |    1 +
 package/curlftpfs/Config.in                        |   17 ++++++
 .../curlftpfs-000-fix-CURLOPT_INFILESIZE.patch     |   11 ++++
 ...curlftpfs-001-free_ftpfs_file-memleak-fix.patch |   13 +++++
 .../curlftpfs-002-nocache-memleak-fix.patch        |   58 ++++++++++++++++++++

Could you please include a description in each patch + Signed-off-by line, or if you're not the author, a reference to the original place, and possibly their upstreamable status?

Thanks,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#6 lore raw

PATCH v4 1/1 curlftpfs: new package

---
 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 ++++++++++++++++++++
 package/curlftpfs/curlftpfs.mk                     |   14 +++++
 6 files changed, 118 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.mk
package/Config.in +1 -0
index f664b8e..8b0188b 100644
@@ -521,6 +521,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
new file mode 100644
index 0000000..23c7547
@@ -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
new file mode 100644
index 0000000..dc83af0
@@ -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
new file mode 100644
index 0000000..4966c9d
@@ -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.mk new file +14 -0
new file mode 100644
index 0000000..9e77eb0
@@ -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
#7 lore raw

PATCH 1/1 curlftpfs: new package

In reply to Thomas Petazzoni
Quoted 11 lines · Thomas Petazzoni

This "Hardware handling" menu is becoming quite crazy. curlftpfs clearly has nothing to do with Hardware handling (and many other things in there).

Even "cramfs" for example is not quite Hardware handling related. Maybe we should put more things in the "System tools" menu, or create a "Filesystems tools" menu or something. Suggestions welcome.

Otherwise, looks good.

Thomas

Filesystems++ :)