views:

15399

answers:

8

My development server (CentOS 5) is running Subversion 1.4.2, and I wish to upgrade it to 1.5. I have read in various blogs and documents scattered around the web that this may be done by using RPMForge. I have followed the instructions found on CentOS Wiki, including installing yum-priorities and setting my priorities as indicated (1 and 2 for core repo sources, and 20 for RPMForge).

However, when I attempt to run:

$ yum info subversion

the version number given to me is still 1.4.2, with a status of Installed. My other option at this point is compiling from source, but I would like to find a package-managed solution for ease of future upgrades.

Any thoughts?

+1  A: 

If you install RPMForge's repos, you should then be able to get a newer package - this isn't working for you?

You should see rpmforge.list in /etc/apt/sources.list.d with a line like:

repomd http://apt.sw.be redhat/el$(VERSION)/en/$(ARCH)/dag

I just tested on a clean CentOS 5 install, and yum check-update shows

subversion.i386                          1.5.2-0.1.el5.rf       rpmforge
subversion-perl.i386                     1.5.2-0.1.el5.rf       rpmforge

So check your sources list and run check-update again.

Edit: Whoops, lost part of my answer. Added it back above.

Peter Stone
A: 

its up to v 1.4.6 in Dag's repository.

You can try the one from Fedora's repo or have a bit of patience for the main repositories to upgrade it.

Making it from source is easy, read the INSTALL file when you download the source package, bear in mind CentOS may have moved where the files get installed. (Use "rpm -ql subversion" to see where the old files were installed to).

When v1.5.0 gets released to the repository, you can delete your built version and install using yum as before.

gbjbaanb
A: 

RPMForge is already in /etc/yum.repos.d/ as rpmforge.repo, and the contents are:

# 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/dag
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
priority=20
jperras
A: 

Hi Peter,

I have that exact line in in /etc/apt/sources.list.d/rpmforge.list .

When I run check-update, I get:

Loading "priorities" plugin
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
 * epel: mirror.unl.edu
 * rpmforge: fr2.rpmfind.net
 * base: mirrors.portafixe.com
 * updates: mirrors.portafixe.com
 * addons: mirrors.portafixe.com
 * extras: mirrors.portafixe.com
2202 packages excluded due to repository priority protections

bzip2.i386                               1.0.3-4.el5_2          updates         
bzip2-devel.i386                         1.0.3-4.el5_2          updates         
bzip2-libs.i386                          1.0.3-4.el5_2          updates         
libxml2.i386                             2.6.26-2.1.2.6         updates         
libxml2-devel.i386                       2.6.26-2.1.2.6         updates         
libxml2-python.i386                      2.6.26-2.1.2.6         updates         
perl.i386                                4:5.8.8-15.el5_2.1     updates         
sos.noarch                               1.7-9.2.el5_2.2        updates         
tzdata.noarch                            2008e-1.el5            updates  

I'm not overly concerned about the other outdated packages at the moment, but as you can see there is no Subversion update available.

jperras
+1  A: 

I'm not overly concerned about the other outdated packages at the moment, but as you can see there is no Subversion update available.

Nor any packages from rpmforge. It's your priority settings. Try disabling yum-priorities (change enabled=1 to enabled=0 in /etc/yum/pluginconf.d/priorities.conf) - then it should work.

So I guess the next question is why the priority is screwing it up.... I'm not sure on this, though.

Edit: See 8jean's answer for more about priorities.

Peter Stone
+31  A: 

What you are trying to do is to replace a "core" package (one which is contained in the CentOS repository) with a newer package from a "3rd party" repository (RPMForge), which is what the priorities plugin is designed to prevent.

The RPMForge repository contains both additional packages not found in CentOS, as well as newer versions of core packages. Unfortunately, yum is pretty stupid and will always update a package to the latest version it can find in any repository. So running "yum update" with RPMforge enabled will update half of your system with the latest (bleeding edge, possibly unstable and less well supported) packages from RPMForge.

Therefore, the recommended way to use repos like RPMForge is to use them only together with a yum plugin like "priorites", which prevents packages from "high" priority repos to overwrite those from "low" priority repos (the name of the "priority" parameter is very misleading). This way you can savely install additional packages (that are not in core) from RPMForge, which is what most people want.

Now to your original question ...

If you want to replace a core package, things get a little tricky. Basically, you have two options:

  1. Uninstall the priority plugin, and disable the RPMForge repository by default (set enabled = 0 in /etc/yum.repos.d/rpmforge.repo). You can then selectively enable it on the command line:

    yum --enablerepo=rpmforge install subversion
    

    will install the latest subversion and dependencies from RPMForge.

    The problem with this approach is that if there is an update to the subversion package in RPMForge, you will not see it when the repo is disabled. To keep subversion up to date, you have to remember to run

    yum --enablerepo=rpmforge update subversion
    

    from time to time.

  2. The second possibility is to use the priorites plugin, but manually "mask" the core subversion package (add exclude=subversion to the [base] and [update] sections in /etc/yum.repos.d/CentOS-Base.repo).

    Now yum will behave as if there is no package named "subversion" in the core repository and happily install the latest version from RPMForge. Plus, you will always get the latest subversion updates when running yum update.

8jean
Thanks 8jean, your solution worked great. The reason it was not functioning the way I expected was due my mis-interpretation of the priorities plugin; I thought that by enabling the repo with --enablerepo would bypass the priority check. Seems I was mistaken.Thanks again!
jperras
This is the first time I googled something and got a Stackoverflow answer as the first search result! And it was perfect.
Mark Biek
#2 was a great suggestion that seems to work well for me. I'm interested in what the long-term ramifications are for ease of updating the system. I know that messing with these kinds of things can make that tricky...
Clint Miller
+3  A: 

Hi I solved this
1.- if you are using yum-priorities disable this in the file /etc/yum/pluginconf.d/priorities.conf

2.- check the version of subversion

  $ rpm -qa|grep subversion
    subversion-1.4.2-4.el5_3.1
    subversion-1.4.2-4.el5_3.1 

3.- search the last version of the subversion from rpmforge repository

$ yum --enablerepo=rpmforge check-update subversion
subversion.x86_64      1.6.6-0.1.el5.rf         rpmforge

4.- now proced to upgrade subversion with rpmforge repository

$ yum shell
>erase mod_dav_svn-1.4.2-4.el5_3.1
>erase subversion-1.4.2-4.el5_3.1
>install mod_dav_svn-1.6.6-0.1.el5.rf
>install subversion-1.6.6-0.1.el5.rf.x86_64
>run

that's all it works for me im running centos 5.4

intoxicadocoder
A: 

All you need to do is get this script. worked perfectly for me on CentOS 5.3

http://wandisco.com/subversion/os/downloads

No, i don't work there or have any affiliation what-so-ever ... just found it and figured I would let you guys knows.

Good luck.

Matt H