One of the big things I have to remember is that EL-5 is based off Fedora 6 () and so its RPM database is a different format than what is in any Fedora after version 8 (I believe). I rediscovered this format change when I was trying to see what packages in EPEL might replace 'core' packages in a bare bones CentOS-5 install. I was using mock to do this which uses the host system (in my case a EL-7 box) to populate the buildroot with packages from EL-5 tree.
I ran into this when I did a
[smooget@junk02 rpm]$ mock -r local-5-i386 --init [smooget@junk02 rpm]$ mock -r local-5-i386 --shell[root@junk02 /]# rpm -qa
I got an error telling me that the database type(9) was unknown. After spending some time working through various people running into this on google, I was able to piece together the following on how to work with the rpm inside the mock shell appropriately.
- Before entering into the shell, dump the databases with the system db_dump
[smooget@junk02 rpm]$ mock -r local-5-i386 --install db4-utils [smooget@junk02 rpm]$ sudo -i [root@junk02 rpm]# cd /srv/mock/tree/local-5-i386/root/var/lib/rpm # this is not DEFAULT location [root@junk02 rpm]# for i in Basenames Conflictname Dirnames Group Installtid Name Obsoletename Packages Providename Requirename Sha1header Sigmd5 Triggername ; do echo $i; db_dump $i > $i.x; done Basenames Conflictname Dirnames Group Installtid Name Obsoletename Packages Providename Requirename Sha1header Sigmd5 Triggername
- Now we can load all those db (really on Packages is needed but I like to be a completist)
[smooget@junk02 rpm]$ mock -r local-5-i386 --shell
[root@junk02 /]# cd /var/lib/rpm [root@junk02 /]# for i in Basenames Conflictname Dirnames Group Installtid Name Obsoletename Packages Providename Requirename Sha1header Sigmd5 Triggername; do echo $i; rm -v $i; cat $i.x | db_load $i; done [root@junk02 /]# rpm --rebuilddb [root@junk02 /]# rpm -qa should give you a list of packages.
So what does this give you if you have completed this and installed EVERY possible package (choosing one set in case of conflicts like samba/samba3)
============================================================================================================================= Package Arch Version Repository Size ============================================================================================================================= Updating: agg i386 2.5-9.el5 extras 147 k agg-devel i386 2.5-9.el5 extras 368 k fribidi i386 0.19.2-2.el5 extras 53 k fribidi-devel i386 0.19.2-2.el5 extras 53 k Transaction Summary ============================================================================================================================= Install 0 Package(s) Upgrade 4 Package(s) Total size: 620 k Is this ok [y/N]:
So it looks like my next step will be to a) see if RHEL-5.10 updated those packages and if not have them 'removed' or something else. Also I need to figure out a better way of doing this so we can have a koji test to make sure the EPEL package doesn't ever get in the first place.
No comments:
Post a Comment