diff options
author | Matt Thode <prometheanfire@gentoo.org> | 2013-12-19 04:31:18 +0000 |
---|---|---|
committer | Matt Thode <prometheanfire@gentoo.org> | 2013-12-19 04:31:18 +0000 |
commit | 4d0a2e2bf7d7e0473f782fa8526e265ed8b8706d (patch) | |
tree | d5f65665cb54875fbd3b2e1f053e52b467ed8297 /sys-cluster/swift | |
parent | 2013.2.1 and cleaner deps (diff) | |
download | historical-4d0a2e2bf7d7e0473f782fa8526e265ed8b8706d.tar.gz historical-4d0a2e2bf7d7e0473f782fa8526e265ed8b8706d.tar.bz2 historical-4d0a2e2bf7d7e0473f782fa8526e265ed8b8706d.zip |
swift updates
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Manifest-Sign-Key: 0x2471EB3E40AC5AC3
Diffstat (limited to 'sys-cluster/swift')
-rw-r--r-- | sys-cluster/swift/ChangeLog | 9 | ||||
-rw-r--r-- | sys-cluster/swift/Manifest | 37 | ||||
-rw-r--r-- | sys-cluster/swift/files/CVE-2013-4155-grizzly.patch | 419 | ||||
-rw-r--r-- | sys-cluster/swift/swift-1.10.0.ebuild | 4 | ||||
-rw-r--r-- | sys-cluster/swift/swift-1.11.0.ebuild (renamed from sys-cluster/swift/swift-1.9.1.ebuild) | 30 | ||||
-rw-r--r-- | sys-cluster/swift/swift-2013.2.9999.ebuild | 6 |
6 files changed, 43 insertions, 462 deletions
diff --git a/sys-cluster/swift/ChangeLog b/sys-cluster/swift/ChangeLog index 44bcb0a7523a..a6d72226b6d0 100644 --- a/sys-cluster/swift/ChangeLog +++ b/sys-cluster/swift/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-cluster/swift # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/ChangeLog,v 1.21 2013/11/14 04:35:40 prometheanfire Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/ChangeLog,v 1.22 2013/12/19 04:31:09 prometheanfire Exp $ + +*swift-1.11.0 (19 Dec 2013) + + 19 Dec 2013; Matthew Thode <prometheanfire@gentoo.org> +swift-1.11.0.ebuild, + -files/CVE-2013-4155-grizzly.patch, -swift-1.9.1.ebuild, swift-1.10.0.ebuild, + swift-2013.2.9999.ebuild: + swift updates 14 Nov 2013; Matthew Thode <prometheanfire@gentoo.org> -swift-1.8.0-r4.ebuild: removing 2012.2 (folsom) 1.8.x diff --git a/sys-cluster/swift/Manifest b/sys-cluster/swift/Manifest index 162d520397d0..51a39edfc6b0 100644 --- a/sys-cluster/swift/Manifest +++ b/sys-cluster/swift/Manifest @@ -2,34 +2,33 @@ Hash: SHA256 AUX CVE-2013-2161.patch 664 SHA256 728949effcf3669658bb8017f89b1a3a6ed481cc74d2f2c8e4bb235ccde24ba6 SHA512 ac95d6cf50209ffcec48ad16ca730816d5891b4adc2f110bab5974c0d31f3062cb0cc5552f8440b602eb88ed15c78faa30afa9c58c00e05abf2714b5503a7cfd WHIRLPOOL 92db329e49df48745b6401b2fb64963f8548a29dcd530f3449cfe7fa1c38ae05e61fc05bf2250e73c85b295aba4362745faa58c458b5ed80ccce3ea0f0467e7b -AUX CVE-2013-4155-grizzly.patch 20586 SHA256 04870c36826c217266f4cca746f98dbe48f49dfb0ba500407565cfce6fd1c9d6 SHA512 ebb35c9ccd96c1d9cfbfe94d3534c0d3e68048ad5ebee632d99000c44ea29a187a99f273d42357d63c43d6f3ed6608f1a78e99a5f3cdbcbce3ee26b728779cb4 WHIRLPOOL a4454469700375bdfdfa874c9795bb2fe92a6de6a44e45241b69f848ff5770c2095c6de9830cf7397346fcebc2db623c694148d47bec20f81d4d2e7e29221863 AUX swift-account.initd 995 SHA256 f1d4594504b53de480abc69ccb72d37e002ad85118b9d90df12bfda42f4b5faa SHA512 93fcd08508f3efd4d1a75aa51c20b256a0f8c34f9b6ee27501d14376efd7a55e28ffd20fbf91b6406883603fc145e80c39d714b6eaa168fbf4a8c5be7ea63368 WHIRLPOOL ff3c69ad4801d742082dbe7131330b2fb154d1b30c8abfd688234a9f955515c9a1ffceb0ced432b1dd81d375e32e8416fa64b9d45eb199af4cc0ba3aa3c87e1a AUX swift-container.initd 1007 SHA256 aba09a5e3396f79c5e49a258c283d37652e182ac62ef8952618ad32b4df1db86 SHA512 1202212955a6a0836abee2c8a2190e359c910037c2f38dbf6874253b21c0739548d9f48c75e3333d0d73376e35c43866b8d0dc38990d4d3b99c04efaab2407c2 WHIRLPOOL d1dc6e468fdd3ab616a53b5357dad09ef089927347a59b95961e7e6b395eec43dedef059fed8eed06f8f324ff0ec7121023953156dcf2266e00dc947aeb8da98 AUX swift-object.initd 989 SHA256 19a252739dca026435b0a861eea10ff76c22a41ec71d94cc6ce3dddd70b5df58 SHA512 1982f2f76df5d279c51a0a2fd5619dd12a6899559761ac7c0013aa5e5098058430e1a8dcc7cf46d5081bd6dffa17e4223de9b6a85bea4cddaf495b3ca91bacc9 WHIRLPOOL d2a16db387e6d3ff3452854672b5a9c64f03f485d3ddf7e2e67aa51dcb4aa4ab80fd375158dac99943f6c52fefc233cce503be26617110765fc859d82d6b01ab AUX swift-proxy.initd 1505 SHA256 8e1ee2051116e869f5e51de426d640c7f57278f1fc2681bd80ec9393fa834c92 SHA512 a030a5b8ceedb69f89fca93abdd08d9f527d2789ed9983f7cca616b4a318176f84913e1d01ed09d5a1a9e55bd0d697d501f5698ea5b3f8ccce7f76b95984dff1 WHIRLPOOL e8653ceb1e19fead4b0941d158661fe6e81d66c71f032aa1be7aa56dd839d43a82adb090a7e509142bfa9a341c49fdf82c8f86e3a9159be63b538b588cca6e66 DIST swift-1.10.0.tar.gz 660633 SHA256 9a841225c3a00a93a15a160102d3f7116f2f1ba98ebffedfe641747844e14889 SHA512 7531f0c6c06be9a4cc2242a75140845474e176994667b60adb356945c78dfae4993f65dea55789735ac6e5a940353fd5188dab855a0fb91a844c5d26352efa68 WHIRLPOOL 63e7876a61010b3d14ad3b0703a8e1e8601b9824deca1745ac45e840fa9ca212269f5b7f24f2285bd65e2069f09be410d11d71eeac6df4d0204612f8c0f3d6e3 -DIST swift-1.9.1.tar.gz 631902 SHA256 d95a8a158cc0dce4780ab462efca13b63be2485ee93a9dc70788b3372f264537 SHA512 ffc06ab87d2696360ded346aff0d29191b6921ab7d3eed35107dc6d8a9bb163b87eebbce4f2521a31df318b0d38e19ceaa2b25f2f066dffb601f9507121b6382 WHIRLPOOL 6fe37fe01589e6c1c82f1e743c001511c2fff402c7731070515d05a3a59192e0069938857752d441b2729e04db3f0cbe9147c32393d33f6dd6583e49b732cdb9 -EBUILD swift-1.10.0.ebuild 3999 SHA256 56c1550d5179b3647fc1c956d2ea35ec0d6df47f73200ae8123abf83881ca171 SHA512 d362c6855e94c8636b8f574535a9ca6f4dbbf84d687fefcfc9b356a53be3a2b52be05b869e7193e1b372ba761be2a9b30adf12238acf45bd56341ee0c95156c5 WHIRLPOOL bc6fefe40d866cb271a39995ca73da0f4dd1d68ab6a6d109da98fa2b41a598f5b56b83a0f7f951105744756131b4b61d5cd9b9c466b621a1cab6a581018bf7a7 -EBUILD swift-1.9.1.ebuild 3920 SHA256 979e7e120aa828f5a8bab84369fceb407da518eafcbc848ad50b72eab4b8d35c SHA512 f578b77c22cdfdf0a6a2f35802323acab7468dba39ee4db3d867309e539967ed43eee7908e5739dfeed7890fd5ae934b6dc7f67d002f600d23c8dd4d159bf5db WHIRLPOOL 36758d4e1ba742a66d9d86972052d187d94b426c376c2943257c1f0ae8199bd81cae2a6f63a9c77795d8ba6e323db618942d484d61c812aeeac1d365ee81b92d +DIST swift-1.11.0.tar.gz 712263 SHA256 d22767a417bdf9837df194672fc8f1e7eb8499e885f144bd83c865b2f95160c9 SHA512 265ecb5bdf5dedad68a7dd4860333fa81e14f4a16881b8d249ee848c543df5494628ccf917db0fdc37209af7333ecd15fd0faf99d978e097917486b8cb1be7be WHIRLPOOL de118849e0ef1e652368d23c51ebc903c8cd557fc05ab1d35a627576d28563184189c2fe89ed337e88e5d04680fcc323ca0dac1b3f98d762e54f97f2540829e7 +EBUILD swift-1.10.0.ebuild 4004 SHA256 356a5f8c793576f8b56083c57a2a86b4e25621e44965fca184e53efdaceb8c1d SHA512 20d9a4b84b260d324dc70fdc83eeeec6e4439997b8ee98a5d017fe7461b95a2d618b3729bc9cf8703f1523abe846a18c5fcc5b9de5ca25dd6d5f5ec8105190c0 WHIRLPOOL cc83676da18db2236902d25fe7f99e66ae494d5cad1e05c5039574b354b20f62bc3cd1bc4da4e7845a5fed689e8f501bc36f693dbdc1d758d8fe0c160ceef982 +EBUILD swift-1.11.0.ebuild 4006 SHA256 372356706cddf3c082519d5e2e256e12c015783c55830165e9bd2c7603af8004 SHA512 d8ee1767abd6a0074d88acb61d7b6ce761d89f75a49588012db1aa3ef44af0aaea3bcc6bf18044f371680d435467f43e3ea2d051dc2ad6850bd508654d0fb128 WHIRLPOOL 3e510ea662a7f584e65a38e7f4e0c0680828d46fa8814560c2d2c30d5aa34296d51dd930264c7f999e2eeb2ae1708ad75106aa3c9fd0c7aba810ae0320868fd7 EBUILD swift-2013.1.9999.ebuild 3982 SHA256 546ce682e57ae30d441cdd4185ff55b86a104f0d7c5fa192c12014180ecb8f22 SHA512 72bf81629a46e27a42703148ea16cb2791e8714a8e6f23955fc8a1921fb97255508758316e23ab7b6fdd3df1a572b8e4a7c37403ea8c9aaf783994764ae64f2b WHIRLPOOL c3c8942434d230d2f2815643024e6fdfc52044922225ed5c66bfa40e10b8d1872ea26a464e3ef45348fe2da97774dc4c6d07a1fb3c5a9f8b7c9f41a10124628b -EBUILD swift-2013.2.9999.ebuild 4049 SHA256 a2a6f6c06d986b782f9c1bda098b6278fb2676aed6926677cad98d09e0a18a9c SHA512 0cd7b1da939bba9fd64d8a1fdd5b7e4ce922ae2ff7641d572469905b3d7850baeaf2a6ef583a4fe50f7833a7274cb409973e2363473aacac23ed4c3f9577ad6b WHIRLPOOL d300b3ed233ea8c0c6979ca5cd5b34beec33a20d10a48e8b73eb844ff5cac722b70add5e16fd8787e3c542f399eb51026fe26b1d3561cfd612d8674e042399be +EBUILD swift-2013.2.9999.ebuild 4017 SHA256 a2686c52d8ad47511b9be359eb79ba16133318749d060c067ee290440aab6e73 SHA512 30c40f088dfa817f98c174fb6a39797b3ef52ba399e9d5ee3107c269aae798834d302a9a69e9293ca9f4e8e4de161f8f4e4ccd1789e5725fc06423aeadfcf852 WHIRLPOOL d160966985097e274ad3740487b27272d13db05cc9c63e69a387dc29b8e0f57bf17874fbc1fdebbfe3c1364a2deba33b57c576a647aa9647e1ca74ef53a82df2 EBUILD swift-9999.ebuild 4111 SHA256 f6b334ec94c879be8807137abe4191854f5cd6413e261f97ba8f171fec995546 SHA512 f57b650e94302b470365c30445cdab60544ef374eb754179c45971334a65996cdef2a4119473e61c41fba13fbf2eb50b57b08ff0662d5483c899940024d4b00c WHIRLPOOL f503dd168b2cadc509d8bd8b9e88bfdc3e072d3cc3ac164f5f630cf4c8059739329cefafc267373f52d388d5c05b260034484b5fd28d3388de227e25963cbf67 -MISC ChangeLog 4059 SHA256 edcb08a82a75b495931097acad7444b64fb60920090e36e0da90a4e081d37cc8 SHA512 bea7b87434aaf91fa9de40ab578f661c8cd552b94b4ab2d4ada8988fb32c84a5bceba7f75dba045f5aad728ac2395c5c77536ba335b3e025af013b89fdd70ef3 WHIRLPOOL 60c99959ff70299b809a72ad81def591f25cdc50c87cef8fdfaa6fd52cb2fe933c894d64ec321feeca3abeb50317af1c0a159597e33a1b6d3a972cc73ab3b545 +MISC ChangeLog 4292 SHA256 36efed622dd51ea16940a51c8c525e453972e717425ecfa9215d59b2c20cb477 SHA512 52b51efc6d9c7be08e86c950ea3be27c522a81e3fd13dc1bc2ec05b52640f6c134f68958de22dbfe73d45b208fd1643bcfb1ffbeec9727e667344b0b1f956bbb WHIRLPOOL 29486365d5cd268827bf471d77a340f67a5014d1eb868dd9149e9e5365b191d3f0367bfdd49cf4db7a3ecd5c70ba6f517a1adf3650d55fc32258507fd259b8ee MISC metadata.xml 719 SHA256 319a1a58e687f433d3fbbc742d13c046dae70211fcf1b81a60d2acb69580c0ec SHA512 029f6557fa226e698e7070a9ee1d445adde992f9b44a219b5be80035d14dbab1daa61d9ad53ae52917a93d7689a0bfd1b0ca8f99e787d6beed9e601d459ea257 WHIRLPOOL da64649598a4601918d5f3932600105de0f8f5c3aa80acca697a7155115a18b562cad8dc068272931907ab4300b55219daec8bbe897a34363c0e9d1700967159 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iQIcBAEBCAAGBQJShFO3AAoJECRx6z5ArFrDh8MP/RKaZnDNricwlX0ViKke7Dd3 -aOkyQFNIYMqXAAUcQLpY1uDe50LkQ2a3hhWk7lDvhfzfEwY/PB7wgLA/2JY1pbEg -S9fSbG3GpiNYt9bP3R7ir52DfYnH7dR6dLpbd30Skau1EPyx9DK5yHH6HlaiM60m -NqwC+3hm6K9twph04pOLt2ospE6HUDWmlMPKCuSGAiV0L2Slns+t8aLoC1T1FaDE -amdC6VnB3fMVIUWYZAkNr8OSWVPFZehi8htYRr6x8rRNGH+by6ZEftZ8AOu2BfGD -duumPNK18bLL0AsF+tq3s/Y5YV9lemhc6wS2zsr2jTnbLkmQe8r28IT4QuH7skmO -+qVN14+HGKlDXUvMa9KhUybp3gJYexGmB1f6LE3EYHveSjQzpak2GGSutLPq8gMC -esex2u6AE+b6USILCyh0a08roozETarctHaCOzr/dGeasY9xLAVd3B7tLGw1TsJQ -BpBUI+OqPD3+4QdXXMhE4HrNGKcukSS06Hf5pdRbpO0YKHFDopGMWKz32G93ajJD -+DC2/yINFdymHn+6W0L2izYYwOFz9nPQzUc9WlDRZrPCWNxZbEaGpoemDcWwZLT9 -7B/DbToWME+G44Wx29YnwnHRXYuSjpXp/1BrdtOleVezqIgdHzQKP3xAqHT0O2sN -eNFp/kXfw0hASNM/8v7G -=pG5i +iQIcBAEBCAAGBQJSsnacAAoJECRx6z5ArFrD5R0P/iBniJ/qc/kuTr7/Z9984uV4 +VODUCL8tUyhbZvMfL1OnO4yRuUoVrzHecvpDi7bOwwsl1nmHyeP9ez8LReuNDXQZ +OwAQ0qfFSGQpZKf7ujmoez1A5A37vBqAFL/Ya1zG2+FlejcxtIGkbNmNXH4GHSXy +7FefrLXiBwePuSU4Gn0vvv5q6P1XHi8UBeGsav5/7pPe1zWWS99L+fozkQNbuogY +c9c5/3hIMZ0mnRFg+I5PDQ+KoOOOaq7+wWfMiZf32IJtUFGXbBR847Iht5aVRAZj +wc4XdqKKaHu07s8fJ/PCubOeS6pRwo24re2iwcv43F4hmSH4pEguW+7fXljc0v0r +79qRGG8nNm8xgjFdXx5Qy9Imh3nnQJYnmsLcYmxy9l8eHfMaQMnv+BsvdXsMA9Ww +Vxi7AaE3m27QPKnM+brORcN+Fzg5peR8jAGB6ca4hBeQInvrokgfyM1WM1xAdvuk +l3C+BAeRHzcx2RSVGN5sWYdcYi+GVv+c6bXA3icHLOBcNGS+WxAU8+C4v+PPjIj3 +ftXnodYgfeGG6DN36hxKSO/XSklK+/NOoRFWCpjeEh7iJPchUCyKczCJYbG8KKTJ +irPvy75vSJoyEUAFfVlBIp7xOi7rqR+bIH3QUNbIZRbceYOyaZVrfgq336Zv4Kq9 +/M2IiXOqKnQiDkKTDCMs +=OFTf -----END PGP SIGNATURE----- diff --git a/sys-cluster/swift/files/CVE-2013-4155-grizzly.patch b/sys-cluster/swift/files/CVE-2013-4155-grizzly.patch deleted file mode 100644 index e5e3ba1bff49..000000000000 --- a/sys-cluster/swift/files/CVE-2013-4155-grizzly.patch +++ /dev/null @@ -1,419 +0,0 @@ -From 1f4ec235cdfd8c868f2d6458532f9dc32c00b8ca Mon Sep 17 00:00:00 2001 -From: Peter Portante <peter.portante@redhat.com> -Date: Fri, 26 Jul 2013 15:03:34 -0400 -Subject: [PATCH] Fix handling of DELETE obj reqs with old timestamp - -The DELETE object REST API was creating tombstone files with old -timestamps, potentially filling up the disk, as well as sending -container updates. - -Here we now make DELETEs with a request timestamp return a 409 (HTTP -Conflict) if a data file exists with a newer timestamp, only creating -tombstones if they have a newer timestamp. - -The key fix is to actually read the timestamp metadata from an -existing tombstone file (thanks to Pete Zaitcev for catching this), -and then only create tombstone files with newer timestamps. - -We also prevent PUT and POST operations using old timestamps as well. - -Change-Id: I631957029d17c6578bca5779367df5144ba01fc9 -Signed-off-by: Peter Portante <peter.portante@redhat.com> ---- - swift/obj/server.py | 58 +++++++------ - test/unit/obj/test_server.py | 194 ++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 225 insertions(+), 27 deletions(-) - -diff --git a/swift/obj/server.py b/swift/obj/server.py -index fc23ea2..f416162 100644 ---- a/swift/obj/server.py -+++ b/swift/obj/server.py -@@ -46,7 +46,7 @@ from swift.common.swob import HTTPAccepted, HTTPBadRequest, HTTPCreated, \ - HTTPInternalServerError, HTTPNoContent, HTTPNotFound, HTTPNotModified, \ - HTTPPreconditionFailed, HTTPRequestTimeout, HTTPUnprocessableEntity, \ - HTTPClientDisconnect, HTTPMethodNotAllowed, Request, Response, UTC, \ -- HTTPInsufficientStorage, multi_range_iterator -+ HTTPInsufficientStorage, multi_range_iterator, HTTPConflict - - - DATADIR = 'objects' -@@ -121,7 +121,6 @@ class DiskFile(object): - self.tmppath = None - self.logger = logger - self.metadata = {} -- self.meta_file = None - self.data_file = None - self.fp = None - self.iter_etag = None -@@ -133,15 +132,18 @@ class DiskFile(object): - if not os.path.exists(self.datadir): - return - files = sorted(os.listdir(self.datadir), reverse=True) -- for file in files: -- if file.endswith('.ts'): -- self.data_file = self.meta_file = None -- self.metadata = {'deleted': True} -- return -- if file.endswith('.meta') and not self.meta_file: -- self.meta_file = os.path.join(self.datadir, file) -- if file.endswith('.data') and not self.data_file: -- self.data_file = os.path.join(self.datadir, file) -+ meta_file = None -+ for afile in files: -+ if afile.endswith('.ts'): -+ self.data_file = None -+ with open(os.path.join(self.datadir, afile)) as mfp: -+ self.metadata = read_metadata(mfp) -+ self.metadata['deleted'] = True -+ break -+ if afile.endswith('.meta') and not meta_file: -+ meta_file = os.path.join(self.datadir, afile) -+ if afile.endswith('.data') and not self.data_file: -+ self.data_file = os.path.join(self.datadir, afile) - break - if not self.data_file: - return -@@ -149,8 +151,8 @@ class DiskFile(object): - self.metadata = read_metadata(self.fp) - if not keep_data_fp: - self.close(verify_file=False) -- if self.meta_file: -- with open(self.meta_file) as mfp: -+ if meta_file: -+ with open(meta_file) as mfp: - for key in self.metadata.keys(): - if key.lower() not in DISALLOWED_HEADERS: - del self.metadata[key] -@@ -594,6 +596,9 @@ class ObjectController(object): - except (DiskFileError, DiskFileNotExist): - file.quarantine() - return HTTPNotFound(request=request) -+ orig_timestamp = file.metadata.get('X-Timestamp', '0') -+ if orig_timestamp >= request.headers['x-timestamp']: -+ return HTTPConflict(request=request) - metadata = {'X-Timestamp': request.headers['x-timestamp']} - metadata.update(val for val in request.headers.iteritems() - if val[0].lower().startswith('x-object-meta-')) -@@ -639,6 +644,8 @@ class ObjectController(object): - file = DiskFile(self.devices, device, partition, account, container, - obj, self.logger, disk_chunk_size=self.disk_chunk_size) - orig_timestamp = file.metadata.get('X-Timestamp') -+ if orig_timestamp and orig_timestamp >= request.headers['x-timestamp']: -+ return HTTPConflict(request=request) - upload_expiration = time.time() + self.max_upload_time - etag = md5() - upload_size = 0 -@@ -863,23 +870,26 @@ class ObjectController(object): - return HTTPPreconditionFailed( - request=request, - body='X-If-Delete-At and X-Delete-At do not match') -- orig_timestamp = file.metadata.get('X-Timestamp') -- if file.is_deleted() or file.is_expired(): -- response_class = HTTPNotFound -- metadata = { -- 'X-Timestamp': request.headers['X-Timestamp'], 'deleted': True, -- } - old_delete_at = int(file.metadata.get('X-Delete-At') or 0) - if old_delete_at: - self.delete_at_update('DELETE', old_delete_at, account, - container, obj, request.headers, device) -- file.put_metadata(metadata, tombstone=True) -- file.unlinkold(metadata['X-Timestamp']) -- if not orig_timestamp or \ -- orig_timestamp < request.headers['x-timestamp']: -+ orig_timestamp = file.metadata.get('X-Timestamp', 0) -+ req_timestamp = request.headers['X-Timestamp'] -+ if file.is_deleted() or file.is_expired(): -+ response_class = HTTPNotFound -+ else: -+ if orig_timestamp < req_timestamp: -+ response_class = HTTPNoContent -+ else: -+ response_class = HTTPConflict -+ if orig_timestamp < req_timestamp: -+ file.put_metadata({'X-Timestamp': req_timestamp}, -+ tombstone=True) -+ file.unlinkold(req_timestamp) - self.container_update( - 'DELETE', account, container, obj, request.headers, -- {'x-timestamp': metadata['X-Timestamp'], -+ {'x-timestamp': req_timestamp, - 'x-trans-id': request.headers.get('x-trans-id', '-')}, - device) - resp = response_class(request=request) -diff --git a/test/unit/obj/test_server.py b/test/unit/obj/test_server.py -index 8ee266b..b354b97 100755 ---- a/test/unit/obj/test_server.py -+++ b/test/unit/obj/test_server.py -@@ -509,6 +509,41 @@ class TestObjectController(unittest.TestCase): - "X-Object-Meta-3" in resp.headers) - self.assertEquals(resp.headers['Content-Type'], 'application/x-test') - -+ def test_POST_old_timestamp(self): -+ ts = time() -+ timestamp = normalize_timestamp(ts) -+ req = Request.blank('/sda1/p/a/c/o', environ={'REQUEST_METHOD': 'PUT'}, -+ headers={'X-Timestamp': timestamp, -+ 'Content-Type': 'application/x-test', -+ 'X-Object-Meta-1': 'One', -+ 'X-Object-Meta-Two': 'Two'}) -+ req.body = 'VERIFY' -+ resp = self.object_controller.PUT(req) -+ self.assertEquals(resp.status_int, 201) -+ -+ # Same timestamp should result in 409 -+ req = Request.blank('/sda1/p/a/c/o', -+ environ={'REQUEST_METHOD': 'POST'}, -+ headers={'X-Timestamp': timestamp, -+ 'X-Object-Meta-3': 'Three', -+ 'X-Object-Meta-4': 'Four', -+ 'Content-Encoding': 'gzip', -+ 'Content-Type': 'application/x-test'}) -+ resp = self.object_controller.POST(req) -+ self.assertEquals(resp.status_int, 409) -+ -+ # Earlier timestamp should result in 409 -+ timestamp = normalize_timestamp(ts - 1) -+ req = Request.blank('/sda1/p/a/c/o', -+ environ={'REQUEST_METHOD': 'POST'}, -+ headers={'X-Timestamp': timestamp, -+ 'X-Object-Meta-5': 'Five', -+ 'X-Object-Meta-6': 'Six', -+ 'Content-Encoding': 'gzip', -+ 'Content-Type': 'application/x-test'}) -+ resp = self.object_controller.POST(req) -+ self.assertEquals(resp.status_int, 409) -+ - def test_POST_not_exist(self): - timestamp = normalize_timestamp(time()) - req = Request.blank('/sda1/p/a/c/fail', -@@ -555,11 +590,15 @@ class TestObjectController(unittest.TestCase): - - old_http_connect = object_server.http_connect - try: -- timestamp = normalize_timestamp(time()) -+ ts = time() -+ timestamp = normalize_timestamp(ts) - req = Request.blank('/sda1/p/a/c/o', environ={'REQUEST_METHOD': - 'POST'}, headers={'X-Timestamp': timestamp, 'Content-Type': - 'text/plain', 'Content-Length': '0'}) - resp = self.object_controller.PUT(req) -+ self.assertEquals(resp.status_int, 201) -+ -+ timestamp = normalize_timestamp(ts + 1) - req = Request.blank('/sda1/p/a/c/o', - environ={'REQUEST_METHOD': 'POST'}, - headers={'X-Timestamp': timestamp, -@@ -571,6 +610,8 @@ class TestObjectController(unittest.TestCase): - object_server.http_connect = mock_http_connect(202) - resp = self.object_controller.POST(req) - self.assertEquals(resp.status_int, 202) -+ -+ timestamp = normalize_timestamp(ts + 2) - req = Request.blank('/sda1/p/a/c/o', - environ={'REQUEST_METHOD': 'POST'}, - headers={'X-Timestamp': timestamp, -@@ -582,6 +623,8 @@ class TestObjectController(unittest.TestCase): - object_server.http_connect = mock_http_connect(202, with_exc=True) - resp = self.object_controller.POST(req) - self.assertEquals(resp.status_int, 202) -+ -+ timestamp = normalize_timestamp(ts + 3) - req = Request.blank('/sda1/p/a/c/o', - environ={'REQUEST_METHOD': 'POST'}, - headers={'X-Timestamp': timestamp, -@@ -718,6 +761,32 @@ class TestObjectController(unittest.TestCase): - 'name': '/a/c/o', - 'Content-Encoding': 'gzip'}) - -+ def test_PUT_old_timestamp(self): -+ ts = time() -+ req = Request.blank('/sda1/p/a/c/o', environ={'REQUEST_METHOD': 'PUT'}, -+ headers={'X-Timestamp': normalize_timestamp(ts), -+ 'Content-Length': '6', -+ 'Content-Type': 'application/octet-stream'}) -+ req.body = 'VERIFY' -+ resp = self.object_controller.PUT(req) -+ self.assertEquals(resp.status_int, 201) -+ -+ req = Request.blank('/sda1/p/a/c/o', environ={'REQUEST_METHOD': 'PUT'}, -+ headers={'X-Timestamp': normalize_timestamp(ts), -+ 'Content-Type': 'text/plain', -+ 'Content-Encoding': 'gzip'}) -+ req.body = 'VERIFY TWO' -+ resp = self.object_controller.PUT(req) -+ self.assertEquals(resp.status_int, 409) -+ -+ req = Request.blank('/sda1/p/a/c/o', environ={'REQUEST_METHOD': 'PUT'}, -+ headers={'X-Timestamp': normalize_timestamp(ts - 1), -+ 'Content-Type': 'text/plain', -+ 'Content-Encoding': 'gzip'}) -+ req.body = 'VERIFY THREE' -+ resp = self.object_controller.PUT(req) -+ self.assertEquals(resp.status_int, 409) -+ - def test_PUT_no_etag(self): - req = Request.blank('/sda1/p/a/c/o', environ={'REQUEST_METHOD': 'PUT'}, - headers={'X-Timestamp': normalize_timestamp(time()), -@@ -1306,12 +1375,32 @@ class TestObjectController(unittest.TestCase): - self.assertEquals(resp.status_int, 400) - # self.assertRaises(KeyError, self.object_controller.DELETE, req) - -+ # The following should have created a tombstone file - timestamp = normalize_timestamp(time()) - req = Request.blank('/sda1/p/a/c/o', - environ={'REQUEST_METHOD': 'DELETE'}, - headers={'X-Timestamp': timestamp}) - resp = self.object_controller.DELETE(req) - self.assertEquals(resp.status_int, 404) -+ objfile = os.path.join(self.testdir, 'sda1', -+ storage_directory(object_server.DATADIR, 'p', -+ hash_path('a', 'c', 'o')), -+ timestamp + '.ts') -+ self.assert_(os.path.isfile(objfile)) -+ -+ # The following should *not* have created a tombstone file. -+ timestamp = normalize_timestamp(float(timestamp) - 1) -+ req = Request.blank('/sda1/p/a/c/o', -+ environ={'REQUEST_METHOD': 'DELETE'}, -+ headers={'X-Timestamp': timestamp}) -+ resp = self.object_controller.DELETE(req) -+ self.assertEquals(resp.status_int, 404) -+ objfile = os.path.join(self.testdir, 'sda1', -+ storage_directory(object_server.DATADIR, 'p', -+ hash_path('a', 'c', 'o')), -+ timestamp + '.ts') -+ self.assertFalse(os.path.exists(objfile)) -+ self.assertEquals(len(os.listdir(os.path.dirname(objfile))), 1) - - sleep(.00001) - timestamp = normalize_timestamp(time()) -@@ -1325,17 +1414,19 @@ class TestObjectController(unittest.TestCase): - resp = self.object_controller.PUT(req) - self.assertEquals(resp.status_int, 201) - -+ # The following should *not* have created a tombstone file. - timestamp = normalize_timestamp(float(timestamp) - 1) - req = Request.blank('/sda1/p/a/c/o', - environ={'REQUEST_METHOD': 'DELETE'}, - headers={'X-Timestamp': timestamp}) - resp = self.object_controller.DELETE(req) -- self.assertEquals(resp.status_int, 204) -+ self.assertEquals(resp.status_int, 409) - objfile = os.path.join(self.testdir, 'sda1', - storage_directory(object_server.DATADIR, 'p', - hash_path('a', 'c', 'o')), - timestamp + '.ts') -- self.assert_(os.path.isfile(objfile)) -+ self.assertFalse(os.path.exists(objfile)) -+ self.assertEquals(len(os.listdir(os.path.dirname(objfile))), 1) - - sleep(.00001) - timestamp = normalize_timestamp(time()) -@@ -1350,6 +1441,103 @@ class TestObjectController(unittest.TestCase): - timestamp + '.ts') - self.assert_(os.path.isfile(objfile)) - -+ def test_DELETE_container_updates(self): -+ # Test swift.object_server.ObjectController.DELETE and container -+ # updates, making sure container update is called in the correct -+ # state. -+ timestamp = normalize_timestamp(time()) -+ req = Request.blank('/sda1/p/a/c/o', environ={'REQUEST_METHOD': 'PUT'}, -+ headers={ -+ 'X-Timestamp': timestamp, -+ 'Content-Type': 'application/octet-stream', -+ 'Content-Length': '4', -+ }) -+ req.body = 'test' -+ resp = self.object_controller.PUT(req) -+ self.assertEquals(resp.status_int, 201) -+ -+ calls_made = [0] -+ -+ def our_container_update(*args, **kwargs): -+ calls_made[0] += 1 -+ -+ orig_cu = self.object_controller.container_update -+ self.object_controller.container_update = our_container_update -+ try: -+ # The following request should return 409 (HTTP Conflict). A -+ # tombstone file should not have been created with this timestamp. -+ timestamp = normalize_timestamp(float(timestamp) - 1) -+ req = Request.blank('/sda1/p/a/c/o', -+ environ={'REQUEST_METHOD': 'DELETE'}, -+ headers={'X-Timestamp': timestamp}) -+ resp = self.object_controller.DELETE(req) -+ self.assertEquals(resp.status_int, 409) -+ objfile = os.path.join(self.testdir, 'sda1', -+ storage_directory(object_server.DATADIR, 'p', -+ hash_path('a', 'c', 'o')), -+ timestamp + '.ts') -+ self.assertFalse(os.path.isfile(objfile)) -+ self.assertEquals(len(os.listdir(os.path.dirname(objfile))), 1) -+ self.assertEquals(0, calls_made[0]) -+ -+ # The following request should return 204, and the object should -+ # be truly deleted (container update is performed) because this -+ # timestamp is newer. A tombstone file should have been created -+ # with this timestamp. -+ sleep(.00001) -+ timestamp = normalize_timestamp(time()) -+ req = Request.blank('/sda1/p/a/c/o', -+ environ={'REQUEST_METHOD': 'DELETE'}, -+ headers={'X-Timestamp': timestamp}) -+ resp = self.object_controller.DELETE(req) -+ self.assertEquals(resp.status_int, 204) -+ objfile = os.path.join(self.testdir, 'sda1', -+ storage_directory(object_server.DATADIR, 'p', -+ hash_path('a', 'c', 'o')), -+ timestamp + '.ts') -+ self.assert_(os.path.isfile(objfile)) -+ self.assertEquals(1, calls_made[0]) -+ self.assertEquals(len(os.listdir(os.path.dirname(objfile))), 1) -+ -+ # The following request should return a 404, as the object should -+ # already have been deleted, but it should have also performed a -+ # container update because the timestamp is newer, and a tombstone -+ # file should also exist with this timestamp. -+ sleep(.00001) -+ timestamp = normalize_timestamp(time()) -+ req = Request.blank('/sda1/p/a/c/o', -+ environ={'REQUEST_METHOD': 'DELETE'}, -+ headers={'X-Timestamp': timestamp}) -+ resp = self.object_controller.DELETE(req) -+ self.assertEquals(resp.status_int, 404) -+ objfile = os.path.join(self.testdir, 'sda1', -+ storage_directory(object_server.DATADIR, 'p', -+ hash_path('a', 'c', 'o')), -+ timestamp + '.ts') -+ self.assert_(os.path.isfile(objfile)) -+ self.assertEquals(2, calls_made[0]) -+ self.assertEquals(len(os.listdir(os.path.dirname(objfile))), 1) -+ -+ # The following request should return a 404, as the object should -+ # already have been deleted, and it should not have performed a -+ # container update because the timestamp is older, or created a -+ # tombstone file with this timestamp. -+ timestamp = normalize_timestamp(float(timestamp) - 1) -+ req = Request.blank('/sda1/p/a/c/o', -+ environ={'REQUEST_METHOD': 'DELETE'}, -+ headers={'X-Timestamp': timestamp}) -+ resp = self.object_controller.DELETE(req) -+ self.assertEquals(resp.status_int, 404) -+ objfile = os.path.join(self.testdir, 'sda1', -+ storage_directory(object_server.DATADIR, 'p', -+ hash_path('a', 'c', 'o')), -+ timestamp + '.ts') -+ self.assertFalse(os.path.isfile(objfile)) -+ self.assertEquals(2, calls_made[0]) -+ self.assertEquals(len(os.listdir(os.path.dirname(objfile))), 1) -+ finally: -+ self.object_controller.container_update = orig_cu -+ - def test_call(self): - """ Test swift.object_server.ObjectController.__call__ """ - inbuf = StringIO() --- -1.8.1.5 - diff --git a/sys-cluster/swift/swift-1.10.0.ebuild b/sys-cluster/swift/swift-1.10.0.ebuild index 8b61d32158bc..86f03012e1c6 100644 --- a/sys-cluster/swift/swift-1.10.0.ebuild +++ b/sys-cluster/swift/swift-1.10.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/swift-1.10.0.ebuild,v 1.2 2013/11/10 07:02:22 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/swift-1.10.0.ebuild,v 1.3 2013/12/19 04:31:09 prometheanfire Exp $ EAPI=5 PYTHON_COMPAT=( python2_7 ) @@ -56,7 +56,7 @@ pkg_setup() { src_prepare() { sed -i 's/xattr/pyxattr/g' "${S}/swift.egg-info/requires.txt" - sed -i 's/xattr/pyxattr/g' "${S}/tools/pip-requires" + sed -i 's/xattr/pyxattr/g' "${S}/requirements.txt" } src_test () { diff --git a/sys-cluster/swift/swift-1.9.1.ebuild b/sys-cluster/swift/swift-1.11.0.ebuild index 25d5cd65fbfe..272e34dcbfcf 100644 --- a/sys-cluster/swift/swift-1.9.1.ebuild +++ b/sys-cluster/swift/swift-1.11.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/swift-1.9.1.ebuild,v 1.2 2013/11/10 07:02:22 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/swift-1.11.0.ebuild,v 1.1 2013/12/19 04:31:09 prometheanfire Exp $ EAPI=5 PYTHON_COMPAT=( python2_7 ) @@ -9,47 +9,46 @@ inherit distutils-r1 eutils linux-info DESCRIPTION="A highly available, distributed, eventually consistent object/blob store" HOMEPAGE="https://launchpad.net/swift" -SRC_URI="http://launchpad.net/${PN}/havana/${PV}/+download/${P}.tar.gz" +SRC_URI="http://launchpad.net/${PN}/icehouse/${PV}/+download/${P}.tar.gz" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="proxy account container object test +memcache" +REQUIRED_USE="|| ( proxy account container object )" DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] - test? ( dev-python/nose[${PYTHON_USEDEP}] + >=dev-python/pbr-0.5.21[${PYTHON_USEDEP}] + <dev-python/pbr-1.0[${PYTHON_USEDEP}] + test? ( ~dev-python/pep8-1.4.5[${PYTHON_USEDEP}] + ~dev-python/pyflakes-0.7.2[${PYTHON_USEDEP}] + ~dev-python/flake8-2.0[${PYTHON_USEDEP}] + >=dev-python/hacking-0.5.6[${PYTHON_USEDEP}] + <dev-python/hacking-0.6[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] dev-python/coverage[${PYTHON_USEDEP}] dev-python/nosexcover[${PYTHON_USEDEP}] dev-python/openstack-nose-plugin[${PYTHON_USEDEP}] dev-python/nosehtmloutput[${PYTHON_USEDEP}] ~dev-python/pep8-1.4.5[${PYTHON_USEDEP}] - ~dev-python/pyflakes-0.7.2[${PYTHON_USEDEP}] - ~dev-python/flake8-2.0[${PYTHON_USEDEP}] - >=dev-python/hacking-0.5.6[${PYTHON_USEDEP}] - <dev-python/hacking-0.6[${PYTHON_USEDEP}] >=dev-python/mock-0.8.0[${PYTHON_USEDEP}] >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}] )" -RDEPEND=">=dev-python/eventlet-0.9.15[${PYTHON_USEDEP}] +RDEPEND=">=dev-python/dnspython-1.9.4[${PYTHON_USEDEP}] + >=dev-python/eventlet-0.9.15[${PYTHON_USEDEP}] >=dev-python/greenlet-0.3.1[${PYTHON_USEDEP}] >=dev-python/netifaces-0.5[${PYTHON_USEDEP}] >=dev-python/pastedeploy-1.3.3[${PYTHON_USEDEP}] >=dev-python/simplejson-2.0.9[${PYTHON_USEDEP}] dev-python/pyxattr[${PYTHON_USEDEP}] - >=dev-python/dnspython-1.10.0-r1[${PYTHON_USEDEP}] dev-python/python-swiftclient[${PYTHON_USEDEP}] memcache? ( net-misc/memcached ) net-misc/rsync[xattr]" -REQUIRED_USE="|| ( proxy account container object )" - CONFIG_CHECK="~EXT3_FS_XATTR ~SQUASHFS_XATTR ~CIFS_XATTR ~JFFS2_FS_XATTR ~TMPFS_XATTR ~UBIFS_FS_XATTR ~EXT2_FS_XATTR ~REISERFS_FS_XATTR ~EXT4_FS_XATTR ~ZFS" -PATCHES=( -) - pkg_setup() { enewuser swift enewgroup swift @@ -57,8 +56,7 @@ pkg_setup() { src_prepare() { sed -i 's/xattr/pyxattr/g' "${S}/swift.egg-info/requires.txt" - sed -i 's/xattr/pyxattr/g' "${S}/tools/pip-requires" - distutils-r1_python_prepare_all + sed -i 's/xattr/pyxattr/g' "${S}/requirements.txt" } src_test () { diff --git a/sys-cluster/swift/swift-2013.2.9999.ebuild b/sys-cluster/swift/swift-2013.2.9999.ebuild index f254d9d57acf..d7e6c86089f8 100644 --- a/sys-cluster/swift/swift-2013.2.9999.ebuild +++ b/sys-cluster/swift/swift-2013.2.9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/swift-2013.2.9999.ebuild,v 1.3 2013/11/10 08:51:46 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/swift-2013.2.9999.ebuild,v 1.4 2013/12/19 04:31:09 prometheanfire Exp $ EAPI=5 PYTHON_COMPAT=( python2_7 ) @@ -50,10 +50,6 @@ CONFIG_CHECK="~EXT3_FS_XATTR ~SQUASHFS_XATTR ~CIFS_XATTR ~JFFS2_FS_XATTR ~TMPFS_XATTR ~UBIFS_FS_XATTR ~EXT2_FS_XATTR ~REISERFS_FS_XATTR ~EXT4_FS_XATTR ~ZFS" -src_test () { - sh .unittests || die -} - pkg_setup() { enewuser swift enewgroup swift |