PLDWWW: Th-RPM

arekm arekm at pld-linux.org
Thu Nov 15 02:13:50 CET 2007


Author: arekm   Date: Thu Nov 15 01:13:50 2007 GMT
Module: PLDWWW   URL: http://www.pld-linux.org/Th-RPM
---- Log message:


---- Page affected: Th-RPM

---- Diffs:

================================================================
New page:
Th RPM conversion process to new rpm using internal BDB 4.5 (there were too many problems with BDB 4.6). Conversion is needed because BDB 4.5 cannot read BDB "Hash version 9" format used in BDB 4.6.

BDB 4.5 is able to read "Hash version 8" and "Btree version 9". Our goal is to convert databases to "Btree version 9" format, upgrade to new rpm, rebuild databases once again and finally live with Hash 8 and/or Btree 9 but NOT Hash 9.

What to do:

   * create backup of /var/lib/rpm directory
   * install db4.6-utils (so you will have recovery tools when something goes wrong)
   * edit /usr/lib/rpm/macross and replace _dbi_config_XYZ  {{{_dbi_htconfig}}} ocurrences with {{{_dbi_btconfig}}} one. It will look like this:

{{{
%_dbi_config_Dirnames           %{_dbi_btconfig}
%_dbi_config_Requireversion     %{_dbi_btconfig}
%_dbi_config_Provideversion     %{_dbi_btconfig}
%_dbi_config_Installtid         %{_dbi_btconfig}
%_dbi_config_Removetid          %{_dbi_btconfig}

%_dbi_config_Basenames          %{_dbi_btconfig}
%_dbi_config_Conflictname       %{_dbi_btconfig}
%_dbi_config_Filedigests        %{_dbi_btconfig}
%_dbi_config_Group              %{_dbi_btconfig}
%_dbi_config_Name               %{_dbi_btconfig}
%_dbi_config_Packagecolor       %{_dbi_btconfig}
%_dbi_config_Providename        %{_dbi_btconfig}
%_dbi_config_Pubkeys            %{_dbi_btconfig}
%_dbi_config_Requirename        %{_dbi_btconfig}
%_dbi_config_Sha1header         %{_dbi_btconfig}
%_dbi_config_Sigmd5             %{_dbi_btconfig}
%_dbi_config_Triggername        %{_dbi_btconfig}
}}}
    * delete almost all files in /var/lib/rpm/ leaving only file named "Packages" (s at the end!)
    * run {{{rpm --rebuilddb}}}. You should now see new database files in /var/lib/rpm/.
    * check with {{{file /var/lib/rpm/*}}} if new databases are one of these:
       1. Berkeley DB (Hash, version 8, native byte-order)
       2. Berkeley DB (Btree, version 9, native byte-order)
    * if you still have "Berkeley DB (Hash, version 9, native byte-order)" then there is a problem. Consult with [http://lists.pld-linux.org/ PLD mailing list] subscribers
    * upgrade rpm package to latest available
    * run {{{rpm --rebuilddb}}} again to get Hash 8/Btree 9 type of databases


More information about the pld-cvs-commit mailing list