[euca2ools] Fix bad behavior with user IDs that contain '-'
gholms
gholms at fedoraproject.org
Wed Feb 23 00:59:17 UTC 2011
commit a01f8b36700d2ff7893f62e22d34dd0592486feb
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Thu Feb 17 19:06:01 2011 -0800
Fix bad behavior with user IDs that contain '-'
euca2ools-1.3.1-userdash.patch | 59 ++++++++++++++++++++++++++++++++++++++++
euca2ools.spec | 4 +++
2 files changed, 63 insertions(+), 0 deletions(-)
---
diff --git a/euca2ools-1.3.1-userdash.patch b/euca2ools-1.3.1-userdash.patch
new file mode 100644
index 0000000..3d04d2e
--- /dev/null
+++ b/euca2ools-1.3.1-userdash.patch
@@ -0,0 +1,59 @@
+--- euca2ools-1.3.1/bin/euca-bundle-image.userdash 2011-02-17 18:49:23.470341988 -0800
++++ euca2ools-1.3.1/bin/euca-bundle-image 2011-02-17 18:51:30.422454861 -0800
+@@ -142,7 +142,7 @@ def main():
+ cert_path = euca.get_environ('EC2_CERT')
+ private_key_path = euca.get_environ('EC2_PRIVATE_KEY')
+ ec2cert_path = euca.get_environ('EUCALYPTUS_CERT')
+- user_string = euca.get_environ('EC2_USER_ID')
++ user = euca.get_environ('EC2_USER_ID')
+ except NotFoundError:
+ sys.exit(1)
+
+@@ -152,8 +152,6 @@ def main():
+ mapping = None
+ product_codes = None
+ product_code_string = None
+- if user_string:
+- user = user_string.replace('-', '')
+
+ for (name, value) in euca.opts:
+ if name in ('-h', '--help'):
+@@ -165,7 +163,7 @@ def main():
+ elif name in ('-k', '--privatekey'):
+ private_key_path = value
+ elif name in ('-u', '--user'):
+- user = value.replace('-', '')
++ user = value
+ elif name == '--kernel':
+ kernel = value
+ elif name == '--ramdisk':
+@@ -191,6 +189,7 @@ def main():
+
+ if image_path and cert_path and private_key_path and user \
+ and ec2cert_path:
++ user = user.replace('-', '')
+ try:
+ euca.validate_file(image_path)
+ except FileValidationError:
+--- euca2ools-1.3.1/bin/euca-bundle-vol.userdash 2011-02-17 18:58:26.652861184 -0800
++++ euca2ools-1.3.1/bin/euca-bundle-vol 2011-02-17 19:00:35.621856539 -0800
+@@ -258,11 +258,6 @@ def main():
+ elif name in ('-k', '--privatekey'):
+ private_key_path = value
+ elif name in ('-u', '--user'):
+- try:
+- user = value.replace('-', '')
+- except ValueError:
+- print 'Invalid user', value
+- sys.exit()
+ user = value
+ elif name == '--kernel':
+ kernel = value
+@@ -302,6 +297,7 @@ def main():
+
+ if size_in_MB and cert_path and private_key_path and user \
+ and ec2cert_path:
++ user = user.replace('-', '')
+ try:
+ euca.validate_file(cert_path)
+ except FileValidationError:
diff --git a/euca2ools.spec b/euca2ools.spec
index 079079c..68041f2 100644
--- a/euca2ools.spec
+++ b/euca2ools.spec
@@ -42,6 +42,8 @@ Patch13: euca2ools-1.3.1-rs.patch
Patch14: euca2ools-1.3.1-shasum.patch
# https://bugs.launchpad.net/euca2ools/+bug/479823
Patch15: euca2ools-1.3.1-userint.patch
+# (upstream bzr revision 331)
+Patch16: euca2ools-1.3.1-userdash.patch
Requires: m2crypto
Requires: python-boto
@@ -80,6 +82,7 @@ Eucalyptus. These tools are also compatible with Amazon AWS.
%patch13 -p1
%patch14 -p1
%patch15 -p1
+%patch16 -p1
%build
@@ -117,6 +120,7 @@ rm -rf %{buildroot}
%changelog
* Thu Feb 17 2011 Garrett Holmstrom <gholms at fedoraproject.org> - 1.3.1-6
- Stop stripping leading '0's from user IDs [LP:479823]
+- Fix bad behavior with user IDs that contain '-'
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list