Squeezebox Setup

Adding yum priorities and updating

At the moment we have all the repo’s set up, but disabled. This is good as it prevents mistakes (accidently running yum upgrade with everything on would be a disaster), but it does mean we dont get updates to things we have installed from 3rd party repositories. The yum priorities plugin can solve that though – it lets you assign priority to repo’s, and the version of the package in the highest rated repository is what you will end up with. To install it:

[root@tranquilpc ~]# yum install yum-priorities
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.dedipower.com
* updates: mirrors.dedipower.com
* extras: mirrors.dedipower.com
* addons: mirrors.dedipower.com
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package yum-priorities.noarch 0:1.1.16-13.el5.centos set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================
Package Arch Version Repository Size
================================================================
Installing:
yum-priorities noarch 1.1.16-13.el5.centos base 14 k

Transaction Summary
================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 14 k
Is this ok [y/N]:

Next we need to add a priority to all the repos set up. So go to /etc/yum.repos.d and edit all the files to make the changes below.  The repositories used have been re-enabled and a priority has been assigned.  The lower the number the more important it is – so the base centos ones are the lowest.  Also note that EPEL and Remi are the same – they are meant to work together.  I’ve combined everything into one block of text – just add the priority in the appropriate file:

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=10

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=10

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=10

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=10

[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=20

[elrepo]
name=ElRepo.org Community Enterprise Linux Repository - el5
baseurl=http://elrepo.org/linux/elrepo/el5/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
protect=0
priority=60

[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
priority=65

[remi]
name=Les RPM de remi pour Enterprise Linux 5 - $basearch
baseurl=http://rpms.famillecollet.com/enterprise/5/remi/$basearch/

http://iut-info.univ-reims.fr/remirpms/enterprise/5/remi/$basearch/

enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
failovermethod=priority
priority=80

[squeezecenter-release]
name = SqueezeCenter Release Repository
baseurl = http://repos.slimdevices.com/yum/squeezecenter/release/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-SqueezeCenter
priority=40

### Name: RPMforge RPM Repository for Red Hat Enterprise 5 – dag
### URL: http://rpmforge.net/
[rpmforge]
name = Red Hat Enterprise $releasever – RPMforge.net – dag
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
priority = 70

Finally we need to clean out the yum cache:

[root@tranquilpc etc]# yum clean all
Loaded plugins: fastestmirror, priorities
Cleaning up Everything
Cleaning up list of fastest mirrors

Then you can use the command yum upgrade to perform a system update. The first time you do an upgrade check that whn yum runs you see the priorities plugin load, and that it is suppressing some upgrades – so you should see two lines like the ones in bold below in the output:

[root@tranquilpc yum.repos.d]# yum upgrade
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* epel: http://www.mirrorservice.org
* base: http://www.mirrorservice.org
* updates: http://www.mirrorservice.org
* remi: rpms.famillecollet.com
* extras: http://www.mirrorservice.org
* addons: http://www.mirrorservice.org
449 packages excluded due to repository priority protections
Setting up Upgrade Process

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Silver is the New Black Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: