rpmrebuild_plugins (1) - Linux Manuals

rpmrebuild_plugins: is an engine to expand rpmrebuild functionality.

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 -
Query rpm to be rebuilded for the different pieces of information.
concatenate -
Create from these pieces specfile.
build -
Use specfile to build rpm.

RPMREBUILD WITH PLUGINS

With plugins process of rpm rebuilding looks like:
query -
Query rpm to be rebuilded for the different pieces of information.
change parts -
Change parts of the spec created by query.
concatenate -
Create specfile from the pieces.
change whole -
Change concatenated specfile.
build -
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:
- for specfile modification (exemple : demo.plug).
- for files (under buildroot) modification (exemple : demofiles.plug).

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.
Exit status
Any plugin should exit with status 0 on success, and any other value on failure. Failed plugin will immediately terminate whole rpmrebuild.
Environment variables
all plugins get following environment variables:
RPMREBUILD_TMPDIR
directory for plugin's temporaries files. plugin no need remove this directory - rpmrebuild will care.
RPMREBUILD_PLUGINS_DIR
directory with plugins.
RPMREBUILD_COMMENT_MISSING
if 'yes' missing files commented in the 'files' part of specfile
RPMREBUILD_PUG_FROM_FS
if 'yes' permission owner and group in the part file were taken from filesystem, otherwise - from rpm's database.
RPMREBUILD_WARNING
if 'yes' rpmrebuild will produce warning for filenames with glob characters.
PATH
This variable is set to $RPMREBUILD_PLUGINS_DIR:$PATH
LONG_OPTION
Contains long option (without --) which was used to invoke plugin.
RPM_BUILD_ROOT
For plugins modifying files under buildroot set to buildroot. For other plugins - empty.
stdin and stdout
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 :
demofiles.plug (change-files) : a "dummy" plugin to show what can be done with a file plugin
demo.plug (change-spec-*) : a "dummy" plugin to show how spec plugins work
uniq.plug (change-spec) : a very simple "real" plugin to sort and clean duplicate spec lines
file2pacDep.plug (change-spec-requires) : a "real" plugin to convert file dependencies to package dependencies
nodoc.plug (change-spec-files): a "real" plugin to remove documentation from a package
set_tag.plug (change-spec-preamble) : a "real" plugin to change a tag in spec file
unset_tag.plug (change-spec-preamble) : a "real" plugin to comment a tag in spec file

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 <gerbier [at] users.sourceforge.net>
Valery Reznic <valery_reznic [at] users.sourceforge.net>

See <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