rpm5
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| rpm5 [2012-11-24 17:39] – use spec syntax hiliting glen | rpm5 [2015-01-13 16:01] (current) – [Fixing database problems] glen | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== RPM 5 quick guide ====== | ||
| + | ===== General information ===== | ||
| - | ====== RPM 5.x quick guide ====== | ||
| - | |||
| - | |||
| - | ===== General information ===== | ||
| Changes in rpm operation that should interest both users and developers. | Changes in rpm operation that should interest both users and developers. | ||
| + | ==== Upgrading from rpm4 and/or older BDB or downgrading from BDB 5.3 ==== | ||
| + | Rpm database upgrade/ | ||
| - | ==== Upgrading from rpm4 and/or older BDB ==== | + | <code> |
| - | Rpm database upgrade is done automatically during package installation, | + | / |
| - | + | </code> | |
| - | <file>/ | + | |
| - | </file> | + | |
| + | Remember to **back up** rpm database before running this script. | ||
| ==== Fixing database problems ==== | ==== Fixing database problems ==== | ||
| - | You can't just do ''' | ||
| - | < | + | You can't just do '' |
| - | dbX.Y_recover -ev | + | |
| - | </file> | + | |
| + | < | ||
| + | cd / | ||
| + | db5.2_recover -ev | ||
| + | </ | ||
| ==== Querying database ==== | ==== Querying database ==== | ||
| - | The semantics of rpm query option **-f** (**--file**) has changed in rpm 5.x; ''' | ||
| - | < | + | The semantics of rpm query option **-f** (**%%--file%%**) has changed in rpm 5.x; '' |
| + | |||
| + | < | ||
| + | rpm -q -f / | ||
| </ | </ | ||
| - | That returned // | + | That returned // |
| + | ==== poldek error "Too many open files" ==== | ||
| + | You have to remove .poldek-cache directory if, after rpm/poldek ugrade, you see error similiar to the following: | ||
| + | |||
| + | < | ||
| + | Loading [pndir]th... | ||
| + | Loading [pndir]th... | ||
| + | 19616 packages read | ||
| + | Loading [rpmdbcache]/ | ||
| + | rpmdb: / | ||
| + | error: db_init: | ||
| + | error: cannot open Packages(0) index: Too many open files(24) | ||
| + | DB: Berkeley DB 5.2.36: (September 14, 2011) | ||
| + | error: // | ||
| + | Abort | ||
| + | </ | ||
| ==== DB_BUFFER_SMALL error messages ==== | ==== DB_BUFFER_SMALL error messages ==== | ||
| - | You may see errors like this: | ||
| + | If running rpm built with BDB 5.3 you may see errors like this: | ||
| + | < | ||
| + | db3.c:1443: dbcursor-> | ||
| + | </ | ||
| - | < | ||
| - | </ | ||
| It appears to be some type of a bug in the BerkleyDB 5.3.x. | It appears to be some type of a bug in the BerkleyDB 5.3.x. | ||
| - | If DBI debugging is enabled, additional diagnostics are printed, otherwise a basic retry and success message is added to show that the failure was resolved. | + | If DBI debugging is enabled, additional diagnostics are printed, otherwise a basic retry and success message is added to show that the failure was resolved. |
| + | ==== poldek: filesystem marks FHS (cap //) ==== | ||
| + | < | ||
| + | # poldek -u filesystem | ||
| + | Processing dependencies... | ||
| + | filesystem-4.0-1.x86_64 obsoleted by filesystem-4.0-26.x86_64 | ||
| + | filesystem-4.0-26.x86_64 marks FHS-2.3-35.x86_64 (cap //) | ||
| + | error: FHS-2.3-35.x86_64: | ||
| + | </ | ||
| - | ===== Packaging changes | + | To fix, upgrade poldek, and invoke '' |
| - | Below is a list of changes in build system that should interest PLD developers. | + | ===== Vserver maintanance |
| + | After upgrading rpm on a vserver host you need to convert rpm databases of vservers with external package management (default). | ||
| + | For this purpose a special option has been added to vrpm wrapper from util-vserver in PLD. Use the following command to convert | ||
| + | rpm database for a single vserver: | ||
| + | < | ||
| + | vrpm < | ||
| + | </ | ||
| + | |||
| + | ===== Packaging changes ===== | ||
| + | |||
| + | Below is a list of changes in build system that should interest PLD developers. | ||
| ==== Build options ==== | ==== Build options ==== | ||
| Line 57: | Line 93: | ||
| * **-Wformat -Werror=format-security** options are added to compiler flags, more information about it can be found on [[http:// | * **-Wformat -Werror=format-security** options are added to compiler flags, more information about it can be found on [[http:// | ||
| * **Stack Smashing Protector** is also enabled by default, if you really MUST disable SSP then undefine **_ssp_cflags** macro | * **Stack Smashing Protector** is also enabled by default, if you really MUST disable SSP then undefine **_ssp_cflags** macro | ||
| - | |||
| ==== Loading additional macros in .spec files ==== | ==== Loading additional macros in .spec files ==== | ||
| Line 63: | Line 98: | ||
| With old rpm 4.x several macro files were loaded in .spec files via **# | With old rpm 4.x several macro files were loaded in .spec files via **# | ||
| - | + | <code rpmspec> | |
| - | <file rpmspec> | + | %include / |
| - | </file> | + | </code> |
| In rpm 5.x those macro files have been moved to ''/ | In rpm 5.x those macro files have been moved to ''/ | ||
| - | + | <code rpmspec> | |
| - | <file rpmspec> | + | %{load:/ |
| - | </file> | + | </code> |
| ==== Excluding dependencies ==== | ==== Excluding dependencies ==== | ||
| - | Regexp patterns for '' | + | Regexp patterns for '' |
| - | <file rpmspec> | + | <code rpmspec> |
| %define _noautoreq ' | %define _noautoreq ' | ||
| - | </file> | + | </code> |
| rpm-build-tools [[http:// | rpm-build-tools [[http:// | ||
| Line 92: | Line 127: | ||
| ==== noarch subpackages ==== | ==== noarch subpackages ==== | ||
| - | Rpm 5.x supports **noarch** subpackages, | + | Rpm 5 supports **noarch** subpackages, |
| To use it within a package, add in the preamble of a subpackage that should be/is architecture independent: | To use it within a package, add in the preamble of a subpackage that should be/is architecture independent: | ||
| - | <file rpmspec> | + | <code rpmspec> |
| # noarch subpackages only when building with rpm5 | # noarch subpackages only when building with rpm5 | ||
| %if " | %if " | ||
| BuildArch: | BuildArch: | ||
| %endif | %endif | ||
| - | </file> | + | </code> |
| + | |||
| + | ==== changes in triggers ==== | ||
| + | |||
| + | in '' | ||
| + | |||
| + | <code sh> | ||
| + | for a in / | ||
| + | </ | ||
| + | |||
| + | This problem has been identified and fixed rpm package will be released soon. | ||
rpm5.1353775142.txt.gz · Last modified: 2012-11-24 17:39 by glen