1rpmrebuild(1)                      rpm tools                     rpmrebuild(1)
2
3
4

NAME

6       rpmrebuild - a tool to build an rpm package from an installed package
7
8

SYNOPSIS

10       rpmrebuild [option] <packagename>
11
12

DESCRIPTION

14       rpmrebuild  is  a  tool to build easily rpm package.  it can be used to
15       build an rpm file from an installed package (lost rpm)  or  to  quickly
16       make  change to a package: just have your change on installed files and
17       call rpmrebuild.
18
19

OPTIONS

21       -5  --md5-compat-digest
22              use rpm 4.4 compatible digest (md5)
23
24       -a, --additional=<flags>
25              pass additional flags to rpmbuild
26
27       -b, --batch
28              work in batch mode (no interactive query if files change)
29
30       --cap-from-db (default)
31              set files posix capabilities as saved in rpm database
32
33       --cap-from-fs
34              set files posix capabilities as installed files (do not force to
35              original capabilities, saved in rpm database)
36
37       -c, --comment-missing=<yes|no>
38              comment out in the specfile missing files. Default: no.
39
40       -D, --define=<defines>
41              defines to be passed to rpmbuild.
42
43       -d, --directory=<directory>
44              rpm package result will be written in directory.
45
46       -e, --edit-spec
47              alias to --edit-whole.
48
49       -f, --filter=<command>
50              alias for --change-spec-whole
51
52       -h, --help
53              output help information about all, but plugins option and exit.
54
55       --help-plugins
56              output help information about plugins options and exit.
57
58       -i, --include=<file>
59              read more options from the file 'file'.
60
61       -I, --install>
62              install the created package
63
64       -k, --keep-perm
65              alias to --pug-from-fs
66
67       -l, --list-plugin
68              list installed plugins
69
70       -m, --modify=<command>
71              alias to --change-files
72
73       -n, --notest-install
74              do not test install at end of rpm building
75
76       -p, --package
77              use  package  file, not installed rpm (this option is like rpm's
78              -p option)
79
80       --pug-from-db (default)
81              set files permission, uid and gid as saved in rpm database
82
83       --pug-from-fs
84              keep installed files permission, uid and gid (do  not  force  to
85              original files permission, uid and gid saved in rpm database)
86
87       -P, --autoprovide
88              use rpm scripts to compute provides
89
90       -R, --autorequire
91              use rpm scripts to compute requires
92
93       -r, --release=<version>
94              specify a release
95
96       -s, --spec-only=<specfile>
97              do  not  rebuild package, only generate specfile.  Can't be used
98              with --change-files.
99
100       -v, --verbose
101              verbose output
102
103       --debug
104              for debugging purposes : do not remove temporary files at end of
105              work
106
107       -V, --version
108              output version information and exit.
109
110       -w, --warning
111              display  some  warnings  if  it detects a potential problem (for
112              example, spec file which contains filename with globbing char).
113
114       -y, --verify=<yes|no>
115              Turn on/off package verifying before processing.  Default:  yes.
116              Can be turn off to get better performance.
117
118       PLUGINS OPTION
119
120       rpmrebuild  use  may be extended with plugins.  Plugins are searched in
121       /usr/lib/rpmrebuild/plugins and then in $PATH
122
123       --change-files=<command>
124              Invoke plugin which change package's  files.  Note,  that  these
125              files  are copied before to the temporary location, so installed
126              package's files not changed.
127              Can't be used with --spec-only
128
129       --change-spec-whole=<command>
130       --edit-whole
131              Invoke plugin or editor to change specfile.
132
133       --change-spec-preamble=<command>
134       --edit-preamble
135
136       --change-spec-conflicts=<command>
137       --edit-conflicts
138
139       --change-spec-obsoletes=<command>
140       --edit-obsoletes
141
142       --change-spec-provides=<command>
143       --edit-provides
144
145       --change-spec-requires=<command>
146       --edit-requires
147
148       --change-spec-suggests=<command>
149       --edit-suggests
150
151       --change-spec-enhances=<command>
152       --edit-enhances
153
154       --change-spec-description=<command>
155       --edit-description
156
157       --change-spec-files=<command>
158       --edit-files
159
160       --change-spec-triggers=<command>
161       --edit-triggers
162
163       --change-spec-pre=<command>
164       --edit-pre
165
166       --change-spec-post=<command>
167       --edit-post
168
169       --change-spec-preun=<command>
170       --edit-preun
171
172       --change-spec-postun=<command>
173       --edit-postun
174
175       --change-spec-pretrans=<command>
176       --edit-postrans
177
178       --change-spec-postrans=<command>
179       --edit-postrans
180
181       --change-spec-verifyscript=<command>
182       --edit-verifyscript
183
184       --change-spec-changelog=<command>
185       --edit-changelog
186
187              Invoke plugin or editor to  change  preamble,  conflicts,  obso‐
188              letes,  provides, requires, description, files, triggers, prein‐
189              stall, postinstall, preuninstall, postuninstall, verifyscript or
190              changelog.
191              None of these options can be specified after --change-spec-whole
192              or --edit-whole.
193
194

INCLUDE FILES

196       Any of the rpmrebuild's LONG option can be  specified  on  the  command
197       line or in the include file (file specified with -i/--include option).
198
199       Include  files  are  also  searched  in the /usr/lib/rpmrebuild/plugins
200       directory.
201
202       Include file has following syntax.
203
204       comments
205              Any line begin with '#' or some number of whitespace and '#'.
206
207       empty line
208              empty line are ignored.
209
210       option line
211              option line is very similar to the option written on the command
212              line.  the limitation of the option line in the file are:
213
214              long option
215                     should be used ONLY long options WITHOUT leading --.
216
217              option's argument
218                     option's argument should not be quoted.
219
220              separator
221                     option's argument should be separated from option by spa‐
222                     ces or tabs, not by equal ('=') sign.
223
224              non-optional argument(s)
225                     package name (non-optional argument) shouldn't be  speci‐
226                     fied in the include file.
227
228       For example, if command line looks like:
229              rpmrebuild  --change-files="pgm1  a b c" --change-spec-pre="pgm2
230              bb" pkg
231
232       Then include file should be written like:
233              change-files    pgm1 a b c
234              change-spec-pre pgm2 bb
235
236

FILES

238       ~/.rpmmacros
239              is used by rpm when building packages (macros)
240
241       $RPMREBUILD_TMPDIR/work
242              directory where rpmrebuild put temporary files.
243
244

ENVIRONMENT

246       RPMREBUILD_TMPDIR
247              Directory for temporal files. If not set ~/.tmp/rpmrebuild.$$ is
248              used.
249
250       RPMREBUILD_OPTS
251              This  is  another way to pass options to rpmrebuild (to use with
252              care). It allows to change the default options on  a  host.  For
253              example  to  activate  the  un_prelink  plugin,  just set RPMRE‐
254              BUILD_OPTS="--include un_prelink.plug"
255
256       VISUAL used to specify an editor for specfile. if not set EDITOR  vari‐
257              able examined.
258
259       EDITOR used to specify an editor for specfile. if not set vi used.
260
261

EXAMPLES

263       Build an rpm package as closed as possible to original one:
264
265       rpmrebuild --batch package
266
267       Build a modified package:
268
269       rpmrebuild --keep-perm package
270
271       Build a rpm from another rpm file:
272
273       rpmrebuild   --package   --filter   filter   /usr/src/redhat/i386/pack‐
274       age-i386.rpm
275
276       rebuild and sign the bash package
277
278       rpmrebuild --additional "--sign" bash
279
280       Rebuild rpm as legacy (rpm[23]) package:
281
282       rpmrebuild --additional "--nodirtokens" bash
283
284       Specify generated rpm name:
285
286       rpmrebuild --define "_rpmfilename %%{NAME}.rpm" bash
287
288       Change package interactive
289
290       rpmrebuild --package --change-files "/bin/bash" /some/place/bash.rpm
291
292       Change package non-interactive
293
294       rpmrebuild --package --change-files "a.sh && b.sh" /some/place/bash.rpm
295
296       if you have problem with rpm building, and if you know specfile syntax,
297       you can also edit it:
298
299       rpmrebuild  --edit-whole package
300
301       batch change of version tag
302
303       rpmrebuild    --change-spec-preamble='sed   -e  "s/^Version:.*/Version:
304       YourVersion/"' YourPackage
305
306

AUTHORS

308       Eric Gerbier <gerbier@users.sourceforge.net>
309       Valery Reznic <valery_reznic@users.sourceforge.net>
310
311       See <URL:http://rpmrebuild.sourceforge.net/>.
312
313

NOTES

315       rpmrebuild can not reproduce exactly a package, so
316              - md5 checksum will not match original ones.
317              - gpg or pgp signatures are lost
318
319       packages which contains file with globbing characters (* ..  ?  )  will
320       not build
321
322
324       rpmrebuild is copyright (C) 2002 by Eric Gerbier.
325       this program is distributed under GNU General Public License
326       It is provided "as is", without any express or implied warranties.
327       See the file COPYING for details.
328
329

SEE ALSO

331       rpm(8),  rpmbuild(8),  rpmrebuild_plugins(1),  'man -k rrp' for plugins
332       specific manpages.
333
334
335
336Eric Gerbier                         2.11                        rpmrebuild(1)
Impressum