RPM

From Gentoo Wiki
Jump to:navigation Jump to:search

USE flags

USE flags for app-arch/rpm The RPM Package Manager

+berkdb Add support for sys-libs/db (Berkeley DB for MySQL)
+sequoia Use app-crypt/rpm-sequoia instead of the deprecated internal parser
+sqlite Add support for sqlite - embedded sql database
+zstd Enable support for ZSTD compression
acl Add support for Access Control Lists
audit Enable support for Linux audit subsystem using sys-process/audit
bzip2 Enable bzip2 compression support
caps Use Linux capabilities library to control privilege
dbus Enable dbus support for anything that needs it (gpsd, gnomemeeting, etc)
doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
iconv Enable support for the iconv character set conversion library
lzma Support for LZMA compression algorithm
nls Add Native Language Support (using gettext - GNU locale utilities)
openmp Build support for the OpenMP (support parallel computing), requires >=sys-devel/gcc-4.2 built with USE="openmp"
python Add optional support/bindings for the Python language
readline Enable support for libreadline, a GNU line-editing library that almost everyone wants
selinux !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur

Emerge

root #emerge --ask app-arch/rpm

RPMs - faking them

Handy for persuading an installer that something is actually installed. The following recipe creates an RPM that does nothing but fake an RPM installation. Usually something like this will work to install an RPM:

root #rpm -Uvh --nodeps <example.rpm>

If an application has an installer that calls RPM directly to see whether something is installed, this might help get over that hurdle.

Note
Make sure the corresponding ebuild is installed from Portage!
  • Create a .spec file in /usr/src/rpm/SPECS/. Then "build" the rpm
root #rpmbuild -ba <specfile>
  • Watch the output from the above to see where the .rpm is created and then install it
root #rpm -Uvh <rpm>

Sample .spec file

Create a .spec file using the following example for gettext as a template. Set the name and version strings accordingly.

FILE /usr/src/rpm/SPECS/gettext-0.18.1.1.specAn example of a .spec file
Name: gettext
Version: 0.18.1.1
Release: r1
Summary: Use to generate virtual package to fake gettext.
Group: Development/Tools
License: GPL2
BuildArch: noarch

%description
Create virtual package specifying gettext as a virtual package.

%prep

%build

%install

%files

%changelog