[packages/s3fs-fuse] s3fs renamed to s3fs-fuse and moved to github
jajcus
jajcus at pld-linux.org
Tue Feb 4 14:14:43 CET 2014
commit 14d3796b626bb1872b4374a76dbb4c70f0b17042
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Tue Feb 4 14:13:43 2014 +0100
s3fs renamed to s3fs-fuse and moved to github
Version: 1.76
Problems that were addressed by the three removed patches seem to be
fixed upstream, in a different way.
s3fs-cache_check.patch | 14 ----
s3fs.spec => s3fs-fuse.spec | 25 ++++----
s3fs-missing_mode.patch | 15 -----
s3fs-x-amz-meta.patch | 153 --------------------------------------------
4 files changed, 14 insertions(+), 193 deletions(-)
---
diff --git a/s3fs.spec b/s3fs-fuse.spec
similarity index 73%
rename from s3fs.spec
rename to s3fs-fuse.spec
index 46e9fdf..3993edd 100644
--- a/s3fs.spec
+++ b/s3fs-fuse.spec
@@ -1,22 +1,22 @@
Summary: FUSE-based file system backed by Amazon S3
-Name: s3fs
-Version: 1.61
+Name: s3fs-fuse
+Version: 1.76
Release: 1
Epoch: 1
License: GPL v2
Group: Applications/System
-Source0: http://s3fs.googlecode.com/files/%{name}-%{version}.tar.gz
-# Source0-md5: 0dd7b7e9b1c58312cde19894488c5072
-Patch0: %{name}-x-amz-meta.patch
-Patch1: %{name}-missing_mode.patch
-Patch2: %{name}-cache_check.patch
+Source0: http://github.com/s3fs-fuse/s3fs-fuse/tarball/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 1f1db900f083aa0b07f66bfa8fc9063a
URL: http://code.google.com/p/s3fs/wiki/FuseOverAmazon
+BuildRequires: autoconf
+BuildRequires: automake
BuildRequires: curl-devel
BuildRequires: libfuse-devel
BuildRequires: libstdc++-devel
BuildRequires: libxml2-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
+Obsoletes: s3fs < 1.75
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -29,12 +29,15 @@ s3fs is stable and is being used in number of production environments,
e.g., rsync backup to s3.
%prep
-%setup -q
-%patch0 -p0
-%patch1 -p1
-%patch2 -p1
+%setup -qc
+mv s3fs-fuse-s3fs-fuse-*/* .
+%{__rm} -r s3fs-fuse-s3fs-fuse-*
%build
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+
%configure
%{__make}
diff --git a/s3fs-cache_check.patch b/s3fs-cache_check.patch
deleted file mode 100644
index fb3b3ad..0000000
--- a/s3fs-cache_check.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -dur s3fs-1.61.orig/src/s3fs.cpp s3fs-1.61/src/s3fs.cpp
---- s3fs-1.61.orig/src/s3fs.cpp 2013-01-03 10:05:41.000000000 +0100
-+++ s3fs-1.61/src/s3fs.cpp 2013-01-03 10:13:01.000000000 +0100
-@@ -532,8 +535,8 @@
-
- // if the local and remote mtime/size
- // do not match we have an invalid cache entry
-- if(str(st.st_size) != responseHeaders["Content-Length"] ||
-- (str(st.st_mtime) != responseHeaders["x-amz-meta-mtime"])) {
-+ if(st.st_size != strtoul(responseHeaders["Content-Length"].c_str(), (char **) NULL, 10) ||
-+ st.st_mtime != get_mtime(responseHeaders["x-amz-meta-mtime"].c_str())) {
- if(close(fd) == -1)
- YIKES(-errno);
-
diff --git a/s3fs-missing_mode.patch b/s3fs-missing_mode.patch
deleted file mode 100644
index d7f256d..0000000
--- a/s3fs-missing_mode.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -dur s3fs-1.61.orig/src/s3fs.cpp s3fs-1.61/src/s3fs.cpp
---- s3fs-1.61.orig/src/s3fs.cpp 2013-01-03 10:05:41.000000000 +0100
-+++ s3fs-1.61/src/s3fs.cpp 2013-01-03 10:05:28.000000000 +0100
-@@ -126,7 +126,10 @@
- }
-
- mode_t get_mode(const char *s) {
-- return (mode_t) strtoul(s, (char **) NULL, 10);
-+ if (s && *s)
-+ return (mode_t) strtoul(s, (char **) NULL, 10);
-+ else
-+ return (mode_t) S_IFREG | 0644;
- }
-
- uid_t get_uid(const char *s) {
diff --git a/s3fs-x-amz-meta.patch b/s3fs-x-amz-meta.patch
deleted file mode 100644
index eea779b..0000000
--- a/s3fs-x-amz-meta.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-http://code.google.com/p/s3fs/source/detail?r=376
-
-Index: src/s3fs.cpp
-===================================================================
---- src/s3fs.cpp (revision 375)
-+++ src/s3fs.cpp (revision 376)
-@@ -121,6 +121,22 @@
- headMap_t headMap;
- };
-
-+time_t get_mtime(const char *s) {
-+ return (time_t) strtoul(s, (char **) NULL, 10);
-+}
-+
-+mode_t get_mode(const char *s) {
-+ return (mode_t) strtoul(s, (char **) NULL, 10);
-+}
-+
-+uid_t get_uid(const char *s) {
-+ return (uid_t) strtoul(s, (char **) NULL, 10);
-+}
-+
-+gid_t get_gid(const char *s) {
-+ return (gid_t) strtoul(s, (char **) NULL, 10);
-+}
-+
- static int insert_object(char *name, struct s3_object **head) {
- size_t n_len = strlen(name) + 1;
- struct s3_object *new_object;
-@@ -527,7 +543,7 @@
-
- // need to download?
- if(fd == -1) {
-- mode_t mode = strtoul(responseHeaders["x-amz-meta-mode"].c_str(), (char **)NULL, 10);
-+ mode_t mode = get_mode(responseHeaders["x-amz-meta-mode"].c_str());
-
- if(use_cache.size() > 0) {
- // only download files, not folders
-@@ -589,7 +605,7 @@
- if(use_cache.size() > 0 && !S_ISLNK(mode)) {
- // make the file's mtime match that of the file on s3
- struct utimbuf n_mtime;
-- n_mtime.modtime = strtoul(responseHeaders["x-amz-meta-mtime"].c_str(), (char **) NULL, 10);
-+ n_mtime.modtime = get_mtime(responseHeaders["x-amz-meta-mtime"].c_str());
- n_mtime.actime = n_mtime.modtime;
- if((utime(cache_path.c_str(), &n_mtime)) == -1) {
- YIKES(-errno);
-@@ -691,7 +707,7 @@
- string cache_path(use_cache + "/" + bucket + path);
-
- if((stat(cache_path.c_str(), &st)) == 0) {
-- n_mtime.modtime = strtoul(meta["x-amz-meta-mtime"].c_str(), (char **) NULL, 10);
-+ n_mtime.modtime = get_mtime(meta["x-amz-meta-mtime"].c_str());
- n_mtime.actime = n_mtime.modtime;
- if((utime(cache_path.c_str(), &n_mtime)) == -1) {
- YIKES(-errno);
-@@ -763,7 +779,7 @@
- string cache_path(use_cache + "/" + bucket + path);
-
- if((stat(cache_path.c_str(), &st)) == 0) {
-- n_mtime.modtime = strtoul(meta["x-amz-meta-mtime"].c_str(), (char **) NULL, 10);
-+ n_mtime.modtime = get_mtime(meta["x-amz-meta-mtime"].c_str());
- n_mtime.actime = n_mtime.modtime;
- if((utime(cache_path.c_str(), &n_mtime)) == -1) {
- YIKES(-errno);
-@@ -1579,14 +1595,14 @@
-
- stbuf->st_nlink = 1; // see fuse faq
-
-- stbuf->st_mtime = strtoul(responseHeaders["x-amz-meta-mtime"].c_str(), (char **)NULL, 10);
-+ stbuf->st_mtime = get_mtime(responseHeaders["x-amz-meta-mtime"].c_str());
- if (stbuf->st_mtime == 0) {
- long LastModified;
- if (curl_easy_getinfo(curl, CURLINFO_FILETIME, &LastModified) == 0)
- stbuf->st_mtime = LastModified;
- }
-
-- stbuf->st_mode = strtoul(responseHeaders["x-amz-meta-mode"].c_str(), (char **)NULL, 10);
-+ stbuf->st_mode = get_mode(responseHeaders["x-amz-meta-mode"].c_str());
- char* ContentType = 0;
- if (curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ContentType) == 0) {
- if (ContentType)
-@@ -1600,8 +1616,8 @@
- if (S_ISREG(stbuf->st_mode))
- stbuf->st_blocks = stbuf->st_size / 512 + 1;
-
-- stbuf->st_uid = strtoul(responseHeaders["x-amz-meta-uid"].c_str(), (char **)NULL, 10);
-- stbuf->st_gid = strtoul(responseHeaders["x-amz-meta-gid"].c_str(), (char **)NULL, 10);
-+ stbuf->st_uid = get_uid(responseHeaders["x-amz-meta-uid"].c_str());
-+ stbuf->st_gid = get_gid(responseHeaders["x-amz-meta-gid"].c_str());
-
- // update stat cache
- add_stat_cache_entry(path, stbuf);
-@@ -2649,7 +2665,7 @@
- string cache_path(use_cache + "/" + bucket + path);
-
- if((stat(cache_path.c_str(), &st)) == 0) {
-- n_mtime.modtime = strtoul(meta["x-amz-meta-mtime"].c_str(), (char **) NULL, 10);
-+ n_mtime.modtime = get_mtime(meta["x-amz-meta-mtime"].c_str());
- n_mtime.actime = n_mtime.modtime;
- if((utime(cache_path.c_str(), &n_mtime)) == -1) {
- YIKES(-errno);
-@@ -2852,8 +2868,7 @@
- st.st_nlink = 1; // see fuse FAQ
-
- // mode
-- st.st_mode = strtoul(
-- (*response.responseHeaders)["x-amz-meta-mode"].c_str(), (char **)NULL, 10);
-+ st.st_mode = get_mode((*response.responseHeaders)["x-amz-meta-mode"].c_str());
-
- // content-type
- char *ContentType = 0;
-@@ -2862,7 +2877,7 @@
- st.st_mode |= strcmp(ContentType, "application/x-directory") == 0 ? S_IFDIR : S_IFREG;
-
- // mtime
-- st.st_mtime = strtoul((*response.responseHeaders)["x-amz-meta-mtime"].c_str(), (char **)NULL, 10);
-+ st.st_mtime = get_mtime((*response.responseHeaders)["x-amz-meta-mtime"].c_str());
- if(st.st_mtime == 0) {
- long LastModified;
- if(curl_easy_getinfo(curl_handle, CURLINFO_FILETIME, &LastModified) == 0)
-@@ -2878,8 +2893,8 @@
- if(S_ISREG(st.st_mode))
- st.st_blocks = st.st_size / 512 + 1;
-
-- st.st_uid = strtoul((*response.responseHeaders)["x-amz-meta-uid"].c_str(), (char **)NULL, 10);
-- st.st_gid = strtoul((*response.responseHeaders)["x-amz-meta-gid"].c_str(), (char **)NULL, 10);
-+ st.st_uid = get_uid((*response.responseHeaders)["x-amz-meta-uid"].c_str());
-+ st.st_gid = get_gid((*response.responseHeaders)["x-amz-meta-gid"].c_str());
-
- add_stat_cache_entry(response.path.c_str(), &st);
-
-@@ -3145,7 +3160,7 @@
- }
-
- struct stat stbuf;
-- stbuf.st_mode = strtoul(responseHeaders["x-amz-meta-mode"].c_str(), (char **)NULL, 10);
-+ stbuf.st_mode = get_mode(responseHeaders["x-amz-meta-mode"].c_str());
- char* ContentType = 0;
- if(curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ContentType) == 0)
- if(ContentType)
-Index: src/s3fs.h
-===================================================================
---- src/s3fs.h (revision 375)
-+++ src/s3fs.h (revision 376)
-@@ -94,6 +94,7 @@
- std::string md5sum(int fd);
- char *get_realpath(const char *path);
-
-+time_t get_mtime(const char *s);
- static int insert_object(char *name, struct s3_object **head);
- static unsigned int count_object_list(struct s3_object *list);
- static int free_object(struct s3_object *object);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/s3fs-fuse.git/commitdiff/14d3796b626bb1872b4374a76dbb4c70f0b17042
More information about the pld-cvs-commit
mailing list