PDA

View Full Version : RPM conflicts


agathongroup
03-05-2010, 03:47 PM
I recognize that this isn't purely an AppLogic question, but we occasionally have this problem with our VDS-style apps when running "yum update":

Transaction Check Error:
file /etc/ssh/sshd_config from install of openssh-server-4.3p2-36.el5_4.4.x86_64 conflicts with file from package LINUX64-1.0.0-1.x86_64


This blocks yum from doing any automated upgrades on openssh-server (or setup or initscripts, thanks to similar conflicts on /etc/fstab and /etc/inittab). I could go about this by rebuilding the LINUX64 RPM to NOT include system files, but I'm wondering if there's a better way to quickly and programmatically resolve this across all of the VDS-style applications we have running.

Thanks,
Peter

PeterNic
04-07-2010, 11:42 AM
Peter,

I believe we fixed a bunch of these in one of the later versions (2.7). Which version are you having the yum problem with?


Best regards,
-- Peter

agathongroup
04-07-2010, 05:15 PM
Peter,

This is on an older 2.4.x grid, so I'm not surprised the problems were fixed in a later version of things. I was hoping there was a way to circumvent the problem entirely using RPM, and avoid an upgrade on this particular grid... but if an upgrade is in order, I'll just have to get it on the docket. :-)

Thanks,
Peter

LeoKalev
04-08-2010, 01:32 AM
The conflicting file is most likely /etc/ssh/sshd_config (erroneously installed by the AppLogic's LINUX64 package).

To deal with this, the LINUX64 package can be removed from the RPM database, without deleting the files (they are needed for the appliance to work in AppLogic):
rpm -e --noscripts --justdb LINUX64

Now you should be able to update openssh-server with 'yum update'.

Note that after running 'yum update', if openssh-server is replaced, RPM will do one of the following (depending on how the new openssh-server package is compiled). In either case, RPM will print a warning telling you what it did.
- keep the old configuration file and write the one in new RPM as sshd_config.rpmnew. If this happens, leave it as is, the old config file (from LINUX64) should remain in use.
- back up the old configuration file as /etc/ssh/sshd_config.rpmsave and write a new /etc/ssh/sshd_config in its place. If this happens, copy the old configuration over the new one:
cp /etc/ssh/sshd_config.rpmsave /etc/ssh/sshd_config

agathongroup
04-08-2010, 12:03 PM
Leo, the "--noscripts --justdb" bit is exactly what I was looking for. Thanks!