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

NAME

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

SYNOPSIS

9       rpmrebuild [option] <packagename>
10       or
11       rpm --rpmrebuild [option] <packagename>
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

OPTIONS

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

INCLUDE FILES

166       Any  of  the  rpmrebuild's  LONG option can be specified on the command
167       line or in the include file (file specified with -i/--include option).
168
169       Include files are searched in  the  /usr/lib/rpmrebuild/plugins  direc‐
170       tory.
171
172       Include file has following syntax.
173
174       comments
175              Any line begin with '#' or some number of whitespace and '#'.
176
177       empty line
178              empty line are ignored.
179
180       option line
181              option line is very similar to the option written on the command
182              line.  the limitation of the option line in the file are:
183
184              long option
185                     should be used ONLY long options WITHOUT leading --.
186
187              option's argument
188                     option's argument should not be quoted.
189
190              separator
191                     - option's argument should be separated  from  option  by
192                     spaces or tabs, not by equal ('=') sign.
193
194              non-optional argument(s)
195                     package  name (non-optional argument) shouldn't be speci‐
196                     fied in the include file.
197
198       For example, if command line looks like:
199              rpmrebuild --change-files="pgm1 a b  c"  --change-spec-pre="pgm2
200              bb" pkg
201
202       Then include file should be written like:
203              change-files    pgm1 a b c
204              change-spec-pre pgm2 bb
205

FILES

207       ~/.rpmmacros
208              is used by rpm when building packages (macros)
209
210       /etc/popt
211              contains rpm alias used by rpmrebuild
212
213       $RPMREBUILD_TMPDIR/work
214              directory where rpmrebuild put temporary files.
215

ENVIRONMENT

217       RPMREBUILD_TMPDIR
218              Directory for temporal files. If not set ~/.tmp/rpmrebuild.$$ is
219              used.
220
221       VISUAL used to specify an editor for specfile. if not set EDITOR  vari‐
222              able examined.
223
224       EDITOR used to specify an editor for specfile. if not set vi used.
225

EXAMPLES

227       Build an rpm package as closed as possible to original one:
228
229       rpm --rpmrebuild --batch package
230
231       Build a modified package:
232
233       rpm --rpmrebuild --keep-perm package
234
235       Build a rpm from another rpm file:
236
237       rpm  --rpmrebuild  --package --filter filter /usr/src/redhat/i386/pack‐
238       age-i386.rpm
239
240       Rebuild rpm as legacy (rpm[23]) package:
241
242       rpm --rpmrebuild --additional "--nodirtokens" bash
243
244       Specify generated rpm name:
245
246       rpm --rpmrebuild --define "_rpmfilename %%{NAME}.rpm" bash
247
248       Change package interactive
249
250       rpm     --rpmrebuild     --package      --change-files      "/bin/bash"
251       /some/place/bash.rpm
252
253       Change package non-interactive
254
255       rpm    --rpmrebuild    --package    --change-files   "a.sh   &&   b.sh"
256       /some/place/bash.rpm
257
258       if you have problem with rpm building, and if you know specfile syntax,
259       you can also edit it:
260
261       rpm --rpmrebuild  --edit-whole package
262

AUTHORS

264       Eric Gerbier <gerbier@users.sourceforge.net>
265       Valery Reznic <valery_reznic@users.sourceforge.net>
266
267       See <URL:http://rpmrebuild.sourceforge.net/>.
268

NOTES

270       rpmrebuild can not reproduce exactly a package, so
271              - md5 checksum will not match original ones.
272              - gpg or pgp signatures are lost
273
274
275       packages  which  contains  file with globbing characters (* .. ? ) will
276       not build
277
279       rpmrebuild is copyright (C) 2002 by Eric Gerbier.
280       this program is distributed under GNU General Public License
281       It is provided "as is", without any express or implied warranties.
282       See the file COPYING for details.
283

SEE ALSO

285       rpm(8), rpmbuild(8), rpmrebuild_plugins(1), 'man -k  rrp'  for  plugins
286       specific manpages.
287
288
289
290
291Eric Gerbier                         2.1.1                       rpmrebuild(1)
Impressum