[CentOS] Repositories in CentOS 5.8

Thu May 24 15:32:54 UTC 2012
Lamar Owen <lowen at pari.edu>

On Wednesday, May 23, 2012 09:22:34 PM Kaushal Shriyan wrote:
> Thanks for the explanation. Please help me understand when i install CentOS
> 5.8 on a fresh server, what are the available repositories by default 

yum repolist enabled

That command works on both CentOS 6.2 and CentOS 5.8.  Use that command after install and you have your answer; use that command on any server you have and you can see what repos were used to get the software set installed (the yum-utils package includes other tools that can help you visualize the dependency tree).

> and
> if i need any packages which are not there in the default repos, Do i need
> to enable third party repositories.

I will put forth the goal of enabling the fewest possible repos.

So you'd want to carefully think about which repo or repos to use if your desired package is found in more than one, as well as the differences between the way these packages are built.  I have two examples. 

First, if you have a machine with an Intel GMA integrated video devices (say a 915, 945, or 965 chipset or even newer) you may need the ELrepo xorg-x11-drv-intel instead of the provided one in CentOS.  

Second, if you need the xrdp package (RDP remote desktop connections to a Linux desktop), EPEL and repoforge have two different versions:

# repoquery --repoid=rpmforge xrdp
xrdp-0:0.4.0-1.el6.rf.i686
# repoquery --repoid=epel xrdp
xrdp-0:0.5.0-0.13.el6.i686

The 0.4.0 xrdp is some different from the 0.5.0 version, and those differences by be significant for a particular use.  The repoquery tool is found in the yum-utils package.

Now, having RPMforge and EPEL enabled on the same machine can be an adventure.  As an example, suppose I have a server (an upstream EL6 server in this case) which is serving remote desktop connections, being used for digital forensics with the scalpel file carver, and I'm wanting to make it my small consultancy's e-mail server and use the crm114 system to help with anti-spam.

A yum install of the latest xrdp will pull from EPEL.  A yum install of the latest scalpel will pull from EPEL.  So far so good.  Now:
[root at www ~]# yum install crm114
Loaded plugins: product-id, refresh-packagekit, rhnplugin, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package crm114.i686 0:20100106-3.el6.rf will be installed
--> Processing Dependency: libtre.so.5 for package: crm114-20100106-3.el6.rf.i686
--> Running transaction check
---> Package tre.i686 0:0.7.6-2.el6 will be updated
--> Processing Dependency: libtre.so.4 for package: scalpel-2.0-1.el6.i686
---> Package tre.i686 0:0.8.0-1.el6.rf will be an update
--> Finished Dependency Resolution
Error: Package: scalpel-2.0-1.el6.i686 (@epel)
           Requires: libtre.so.4
           Removing: tre-0.7.6-2.el6.i686 (@epel)
               libtre.so.4
           Updated By: tre-0.8.0-1.el6.rf.i686 (rpmforge)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root at www ~]#

Hmmm, looks like I need some more hardware or a VM to run the e-mail (as this is a multiprocessor pre-em64t Xeon with loads of RAM and large disk, i686 is a reasonable option, but KVM isn't by default available and no em64t Xeons are available for the chipset and sockets on this particular SuperMicro motherboard....and it's not fully depreciated yet, either, and newer hardware is not in this year's budget, but I am open to donations....:-) ).  Or I need to rebuild scalpel myself to be compatible with the RPMforge tre package.  Or I can wait on EPEL to catch up on tre. Or I can use the RPMforge scalpel (a lower version scalpel, but a higher version tre in this case):

[root at www ~]# repoquery --repoid=epel scalpel tre
scalpel-0:2.0-1.el6.i686
tre-0:0.7.6-2.el6.i686
[root at www ~]# repoquery --repoid=rpmforge scalpel tre
scalpel-0:1.60-1.el6.rf.i686
tre-0:0.8.0-1.el6.rf.i686
[root at www ~]#

Oh, but:
[root at www ~]# repoquery --repoid=forensics scalpel tre
scalpel-0:2.0-1.el6.i386
[root at www ~]#

(That's the CERT Forensics repo; I haven't checked to see which tre its scalpel is built against.)

This is not a contrived example; this is my own box, and I wanted to do this very thing not too long ago.  I haven't solved that problem yet, and haven't installed crm114 either, due to time constraints.  It would depend entirely on whether I really have to have the features in scalpel 2.0, or if scalpel 1.60 is good enough (the scalpel website lists: "As for v2.0, Scalpel supports regular expressions for headers and footers, minimum carve sizes, multithreading and asynchronous I/O, and beta-level support for GPU-accelerated file carving. ")  Hmmm, GPU accelerated file carving sounds interesting, but my system doesn't have a GPU capable of helping much.  Multithreading and async I/O, plus regexp for headers and footers.... while I haven't needed those features yet, I might.

I think I've illustrated the process at this point.  I have a tradeoff between not having crm114 at all and not having certain features that I may or may not use in a program that I use once in a blue moon (but blue moons happen, and I have used scalpel a few times in the past).... I'll probably end up doing a yum remove of scalpel, excluding the EPEL and the CERT Forensics versions of scalpel in the respective repo files in /etc/yum.repos.d, and then reinstalling scalpel, which should pull the RPMforge one, and make the crm114 install possible.