1rpmrebuild(1) rpm tools rpmrebuild(1)
2
3
4
6 rpmrebuild - a tool to build an rpm package from an installed package
7
8
10 rpmrebuild [option] <packagename>
11
12
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
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. you need to run rpmrebuild as root
63 user.
64
65 -k, --keep-perm
66 alias to --pug-from-fs
67
68 -l, --list-plugin
69 list installed plugins
70
71 -m, --modify=<command>
72 alias to --change-files
73
74 -n, --notest-install
75 do not test install at end of rpm building
76
77 -p, --package
78 use package file, not installed rpm (this option is like rpm's
79 -p option)
80
81 --pug-from-db (default)
82 set files permission, uid and gid as saved in rpm database
83
84 --pug-from-fs
85 keep installed files permission, uid and gid (do not force to
86 original files permission, uid and gid saved in rpm database)
87
88 -P, --autoprovide
89 use rpm scripts to compute provides
90
91 -R, --autorequire
92 use rpm scripts to compute requires
93
94 -r, --release=<version>
95 specify a release
96
97 -s, --spec-only=<specfile>
98 do not rebuild package, only generate specfile. Can't be used
99 with --change-files.
100
101 -v, --verbose
102 verbose output
103
104 --debug
105 for debugging purposes : do not remove temporary files at end of
106 work. also force verbose mode
107
108 -V, --version
109 output version information and exit.
110
111 -w, --warning
112 display some warnings if it detects a potential problem (for ex‐
113 ample, spec file which contains filename with globbing char).
114
115 -y, --verify=<yes|no>
116 Turn on/off package verifying before processing. Default: yes.
117 Can be turn off to get better performance.
118
119 PLUGINS OPTION
120
121 rpmrebuild use may be extended with plugins. Plugins are searched in
122 /usr/lib/rpmrebuild/plugins and then in $PATH
123
124 --change-files=<command>
125 Invoke plugin which change package's files. Note, that these
126 files are copied before to the temporary location, so installed
127 package's files not changed.
128 Can't be used with --spec-only
129
130 --change-spec-whole=<command>
131 --edit-whole
132 Invoke plugin or editor to change specfile.
133
134 --change-spec-preamble=<command>
135 --edit-preamble
136
137 --change-spec-conflicts=<command>
138 --edit-conflicts
139
140 --change-spec-obsoletes=<command>
141 --edit-obsoletes
142
143 --change-spec-provides=<command>
144 --edit-provides
145
146 --change-spec-requires=<command>
147 --edit-requires
148
149 --change-spec-suggests=<command>
150 --edit-suggests
151
152 --change-spec-enhances=<command>
153 --edit-enhances
154
155 --change-spec-recommends=<command>
156 --edit-recommends
157
158 --change-spec-supplements=<command>
159 --edit-supplements
160
161 --change-spec-description=<command>
162 --edit-description
163
164 --change-spec-files=<command>
165 --edit-files
166
167 --change-spec-triggers=<command>
168 --edit-triggers
169
170 --change-spec-pre=<command>
171 --edit-pre
172
173 --change-spec-post=<command>
174 --edit-post
175
176 --change-spec-preun=<command>
177 --edit-preun
178
179 --change-spec-postun=<command>
180 --edit-postun
181
182 --change-spec-pretrans=<command>
183 --edit-pretrans
184
185 --change-spec-postrans=<command>
186 --edit-postrans
187
188 --change-spec-verifyscript=<command>
189 --edit-verifyscript
190
191 --change-spec-changelog=<command>
192 --edit-changelog
193
194 Invoke plugin or editor to change preamble, conflicts, obso‐
195 letes, provides, requires, description, files, triggers, prein‐
196 stall, postinstall, preuninstall, postuninstall, verifyscript or
197 changelog.
198 None of these options can be specified after --change-spec-whole
199 or --edit-whole.
200
201
203 Any of the rpmrebuild's LONG option can be specified on the command
204 line or in the include file (file specified with -i/--include option).
205
206 Include files are also searched in the /usr/lib/rpmrebuild/plugins di‐
207 rectory.
208
209 Include file has following syntax.
210
211 comments
212 Any line begin with '#' or some number of whitespace and '#'.
213
214 empty line
215 empty line are ignored.
216
217 option line
218 option line is very similar to the option written on the command
219 line. the limitation of the option line in the file are:
220
221 long option
222 should be used ONLY long options WITHOUT leading --.
223
224 option's argument
225 option's argument should not be quoted.
226
227 separator
228 option's argument should be separated from option by spa‐
229 ces or tabs, not by equal ('=') sign.
230
231 non-optional argument(s)
232 package name (non-optional argument) shouldn't be speci‐
233 fied in the include file.
234
235 For example, if command line looks like:
236 rpmrebuild --change-files="pgm1 a b c" --change-spec-pre="pgm2
237 bb" pkg
238
239 Then include file should be written like:
240 change-files pgm1 a b c
241 change-spec-pre pgm2 bb
242
243
245 ~/.rpmmacros
246 is used by rpm when building packages (macros)
247
248 $RPMREBUILD_TMPDIR/work
249 directory where rpmrebuild put temporary files.
250
251
253 RPMREBUILD_TMPDIR
254 Directory for temporal files. If not set ~/.tmp/rpmrebuild.$$ is
255 used.
256
257 RPMREBUILD_OPTS
258 This is another way to pass options to rpmrebuild (to use with
259 care). It allows to change the default options on a host. For
260 example to activate the un_prelink plugin, just set RPMRE‐
261 BUILD_OPTS="--include un_prelink.plug"
262
263 VISUAL used to specify an editor for specfile. if not set EDITOR vari‐
264 able examined.
265
266 EDITOR used to specify an editor for specfile. if not set vi used.
267
268
270 Build an rpm package as closed as possible to original one:
271
272 rpmrebuild --batch package
273
274 Build a modified package:
275
276 rpmrebuild --keep-perm package
277
278 Build a rpm from another rpm file:
279
280 rpmrebuild --package --filter filter /usr/src/redhat/i386/pack‐
281 age-i386.rpm
282
283 rebuild and sign the bash package
284
285 rpmrebuild --additional "--sign" bash
286
287 Rebuild rpm as legacy (rpm[23]) package:
288
289 rpmrebuild --additional "--nodirtokens" bash
290
291 Specify generated rpm name:
292
293 rpmrebuild --define "_rpmfilename %%{NAME}.rpm" bash
294
295 Change package interactive
296
297 rpmrebuild --package --change-files "/bin/bash" /some/place/bash.rpm
298
299 Change package non-interactive
300
301 rpmrebuild --package --change-files "a.sh && b.sh" /some/place/bash.rpm
302
303 if you have problem with rpm building, and if you know specfile syntax,
304 you can also edit it:
305
306 rpmrebuild --edit-whole package
307
308 batch change of version tag
309
310 rpmrebuild --change-spec-preamble='sed -e "s/^Version:.*/Version:
311 YourVersion/"' YourPackage
312
313
315 Eric Gerbier <eric.gerbier@tutanota.com>
316 Valery Reznic <valery_reznic@users.sourceforge.net>
317
318 See <URL:http://rpmrebuild.sourceforge.net/>.
319
320
322 rpmrebuild can not reproduce exactly a package, so
323 - md5 checksum will not match original ones.
324 - gpg or pgp signatures are lost
325
326 packages which contains file with globbing characters (* .. ? ) will
327 not build
328
329
331 rpmrebuild is copyright (C) 2002 by Eric Gerbier.
332 this program is distributed under GNU General Public License
333 It is provided "as is", without any express or implied warranties.
334 See the file COPYING for details.
335
336
338 rpm(8), rpmbuild(8), rpmrebuild_plugins(1), 'man -k rrp' for plugins
339 specific manpages.
340
341
342
343Eric Gerbier 2.17 rpmrebuild(1)