Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes issue with grub-0.97-77.fc16 which has been marked as conflicti…

…ng with grub2 in Fedora 16+.
  • Loading branch information...
commit 73e636fa1bb6370f55ebac6ee21e91636f06d830 1 parent eec11e0
@goldmann goldmann authored
View
4 integ/appliances/jeos-f16.appl
@@ -2,8 +2,4 @@ name: jeos-f16
os:
name: fedora
version: 16
-repos:
- - name: "temp-fedora-updates-testing"
- mirrorlist: "https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f#OS_VERSION#&arch=#BASE_ARCH#"
- ephemeral: true
View
3  lib/boxgrinder-build/plugins/os/fedora/fedora-plugin.rb
@@ -68,6 +68,8 @@ def normalize_packages(packages)
else
@plugin_config['PAE'] ? packages << "kernel-PAE" : packages << "kernel"
end
+
+ packages << "-grub2" if @appliance_config.os.version >= "16"
end
# Since Fedora 16 by default GRUB2 is used - we remove Legacy GRUB
@@ -77,6 +79,7 @@ def normalize_packages(packages)
def switch_to_grub2(guestfs, guestfs_helper)
@log.debug "Switching to GRUB2..."
guestfs_helper.sh("yum -y remove grub")
+ guestfs_helper.sh("yum -y install grub2")
# We are using only one disk, so this is save
guestfs.sh("cd / && grub2-install --force #{guestfs.list_devices.first}")
guestfs.sh("cd / && grub2-mkconfig -o /boot/grub2/grub.cfg")
View
2  lib/boxgrinder-build/plugins/os/rpm-based/rpm-dependency-validator.rb
@@ -98,7 +98,7 @@ def invalid_names( repo_list, package_list )
def generate_package_list
packages = []
for package in @appliance_config.packages
- packages << package unless package.match /^@/
+ packages << package unless package.match /^@/ or package.match /^-/
end
packages
end
View
1  spec/plugins/os/fedora/fedora-plugin-spec.rb
@@ -130,6 +130,7 @@ module BoxGrinder
guestfs = mock("GuestFS")
guestfs_helper = mock("GuestFSHelper")
guestfs_helper.should_receive(:sh).ordered.with("yum -y remove grub")
+ guestfs_helper.should_receive(:sh).ordered.with("yum -y install grub2")
guestfs.should_receive(:list_devices).and_return(['/dev/vda'])
guestfs.should_receive(:sh).ordered.with("cd / && grub2-install --force /dev/vda")
guestfs.should_receive(:sh).ordered.with("cd / && grub2-mkconfig -o /boot/grub2/grub.cfg")
Please sign in to comment.
Something went wrong with that request. Please try again.