boxgrinder-build 0.4.1 → 0.5.0
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.
- data/CHANGELOG +7 -0
- data/Manifest +0 -0
- data/Rakefile +11 -0
- data/bin/boxgrinder-build +33 -27
- data/boxgrinder-build.gemspec +38 -0
- data/lib/boxgrinder-build/appliance.rb +32 -41
- data/lib/boxgrinder-build/helpers/appliance-customize-helper.rb +3 -48
- data/lib/boxgrinder-build/helpers/guestfs-helper.rb +98 -12
- data/lib/boxgrinder-build/helpers/linux-helper.rb +69 -0
- data/lib/boxgrinder-build/helpers/package-helper.rb +20 -11
- data/lib/boxgrinder-build/helpers/plugin-helper.rb +32 -32
- data/lib/boxgrinder-build/managers/plugin-manager.rb +98 -0
- data/lib/boxgrinder-build/plugins/base-plugin.rb +70 -17
- data/spec/Rakefile +13 -0
- data/spec/appliance-spec.rb +195 -0
- data/spec/helpers/appliance-customize-helper-spec.rb +30 -0
- data/spec/helpers/guestfs-helper-spec.rb +129 -0
- data/spec/helpers/linux-helper-spec.rb +50 -0
- data/spec/helpers/package-helper-spec.rb +6 -0
- data/spec/helpers/plugin-helper-spec.rb +63 -0
- data/spec/managers/plugin-manager-spec.rb +27 -0
- data/spec/plugins/base-plugin-spec.rb +89 -0
- data/spec/rspec/src/appliances/jeos-f13.appl +27 -0
- metadata +60 -157
- data/docs/examples/appliances/appliances.appl +0 -5
- data/docs/examples/appliances/minimal.appl +0 -9
- data/docs/examples/appliances/mix.appl +0 -8
- data/docs/examples/appliances/packages.appl +0 -13
- data/docs/node-info/pom.xml +0 -31
- data/docs/node-info/src/main/webapp/META-INF/MANIFEST.MF +0 -3
- data/docs/node-info/src/main/webapp/WEB-INF/web.xml +0 -7
- data/docs/node-info/src/main/webapp/index.jsp +0 -70
- data/lib/boxgrinder-build/helpers/rake-helper.rb +0 -71
- data/lib/boxgrinder-build/managers/base-plugin-manager.rb +0 -62
- data/lib/boxgrinder-build/managers/delivery-plugin-manager.rb +0 -39
- data/lib/boxgrinder-build/managers/operating-system-plugin-manager.rb +0 -6
- data/lib/boxgrinder-build/managers/platform-plugin-manager.rb +0 -26
- data/lib/boxgrinder-build/plugins/delivery/base/base-delivery-plugin.rb +0 -43
- data/lib/boxgrinder-build/plugins/delivery/local/local-plugin.rb +0 -57
- data/lib/boxgrinder-build/plugins/delivery/s3/aws-helper.rb +0 -64
- data/lib/boxgrinder-build/plugins/delivery/s3/s3-plugin.rb +0 -190
- data/lib/boxgrinder-build/plugins/delivery/sftp/sftp-plugin.rb +0 -159
- data/lib/boxgrinder-build/plugins/os/base/kickstart.rb +0 -148
- data/lib/boxgrinder-build/plugins/os/base/rhel-based-os-plugin.rb +0 -51
- data/lib/boxgrinder-build/plugins/os/base/rpm-based-os-plugin.rb +0 -134
- data/lib/boxgrinder-build/plugins/os/base/src/appliance.ks.erb +0 -41
- data/lib/boxgrinder-build/plugins/os/base/src/base.repo +0 -4
- data/lib/boxgrinder-build/plugins/os/base/src/motd.init +0 -21
- data/lib/boxgrinder-build/plugins/os/base/validators/rpm-dependency-validator.rb +0 -162
- data/lib/boxgrinder-build/plugins/os/base-operating-system-plugin.rb +0 -37
- data/lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb +0 -52
- data/lib/boxgrinder-build/plugins/os/fedora/fedora-plugin.rb +0 -74
- data/lib/boxgrinder-build/plugins/os/rhel/rhel-plugin.rb +0 -40
- data/lib/boxgrinder-build/plugins/platform/base-platform-plugin.rb +0 -37
- data/lib/boxgrinder-build/plugins/platform/ec2/ec2-plugin.rb +0 -332
- data/lib/boxgrinder-build/plugins/platform/ec2/src/f12/yum.conf +0 -24
- data/lib/boxgrinder-build/plugins/platform/ec2/src/f12-i386-boxgrinder.repo +0 -11
- data/lib/boxgrinder-build/plugins/platform/ec2/src/f12-x86_64-boxgrinder.repo +0 -11
- data/lib/boxgrinder-build/plugins/platform/ec2/src/fstab_32bit +0 -8
- data/lib/boxgrinder-build/plugins/platform/ec2/src/fstab_64bit +0 -8
- data/lib/boxgrinder-build/plugins/platform/ec2/src/ifcfg-eth0 +0 -7
- data/lib/boxgrinder-build/plugins/platform/ec2/src/rc_local +0 -29
- data/lib/boxgrinder-build/plugins/platform/vmware/src/README +0 -42
- data/lib/boxgrinder-build/plugins/platform/vmware/src/base.vmdk +0 -19
- data/lib/boxgrinder-build/plugins/platform/vmware/src/base.vmx +0 -45
- data/lib/boxgrinder-build/plugins/platform/vmware/vmware-plugin.rb +0 -181
- data/lib/boxgrinder-build/validators/appliance-config-parameter-validator.rb +0 -37
- data/lib/boxgrinder-build/validators/appliance-validator.rb +0 -84
- data/lib/boxgrinder-build/validators/config-validator.rb +0 -48
- data/lib/boxgrinder-build/validators/ssh-validator.rb +0 -35
- data/lib/boxgrinder-build/validators/validator.rb +0 -91
@@ -1,41 +0,0 @@
|
|
1
|
-
lang en_US.UTF-8
|
2
|
-
keyboard us
|
3
|
-
timezone US/Eastern
|
4
|
-
auth --useshadow --enablemd5
|
5
|
-
selinux --permissive
|
6
|
-
firewall --disabled
|
7
|
-
bootloader --timeout=1 --append="acpi=force scsi_mod.scan=sync"
|
8
|
-
firstboot --disabled
|
9
|
-
|
10
|
-
<% if graphical %>
|
11
|
-
xconfig --startxonboot
|
12
|
-
services --enabled=NetworkManager --disabled=network,sshd
|
13
|
-
<% else %>
|
14
|
-
network --bootproto=dhcp --device=eth0 --onboot=on
|
15
|
-
services --enabled=network
|
16
|
-
<% end %>
|
17
|
-
|
18
|
-
rootpw <%= root_password %>
|
19
|
-
|
20
|
-
<% appliance_config.hardware.partitions.each do |root, partition| %>
|
21
|
-
part <%= root %> --size <%= (partition['size'].to_f * 1024).to_i %> --fstype <%= fstype %> --ondisk sda<% end %>
|
22
|
-
|
23
|
-
<% for repo in repos %>
|
24
|
-
<%= repo %><% end %>
|
25
|
-
|
26
|
-
<% if graphical %>
|
27
|
-
%packages --excludedocs
|
28
|
-
<% else %>
|
29
|
-
%packages --excludedocs --nobase
|
30
|
-
<% end %>
|
31
|
-
|
32
|
-
<% for package in packages %>
|
33
|
-
<%= package %><% end %>
|
34
|
-
%end
|
35
|
-
%post
|
36
|
-
|
37
|
-
<% if graphical %>
|
38
|
-
chkconfig --level 345 firstboot off 2>/dev/null<% end %>
|
39
|
-
|
40
|
-
%end
|
41
|
-
|
@@ -1,21 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
#
|
3
|
-
# motd Prepares /etc/motd file
|
4
|
-
#
|
5
|
-
# chkconfig: 2345 99 05
|
6
|
-
# description: Prepares /etc/motd file
|
7
|
-
#
|
8
|
-
### BEGIN INIT INFO
|
9
|
-
# Provides: ec2
|
10
|
-
# Default-Start: 2345
|
11
|
-
# Default-Stop: 0 1 6
|
12
|
-
# Short-Description: Prepares /etc/motd file
|
13
|
-
# Description: Prepares /etc/motd file
|
14
|
-
### END INIT INFO
|
15
|
-
|
16
|
-
HOSTNAME=`/bin/uname -a | awk '{print $2}'`
|
17
|
-
IP_ADDRESS=`ip addr list eth0 | grep "inet " | cut -d' ' -f6 | cut -d/ -f1`
|
18
|
-
|
19
|
-
echo -e "\nAppliance:\t#APPLIANCE# #VERSION#\nHostname:\t$HOSTNAME\nIP Address:\t$IP_ADDRESS\n" > /etc/motd
|
20
|
-
|
21
|
-
exit 0
|
@@ -1,162 +0,0 @@
|
|
1
|
-
# JBoss, Home of Professional Open Source
|
2
|
-
# Copyright 2009, Red Hat Middleware LLC, and individual contributors
|
3
|
-
# by the @authors tag. See the copyright.txt in the distribution for a
|
4
|
-
# full listing of individual contributors.
|
5
|
-
#
|
6
|
-
# This is free software; you can redistribute it and/or modify it
|
7
|
-
# under the terms of the GNU Lesser General Public License as
|
8
|
-
# published by the Free Software Foundation; either version 2.1 of
|
9
|
-
# the License, or (at your option) any later version.
|
10
|
-
#
|
11
|
-
# This software is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
# Lesser General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU Lesser General Public
|
17
|
-
# License along with this software; if not, write to the Free
|
18
|
-
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
19
|
-
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
20
|
-
|
21
|
-
require 'yaml'
|
22
|
-
|
23
|
-
module BoxGrinder
|
24
|
-
class Repo
|
25
|
-
def initialize( name, baseurl = nil, mirrorlist = nil )
|
26
|
-
@name = name
|
27
|
-
@baseurl = baseurl
|
28
|
-
@mirrorlist = mirrorlist
|
29
|
-
end
|
30
|
-
|
31
|
-
attr_reader :name
|
32
|
-
attr_reader :baseurl
|
33
|
-
attr_reader :mirrorlist
|
34
|
-
end
|
35
|
-
|
36
|
-
class RPMDependencyValidator
|
37
|
-
def initialize( config, appliance_config, options = {} )
|
38
|
-
@config = config
|
39
|
-
@appliance_config = appliance_config
|
40
|
-
|
41
|
-
@log = options[:log] || Logger.new(STDOUT)
|
42
|
-
@exec_helper = options[:exec_helper] || ExecHelper.new( { :log => @log } )
|
43
|
-
|
44
|
-
# Because we're using repoquery command from our building environment, we must ensure, that our repository
|
45
|
-
# names are unique
|
46
|
-
@magic_hash = "#{@config.name.downcase.gsub(" ", "_")}-"
|
47
|
-
|
48
|
-
define_tasks
|
49
|
-
end
|
50
|
-
|
51
|
-
def define_tasks
|
52
|
-
desc "Validate packages dependencies for #{@appliance_config.simple_name} appliance"
|
53
|
-
task "appliance:#{@appliance_config.name}:validate:dependencies" => [ @appliance_config.path.file.raw.kickstart ] do
|
54
|
-
# if RAW file is already built, don't check for dependencies
|
55
|
-
resolve_packages unless File.exists?( @appliance_config.path.file.raw.disk )
|
56
|
-
end
|
57
|
-
|
58
|
-
task "appliance:all:validate:dependencies" => [ "appliance:#{@appliance_config.name}:validate:dependencies" ]
|
59
|
-
end
|
60
|
-
|
61
|
-
def resolve_packages
|
62
|
-
@log.info "Resolving packages added to #{@appliance_config.simple_name} appliance definition file..."
|
63
|
-
|
64
|
-
repos = read_repos_from_kickstart_file
|
65
|
-
package_list = generate_package_list
|
66
|
-
repo_list = generate_repo_list( repos )
|
67
|
-
|
68
|
-
generate_yum_config( repos )
|
69
|
-
|
70
|
-
invalid_names = invalid_names( repo_list, package_list )
|
71
|
-
|
72
|
-
if invalid_names.size == 0
|
73
|
-
@log.info "All additional packages for #{@appliance_config.simple_name} appliance successfully resolved."
|
74
|
-
else
|
75
|
-
raise "Package#{invalid_names.size > 1 ? "s" : ""} #{invalid_names.join(', ')} for #{@appliance_config.simple_name} appliance not found in repositories. Please check package names in appliance definition file."
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
def invalid_names( repo_list, package_list )
|
80
|
-
@log.debug "Querying package database..."
|
81
|
-
|
82
|
-
unless @appliance_config.is64bit?
|
83
|
-
arches = "i386,i486,i586,i686"
|
84
|
-
else
|
85
|
-
arches = "x86_64"
|
86
|
-
end
|
87
|
-
|
88
|
-
repoquery_output = @exec_helper.execute( "sudo repoquery --quiet --disablerepo=* --enablerepo=#{repo_list} -c #{@appliance_config.path.file.raw.yum} list available #{package_list.join( ' ' )} --nevra --archlist=#{arches},noarch" )
|
89
|
-
invalid_names = []
|
90
|
-
|
91
|
-
for name in package_list
|
92
|
-
found = false
|
93
|
-
|
94
|
-
repoquery_output.each do |line|
|
95
|
-
line = line.strip
|
96
|
-
|
97
|
-
package = line.match( /^([\S]+)-\d+:/ )
|
98
|
-
package = package.nil? ? line : package[1]
|
99
|
-
|
100
|
-
if package.size > 0 and name.match( /^#{package.gsub(/[\+]/, '\\+')}/ )
|
101
|
-
found = true
|
102
|
-
end
|
103
|
-
end
|
104
|
-
invalid_names += [ name ] unless found
|
105
|
-
end
|
106
|
-
|
107
|
-
invalid_names
|
108
|
-
end
|
109
|
-
|
110
|
-
def generate_package_list
|
111
|
-
packages = []
|
112
|
-
for package in @appliance_config.packages.includes
|
113
|
-
packages << package unless package.match /^@/
|
114
|
-
end
|
115
|
-
packages
|
116
|
-
end
|
117
|
-
|
118
|
-
def generate_repo_list(repos)
|
119
|
-
repo_list = ""
|
120
|
-
|
121
|
-
repos.each do |repo|
|
122
|
-
repo_list += "#{@magic_hash}#{repo.name},"
|
123
|
-
end
|
124
|
-
|
125
|
-
repo_list = repo_list[0, repo_list.length - 1]
|
126
|
-
end
|
127
|
-
|
128
|
-
def read_repos_from_kickstart_file
|
129
|
-
repos = `grep -e "^repo" #{@appliance_config.path.file.raw.kickstart}`
|
130
|
-
repo_list = []
|
131
|
-
|
132
|
-
repos.each do |repo_line|
|
133
|
-
name = repo_line.match( /--name=([\w\-]+)/ )[1]
|
134
|
-
baseurl = repo_line.match( /--baseurl=([\w\-\:\/\.&\?=]+)/ )
|
135
|
-
mirrorlist = repo_line.match( /--mirrorlist=([\w\-\:\/\.&\?=]+)/ )
|
136
|
-
|
137
|
-
baseurl = baseurl[1] unless baseurl.nil?
|
138
|
-
mirrorlist = mirrorlist[1] unless mirrorlist.nil?
|
139
|
-
|
140
|
-
repo_list.push( Repo.new( name, baseurl, mirrorlist ) )
|
141
|
-
end
|
142
|
-
|
143
|
-
repo_list
|
144
|
-
end
|
145
|
-
|
146
|
-
def generate_yum_config( repo_list )
|
147
|
-
File.open( @appliance_config.path.file.raw.yum, "w") do |f|
|
148
|
-
|
149
|
-
f.puts( "[main]\r\ncachedir=/tmp/#{@magic_hash}#{@appliance_config.hardware.arch}-yum-cache/\r\n\r\n" )
|
150
|
-
|
151
|
-
for repo in repo_list
|
152
|
-
f.puts( "[#{@magic_hash}#{repo.name}]" )
|
153
|
-
f.puts( "name=#{repo.name}" )
|
154
|
-
f.puts( "baseurl=#{repo.baseurl}" ) unless repo.baseurl.nil?
|
155
|
-
f.puts( "mirrorlist=#{repo.mirrorlist}" ) unless repo.mirrorlist.nil?
|
156
|
-
f.puts( "enabled=1" )
|
157
|
-
f.puts
|
158
|
-
end
|
159
|
-
end
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# JBoss, Home of Professional Open Source
|
2
|
-
# Copyright 2009, Red Hat Middleware LLC, and individual contributors
|
3
|
-
# by the @authors tag. See the copyright.txt in the distribution for a
|
4
|
-
# full listing of individual contributors.
|
5
|
-
#
|
6
|
-
# This is free software; you can redistribute it and/or modify it
|
7
|
-
# under the terms of the GNU Lesser General Public License as
|
8
|
-
# published by the Free Software Foundation; either version 2.1 of
|
9
|
-
# the License, or (at your option) any later version.
|
10
|
-
#
|
11
|
-
# This software is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
# Lesser General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU Lesser General Public
|
17
|
-
# License along with this software; if not, write to the Free
|
18
|
-
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
19
|
-
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
20
|
-
|
21
|
-
require 'boxgrinder-build/managers/operating-system-plugin-manager'
|
22
|
-
require 'boxgrinder-build/plugins/base-plugin'
|
23
|
-
|
24
|
-
module BoxGrinder
|
25
|
-
class BaseOperatingSystemPlugin < BasePlugin
|
26
|
-
def self.inherited(klass)
|
27
|
-
OperatingSystemPluginManager.instance << klass
|
28
|
-
end
|
29
|
-
|
30
|
-
alias_method :execute_original, :execute
|
31
|
-
|
32
|
-
def execute( args = nil )
|
33
|
-
raise "Build cannot be started before the plugin isn't initialized" if @initialized.nil?
|
34
|
-
execute_original( args )
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# JBoss, Home of Professional Open Source
|
2
|
-
# Copyright 2009, Red Hat Middleware LLC, and individual contributors
|
3
|
-
# by the @authors tag. See the copyright.txt in the distribution for a
|
4
|
-
# full listing of individual contributors.
|
5
|
-
#
|
6
|
-
# This is free software; you can redistribute it and/or modify it
|
7
|
-
# under the terms of the GNU Lesser General Public License as
|
8
|
-
# published by the Free Software Foundation; either version 2.1 of
|
9
|
-
# the License, or (at your option) any later version.
|
10
|
-
#
|
11
|
-
# This software is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
# Lesser General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU Lesser General Public
|
17
|
-
# License along with this software; if not, write to the Free
|
18
|
-
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
19
|
-
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
20
|
-
|
21
|
-
require 'boxgrinder-build/plugins/os/base/rhel-based-os-plugin'
|
22
|
-
|
23
|
-
module BoxGrinder
|
24
|
-
class CentOSPlugin < RHELBasedOSPlugin
|
25
|
-
|
26
|
-
CENTOS_REPOS = {
|
27
|
-
"5" => {
|
28
|
-
"base" => {
|
29
|
-
"mirrorlist" => "http://mirrorlist.centos.org/?release=#OS_VERSION#&arch=#ARCH#&repo=os"
|
30
|
-
},
|
31
|
-
"updates" => {
|
32
|
-
"mirrorlist" => "http://mirrorlist.centos.org/?release=#OS_VERSION#&arch=#ARCH#&repo=updates"
|
33
|
-
}
|
34
|
-
}
|
35
|
-
}
|
36
|
-
|
37
|
-
def info
|
38
|
-
{
|
39
|
-
:name => :centos,
|
40
|
-
:full_name => "CentOS",
|
41
|
-
:type => :linux,
|
42
|
-
:versions => ["5"]
|
43
|
-
}
|
44
|
-
end
|
45
|
-
|
46
|
-
def execute
|
47
|
-
raise "Build cannot be started until the plugin isn't initialized" if @initialized.nil?
|
48
|
-
|
49
|
-
build_rhel( CENTOS_REPOS )
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,74 +0,0 @@
|
|
1
|
-
# JBoss, Home of Professional Open Source
|
2
|
-
# Copyright 2009, Red Hat Middleware LLC, and individual contributors
|
3
|
-
# by the @authors tag. See the copyright.txt in the distribution for a
|
4
|
-
# full listing of individual contributors.
|
5
|
-
#
|
6
|
-
# This is free software; you can redistribute it and/or modify it
|
7
|
-
# under the terms of the GNU Lesser General Public License as
|
8
|
-
# published by the Free Software Foundation; either version 2.1 of
|
9
|
-
# the License, or (at your option) any later version.
|
10
|
-
#
|
11
|
-
# This software is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
# Lesser General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU Lesser General Public
|
17
|
-
# License along with this software; if not, write to the Free
|
18
|
-
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
19
|
-
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
20
|
-
|
21
|
-
require 'boxgrinder-build/plugins/os/base/rpm-based-os-plugin'
|
22
|
-
require 'boxgrinder-build/plugins/os/base/kickstart'
|
23
|
-
require 'boxgrinder-build/plugins/os/base/validators/rpm-dependency-validator'
|
24
|
-
|
25
|
-
module BoxGrinder
|
26
|
-
class FedoraPlugin < RPMBasedOSPlugin
|
27
|
-
|
28
|
-
FEDORA_REPOS = {
|
29
|
-
"13" => {
|
30
|
-
"base" => {
|
31
|
-
"mirrorlist" => "http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-13&arch=#ARCH#"
|
32
|
-
},
|
33
|
-
"updates" => {
|
34
|
-
"mirrorlist" => "http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f13&arch=#ARCH#"
|
35
|
-
}
|
36
|
-
},
|
37
|
-
"12" => {
|
38
|
-
"base" => {
|
39
|
-
"mirrorlist" => "http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-12&arch=#ARCH#"
|
40
|
-
},
|
41
|
-
"updates" => {
|
42
|
-
"mirrorlist" => "http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f12&arch=#ARCH#"
|
43
|
-
}
|
44
|
-
},
|
45
|
-
"11" => {
|
46
|
-
"base" => {
|
47
|
-
"mirrorlist" => "http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-11&arch=#ARCH#"
|
48
|
-
},
|
49
|
-
"updates" => {
|
50
|
-
"mirrorlist" => "http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f11&arch=#ARCH#"
|
51
|
-
}
|
52
|
-
},
|
53
|
-
"rawhide" => {
|
54
|
-
"base" => {
|
55
|
-
"mirrorlist" => "http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=#ARCH#"
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
|
-
}
|
60
|
-
|
61
|
-
def info
|
62
|
-
{
|
63
|
-
:name => :fedora,
|
64
|
-
:full_name => "Fedora",
|
65
|
-
:type => :linux,
|
66
|
-
:versions => ["11", "12", "13", "rawhide"]
|
67
|
-
}
|
68
|
-
end
|
69
|
-
|
70
|
-
def execute
|
71
|
-
build_with_appliance_creator( FEDORA_REPOS )
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# JBoss, Home of Professional Open Source
|
2
|
-
# Copyright 2009, Red Hat Middleware LLC, and individual contributors
|
3
|
-
# by the @authors tag. See the copyright.txt in the distribution for a
|
4
|
-
# full listing of individual contributors.
|
5
|
-
#
|
6
|
-
# This is free software; you can redistribute it and/or modify it
|
7
|
-
# under the terms of the GNU Lesser General Public License as
|
8
|
-
# published by the Free Software Foundation; either version 2.1 of
|
9
|
-
# the License, or (at your option) any later version.
|
10
|
-
#
|
11
|
-
# This software is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
# Lesser General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU Lesser General Public
|
17
|
-
# License along with this software; if not, write to the Free
|
18
|
-
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
19
|
-
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
20
|
-
|
21
|
-
require 'boxgrinder-build/plugins/os/base/rhel-based-os-plugin'
|
22
|
-
|
23
|
-
module BoxGrinder
|
24
|
-
class RHELPlugin < RHELBasedOSPlugin
|
25
|
-
def info
|
26
|
-
{
|
27
|
-
:name => :rhel,
|
28
|
-
:full_name => "Red Hat Enterprise Linux",
|
29
|
-
:type => :linux,
|
30
|
-
:versions => ["5"]
|
31
|
-
}
|
32
|
-
end
|
33
|
-
|
34
|
-
def execute
|
35
|
-
raise "Build cannot be started until the plugin isn't initialized" if @initialized.nil?
|
36
|
-
|
37
|
-
build_rhel
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# JBoss, Home of Professional Open Source
|
2
|
-
# Copyright 2009, Red Hat Middleware LLC, and individual contributors
|
3
|
-
# by the @authors tag. See the copyright.txt in the distribution for a
|
4
|
-
# full listing of individual contributors.
|
5
|
-
#
|
6
|
-
# This is free software; you can redistribute it and/or modify it
|
7
|
-
# under the terms of the GNU Lesser General Public License as
|
8
|
-
# published by the Free Software Foundation; either version 2.1 of
|
9
|
-
# the License, or (at your option) any later version.
|
10
|
-
#
|
11
|
-
# This software is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
# Lesser General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU Lesser General Public
|
17
|
-
# License along with this software; if not, write to the Free
|
18
|
-
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
19
|
-
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
20
|
-
|
21
|
-
require 'boxgrinder-build/managers/platform-plugin-manager'
|
22
|
-
require 'boxgrinder-build/plugins/base-plugin'
|
23
|
-
|
24
|
-
module BoxGrinder
|
25
|
-
class BasePlatformPlugin < BasePlugin
|
26
|
-
def self.inherited(klass)
|
27
|
-
PlatformPluginManager.instance << klass
|
28
|
-
end
|
29
|
-
|
30
|
-
alias_method :execute_original, :execute
|
31
|
-
|
32
|
-
def execute(args = nil)
|
33
|
-
raise "Conversion cannot be started before the plugin isn't initialized" if @initialized.nil?
|
34
|
-
execute_original(args)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|