From 47b3dd10388e8688f6646d0d780bcc6e3e20586d Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Mon, 12 Aug 2013 18:38:33 -0400 Subject: [PATCH] bump(net-misc/gsutil): Update to 3.34 ebuilds originally created and tested in my "misc-overlay" https://github.com/marineam/misc-overlay --- .../coreos-overlay/net-misc/gsutil/Manifest | 1 + .../net-misc/gsutil/files/dummy.boto | 2 + ...Fix-test-using-glob-with-ObjectToURI.patch | 30 +++++++++++++ ...tests-that-fail-for-package-installs.patch | 45 +++++++++++++++++++ ...util-3.34-use-friendy-version-checks.patch | 22 +++++++++ .../net-misc/gsutil/gsutil-3.34.ebuild | 42 +++++++++++++++++ .../default/linux/package.accept_keywords | 5 +-- 7 files changed, 144 insertions(+), 3 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-Fix-test-using-glob-with-ObjectToURI.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-Fix-update-tests-that-fail-for-package-installs.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-use-friendy-version-checks.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/gsutil-3.34.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/Manifest b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/Manifest index 345cc5206a..e5328ee206 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/Manifest @@ -1 +1,2 @@ DIST gsutil_3.31.tar.gz 1533732 SHA256 fc429054777caa6dfa49776b28c0511f0d63dc45351f9e0ba31e9fee036694f9 SHA512 acb210147d618c1a5e82259ab0183ef4349b491889d862f4619d6b10384f30a719dd1239e87d2b65260ba1f6865447b9c4989cf35959c15149d124b345d65da6 WHIRLPOOL 4279cfbdb5d452a062e6a8cc23dd49bb7bff3e264903c1da46861bc5ef39dfb73a62e22b49175652b5003e658017921873f2c6dbfdc6c114ad80cf1b71e7d004 +DIST gsutil_3.34.tar.gz 1572225 SHA256 f01195a58358836d665c1760e248044fb19b85ab33565e60f0f96f915f41e7e7 SHA512 a413570c881bd222a49169da5a4e899ccb889bcbe889f3e7cb888562884b759af18253b942dfb6d0fbdede3d6b8dd8eee4bb45af3d9adfe630f96f163bf7773d WHIRLPOOL 5afc1680f402181a1d1f53fa72f9fa98ec417684cc21c7c794ed2e779ff6516fd27b35d8e48ac90e427868c6311c3450b1c373dd133290e7b5d4a1be8f753620 diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/dummy.boto b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/dummy.boto index 71653fef44..0abc21056d 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/dummy.boto +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/dummy.boto @@ -2,3 +2,5 @@ [Credentials] gs_oauth2_refresh_token = 1/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +[GSUtil] diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-Fix-test-using-glob-with-ObjectToURI.patch b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-Fix-test-using-glob-with-ObjectToURI.patch new file mode 100644 index 0000000000..6ef41cc45c --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-Fix-test-using-glob-with-ObjectToURI.patch @@ -0,0 +1,30 @@ +From 1b2eccc8a3c8c70855973d9dcff46bb0c4f79345 Mon Sep 17 00:00:00 2001 +From: Michael Marineau +Date: Mon, 12 Aug 2013 17:42:39 -0400 +Subject: [PATCH] Fix test using ? glob with ObjectToURI + +Passing a ? wildcard through ObjectToURI does not work because passing +the constructed URI through urlparse.urlparse() interprets ? as a query +and strips it off since there is no query string following it. The * +glob which is actually used in the very next call doesn't have that +problem so just use that instead. +--- + gslib/tests/test_naming.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gslib/tests/test_naming.py b/gslib/tests/test_naming.py +index b4d0ccd..8208238 100755 +--- a/gslib/tests/test_naming.py ++++ b/gslib/tests/test_naming.py +@@ -840,7 +840,7 @@ class GsutilNamingTests(testcase.GsUtilUnitTestCase): + for i, final_dst_char in enumerate(('', '/')): + # Copy some files into place in dst bucket. + self.RunCommand( +- 'cp', [suri(src_bucket_uri, 'f%df?' % i), ++ 'cp', [suri(src_bucket_uri, 'f%df*' % i), + suri(dst_bucket_uri, 'dst_subdir%d' % i) + final_dst_char]) + # Now do the move test. + self.RunCommand( +-- +1.8.1.5 + diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-Fix-update-tests-that-fail-for-package-installs.patch b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-Fix-update-tests-that-fail-for-package-installs.patch new file mode 100644 index 0000000000..6307353bb7 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-Fix-update-tests-that-fail-for-package-installs.patch @@ -0,0 +1,45 @@ +From a978811458f3d0c5379101bdda4396c62b8b0d6b Mon Sep 17 00:00:00 2001 +From: Michael Marineau +Date: Mon, 12 Aug 2013 16:46:25 -0400 +Subject: [PATCH] Fix update tests that fail for package installs. + +Software updates are checked for but never offered in package installs. +Perhaps _MaybeCheckForAndOfferSoftwareUpdate should be split into two +functions so the "check for" and "offer" parts can be tested +independently but this fixes the tests as-is. +--- + gslib/tests/test_command_runner.py | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/gslib/tests/test_command_runner.py b/gslib/tests/test_command_runner.py +index 01b5312..0a9eb01 100644 +--- a/gslib/tests/test_command_runner.py ++++ b/gslib/tests/test_command_runner.py +@@ -105,8 +105,10 @@ class TestSoftwareUpdateCheckUnitTests( + self._SetBotoConfig('GSUtil', 'software_update_check_period', '1') + with open(self.timestamp_file, 'w') as f: + f.write(str(int(time.time() - 2 * SECONDS_PER_DAY))) ++ # Update will not trigger for package installs. ++ expect = not gslib.IS_PACKAGE_INSTALL + self.assertEqual( +- True, ++ expect, + self.command_runner._MaybeCheckForAndOfferSoftwareUpdate('ls', 0)) + + def test_not_time_for_update_yet(self): +@@ -134,9 +136,10 @@ class TestSoftwareUpdateCheckUnitTests( + with open(self.timestamp_file, 'w') as f: + f.write(str(int(time.time() - 2 * SECONDS_PER_DAY))) + +- # With regular loglevel, should return True. ++ # With regular loglevel, should return True except for package installs. ++ expect = not gslib.IS_PACKAGE_INSTALL + self.assertEqual( +- True, ++ expect, + self.command_runner._MaybeCheckForAndOfferSoftwareUpdate('ls', 0)) + + prev_loglevel = logging.getLogger().getEffectiveLevel() +-- +1.8.1.5 + diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-use-friendy-version-checks.patch b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-use-friendy-version-checks.patch new file mode 100644 index 0000000000..a807b13199 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/files/gsutil-3.34-use-friendy-version-checks.patch @@ -0,0 +1,22 @@ +diff --git a/setup.py b/setup.py +index 1478628..c25b6e7 100755 +--- a/setup.py ++++ b/setup.py +@@ -33,15 +33,13 @@ management tasks, including: + """ + + requires = [ +- 'boto==2.9.7', ++ 'boto>=2.9.7', + 'httplib2>=0.8', + 'python-gflags>=2.0', + 'google-api-python-client>=1.1', + 'pyOpenSSL>=0.13', + 'crcmod>=1.7', +- # Not using 1.02 because of: +- # https://code.google.com/p/socksipy-branch/issues/detail?id=3 +- 'SocksiPy-branch==1.01', ++ 'SocksiPy-branch>=1.01', + ] + + dependency_links = [ diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/gsutil-3.34.ebuild b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/gsutil-3.34.ebuild new file mode 100644 index 0000000000..d505af43d1 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/gsutil/gsutil-3.34.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="5" +PYTHON_COMPAT=( python{2_6,2_7} ) + +inherit distutils-r1 + +DESCRIPTION="command line tool for interacting with cloud storage services" +HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil" +SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64" +IUSE="" + +DEPEND="${PYTHON_DEPS}" +RDEPEND="${DEPEND} + >=dev-python/boto-2.9.7[${PYTHON_USEDEP}] + >=dev-python/crcmod-1.7 + >=dev-python/httplib2-0.8[${PYTHON_USEDEP}] + >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}] + dev-python/google-api-python-client[${PYTHON_USEDEP}] + dev-python/python-gflags[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/socksipy-branch[${PYTHON_USEDEP}] + " + +S=${WORKDIR}/${PN} +DOCS=( README.md CHANGES.md ) +PATCHES=( + ${FILESDIR}/${P}-use-friendy-version-checks.patch + ${FILESDIR}/${P}-Fix-update-tests-that-fail-for-package-installs.patch + ${FILESDIR}/${P}-Fix-test-using-glob-with-ObjectToURI.patch +) + +python_test() { + export BOTO_CONFIG=${FILESDIR}/dummy.boto + ${PYTHON} gslib/__main__.py test -u || die "tests failed" +} diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/default/linux/package.accept_keywords b/sdk_container/src/third_party/coreos-overlay/profiles/default/linux/package.accept_keywords index 029f9571c0..4174a2be1a 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/default/linux/package.accept_keywords +++ b/sdk_container/src/third_party/coreos-overlay/profiles/default/linux/package.accept_keywords @@ -59,7 +59,6 @@ =sys-devel/clang-3.2 ~amd64 =dev-util/shflags-1.0.3 ~amd64 =dev-util/perf-3.4 ~amd64 -=dev-python/boto-2.7.0 ~amd64 =sys-libs/libnih-1.0.3 ~amd64 =sys-devel/llvm-3.2 ~amd64 =dev-python/pyusb-1.0.0_alpha3 ~amd64 @@ -93,10 +92,10 @@ # Needed for docker =sys-fs/aufs-util-3.7.6 ~amd64 -# Needed by gsutil-3.31 +# Needed by gsutil-3.34 =dev-python/httplib2-0.8 ~amd64 =dev-python/crcmod-1.7-r1 ~amd64 -=dev-python/boto-2.9.6 ~amd64 +=dev-python/boto-2.9.8 ~amd64 # Fixes XML validation failure and python eclass usage =dev-lang/yasm-1.2.0-r1