[fuse-s3fs/f16] Resolves: bz 760490
Neil Horman
nhorman at fedoraproject.org
Tue Dec 6 16:47:39 UTC 2011
commit 5f739cca05d29b9c40f4fcad968a916e74ba619c
Author: Neil Horman <nhorman at tuxdriver.com>
Date: Tue Dec 6 11:47:20 2011 -0500
Resolves: bz 760490
fuse-s3fs.spec | 7 ++++-
s3fs-get_key.patch | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 1 deletions(-)
---
diff --git a/fuse-s3fs.spec b/fuse-s3fs.spec
index fde3230..7e95c95 100644
--- a/fuse-s3fs.spec
+++ b/fuse-s3fs.spec
@@ -1,6 +1,6 @@
Name: fuse-s3fs
Version: 0.7
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: FUSE filesystem using Amazon Simple Storage Service as storage
Group: System Environment/Base
License: GPLv2
@@ -10,6 +10,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: python fuse-python python-boto
BuildArch: noarch
+Patch1: s3fs-get_key.patch
%description
This package provides a FUSE (Filesystem in User Space) application allowing
@@ -24,6 +25,7 @@ data stored on fuse-s3fs be backed up on other media as well.
%prep
%setup -q
+%patch1 -p1
%build
@@ -45,6 +47,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/*
%changelog
+* Tue Dec 06 2011 Neil Horman <nhorman at redhat.com> - 0.7-6
+- Fixed traceback arising from new boto version throwing exception (bz760409)
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/s3fs-get_key.patch b/s3fs-get_key.patch
new file mode 100644
index 0000000..1f13130
--- /dev/null
+++ b/s3fs-get_key.patch
@@ -0,0 +1,75 @@
+commit f968e05043d2c658b9c1805988fa630a0c46c6b1
+Author: Neil Horman <nhorman at tuxdriver.com>
+Date: Tue Dec 6 11:36:23 2011 -0500
+
+ get_key: consolidate call points and catch exceptions
+
+ Apparently get_key can throw a 403 error now, catch it and return NULL, as thats
+ what s3fs expects
+
+ Signed-off-by: Neil Horman <nhorman at tuxdriver.com>
+
+diff --git a/src/s3fs b/src/s3fs
+index 3ee386a..551dbb2 100755
+--- a/src/s3fs
++++ b/src/s3fs
+@@ -389,6 +389,14 @@ class S3Drive:
+ def create(self, node):
+ fqkn = node.getKeyName()
+ return self.bucket.new_key(fqkn)
++
++ def getKey(self, keyname):
++ key = None
++ try:
++ key = self.bucket.get_key(keyname)
++ except:
++ pass
++ return key
+ """
+ The S3Cache class represents the local cache that we store our downloaded files
+ in
+@@ -914,7 +922,7 @@ class S3Fs(Fuse):
+ self.blockdev = S3Drive(self.bucket, self.host)
+ if self.blockdev.drive_ready == False:
+ return False
+- fsdata_key = self.blockdev.bucket.get_key("fsdata")
++ fsdata_key = self.blockdev.getKey("fsdata")
+ if fsdata_key == None:
+ return False
+ fsdata_name="/tmp/"+self.bucket+".pkl"
+@@ -1312,7 +1320,7 @@ def delete_S3_bucket(bucket, host):
+ if drive.drive_ready == False:
+ print "Unable to find bucket ", bucket
+ return -1
+- fsdata_key = drive.bucket.get_key("fsdata")
++ fsdata_key = drive.getKey("fsdata")
+ if fsdata_key == None:
+ print "Not a formatted bucket, won't delete"
+ return
+@@ -1340,7 +1348,7 @@ def format_S3_bucket(bucket, host):
+ print "Could not find Drive", bucket
+ return -1
+
+- fsdata_key = drive.bucket.get_key("fsdata")
++ fsdata_key = drive.getKey("fsdata")
+ if fsdata_key != None:
+ fsdata_name="/tmp/"+bucket+".pkl"
+ fp = open(fsdata_name,"w+b")
+@@ -1373,7 +1381,7 @@ def toggle_S3_bucket_lock(bucket, host):
+ if drive.drive_ready == False:
+ print "Unable to find bucket ", bucket
+ return -1
+- fsdata_key = drive.bucket.get_key("fsdata")
++ fsdata_key = drive.getKey("fsdata")
+ if fsdata_key == None:
+ print "Not a formatted bucket, won't delete"
+ return
+@@ -1514,7 +1522,7 @@ def main():
+ fs.flags = 0
+ fs.multithreaded = True
+ if fs.setup() == False:
+- print "Unable to establish this mount"
++ print "Unable to establish this mount - did you format it?"
+ sys.exit(1)
+ check_S3_data()
+ fs.main()
More information about the scm-commits
mailing list