Browse Source

curlftpfs package creation

Signed-off-by: tuibuilder_pel7x64builder0 <tuibuilder@powerel.org>
master
tuibuilder_pel7x64builder0 5 years ago
parent
commit
15933bec1e
  1. 1629
      SOURCES/curlftpfs-0.9.2-aarch64.patch
  2. 33
      SOURCES/curlftpfs-0.9.2-create-fix.patch
  3. 15
      SOURCES/curlftpfs-0.9.2-memleak#591298.patch
  4. 58
      SOURCES/curlftpfs-0.9.2-memleak-cached#591299.patch
  5. 21
      SOURCES/curlftpfs-0.9.2-offset_64_another.patch
  6. 107
      SPECS/curlftpfs.spec

1629
SOURCES/curlftpfs-0.9.2-aarch64.patch

File diff suppressed because it is too large Load Diff

33
SOURCES/curlftpfs-0.9.2-create-fix.patch

@ -0,0 +1,33 @@ @@ -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

15
SOURCES/curlftpfs-0.9.2-memleak#591298.patch

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
@@ -, +, @@
---
ftpfs.c | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)
--- b/ftpfs.c
+++ b/ftpfs.c
@@ -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);
}

58
SOURCES/curlftpfs-0.9.2-memleak-cached#591299.patch

@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
@@ -, +, @@
---
cache.c | 2 1 + 1 - 0 !
ftpfs-ls.c | 19 15 + 4 - 0 !
2 files changed, 16 insertions(+), 5 deletions(-)
--- b/cache.c
+++ b/cache.c
@@ -25,7 +25,7 @@ struct cache {
time_t last_cleaned;
};
-static struct cache cache;
+struct cache cache;
struct node {
struct stat stat;
--- b/ftpfs-ls.c
+++ b/ftpfs-ls.c
@@ -25,6 +25,13 @@
#include "charset_utils.h"
#include "ftpfs-ls.h"
+struct cache {
+ int on;
+ char incomplete[];
+};
+
+extern struct cache cache;
+
static int parse_dir_unix(const char *line,
struct stat *sbuf,
char *file,
@@ -243,8 +250,10 @@ int parse_dir(const char* list, const ch
reallink = g_strdup(link);
}
int linksize = strlen(reallink);
- cache_add_link(full_path, reallink, linksize+1);
- DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink);
+ if (cache.on) {
+ cache_add_link(full_path, reallink, linksize+1);
+ DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink);
+ }
if (linkbuf && linklen) {
if (linksize > linklen) linksize = linklen - 1;
strncpy(linkbuf, reallink, linksize);
@@ -257,8 +266,10 @@ int parse_dir(const char* list, const ch
DEBUG(1, "filler: %s\n", file);
filler(h, file, &stat_buf);
} else {
- DEBUG(1, "cache_add_attr: %s\n", full_path);
- cache_add_attr(full_path, &stat_buf);
+ if (cache.on) {
+ DEBUG(1, "cache_add_attr: %s\n", full_path);
+ cache_add_attr(full_path, &stat_buf);
+ }
}
DEBUG(2, "comparing %s %s\n", name, file);

21
SOURCES/curlftpfs-0.9.2-offset_64_another.patch

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
@@ -, +, @@
ftpfs.c | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)
--- b/ftpfs.c
+++ b/ftpfs.c
@@ -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_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,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_UPLOAD, 1);
curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_READDATA, NULL);
CURLcode curl_res = curl_easy_perform(ftpfs.connection);

107
SPECS/curlftpfs.spec

@ -0,0 +1,107 @@ @@ -0,0 +1,107 @@
Name: curlftpfs
Version: 0.9.2
Release: 14%{?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.
License: GPL+
Group: System Environment/Base
Requires: fuse
Source: http://downloads.sourceforge.net/curlftpfs/%{name}-%{version}.tar.gz
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
# Aarch64 support, Fedora-specific. bz#925209
Patch3: curlftpfs-0.9.2-aarch64.patch

# Fix memleaks 2 patches (one upstream report: https://code.google.com/p/curlftpfs/issues/detail?id=10)
Patch4: curlftpfs-0.9.2-memleak#591298.patch
Patch5: curlftpfs-0.9.2-memleak-cached#591299.patch

%description
CurlFtpFS is a filesystem for accessing FTP hosts based on FUSE and
libcurl. It features SSL support, connecting through tunneling HTTP
proxies, and automatically reconnecting if the server times out.

%prep
%setup -q
%patch1 -p1 -b .offset
%patch2 -p1 -b .create-fix
%patch3 -p1 -b .aarch64
%patch4 -p1 -b .memleak
%patch5 -p1 -b .memleak-cached

%build
%configure
make %{?_smp_mflags}

%install
make DESTDIR=$RPM_BUILD_ROOT install

%files
%{_bindir}/curlftpfs
%{_mandir}/*/curlftpfs.*
%doc README
%doc COPYING

%changelog
* Sun May 12 2013 Pavel Alexeev <Pahan@Hubbitus.info> - 0.9.2-14
- Apply patch to support aarch64 (Thanks to Dennis Gilmore) - bz#925209.
- Apply Patch4: curlftpfs-0.9.2-memleak#591298.patch and
Patch5: curlftpfs-0.9.2-memleak-cached#591299.patch to fix memleaks. Thanks to Jérôme Benoit.

* Sun May 12 2013 Pavel Alexeev <Pahan@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).
- Add patch2

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Aug 6 2012 Pavel Alexeev <Pahan@Hubbitus.info> - 0.9.2-11
- Replace patch0 (offset 64 fix) by more correct (bz#831417).

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Fri Jun 24 2011 Pavel Alexeev <Pahan@Hubbitus.info> - 0.9.2-7
- Fix bz#671204, thanks to Viktor for the patch.

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Jan 12 2010 Pavel Alexeev <Pahan@Hubbitus.info> - 0.9.2-7
- New version 0.9.2

* Thu Sep 17 2009 Peter Lemenkov <lemenkov@gmail.com> - 0.9.1-6
- Rebuild with new fuse

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed May 21 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.9.1-3
- fix license tag

* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.1-2
- Autorebuild for GCC 4.3

* Thu Apr 05 2007 David Anderson <fedora-packaging@dw-perspective.org.uk> 0.9.1-1
- 0.9.1

* Wed Mar 28 2007 David Anderson <fedora-packaging@dw-perspective.org.uk> 0.9-5
- Explicit dependency on fuse (bz#234349)

* Mon Jan 08 2007 David Anderson <fedora-packaging@dw-perspective.org.uk> 0.9-3
- Bump release number

* Tue Dec 12 2006 David Anderson <fedora-packaging@dw-perspective.org.uk> 0.9-1
- Initial package
Loading…
Cancel
Save