boxgrinder-build 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. data/CHANGELOG +12 -0
  2. data/Manifest +6 -5
  3. data/README.md +1 -1
  4. data/Rakefile +13 -20
  5. data/boxgrinder-build.gemspec +7 -10
  6. data/lib/boxgrinder-build/helpers/aws-helper.rb +81 -0
  7. data/lib/boxgrinder-build/helpers/ec2-helper.rb +182 -0
  8. data/lib/boxgrinder-build/helpers/guestfs-helper.rb +5 -1
  9. data/lib/boxgrinder-build/helpers/s3-helper.rb +124 -0
  10. data/lib/boxgrinder-build/plugins/delivery/ebs/ebs-plugin.rb +95 -299
  11. data/lib/boxgrinder-build/plugins/delivery/elastichosts/elastichosts-plugin.rb +2 -1
  12. data/lib/boxgrinder-build/plugins/delivery/s3/s3-plugin.rb +67 -133
  13. data/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb +15 -14
  14. data/rubygem-boxgrinder-build.spec +23 -28
  15. data/spec/appliance-spec.rb +1 -0
  16. data/spec/helpers/augeas-helper-spec.rb +1 -0
  17. data/spec/helpers/ec2-helper-spec.rb +260 -0
  18. data/spec/helpers/guestfs-helper-spec.rb +34 -7
  19. data/spec/helpers/image-helper-spec.rb +1 -0
  20. data/spec/helpers/linux-helper-spec.rb +1 -0
  21. data/spec/helpers/package-helper-spec.rb +1 -0
  22. data/spec/helpers/plugin-helper-spec.rb +1 -0
  23. data/spec/helpers/s3-helper-spec.rb +168 -0
  24. data/spec/managers/plugin-manager-spec.rb +1 -0
  25. data/spec/plugins/base-plugin-spec.rb +1 -1
  26. data/spec/plugins/delivery/ebs/ebs-plugin-spec.rb +115 -204
  27. data/spec/plugins/delivery/elastichosts/elastichosts-plugin-spec.rb +5 -4
  28. data/spec/plugins/delivery/local/local-plugin-spec.rb +1 -0
  29. data/spec/plugins/delivery/s3/s3-plugin-spec.rb +143 -134
  30. data/spec/plugins/delivery/sftp/sftp-plugin-spec.rb +1 -0
  31. data/spec/plugins/os/centos/centos-plugin-spec.rb +1 -0
  32. data/spec/plugins/os/fedora/fedora-plugin-spec.rb +1 -0
  33. data/spec/plugins/os/rhel/rhel-plugin-spec.rb +1 -0
  34. data/spec/plugins/os/rpm-based/kickstart-spec.rb +5 -1
  35. data/spec/plugins/os/rpm-based/rpm-based-os-plugin-spec.rb +9 -7
  36. data/spec/plugins/os/rpm-based/rpm-dependency-validator-spec.rb +1 -0
  37. data/spec/plugins/os/sl/sl-plugin-spec.rb +1 -0
  38. data/spec/plugins/platform/ec2/ec2-plugin-spec.rb +1 -0
  39. data/spec/plugins/platform/virtualbox/virtualbox-plugin-spec.rb +1 -0
  40. data/spec/plugins/platform/vmware/vmware-plugin-spec.rb +1 -0
  41. metadata +17 -23
@@ -17,7 +17,8 @@
17
17
  # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
18
18
 
19
19
  require 'boxgrinder-build/plugins/base-plugin'
20
- require 'restclient'
20
+ require 'rubygems'
21
+ require 'rest_client'
21
22
  require 'zlib'
22
23
  require 'cgi'
23
24
 
@@ -17,60 +17,14 @@
17
17
  # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
18
18
 
19
19
  require 'rubygems'
20
+ require 'aws-sdk'
20
21
  require 'boxgrinder-build/plugins/base-plugin'
21
22
  require 'boxgrinder-build/helpers/package-helper'
22
- require 'AWS'
23
- require 'aws'
23
+ require 'boxgrinder-build/helpers/s3-helper'
24
+ require 'boxgrinder-build/helpers/ec2-helper'
24
25
 
25
26
  module BoxGrinder
26
27
  class S3Plugin < BasePlugin
27
- REGION_OPTIONS = {
28
- 'eu-west-1' => {
29
- :endpoint => 's3-eu-west-1.amazonaws.com',
30
- :location => 'EU',
31
- :kernel => {
32
- 'i386' => {:aki => 'aki-4deec439'},
33
- 'x86_64' => {:aki => 'aki-4feec43b'}
34
- }
35
- },
36
-
37
- 'ap-southeast-1' => {
38
- :endpoint => 's3-ap-southeast-1.amazonaws.com',
39
- :location => 'ap-southeast-1',
40
- :kernel => {
41
- 'i386' => {:aki => 'aki-13d5aa41'},
42
- 'x86_64' => {:aki => 'aki-11d5aa43'}
43
- }
44
- },
45
-
46
- 'ap-northeast-1' => {
47
- :endpoint => 's3-ap-northeast-1.amazonaws.com',
48
- :location => 'ap-northeast-1',
49
- :kernel => {
50
- 'i386' => {:aki => 'aki-d209a2d3'},
51
- 'x86_64' => {:aki => 'aki-d409a2d5'}
52
- }
53
-
54
- },
55
-
56
- 'us-west-1' => {
57
- :endpoint => 's3-us-west-1.amazonaws.com',
58
- :location => 'us-west-1',
59
- :kernel => {
60
- 'i386' => {:aki => 'aki-99a0f1dc'},
61
- 'x86_64' => {:aki => 'aki-9ba0f1de'}
62
- }
63
- },
64
-
65
- 'us-east-1' => {
66
- :endpoint => 's3.amazonaws.com',
67
- :location => '',
68
- :kernel => {
69
- 'i386' => {:aki => 'aki-407d9529'},
70
- 'x86_64' => {:aki => 'aki-427d952b'}
71
- }
72
- }
73
- }
74
28
 
75
29
  def after_init
76
30
  register_supported_os("fedora", ['13', '14', '15'])
@@ -93,8 +47,24 @@ module BoxGrinder
93
47
  validate_plugin_config(['cert_file', 'key_file', 'account_number'], 'http://boxgrinder.org/tutorials/boxgrinder-build-plugins/#S3_Delivery_Plugin')
94
48
  end
95
49
 
96
- raise PluginValidationError, "Invalid region specified: #{@plugin_config['region']}. This plugin only aware of the following regions: #{REGION_OPTIONS.keys.join(", ")}" unless REGION_OPTIONS.has_key?(@plugin_config['region'])
50
+ @s3_endpoints = S3Helper::endpoints
51
+ raise PluginValidationError, "Invalid region specified: #{@plugin_config['region']}. This plugin is only aware of the following regions: #{@s3_endpoints.keys.join(", ")}" unless @s3_endpoints.has_key?(@plugin_config['region'])
97
52
 
53
+ @plugin_config['account_number'] = @plugin_config['account_number'].to_s.gsub(/-/, '')
54
+
55
+ # Set global AWS configuration
56
+ AWS.config(:access_key_id => @plugin_config['access_key'],
57
+ :secret_access_key => @plugin_config['secret_access_key'],
58
+ :ec2_endpoint => EC2Helper::endpoints[@plugin_config['region']][:endpoint],
59
+ :s3_endpoint => @s3_endpoints[@plugin_config['region']][:endpoint],
60
+ :max_retries => 5,
61
+ :use_ssl => @plugin_config['use_ssl'])
62
+ #:logger => @log) need to modify our logger to accept blah.log(:level, 'message')
63
+
64
+ @ec2 = AWS::EC2.new
65
+ @s3 = AWS::S3.new
66
+ @s3helper = S3Helper.new(@ec2, @s3, :log => @log)
67
+ @ec2helper = EC2Helper.new(@ec2, :log => @log)
98
68
  end
99
69
 
100
70
  def execute
@@ -102,33 +72,25 @@ module BoxGrinder
102
72
  when :s3
103
73
  upload_to_bucket(@previous_deliverables)
104
74
  when :cloudfront
105
- upload_to_bucket(@previous_deliverables, 'public-read')
75
+ upload_to_bucket(@previous_deliverables, :public_read)
106
76
  when :ami
107
- @plugin_config['account_number'] = @plugin_config['account_number'].to_s.gsub(/-/, '')
108
-
109
- @ec2 = AWS::EC2::Base.new(:access_key_id => @plugin_config['access_key'], :secret_access_key => @plugin_config['secret_access_key'], :server => "ec2.#{@plugin_config['region']}.amazonaws.com")
110
-
111
77
  ami_dir = ami_key(@appliance_config.name, @plugin_config['path'])
112
- ami_manifest_key = "#{ami_dir}/#{@appliance_config.name}.ec2.manifest.xml"
113
- s3_object_exists = s3_object_exists?(ami_manifest_key)
78
+ ami_manifest_key = @s3helper.stub_s3obj(asset_bucket, "#{ami_dir}/#{@appliance_config.name}.ec2.manifest.xml")
114
79
 
115
- @log.debug "Going to check whether s3 object exists"
80
+ @log.debug "Going to check whether s3 object exists"
116
81
 
117
- if s3_object_exists and @plugin_config['overwrite']
82
+ if @s3helper.object_exists?(ami_manifest_key) and @plugin_config['overwrite']
118
83
  @log.info "Object exists, attempting to deregister an existing image"
119
84
  deregister_image(ami_manifest_key) # Remove existing image
120
- bucket().delete_folder(ami_dir) # Avoid triggering dupe detection
85
+ @s3helper.delete_folder(asset_bucket, ami_dir) # Avoid triggering dupe detection
121
86
  end
122
87
 
123
- if !s3_object_exists or @plugin_config['snapshot']
88
+ if !@s3helper.object_exists?(ami_manifest_key) or @plugin_config['snapshot']
124
89
  @log.info "Doing bundle/snapshot"
125
90
  bundle_image(@previous_deliverables)
126
91
  fix_sha1_sum
127
92
  upload_image(ami_dir)
128
- else
129
- @log.debug "AMI for #{@appliance_config.name} appliance already uploaded, skipping..."
130
93
  end
131
-
132
94
  register_image(ami_manifest_key)
133
95
  end
134
96
  end
@@ -141,7 +103,7 @@ module BoxGrinder
141
103
  File.open(@ami_manifest, "w") { |f| f.write(ami_manifest) }
142
104
  end
143
105
 
144
- def upload_to_bucket(previous_deliverables, permissions = 'private')
106
+ def upload_to_bucket(previous_deliverables, permissions = :private)
145
107
  register_deliverable(
146
108
  :package => "#{@appliance_config.name}-#{@appliance_config.version}.#{@appliance_config.release}-#{@appliance_config.os.name}-#{@appliance_config.os.version}-#{@appliance_config.hardware.arch}-#{current_platform}.tgz"
147
109
  )
@@ -151,25 +113,29 @@ module BoxGrinder
151
113
 
152
114
  PackageHelper.new(@config, @appliance_config, :log => @log, :exec_helper => @exec_helper).package(File.dirname(previous_deliverables[:disk]), @deliverables[:package])
153
115
 
154
- remote_path = "#{s3_path(@plugin_config['path'])}#{File.basename(@deliverables[:package])}"
155
- size_b = File.size(@deliverables[:package])
156
- key = bucket(true, permissions).key(remote_path.gsub(/^\//, '').gsub(/\/\//, ''))
157
-
158
- if !key.exists? or @plugin_config['overwrite']
159
- @log.info "Will overwrite existing file #{remote_path}" if key.exists? and @plugin_config['overwrite']
160
- @log.info "Uploading #{File.basename(@deliverables[:package])} (#{size_b/1024/1024}MB) to '#{@plugin_config['bucket']}#{remote_path}' path..."
161
- key.put(open(@deliverables[:package]), permissions, :server => REGION_OPTIONS[@plugin_config['region']][:endpoint])
116
+ remote_path = "#{@s3helper.parse_path(@plugin_config['path'])}#{File.basename(@deliverables[:package])}"
117
+ size_m = File.size(@deliverables[:package])/1024**2
118
+ s3_obj = @s3helper.stub_s3obj(asset_bucket,remote_path.gsub(/^\//, '').gsub(/\/\//, ''))
119
+ # Does it really exist?
120
+ obj_exists = @s3helper.object_exists?(s3_obj)
121
+
122
+ if !obj_exists or @plugin_config['overwrite']
123
+ @log.info "Will overwrite existing file #{remote_path}" if obj_exists and @plugin_config['overwrite']
124
+ @log.info "Uploading #{File.basename(@deliverables[:package])} (#{size_m}MB) to '#{@plugin_config['bucket']}#{remote_path}' path..."
125
+ s3_obj.write(:file => @deliverables[:package],
126
+ :acl => permissions)
162
127
  @log.info "Appliance #{@appliance_config.name} uploaded to S3."
163
128
  else
164
129
  @log.info "File '#{@plugin_config['bucket']}#{remote_path}' already uploaded, skipping."
165
130
  end
166
-
167
- @s3.close_connection
168
131
  end
169
132
 
170
- def bucket(create_if_missing = true, permissions = 'private')
171
- @s3 ||= Aws::S3.new(@plugin_config['access_key'], @plugin_config['secret_access_key'], :connection_mode => :single, :logger => @log, :server => REGION_OPTIONS[@plugin_config['region']][:endpoint])
172
- @s3.bucket(@plugin_config['bucket'], create_if_missing, permissions, :location => REGION_OPTIONS[@plugin_config['region']][:location])
133
+ def asset_bucket(create_if_missing = true, permissions = :private)
134
+ @s3helper.bucket(:bucket => @plugin_config['bucket'],
135
+ :acl => permissions,
136
+ :create_of_missing => create_if_missing,
137
+ :location_constraint => @s3_endpoints[@plugin_config['region']][:location]
138
+ )
173
139
  end
174
140
 
175
141
  def bundle_image(deliverables)
@@ -184,96 +150,64 @@ module BoxGrinder
184
150
 
185
151
  FileUtils.mkdir_p(@ami_build_dir)
186
152
 
187
- @exec_helper.execute("euca-bundle-image --ec2cert #{File.dirname(__FILE__)}/src/cert-ec2.pem -i #{deliverables[:disk]} --kernel #{REGION_OPTIONS[@plugin_config['region']][:kernel][@appliance_config.hardware.base_arch][:aki]} -c #{@plugin_config['cert_file']} -k #{@plugin_config['key_file']} -u #{@plugin_config['account_number']} -r #{@appliance_config.hardware.base_arch} -d #{@ami_build_dir}", :redacted => [@plugin_config['account_number'], @plugin_config['key_file'], @plugin_config['cert_file']])
153
+ @exec_helper.execute("euca-bundle-image --ec2cert #{File.dirname(__FILE__)}/src/cert-ec2.pem -i #{deliverables[:disk]} --kernel #{@s3_endpoints[@plugin_config['region']][:kernel][@appliance_config.hardware.base_arch.intern][:aki]} -c #{@plugin_config['cert_file']} -k #{@plugin_config['key_file']} -u #{@plugin_config['account_number']} -r #{@appliance_config.hardware.base_arch} -d #{@ami_build_dir}", :redacted => [@plugin_config['account_number'], @plugin_config['key_file'], @plugin_config['cert_file']])
188
154
 
189
155
  @log.info "Bundling AMI finished."
190
156
  end
191
157
 
192
158
  def upload_image(ami_dir)
193
- bucket # this will create the bucket if needed
159
+ asset_bucket(true,:private) # this will create the bucket if needed
194
160
  @log.info "Uploading #{@appliance_config.name} AMI to bucket '#{@plugin_config['bucket']}'..."
195
161
 
196
- @exec_helper.execute("euca-upload-bundle -U #{@plugin_config['url'].nil? ? "http://#{REGION_OPTIONS[@plugin_config['region']][:endpoint]}" : @plugin_config['url']} -b #{@plugin_config['bucket']}/#{ami_dir} -m #{@ami_manifest} -a #{@plugin_config['access_key']} -s #{@plugin_config['secret_access_key']}", :redacted => [@plugin_config['access_key'], @plugin_config['secret_access_key']])
162
+ @exec_helper.execute("euca-upload-bundle -U #{@plugin_config['url'].nil? ? "http://#{@s3_endpoints[@plugin_config['region']][:endpoint]}" : @plugin_config['url']} -b #{@plugin_config['bucket']}/#{ami_dir} -m #{@ami_manifest} -a #{@plugin_config['access_key']} -s #{@plugin_config['secret_access_key']}", :redacted => [@plugin_config['access_key'], @plugin_config['secret_access_key']])
197
163
  end
198
164
 
199
165
  def register_image(ami_manifest_key)
200
- info = ami_info(ami_manifest_key)
201
-
202
- if info
203
- @log.info "Image for #{@appliance_config.name} is registered under id: #{info.imageId} (region: #{@plugin_config['region']})."
166
+ if ami = ami_by_manifest_key(ami_manifest_key)
167
+ @log.info "Image for #{@appliance_config.name} is already registered under id: #{ami.id} (region: #{@plugin_config['region']})."
204
168
  else
205
- info = @ec2.register_image(:image_location => "#{@plugin_config['bucket']}/#{ami_manifest_key}")
206
- @log.info "Image for #{@appliance_config.name} successfully registered under id: #{info.imageId} (region: #{@plugin_config['region']})."
169
+ ami = @ec2.images.create(:image_location => "#{@plugin_config['bucket']}/#{ami_manifest_key.key}")
170
+ @ec2helper.wait_for_image_state(:available, ami)
171
+ @log.info "Image for #{@appliance_config.name} successfully registered under id: #{ami.id} (region: #{@plugin_config['region']})."
207
172
  end
208
173
  end
209
174
 
210
175
  def deregister_image(ami_manifest_key)
211
- info = ami_info(ami_manifest_key)
212
- if info
213
- @ec2.deregister_image(:image_id => info.imageId)
214
- @log.info "Preexisting image '#{info.imageLocation}' for #{@appliance_config.name} was successfully de-registered, it had id: #{info.imageId} (region: #{@plugin_config['region']})."
176
+ if ami = ami_by_manifest_key(ami_manifest_key)
177
+ @log.info "Preexisting image '#{ami.location}' for #{@appliance_config.name} will be de-registered, it had id: #{ami.id} (region: #{@plugin_config['region']})."
178
+ ami.deregister
179
+ @ec2helper.wait_for_image_death(ami)
215
180
  else # This occurs when the AMI is de-registered externally but the file structure is left intact in S3. In this instance, we simply overwrite and register the image as if it were "new".
216
- @log.info "Possible dangling/unregistered AMI skeleton structure in S3, there is nothing to deregister"
181
+ @log.debug "Possible dangling/unregistered AMI skeleton structure in S3, there is nothing to deregister"
217
182
  end
218
183
  end
219
184
 
220
- def ami_info(ami_manifest_key)
221
- ami_info = nil
222
-
223
- images = @ec2.describe_images(:owner_id => @plugin_config['account_number']).imagesSet
224
-
225
- return nil if images.nil?
226
-
227
- for image in images.item do
228
- ami_info = image if (image.imageLocation.eql?("#{@plugin_config['bucket']}/#{ami_manifest_key}"))
229
- end
230
-
231
- ami_info
232
- end
233
-
234
- def s3_path(path)
235
- return '' if path == '/'
236
-
237
- "#{path.gsub(/^(\/)*/, '').gsub(/(\/)*$/, '')}/"
185
+ def ami_by_manifest_key(ami_manifest_key)
186
+ ami = @ec2.images.with_owner(@plugin_config['account_number']).
187
+ filter("manifest-location","#{@plugin_config['bucket']}/#{ami_manifest_key.key}")
188
+ return nil unless ami.any?
189
+ ami.first
238
190
  end
239
191
 
240
192
  def ami_key(appliance_name, path)
241
- base_path = "#{s3_path(path)}#{appliance_name}/#{@appliance_config.os.name}/#{@appliance_config.os.version}/#{@appliance_config.version}.#{@appliance_config.release}"
193
+ base_path = "#{@s3helper.parse_path(path)}#{appliance_name}/#{@appliance_config.os.name}/#{@appliance_config.os.version}/#{@appliance_config.version}.#{@appliance_config.release}"
242
194
 
243
195
  return "#{base_path}/#{@appliance_config.hardware.arch}" unless @plugin_config['snapshot']
244
196
 
245
197
  @log.info "Determining snapshot name"
246
-
247
198
  snapshot = 1
248
-
249
- while s3_object_exists?("#{base_path}-SNAPSHOT-#{snapshot}/#{@appliance_config.hardware.arch}/")
199
+ while @s3helper.object_exists?(
200
+ @s3helper.stub_s3obj(asset_bucket, "#{base_path}-SNAPSHOT-#{snapshot}/#{@appliance_config.hardware.arch}/")
201
+ )
250
202
  snapshot += 1
251
203
  end
252
-
253
204
  # Reuse the last key (if there was one)
254
205
  snapshot -=1 if snapshot > 1 and @plugin_config['overwrite']
255
206
 
256
207
  "#{base_path}-SNAPSHOT-#{snapshot}/#{@appliance_config.hardware.arch}"
257
208
  end
258
209
 
259
- def s3_object_exists?(path)
260
- @log.trace "Checking if '#{path}' path exists in #{@plugin_config['bucket']}..."
261
-
262
- begin
263
- b = bucket(false)
264
- # Retrieve only one or no keys (if bucket is empty), throw an exception if bucket doesn't exist
265
- b.keys('max-keys' => 1)
266
-
267
- if b.key(path).exists?
268
- @log.trace "Path exists!"
269
- return true
270
- end
271
- rescue
272
- end
273
- @log.trace "Path doesn't exist!"
274
- false
275
- end
276
210
  end
277
211
  end
278
212
 
279
- plugin :class => BoxGrinder::S3Plugin, :type => :delivery, :name => :s3, :full_name => "Amazon Simple Storage Service (Amazon S3)", :types => [:s3, :cloudfront, :ami]
213
+ plugin :class => BoxGrinder::S3Plugin, :type => :delivery, :name => :s3, :full_name => "Amazon Simple Storage Service (Amazon S3)", :types => [:s3, :cloudfront, :ami]
@@ -151,23 +151,12 @@ module BoxGrinder
151
151
 
152
152
  guestfs.sh("chkconfig firstboot off") if guestfs.exists('/etc/init.d/firstboot') != 0
153
153
 
154
- @log.info "Executing post operations after build..."
154
+ # https://issues.jboss.org/browse/BGBUILD-148
155
+ recreate_rpm_database(guestfs, guestfs_helper) if @config.os.name != @appliance_config.os.name or @config.os.version != @appliance_config.os.version
155
156
 
156
- unless @appliance_config.post['base'].nil?
157
- @appliance_config.post['base'].each do |cmd|
158
- guestfs_helper.sh(cmd, :arch => @appliance_config.hardware.arch)
159
- end
160
- @log.debug "Post commands from appliance definition file executed."
161
- else
162
- @log.debug "No commands specified, skipping."
163
- end
157
+ execute_post(guestfs_helper)
164
158
 
165
159
  yield guestfs, guestfs_helper if block_given?
166
-
167
- @log.info "Post operations executed."
168
-
169
- # https://issues.jboss.org/browse/BGBUILD-148
170
- recreate_rpm_database(guestfs, guestfs_helper) if @config.os.name != @appliance_config.os.name or @config.os.version != @appliance_config.os.version
171
160
  end
172
161
 
173
162
  @log.info "Base image for #{@appliance_config.name} appliance was built successfully."
@@ -182,6 +171,18 @@ module BoxGrinder
182
171
  end
183
172
  end
184
173
 
174
+ def execute_post(guestfs_helper)
175
+ @log.info "Executing post operations after build..."
176
+ unless @appliance_config.post['base'].nil?
177
+ @appliance_config.post['base'].each do |cmd|
178
+ guestfs_helper.sh(cmd, :arch => @appliance_config.hardware.arch)
179
+ end
180
+ @log.debug "Post commands from appliance definition file executed."
181
+ else
182
+ @log.debug "No commands specified, skipping."
183
+ end
184
+ end
185
+
185
186
  # https://issues.jboss.org/browse/BGBUILD-204
186
187
  def disable_biosdevname(guestfs)
187
188
  @log.debug "Disabling biosdevname for Fedora 15..."
@@ -5,7 +5,7 @@
5
5
 
6
6
  Summary: A tool for creating appliances from simple plain text files
7
7
  Name: rubygem-%{gemname}
8
- Version: 0.9.3
8
+ Version: 0.9.4
9
9
  Release: 1%{?dist}
10
10
  Group: Development/Languages
11
11
  License: LGPLv3+
@@ -16,35 +16,22 @@ Requires: ruby(abi) = %{rubyabi}
16
16
  Requires: rubygem(boxgrinder-core) >= 0.3.0
17
17
  Requires: rubygem(boxgrinder-core) < 0.4.0
18
18
  Requires: ruby-libguestfs
19
- Requires: parted
20
- Requires: e2fsprogs
21
-
22
- # Fix for rubygem-aws package
23
- Requires: rubygem(activesupport)
24
19
 
25
20
  BuildArch: noarch
26
21
 
27
22
  BuildRequires: rubygem(rake)
28
- BuildRequires: rubygem(rspec)
29
23
  BuildRequires: rubygem(boxgrinder-core) >= 0.3.0
30
24
  BuildRequires: rubygem(boxgrinder-core) < 0.4.0
31
25
  BuildRequires: rubygem(echoe)
32
26
  BuildRequires: ruby-libguestfs
27
+ # Use rspec-core until rspec are migrated to RSpec 2.x
28
+ BuildRequires: rubygem(rspec-core)
33
29
 
34
- # Fix for rubygem-aws package
35
- BuildRequires: rubygem(activesupport)
36
-
37
- # EBS and S3
38
- Requires: rubygem(amazon-ec2)
39
- # Fixes blankslate error
40
- Requires: rubygem(builder)
41
- Requires: rubygem(aws)
30
+ # AWS
42
31
  Requires: euca2ools >= 1.3.1-4
32
+ Requires: rubygem(aws-sdk) >= 1.0.4
43
33
 
44
- BuildRequires: rubygem(amazon-ec2)
45
- BuildRequires: rubygem(aws)
46
- # Fixes blankslate error
47
- BuildRequires: rubygem(builder)
34
+ BuildRequires: rubygem(aws-sdk) >= 1.0.4
48
35
 
49
36
  # SFTP
50
37
  Requires: rubygem(net-sftp)
@@ -59,15 +46,9 @@ BuildRequires: rubygem(progressbar)
59
46
  Requires: appliance-tools
60
47
  Requires: yum-utils
61
48
 
62
- # EC2
63
- Requires: rsync
64
- Requires: wget
65
- Requires: util-linux
66
-
67
- # ElasticHosts
68
- Requires: rubygem(rest-client)
69
-
49
+ #Elastichosts
70
50
  BuildRequires: rubygem(rest-client)
51
+ Requires: rubygem(rest-client)
71
52
 
72
53
  Provides: rubygem(%{gemname}) = %{version}
73
54
 
@@ -117,6 +98,7 @@ mkdir -p %{buildroot}/%{gemdir}
117
98
  --force --rdoc %{SOURCE0}
118
99
  mv %{_builddir}%{gemdir}/bin/* %{buildroot}/%{_bindir}
119
100
  find %{_builddir}%{geminstdir}/bin -type f | xargs chmod a+x
101
+ rm -rf %{_builddir}/%{geminstdir}/integ/packages/*.rpm
120
102
  cp -r %{_builddir}%{gemdir}/* %{buildroot}/%{gemdir}
121
103
 
122
104
  %check
@@ -148,6 +130,19 @@ popd
148
130
  %{gemdir}/doc/%{gemname}-%{version}
149
131
 
150
132
  %changelog
133
+
134
+ * Fri Aug 12 2011 Marc Savy <msavy@redhat.com> - 0.9.4-1
135
+ - Upstream release: 0.9.4
136
+ - [BGBUILD-263] NoMethodError: undefined method `item' for nil:NilClass while creating EBS appliance
137
+ - [BGBUILD-246] Detect when insufficient system memory is available for standard libguestfs, and reduce allocation.
138
+ - [BGBUILD-269] RPM database is recreated after post section execution preventing installing RPM in post section
139
+ - [BGBUILD-273] Move to RSpec2
140
+ - [BGBUILD-272] Move from aws and amazon-ec2 to official aws-sdk gem
141
+ - [BGBUILD-238] Stop AWS gem warnings
142
+ - [BGBUILD-265] Resolve concurrency issues in S3 plugin for overwriting
143
+ - [BGBUILD-249] Warning from S3 AMI plugin that BG is attempting to create a bucket that already exists
144
+ - [BGBUILD-242] Additional EBS overwrite edge cases
145
+
151
146
  * Fri Jun 17 2011 Marc Savy <msavy@redhat.com> - 0.9.3-1
152
147
  - Upstream release: 0.9.3
153
148
  - [BGBUILD-232] boxgrinder doesn't validate config early enough
@@ -158,7 +153,7 @@ popd
158
153
  - [BGBUILD-222] Allow overwrite of uploaded ec2 image
159
154
  - [BGBUILD-225] Move PAE configuration parameter to operating system configuration
160
155
  - [BGBUILD-224] EBS Plugin Support for CentOS v5.5 and fix for non-integer EBS disk sizes
161
- - [BGBUILD-231] Cannot register Fedora 15 EC2 AMI with S3 delivery plugin in eu-west-1 availability zone
156
+ - [BGBUILD-231] Cannot register Fedora 15 EC2 AMI with S3 delivery plugin in eu-west-1 availability zone
162
157
  - [BGBUILD-193] EBS delivery plugin timing/concurrency issues
163
158
  - [BGBUILD-247] ap-northeast-1 end-point is missing in S3 plugin (added Tokyo region)
164
159
  - [BGBUILD-251] Add ap-northeast-1 (tokyo) region for EBS plugin