[curlftpfs] - Made Patch2: curlftpfs-0.9.2-create-fix.patch to fix file create issue bz#962015. - Some cleanup,

Pavel Alexeev hubbitus at fedoraproject.org
Sun May 12 19:32:23 UTC 2013


commit aab72017b81712de698de259df69d54979ca99f1
Author: Pavel Alexeev (aka Pahan-Hubbitus) <pahan at hubbitus.info>
Date:   Sun May 12 23:32:15 2013 +0400

    - Made Patch2: curlftpfs-0.9.2-create-fix.patch to fix file create issue bz#962015.
    - Some cleanup, as it is not intended to be build on EPEL5.
    - Reintroduce Patch1 by Debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556012) (bz#962015).
    - bz#962164

 curlftpfs-0.9.2-create-fix.patch        |   33 +++++++++++++++++++++++++++++++
 curlftpfs-0.9.2-offset_64_another.patch |    6 +---
 curlftpfs.spec                          |   17 ++++++++-------
 3 files changed, 44 insertions(+), 12 deletions(-)
---
diff --git a/curlftpfs-0.9.2-create-fix.patch b/curlftpfs-0.9.2-create-fix.patch
new file mode 100644
index 0000000..4389d9d
--- /dev/null
+++ b/curlftpfs-0.9.2-create-fix.patch
@@ -0,0 +1,33 @@
+diff -NaurEbBH -x '*.Plo' -x Makefile -x '*.log' -x '*.status' -x '*.list' -x '*.Po' -x libtool -x nbproject curlftpfs-0.9.2.orig/ftpfs.c curlftpfs-0.9.2/ftpfs.c
+--- curlftpfs-0.9.2.orig/ftpfs.c	2013-05-12 14:31:57.000000000 +0400
++++ curlftpfs-0.9.2/ftpfs.c	2013-05-12 14:29:00.906721322 +0400
+@@ -759,13 +759,13 @@
+ 		err = -ENOTSUP;
+ 	  }
+ 	  
+-	  if ((fi->flags & O_EXCL))
+-	  {
+-		DEBUG(1, "opening %s with O_EXCL - testing existence\n", path);
+-		int exists_r = test_exists(path);
+-		if (exists_r != -ENOENT)
+-			err = -EACCES;
+-	  }
++//	  if ((fi->flags & O_EXCL))
++//	  {
++//		DEBUG(1, "opening %s with O_EXCL - testing existence\n", path);
++//		int exists_r = test_exists(path);
++//		if (exists_r != -ENOENT)
++//			err = -EACCES;
++//	  }
+ 	  
+ 	  if (!err)
+ 	  {
+@@ -816,6 +816,8 @@
+ #if FUSE_VERSION >= 25
+ static int ftpfs_create(const char* path, mode_t mode,
+                         struct fuse_file_info* fi) {
++//	return ftpfs_open_common(path, mode, fi);
++	ftpfs_mknod(path, mode, NULL);
+   return ftpfs_open_common(path, mode, fi);
+ }
+ #endif
diff --git a/curlftpfs-0.9.2-offset_64_another.patch b/curlftpfs-0.9.2-offset_64_another.patch
index 6a26931..35a910c 100644
--- a/curlftpfs-0.9.2-offset_64_another.patch
+++ b/curlftpfs-0.9.2-offset_64_another.patch
@@ -3,21 +3,19 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 --- b/ftpfs.c	
 +++ b/ftpfs.c	
-@@ -503,7 +503,7 @@ static void *ftpfs_write_thread(void *da
+@@ -503,7 +503,6 @@ static void *ftpfs_write_thread(void *da
    
    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_INFILESIZE_LARGE, -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);
-@@ -645,7 +645,7 @@ static int create_empty_file(const char 
+@@ -645,7 +645,6 @@ static int create_empty_file(const char 
    pthread_mutex_lock(&ftpfs.lock);
    cancel_previous_multi();
    curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path);
 -  curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_INFILESIZE, 0);
-+  curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_INFILESIZE_LARGE, 0);
    curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_UPLOAD, 1);
    curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_READDATA, NULL);
    CURLcode curl_res = curl_easy_perform(ftpfs.connection);
diff --git a/curlftpfs.spec b/curlftpfs.spec
index 8a0d3d8..e270f56 100644
--- a/curlftpfs.spec
+++ b/curlftpfs.spec
@@ -1,6 +1,6 @@
 Name: curlftpfs
 Version: 0.9.2
-Release: 12%{?dist}
+Release: 13%{?dist}
 Summary: CurlFtpFS is a filesystem for accessing FTP hosts based on FUSE and libcurl
 URL: http://curlftpfs.sourceforge.net/
 # Code does not specify a version of the license.
@@ -8,10 +8,11 @@ License: GPL+
 Group: System Environment/Base
 Requires: fuse
 Source: http://downloads.sourceforge.net/curlftpfs/%{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: curl-devel >= 7.15.2 fuse-devel glib2-devel
 # https://bugzilla.redhat.com/show_bug.cgi?id=831417
 Patch1: curlftpfs-0.9.2-offset_64_another.patch
+# https://code.google.com/p/curlftpfs/issues/detail?id=6 (bz#962015)
+Patch2: curlftpfs-0.9.2-create-fix.patch
 
 %description
 CurlFtpFS is a filesystem for accessing FTP hosts based on FUSE and
@@ -21,27 +22,27 @@ proxies, and automatically reconnecting if the server times out.
 %prep
 %setup -q
 %patch1 -p1 -b .offset
+%patch2 -p1 -b .create-fix
 
 %build
 %configure
 make %{?_smp_mflags}
 
 %install
-%{__rm} -rf --preserve-root $RPM_BUILD_ROOT
-
 make DESTDIR=$RPM_BUILD_ROOT install
 
-%clean
-%{__rm} -rf --preserve-root $RPM_BUILD_ROOT
-
 %files
-%defattr (-,root,root)
 %{_bindir}/curlftpfs
 %{_mandir}/*/curlftpfs.*
 %doc README
 %doc COPYING
 
 %changelog
+* Sun May 12 2013 Pavel Alexeev <Pahan at Hubbitus.info> - 0.9.2-13
+- Made Patch2: curlftpfs-0.9.2-create-fix.patch to fix file create issue bz#962015.
+- Some cleanup, as it is not intended to be build on EPEL5.
+- Reintroduce Patch1 by Debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556012) (bz#962015).
+
 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.2-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list