Scroll to navigation

rpmrebuild_plugins(1) rpm tools rpmrebuild_plugins(1)

NAME

rpmrebuild_plugins - is an engine to expand rpmrebuild functionality.

SYNOPSIS

rpmrebuild [non-plugins-option] [plugins-option] <packagename>

DESCRIPTION

rpmrebuild itself try to do it's best to reconstruct rpm package as close to original as possible.

rpmrebuild plugins's aim is opposite - somehow change rebuilded rpm.

RPMREBUILD WITHOUT PLUGINS

Without plugins process of rpm rebuilding looks like:

Query rpm to be rebuilded for the different pieces of information.
Create from these pieces specfile.
Use specfile to build rpm.

RPMREBUILD WITH PLUGINS

With plugins process of rpm rebuilding looks like:

Query rpm to be rebuilded for the different pieces of information.
Change parts of the spec created by query.
Create specfile from the pieces.
Change concatenated specfile.
use specfile to build rpm.

SPECFILE PIECES

Query" queries for the following information:


preamble
conflicts
obsoletes
provides
requires
description
files
triggers
pre
post
preun
postun
verifyscript
changelog

SPECFILE CONCATENATION

Concatenate" create 'full' specfile from the pieces. It do following:

add AutoReq / AutoProv tags
add BuildRoot tag
add some defines to adjust rpm's behaviour.
double all '%' - it'll prevent rpm from attempting expand %something as macro.
add '%description' before description
add '%files' before files
add '%changelog' before changelog

PLUGINS TYPES

rpm building (or rebuilding) process has two inputs: specfile and package's files under buildroot directory. So, there are two plugins type:

PLUGIN'S INTERFACE

Plugins are executed AFTER rpm package is queried and BEFORE new package is rebuilded in the order specified on the command line.

Any plugin should exit with status 0 on success, and any other value on failure. Failed plugin will immediately terminate whole rpmrebuild.
all plugins get following environment variables:
directory for plugin's temporaries files. plugin no need remove this directory - rpmrebuild will care.
directory with plugins.
if 'yes' missing files commented in the 'files' part of specfile
if 'yes' permission owner and group in the part file were taken from filesystem, otherwise - from rpm's database.
if 'yes' rpmrebuild will produce warning for filenames with glob characters.
This variable is set to $RPMREBUILD_PLUGINS_DIR:$PATH
Contains long option (without --) which was used to invoke plugin.
For plugins modifying files under buildroot set to buildroot. For other plugins - empty.
Plugins for specfile modification (i.e., invoked with --spec-hange-*) got "source" spec file from stdin and have to write resulting spec file to stdout.

PLUGIN'S EXAMPLES

Some plugins are given as examples :

PLUGINS' MANPAGES FILENAME CONVENTION

If you are going to write plugin (and manpage for it) it's strongly recommended than manpage's file looks like name.1rrp - this way command 'man -k rrp' will provide list of all rpmrebuild's plugins installed. Please note, that makewhatis should be run before newly installed manpages will be available for 'man -k rrp'

AUTHORS

Eric Gerbier <eric.gerbier@tutanota.com>
Valery Reznic <valery_reznic@users.sourceforge.net>

URL:http://rpmrebuild.sourceforge.net/>.

SEE ALSO

rpm(8), rpmbuild(8), rpmrebuild(1), demofiles.plug(1), demo.plug(1), nodoc.plug(1), uniq.plug(1), file2pacDep.plug(1), set_tag.plug(1), unset_tag.plug(1)
'man -k rrp' for plugins specific manpages

2.17 Valery Reznic