[euca2ools/f14/master] euca2ools-1.3.1-2 (bugfix update)
gholms
gholms at fedoraproject.org
Thu Nov 18 21:22:01 UTC 2010
commit eb48700b40ec355fae45f1df1fc0a1eb53d1204b
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Thu Nov 18 15:08:39 2010 -0600
euca2ools-1.3.1-2 (bugfix update)
- Fix euca-bundle-image returning Odd-length string errors [LP:509562]
- Fix euca-bundle-image failure to use symbolic links [LP:522292]
- Fix euca-bundle-image --help yielding 'Invalid user' messages
[LP:546526]
- Fix rebundled instance boot failure [LP:551847]
- Check a default location for Eucalyptus certificate [LP:479836]
- Fix euca-describe-image-attribute --kernel or --ramdisk [LP:546551]
- Fix euca-describe-images listing too many images on EC2 [LP:541468]
- Fix euca-download-bundle usage message [LP:546567]
- Fix failures related to a spurious space in euca-describe-images
[LP:531453]
- Fix euca-run-instances parameter validation [LP:546420]
- Fix euca-run-instances usage message [LP:530816]
euca2ools-1.3.1-describe-all.patch | 82 ++++++++++++++++++++++++
euca2ools-1.3.1-download-usage.patch | 16 +++++
euca2ools-1.3.1-ec2cert.patch | 15 +++++
euca2ools-1.3.1-inv-user.patch | 43 +++++++++++++
euca2ools-1.3.1-kernel.patch | 15 +++++
euca2ools-1.3.1-key-doc.patch | 20 ++++++
euca2ools-1.3.1-space.patch | 106 ++++++++++++++++++++++++++++++++
euca2ools-1.3.1-strlen.patch | 17 +++++
euca2ools-1.3.1-symlink.patch | 11 +++
euca2ools-1.3.1-udev-persistence.patch | 22 +++++++
euca2ools-1.3.1-valid.patch | 23 +++++++
euca2ools.spec | 48 ++++++++++++++-
12 files changed, 417 insertions(+), 1 deletions(-)
---
diff --git a/euca2ools-1.3.1-describe-all.patch b/euca2ools-1.3.1-describe-all.patch
new file mode 100644
index 0000000..cea3be9
--- /dev/null
+++ b/euca2ools-1.3.1-describe-all.patch
@@ -0,0 +1,82 @@
+--- bin/euca-describe-images 2010-06-16 23:22:33 +0000
++++ bin/euca-describe-images 2010-11-18 13:12:32 +0000
+@@ -112,35 +112,28 @@
+ print e
+ usage()
+
+- show_all = False
+- executable_by = ['self']
+- owners = ['self']
+- defaults = True
++ all_ids = False
++ owners = [ ]
++ executable_by = [ ]
++ image_ids = [ ]
+
+ for (name, value) in euca.opts:
+ if name in ('-h', '--help'):
+ usage(0)
+ elif name == '-x':
+- if defaults:
+- executable_by = []
+- defaults = False
+- owners = []
+ executable_by.append(value)
+ elif name == '-o':
+- if defaults:
+- executable_by = []
+- defaults = False
+ owners.append(value)
+ elif name == '-a':
+- executable_by = ['self', 'all']
+- owners = []
++ all_ids = True
+ elif name == '--version':
+ version()
++ sys.exit(0)
+
+ image_ids = euca.process_args()
+- if defaults and len(image_ids) > 0:
+- executable_by = ['self', 'all']
+- owners = []
++
++ if all_ids and ( len(owners) or len(executable_by) or len(image_ids) ):
++ euca.display_error_and_exit("-a cannot be combined with owner, launch, or image list")
+
+ try:
+ euca_conn = euca.make_connection()
+@@ -148,11 +141,29 @@
+ print e.message
+ sys.exit(1)
+
+- try:
+- images = euca_conn.get_all_images(image_ids=image_ids,
+- owners=owners, executable_by=executable_by)
+- except Exception, ex:
+- euca.display_error_and_exit('%s' % ex)
++ if len(owners) == 0 and len(executable_by) == 0 and \
++ len(image_ids) == 0 and not all_ids:
++ try:
++ owned = euca_conn.get_all_images(image_ids = None,
++ owners = ("self", ), executable_by = None )
++ launchable = euca_conn.get_all_images(image_ids = None,
++ owners = None, executable_by = ("self"))
++
++ mylist = [ ]
++ images = [ ]
++ for image in owned:
++ mylist.append(image.id)
++ images.append(image)
++ for image in launchable:
++ if image.id not in mylist:
++ images.append(image)
++ except Exception, ex:
++ euca.display_error_and_exit('%s' % ex)
++ else:
++ try:
++ images = euca_conn.get_all_images(image_ids=image_ids, owners=owners, executable_by=executable_by)
++ except Exception, ex:
++ euca.display_error_and_exit('%s' % ex)
+
+ display_images(images, image_ids)
+
diff --git a/euca2ools-1.3.1-download-usage.patch b/euca2ools-1.3.1-download-usage.patch
new file mode 100644
index 0000000..b791102
--- /dev/null
+++ b/euca2ools-1.3.1-download-usage.patch
@@ -0,0 +1,16 @@
+--- euca2ools-1.3.1/bin/euca-download-bundle.download-usage 2010-09-04 08:01:51.000000000 -0500
++++ euca2ools-1.3.1/bin/euca-download-bundle 2010-11-18 14:21:44.041081154 -0600
+@@ -52,11 +52,11 @@ euca-download-bundle -b, --bucket bucket
+
+ REQUIRED PARAMETERS
+
+--b, --bucket The name of the bucket to download to. Bucket will be created if it does not exist.
++-b, --bucket The name of the bucket to download from.
+
+ OPTIONAL PARAMETERS
+
+--m, --manifest_path The path to the manifest file.
++-m, --manifest The path to the manifest file.
+
+ -d, --directory The name of the directory to download the bundled parts to.
+
diff --git a/euca2ools-1.3.1-ec2cert.patch b/euca2ools-1.3.1-ec2cert.patch
new file mode 100644
index 0000000..6de6fbc
--- /dev/null
+++ b/euca2ools-1.3.1-ec2cert.patch
@@ -0,0 +1,15 @@
+--- euca2ools-1.3.1/bin/euca-bundle-vol.ec2cert 2010-11-18 13:57:51.367349699 -0600
++++ euca2ools-1.3.1/bin/euca-bundle-vol 2010-11-18 13:57:35.934866956 -0600
+@@ -452,7 +452,11 @@ def main():
+ if not user:
+ print 'user must be specified.'
+ if not ec2cert_path:
+- print 'ec2cert must be specified.'
++ defcert = "/usr/share/euca2ools/cert-ec2.pem"
++ if os.path.exists(defcert):
++ ec2cert_path = defcert
++ else:
++ print 'ec2cert must be specified or exist in %s.' % defcert
+ usage()
+
+
diff --git a/euca2ools-1.3.1-inv-user.patch b/euca2ools-1.3.1-inv-user.patch
new file mode 100644
index 0000000..72794f8
--- /dev/null
+++ b/euca2ools-1.3.1-inv-user.patch
@@ -0,0 +1,43 @@
+--- euca2ools-1.3.1/bin/euca-bundle-image.inv-user 2010-09-04 08:01:51.000000000 -0500
++++ euca2ools-1.3.1/bin/euca-bundle-image 2010-11-18 13:26:16.508439936 -0600
+@@ -153,12 +153,7 @@ def main():
+ product_codes = None
+ product_code_string = None
+ if user_string:
+- try:
+- user = int(user_string)
+- except ValueError:
+- print 'Invalid user', user_string
+- sys.exit()
+- user = user_string
++ user = user_string.replace('-', '')
+
+ for (name, value) in euca.opts:
+ if name in ('-h', '--help'):
+@@ -170,13 +165,7 @@ def main():
+ elif name in ('-k', '--privatekey'):
+ private_key_path = value
+ elif name in ('-u', '--user'):
+- try:
+- value = value.replace('-', '')
+- user = int(value)
+- except ValueError:
+- print 'Invalid user', value
+- sys.exit()
+- user = value
++ user = value.replace('-', '')
+ elif name == '--kernel':
+ kernel = value
+ elif name == '--ramdisk':
+@@ -203,6 +192,11 @@ def main():
+ if image_path and cert_path and private_key_path and user \
+ and ec2cert_path:
+ try:
++ int(user)
++ except ValueError:
++ print 'Invalid user', user
++ sys.exit(1)
++ try:
+ euca.validate_file(image_path)
+ except FileValidationError:
+ print 'Invalid image'
diff --git a/euca2ools-1.3.1-kernel.patch b/euca2ools-1.3.1-kernel.patch
new file mode 100644
index 0000000..6c5ebe2
--- /dev/null
+++ b/euca2ools-1.3.1-kernel.patch
@@ -0,0 +1,15 @@
+--- euca2ools-1.3.1/bin/euca-describe-image-attribute.kernel 2010-09-04 08:01:51.000000000 -0500
++++ euca2ools-1.3.1/bin/euca-describe-image-attribute 2010-11-18 14:05:28.537642732 -0600
+@@ -88,10 +88,10 @@ def display_image_attribute(image_id, im
+ % (image_attribute.image_id, product_code)
+ if image_attribute.kernel is not None:
+ print 'kernel\t%s\t\t%s' % (image_attribute.image_id,
+- image_attribute.value)
++ getattr(image_attribute, 'value', ""))
+ if image_attribute.ramdisk is not None:
+ print 'ramdisk\t%s\t\t%s' % (image_attribute.image_id,
+- image_attribute.value)
++ getattr(image_attribute, 'value', ""))
+ if image_attribute.attrs.has_key('block_device_mapping'):
+ block_device_mapping = \
+ image_attribute.attrs['block_device_mapping']
diff --git a/euca2ools-1.3.1-key-doc.patch b/euca2ools-1.3.1-key-doc.patch
new file mode 100644
index 0000000..b8df815
--- /dev/null
+++ b/euca2ools-1.3.1-key-doc.patch
@@ -0,0 +1,20 @@
+--- euca2ools-1.3.1/bin/euca-run-instances.key-doc 2010-11-18 14:48:06.235119476 -0600
++++ euca2ools-1.3.1/bin/euca-run-instances 2010-11-18 14:50:11.414991323 -0600
+@@ -42,7 +42,7 @@ usage_string = \
+ """
+ Starts instances.
+
+-euca-run-instances [-n, --instance-count count] [-g, --group group_name] [-k, --keypair keyname]
++euca-run-instances [-n, --instance-count count] [-g, --group group_name] [-k, --key keyname]
+ [-d user_data] [-f user_data_file] [--addressing addressing] [-t, --instance-type instance_type]
+ [-z, --availability-zone zone] [--kernel kernel_id] [--ramdisk ramdisk_id] [-b block_device_mapping]
+ [--monitor] [-s, --subnet subnet_id]
+@@ -58,7 +58,7 @@ OPTIONAL PARAMETERS
+
+ -g, --group Security group to run the instance under.
+
+--k, --keypair Name of a (previously created) keypair to associate with this reservation.
++-k, --key Name of a (previously created) keypair to associate with this reservation.
+ -d, --user-data User data for instances read from the command line.
+
+ -f, --user-data-file User data for instances as a filename.
diff --git a/euca2ools-1.3.1-space.patch b/euca2ools-1.3.1-space.patch
new file mode 100644
index 0000000..4786626
--- /dev/null
+++ b/euca2ools-1.3.1-space.patch
@@ -0,0 +1,106 @@
+--- euca2ools-1.3.1/bin/euca-describe-instances.space 2010-09-04 08:01:51.000000000 -0500
++++ euca2ools-1.3.1/bin/euca-describe-instances 2010-11-18 14:32:09.693527928 -0600
+@@ -37,7 +37,7 @@ import getopt
+ import sys
+ import os
+ from euca2ools import Euca2ool, InstanceValidationError, Util, \
+- ConnectionFailed
++ ConnectionFailed, print_instances
+
+ usage_string = \
+ """
+@@ -85,35 +85,7 @@ def display_reservations(reservations, i
+ reservation_string += '%s%s' % (group_delim, group.id)
+ group_delim = ', '
+ print 'RESERVATION\t%s' % reservation_string
+- for instance in instances:
+- if instance:
+- instance_string = '%s\t%s\t%s\t%s\t%s' % (instance.id,
+- instance.image_id, instance.public_dns_name,
+- instance.private_dns_name, instance.state)
+- if instance.key_name:
+- instance_string += ' \t%s' % instance.key_name
+- if instance.ami_launch_index:
+- instance_string += ' \t%s' \
+- % instance.ami_launch_index
+- if instance.product_codes:
+- first = True
+- for p in instance.product_codes:
+- if first:
+- instance_string += ' \t%s' % p
+- first = False
+- else:
+- instance_string += ',%s' % p
+- if instance.instance_type:
+- instance_string += ' \t%s' % instance.instance_type
+- if instance.launch_time:
+- instance_string += ' \t%s' % instance.launch_time
+- if instance.placement:
+- instance_string += ' \t%s' % instance.placement
+- if instance.kernel:
+- instance_string += ' \t%s' % instance.kernel
+- if instance.ramdisk:
+- instance_string += ' \t%s' % instance.ramdisk
+- print 'INSTANCE\t%s' % instance_string
++ print_instances(instances)
+
+
+ def main():
+--- euca2ools-1.3.1/bin/euca-run-instances.space 2010-09-04 08:01:51.000000000 -0500
++++ euca2ools-1.3.1/bin/euca-run-instances 2010-11-18 14:35:22.495492578 -0600
+@@ -36,7 +36,7 @@
+ import getopt
+ import sys
+ import os
+-from euca2ools import Euca2ool, Util, ConnectionFailed
++from euca2ools import Euca2ool, Util, ConnectionFailed, print_instances
+
+ usage_string = \
+ """
+@@ -101,19 +101,7 @@ def display_reservations(reservation):
+ reservation_string += '%s%s' % (group_delim, group.id)
+ group_delim = ', '
+ print 'RESERVATION\t%s' % reservation_string
+- for instance in reservation.instances:
+- instance_string = '%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s' % (
+- instance.id,
+- instance.image_id,
+- instance.public_dns_name,
+- instance.private_dns_name,
+- instance.state,
+- instance.key_name,
+- instance.launch_time,
+- instance.kernel,
+- instance.ramdisk,
+- )
+- print 'INSTANCE\t%s' % instance_string
++ print_instances(reservation.instances)
+
+
+ def read_user_data(user_data_filename):
+--- euca2ools-1.3.1/euca2ools/euca2ools/__init__.py.space 2010-11-18 14:22:17.869135285 -0600
++++ euca2ools-1.3.1/euca2ools/euca2ools/__init__.py 2010-11-18 14:38:24.345118937 -0600
+@@ -1459,3 +1459,23 @@ def parse_config(config, dict, keylist):
+ dict[keylist[i]] = values[i]
+
+
++def print_instances(instances, nil=""):
++ members=( "id", "image_id", "public_dns_name", "private_dns_name",
++ "state", "key_name", "ami_launch_index", "product_codes",
++ "instance_type", "launch_time", "placement", "kernel",
++ "ramdisk" )
++
++ for instance in instances:
++ # in old describe-instances, there was a check for 'if instance:'
++ # I (smoser) have carried this over, but dont know how instance
++ # could be false
++ if not instance: continue
++ items=[ ]
++ for member in members:
++ val = getattr(instance,member,nil)
++ # product_codes is a list
++ if val is None: val = nil
++ if hasattr(val,'__iter__'):
++ val = ','.join(val)
++ items.append(val)
++ print "INSTANCE\t%s" % '\t'.join(items)
diff --git a/euca2ools-1.3.1-strlen.patch b/euca2ools-1.3.1-strlen.patch
new file mode 100644
index 0000000..5344d02
--- /dev/null
+++ b/euca2ools-1.3.1-strlen.patch
@@ -0,0 +1,17 @@
+--- euca2ools/euca2ools/__init__.py 2010-09-03 16:18:03 +0000
++++ euca2ools/euca2ools/__init__.py 2010-09-20 13:42:56 +0000
+@@ -711,10 +711,13 @@
+ print 'Encrypting image'
+ enc_file = '%s.part' % file.replace('.tar.gz', '')
+
+- key = hex(BN.rand(16 * 8))[2:34].replace('L', 'c')
++ # get 17 bytes of randomness with top bit a '1'.
++ # convert to a hex string like '0x<34 hex chars>L'
++ # then take the last 32 of the hex digits, giving 32 random hex chars
++ key = hex(BN.rand(17 * 8,top=0))[4:36]
+ if self.debug:
+ print 'Key: %s' % key
+- iv = hex(BN.rand(16 * 8))[2:34].replace('L', 'c')
++ iv = hex(BN.rand(17 * 8,top=0))[4:36]
+ if self.debug:
+ print 'IV: %s' % iv
diff --git a/euca2ools-1.3.1-symlink.patch b/euca2ools-1.3.1-symlink.patch
new file mode 100644
index 0000000..26874c3
--- /dev/null
+++ b/euca2ools-1.3.1-symlink.patch
@@ -0,0 +1,11 @@
+--- euca2ools-1.3.1/euca2ools/euca2ools/__init__.py.symlink 2010-11-18 13:06:00.563321359 -0600
++++ euca2ools-1.3.1/euca2ools/euca2ools/__init__.py 2010-11-18 13:14:00.694976143 -0600
+@@ -735,7 +735,7 @@ class Euca2ool:
+ tar_file = '%s.tar.gz' % os.path.join(path, prefix)
+ outfile = open(tar_file, 'wb')
+ file_path = self.get_file_path(file)
+- tar_cmd = ['tar', 'c', '-S']
++ tar_cmd = ['tar', 'ch', '-S']
+ if file_path:
+ tar_cmd.append('-C')
+ tar_cmd.append(file_path)
diff --git a/euca2ools-1.3.1-udev-persistence.patch b/euca2ools-1.3.1-udev-persistence.patch
new file mode 100644
index 0000000..27cd5b8
--- /dev/null
+++ b/euca2ools-1.3.1-udev-persistence.patch
@@ -0,0 +1,22 @@
+--- euca2ools-1.3.1/bin/euca-bundle-vol.udev-persistence 2010-09-04 08:01:51.000000000 -0500
++++ euca2ools-1.3.1/bin/euca-bundle-vol 2010-11-18 13:47:08.682210999 -0600
+@@ -348,9 +348,18 @@ def main():
+ check_root()
+ check_image_size(size_in_MB)
+ volume_path = os.path.normpath(volume_path)
++
++ noex='EUCA_BUNDLE_VOL_EMPTY_EXCLUDES'
++ if noex in os.environ and os.environ[noex] != "0":
++ excludes = [ ]
++ else:
++ excludes = [ '/etc/udev/rules.d/70-persistent-net.rules',
++ '/etc/udev/rules.d/z25_persistent-net.rules' ]
++
+ if not all:
+- excludes = parse_excludes(excludes_string)
++ excludes.extend(parse_excludes(excludes_string))
+ euca.add_excludes(volume_path, excludes)
++
+ if inherit:
+ (ramdisk, kernel, mapping, product_codes,
+ ancestor_ami_ids) = get_instance_metadata(euca, ramdisk,
diff --git a/euca2ools-1.3.1-valid.patch b/euca2ools-1.3.1-valid.patch
new file mode 100644
index 0000000..b12366b
--- /dev/null
+++ b/euca2ools-1.3.1-valid.patch
@@ -0,0 +1,23 @@
+--- euca2ools-1.3.1/bin/euca-run-instances.valid 2010-11-18 14:42:19.954407983 -0600
++++ euca2ools-1.3.1/bin/euca-run-instances 2010-11-18 14:46:35.875324194 -0600
+@@ -164,11 +164,15 @@ def main():
+ ramdisk_id = value
+ elif name in ('-n', '--instance-count'):
+ counts = value.split('-')
+- if len(counts) > 1:
+- min_count = int(counts[0])
+- max_count = int(counts[1])
+- else:
+- min_count = max_count = int(counts[0])
++ try:
++ if len(counts) > 1:
++ min_count = int(counts[0])
++ max_count = int(counts[1])
++ else:
++ min_count = max_count = int(counts[0])
++ except ValueError:
++ print "Invalid value for --instance-count: ", value
++ sys.exit(1)
+ elif name in ('-t', '--instance-type'):
+ instance_type = value
+ elif name in ('-g', '--group'):
diff --git a/euca2ools.spec b/euca2ools.spec
index e03e95b..d2d2434 100644
--- a/euca2ools.spec
+++ b/euca2ools.spec
@@ -2,7 +2,7 @@
Name: euca2ools
Version: 1.3.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Elastic Utility Computing Architecture Command-Line Tools
Group: Applications/Internet
@@ -12,6 +12,28 @@ URL: http://open.eucalyptus.com/
# bzr export -r 303 --root=euca2ools-1.3 euca2ools-1.3-bzr303.tar.gz
#Source0: %{name}-%{version}-bzr303.tar.gz
Source0: http://eucalyptussoftware.com/downloads/releases/%{name}-%{version}.tar.gz
+# https://bugs.launchpad.net/euca2ools/+bug/509562
+Patch1: euca2ools-1.3.1-strlen.patch
+# https://bugs.launchpad.net/euca2ools/+bug/522292
+Patch2: euca2ools-1.3.1-symlink.patch
+# https://bugs.launchpad.net/euca2ools/+bug/546526
+Patch3: euca2ools-1.3.1-inv-user.patch
+# https://bugs.launchpad.net/euca2ools/+bug/551847
+Patch4: euca2ools-1.3.1-udev-persistence.patch
+# https://bugs.launchpad.net/euca2ools/+bug/479836
+Patch5: euca2ools-1.3.1-ec2cert.patch
+# https://bugs.launchpad.net/euca2ools/+bug/546551
+Patch6: euca2ools-1.3.1-kernel.patch
+# https://bugs.launchpad.net/euca2ools/+bug/541468
+Patch7: euca2ools-1.3.1-describe-all.patch
+# https://bugs.launchpad.net/euca2ools/+bug/546567
+Patch8: euca2ools-1.3.1-download-usage.patch
+# https://bugs.launchpad.net/euca2ools/+bug/531453
+Patch9: euca2ools-1.3.1-space.patch
+# https://bugs.launchpad.net/euca2ools/+bug/546420
+Patch10: euca2ools-1.3.1-valid.patch
+# https://bugs.launchpad.net/euca2ools/+bug/530816
+Patch11: euca2ools-1.3.1-key-doc.patch
Requires: m2crypto
Requires: python-boto
@@ -35,6 +57,17 @@ Eucalyptus. These tools are also compatible with Amazon AWS.
%prep
%setup -q
+%patch1 -p0
+%patch2 -p1 -b .symlink
+%patch3 -p1 -b .inv-user
+%patch4 -p1 -b .udev-persistence
+%patch5 -p1 -b .ec2cert
+%patch6 -p1 -b .kernel
+%patch7 -p0
+%patch8 -p1 -b .download-usage
+%patch9 -p1 -b .space
+%patch10 -p1 -b .valid
+%patch11 -p1 -b .key-doc
%build
@@ -70,6 +103,19 @@ rm -rf %{buildroot}
%doc README
%changelog
+* Thu Nov 18 2010 Garrett Holmstrom <gholms at fedoraproject.org> - 1.3.1-2
+- Fix euca-bundle-image returning Odd-length string errors [LP:509562]
+- Fix euca-bundle-image failure to use symbolic links [LP:522292]
+- Fix euca-bundle-image --help yielding 'Invalid user' messages [LP:546526]
+- Fix rebundled instance boot failure [LP:551847]
+- Check a default location for Eucalyptus certificate [LP:479836]
+- Fix euca-describe-image-attribute --kernel or --ramdisk [LP:546551]
+- Fix euca-describe-images listing too many images on EC2 [LP:541468]
+- Fix euca-download-bundle usage message [LP:546567]
+- Fix failures related to a spurious space in euca-describe-images [LP:531453]
+- Fix euca-run-instances parameter validation [LP:546420]
+- Fix euca-run-instances usage message [LP:530816]
+
* Sat Sep 4 2010 Garrett Holmstrom <gholms at fedoraproject.org> - 1.3.1-1
- Upstream bugfix release [LP:629118]
More information about the scm-commits
mailing list