VirtualBox

Ticket #5271 (new defect)

Opened 5 years ago

Last modified 5 years ago

RHEL5 Yum repository incorrectly setup

Reported by: mjlucas Owned by:
Priority: major Component: other
Version: VirtualBox 3.0.8 Keywords:
Cc: Guest type: other
Host type: other

Description

The VirtualBox Yum virtualbox.repo file used the variable $releasever to select the appropriate repository location. $releasever is set to either 5Client or 5Server in Redhat Enterprise Linux 5, not the generic release value of 5

The directory layout for the RHEL repo should have symlinks created for 5Client and 5Server to 5 on the download site ( http://download.virtualbox.org/virtualbox/rpm/rhel/) for it to work.

Also because the repository has not split up the repository with the base architecture (i586/x86_64) in the path the documentation should be updated on the download page to specify the architecture when installing through yum (eg, yum install VirtualBox on a 64bit machine will attempt to install the i386 version, you must specify yum install VirtualBox.x86_64 to install the 64bit version)

Attachments

virtualbox-repo.spec.txt Download (1021 bytes) - added by mjlucas 5 years ago.
VirtualBox YUM Config rpm spec file

Change History

comment:1 Changed 5 years ago by frank

Thanks for this report. Actually I was hoping that the package for the current architecture is selected automatically. Isn't there any trick to make yum prefer the x86_64 version on a x86_64 host?

comment:2 Changed 5 years ago by mjlucas

The way I've seen it been done is to setup the base url to the repository to include the macro $basearch and split it up into two yum repos.

http://download.virtualbox.org/virtualbox/rpm/rhel/5/i386/{virtualbox.rpm, repodata/}
http://download.virtualbox.org/virtualbox/rpm/rhel/5/x86_64/{virtualbox.rpm, repodata/}

(Simlink 5Client and 5Server to 5)

So the virtualbox.repo should be something like this (I also added the GPG key value in

[virtualbox]
name=VirtualBox RHEL/CentOS $releasever - $basearch
baseurl=http://download.virtualbox.org/virtualbox/rpm/rhel/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc

comment:3 Changed 5 years ago by frank

Should be fixed that way, I've updated the virtualbox.repo files as well. Please confirm.

comment:4 Changed 5 years ago by mjlucas

Hi Frank, I can confirm that it is all working now. I have made a simple RHEL5/CENTOS5 rpm which will install the yum config and GPG key, i used it to deploy VirtualBox automatically in a kickstart this morning. The repo file is modified to point to the local copy of the GPG key ( in rpm version of virtualbox.repo have gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-virtualbox). I'm releasing it here under MIT license for anyone to use.

Usage:

# To Install Virtualbox
rpm -ivh http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox-repo-5-1.noarch.rpm
yum install VirtualBox

Changed 5 years ago by mjlucas

VirtualBox YUM Config rpm spec file

comment:5 Changed 5 years ago by mjlucas

Modified repo file for the rpm

[virtualbox]
name=RHEL/CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/rhel/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-virtualbox
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use