rpmrebuild
Section: rpm tools (1)
Updated: 2.11
Index
Return to Main Contents
NAME
rpmrebuild - a tool to build an rpm package from an installed package
SYNOPSIS
rpmrebuild [option] <packagename>
DESCRIPTION
rpmrebuild is a tool to build easily rpm package.
it can be used to build an rpm file from an installed package (lost rpm) or
to quickly make change to a package:
just have your change on installed files and call rpmrebuild.
OPTIONS
- -5 --md5-compat-digest
-
use rpm 4.4 compatible digest (md5)
- -a, --additional=<flags>
-
pass additional flags to rpmbuild
- -b, --batch
-
work in batch mode (no interactive query if files change)
- --cap-from-db (default)
-
set files posix capabilities as saved in rpm database
- --cap-from-fs
-
set files posix capabilities as installed files
(do not force to original capabilities, saved in rpm database)
- -c, --comment-missing=<yes|no>
-
comment out in the specfile missing files. Default: no.
- -D, --define=<defines>
-
defines to be passed to rpmbuild.
- -d, --directory=<directory>
-
rpm package result will be written in directory.
- -e, --edit-spec
-
alias to --edit-whole.
- -f, --filter=<command>
-
alias for --change-spec-whole
- -h, --help
-
output help information about all, but plugins option and exit.
- --help-plugins
-
output help information about plugins options and exit.
- -i, --include=<file>
-
read more options from the file 'file'.
- -I, --install
-
install the created package. you need to run rpmrebuild as root user.
- -k, --keep-perm
-
alias to --pug-from-fs
- -l, --list-plugin
-
list installed plugins
- -m, --modify=<command>
-
alias to --change-files
- -n, --notest-install
-
do not test install at end of rpm building
- -p, --package
-
use package file, not installed rpm (this option is like rpm's -p option)
- --pug-from-db (default)
-
set files permission, uid and gid as saved in rpm database
- --pug-from-fs
-
keep installed files permission, uid and gid
(do not force to original files permission, uid and gid saved in rpm database)
- -P, --autoprovide
-
use rpm scripts to compute provides
- -R, --autorequire
-
use rpm scripts to compute requires
- -r, --release=<version>
-
specify a release
- -s, --spec-only=<specfile>
-
do not rebuild package, only generate specfile.
Can't be used with --change-files.
- -v, --verbose
-
verbose output
- --debug
-
for debugging purposes : do not remove temporary files at end of work
- -V, --version
-
output version information and exit.
- -w, --warning
-
display some warnings if it detects a potential problem
(for example, spec file which contains filename with globbing char).
- -y, --verify=<yes|no>
-
Turn on/off package verifying before processing.
Default: yes. Can be turn off to get better performance.
PLUGINS OPTION
rpmrebuild use may be extended with plugins.
Plugins are searched in /usr/lib/rpmrebuild/plugins and then in $PATH
- --change-files=<command>
-
Invoke plugin which change package's files. Note, that these files are copied
before to the temporary location, so installed package's files not changed.
Can't be used with --spec-only
--change-spec-whole=<command>
--edit-whole
-
Invoke plugin or editor to change specfile.
--change-spec-preamble=<command>
--edit-preamble
--change-spec-conflicts=<command>
--edit-conflicts
--change-spec-obsoletes=<command>
--edit-obsoletes
--change-spec-provides=<command>
--edit-provides
--change-spec-requires=<command>
--edit-requires
--change-spec-suggests=<command>
--edit-suggests
--change-spec-enhances=<command>
--edit-enhances
--change-spec-description=<command>
--edit-description
--change-spec-files=<command>
--edit-files
--change-spec-triggers=<command>
--edit-triggers
--change-spec-pre=<command>
--edit-pre
--change-spec-post=<command>
--edit-post
--change-spec-preun=<command>
--edit-preun
--change-spec-postun=<command>
--edit-postun
--change-spec-pretrans=<command>
--edit-pretrans
--change-spec-postrans=<command>
--edit-postrans
--change-spec-verifyscript=<command>
--edit-verifyscript
--change-spec-changelog=<command>
--edit-changelog
-
Invoke plugin or editor to change preamble, conflicts, obsoletes, provides,
requires, description, files, triggers, preinstall, postinstall, preuninstall,
postuninstall, verifyscript or changelog.
None of these options can be specified after --change-spec-whole
or --edit-whole.
INCLUDE FILES
Any of the rpmrebuild's LONG option can be specified on the command line or
in the include file (file specified with -i/--include option).
Include files are also searched in the /usr/lib/rpmrebuild/plugins directory.
Include file has following syntax.
- comments
-
Any line begin with '#' or some number of whitespace and '#'.
- empty line
-
empty line are ignored.
- option line
-
option line is very similar to the option written on the command line.
the limitation of the option line in the file are:
-
- long option
-
should be used ONLY long options WITHOUT leading --.
- option's argument
-
option's argument should not be quoted.
- separator
-
option's argument should be separated from option by spaces or tabs, not by
equal ('=') sign.
- non-optional argument(s)
-
package name (non-optional argument) shouldn't be specified in the include file.
For example, if command line looks like:
-
rpmrebuild --change-files="pgm1 a b c" --change-spec-pre="pgm2 bb" pkg
Then include file should be written like:
-
change-files pgm1 a b c
change-spec-pre pgm2 bb
FILES
- ~/.rpmmacros
-
is used by rpm when building packages (macros)
- $RPMREBUILD_TMPDIR/work
-
directory where rpmrebuild put temporary files.
ENVIRONMENT
- RPMREBUILD_TMPDIR
-
Directory for temporal files. If not set ~/.tmp/rpmrebuild.$$ is used.
- RPMREBUILD_OPTS
-
This is another way to pass options to rpmrebuild (to use with care). It allows to change
the default options on a host. For example to activate the un_prelink plugin,
just set RPMREBUILD_OPTS="--include un_prelink.plug"
- VISUAL
-
used to specify an editor for specfile. if not set EDITOR variable examined.
- EDITOR
-
used to specify an editor for specfile. if not set vi used.
EXAMPLES
Build an rpm package as closed as possible to original one:
rpmrebuild --batch package
Build a modified package:
rpmrebuild --keep-perm package
Build a rpm from another rpm file:
rpmrebuild --package --filter filter /usr/src/redhat/i386/package-i386.rpm
rebuild and sign the bash package
rpmrebuild --additional "--sign" bash
Rebuild rpm as legacy (rpm[23]) package:
rpmrebuild --additional "--nodirtokens" bash
Specify generated rpm name:
rpmrebuild --define "_rpmfilename %%{NAME}.rpm" bash
Change package interactive
rpmrebuild --package --change-files "/bin/bash" /some/place/bash.rpm
Change package non-interactive
rpmrebuild --package --change-files "a.sh && b.sh" /some/place/bash.rpm
if you have problem with rpm building, and if you know specfile syntax, you can also edit it:
rpmrebuild --edit-whole package
batch change of version tag
rpmrebuild --change-spec-preamble='sed -e "s/^Version:.*/Version: YourVersion/"' YourPackage
AUTHORS
Eric Gerbier <gerbier@users.sourceforge.net>
Valery Reznic <valery_reznic@users.sourceforge.net>
- See <URL:http://rpmrebuild.sourceforge.net/>.
-
NOTES
- rpmrebuild can not reproduce exactly a package, so
-
- md5 checksum will not match original ones.
- gpg or pgp signatures are lost
- packages which contains file with globbing characters (* .. ? ) will not build
-
COPYRIGHT
rpmrebuild is copyright (C) 2002 by Eric Gerbier.
this program is distributed under GNU General Public License
It is provided "as is", without any express or implied
warranties.
See the file COPYING for details.
SEE ALSO
rpm(8), rpmbuild(8), rpmrebuild_plugins(1), 'man -k rrp' for plugins specific manpages.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- INCLUDE FILES
-
- FILES
-
- ENVIRONMENT
-
- EXAMPLES
-
- AUTHORS
-
- NOTES
-
- COPYRIGHT
-
- SEE ALSO
-
This document was created by