Skip to content

Commit

Permalink
Change CentOS 6.5 arg to 6
Browse files Browse the repository at this point in the history
The policy we decided on for CentOS versions was to just take the
major version as the argument, and keep the scripts up-to-date
so they always build the latest minor version of the given major.
  • Loading branch information
Jonathan Fuerth and Nader Ziada committed Mar 23, 2015
1 parent 79f7479 commit 0b7e99e
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions .rubocop.yml
Expand Up @@ -15,8 +15,6 @@ AllCops:
- bosh_vsphere_cpi/**/*
- bosh-monitor/**/*
- bosh-release/**/*
- bosh-stemcell/spec/stemcells/centos_6.5_spec.rb
- bosh-stemcell/spec/stemcells/centos_7_spec.rb
- release/**/*
- simple_blobstore_server/**/*
- spec/**/*
Expand Down
2 changes: 1 addition & 1 deletion bosh-stemcell/README.md
Expand Up @@ -50,7 +50,7 @@ If you have changes that will require new OS image you need to build one. A stem
The arguments to `stemcell:build_os_image` are:

1. *`operating_system_name`* identifies which type of OS to fetch. Determines which package repository and packaging tool will be used to download and assemble the files. Must match a value recognized by the [OperatingSystem](lib/bosh/stemcell/operating_system.rb) module. Currently, only `ubuntu` and `centos` are recognized.
2. *`operating_system_version`* an identifier that the system may use to decide which release of the OS to download. Acceptable values depend on the operating system. For `ubuntu`, use `trusty`. For `centos`, use `6.5` (which builds a CentOS 6.6 OS image) or `7`. No other combinations are presently supported.
2. *`operating_system_version`* an identifier that the system may use to decide which release of the OS to download. Acceptable values depend on the operating system. For `ubuntu`, use `trusty`. For `centos`, use `6` or `7`. No other combinations are presently supported.
3. *`os_image_path`* the path to write the finished OS image tarball to. If a file exists at this path already, it will be overwritten without warning.

See below [Building the stemcell with local OS image](#building-the-stemcell-with-local-os-image) on how to build stemcell with the new OS image.
Expand Down
4 changes: 2 additions & 2 deletions bosh-stemcell/spec/bosh/stemcell/definition_spec.rb
Expand Up @@ -81,7 +81,7 @@ module Bosh::Stemcell
describe '#==' do
it 'compares by value instead of reference' do
expect_eq = [
%w(aws xen centos 6.5 go true),
%w(aws xen centos 6 go true),
%w(vsphere esxi ubuntu penguin go false),
]

Expand All @@ -90,7 +90,7 @@ module Bosh::Stemcell
end

expect_not_equal = [
[['aws', 'xen', 'ubuntu', 'penguin', 'null', false], ['aws', 'xen', 'centos', '6.5', 'null', false]],
[['aws', 'xen', 'ubuntu', 'penguin', 'null', false], ['aws', 'xen', 'centos', '6', 'null', false]],
[['aws', 'xen', 'ubuntu', 'penguin', 'null', false], ['aws', 'xen', 'ubuntu', 'penguin', 'null', true]],
[
['vsphere', 'esxi', 'ubuntu', 'penguin', 'go', false],
Expand Down
2 changes: 1 addition & 1 deletion stemcell_builder/stages/base_centos/apply.sh
Expand Up @@ -9,7 +9,7 @@ source $base_dir/etc/settings.bash
mkdir -p $chroot/var/lib/rpm
rpm --root $chroot --initdb
case "${stemcell_operating_system_version}" in
"6.5")
"6")
centos_release_package_url="http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-6.el6.centos.12.2.x86_64.rpm"
epel_package_url="http://ftp.osuosl.org/pub/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm"
;;
Expand Down
4 changes: 2 additions & 2 deletions stemcell_builder/stages/base_centos_packages/apply.sh
Expand Up @@ -7,7 +7,7 @@ source $base_dir/lib/prelude_apply.bash
source $base_dir/etc/settings.bash

case "${stemcell_operating_system_version}" in
"6.5")
"6")
init_package_name="upstart"
version_specific_packages="nc"
;;
Expand All @@ -21,7 +21,7 @@ case "${stemcell_operating_system_version}" in
;;
esac

# The CentOS 6.5 script upgraded upstart first, "to prevent it from messing up our stubs and starting daemons anyway"
# The CentOS 6 script upgraded upstart first, "to prevent it from messing up our stubs and starting daemons anyway"
# so we'll upgrade systemd for possibly the same reason
pkg_mgr install ${init_package_name}

Expand Down
2 changes: 1 addition & 1 deletion stemcell_builder/stages/system_grub/apply.sh
Expand Up @@ -23,7 +23,7 @@ then

rsync -a $chroot/usr/lib/grub/x86*/ $chroot/boot/grub/

elif [ -d $chroot/usr/share/grub/x86* ] # classic GRUB on CentOS 6.5
elif [ -d $chroot/usr/share/grub/x86* ] # classic GRUB on CentOS 6
then

rsync -a $chroot/usr/share/grub/x86*/ $chroot/boot/grub/
Expand Down

0 comments on commit 0b7e99e

Please sign in to comment.