1rpmrebuild(1) rpm tools rpmrebuild(1)
2
3
4
6 rpmrebuild - a tool to build an rpm package from an installed package
7
9 rpmrebuild [option] <packagename>
10
12 rpmrebuild is a tool to build easily rpm package. it can be used to
13 build an rpm file from an installed package (lost rpm) or to quickly
14 make change to a package: just have your change on installed files and
15 call rpmrebuild.
16
18 -a, --additional=<flags>
19 pass additional flags to rpmbuild
20
21 -b, --batch
22 work in batch mode (no interactive query if files change)
23
24 -c, --comment-missing=<yes|no>
25 comment out in the specfile missing files. Default: no.
26
27 -D, --define=<defines>
28 defines to be passed to rpmbuild.
29
30 -d, --directory=<directory>
31 rpm package result will be written in directory.
32
33 -e, --edit-spec
34 alias to --edit-whole.
35
36 -f, --filter=<command>
37 alias for --change-spec-whole
38
39 -h, --help
40 output help information about all, but plugins option and exit.
41
42 --help-plugins
43 output help information about plugins options and exit.
44
45 -i, --include=<file>
46 read more options from the file 'file'.
47
48 -k, --keep-perm
49 alias to --pug-from-fs
50
51 -m, --modify=<command>
52 alias to --change-files
53
54 -n, --notest-install
55 do not test install at end of rpm building
56
57 -p, --package
58 use package file, not installed rpm (this option is like rpm's
59 -p option)
60
61 --pug-from-db (default)
62 set files permission, uid and gid as saved in rpm database
63
64 --pug-from-fs
65 keep installed files permission, uid and gid (do not force to
66 original files permission, uid and gid saved in rpm database)
67
68 -P, --autoprovide
69 use rpm scripts to compute provides
70
71 -R, --autorequire
72 use rpm scripts to compute requires
73
74 -r, --release=<version>
75 specify a release
76
77 -s, --spec-only=<specfile>
78 do not rebuild package, only generate specfile. Can't be used
79 with --change-files.
80
81 -v, --verbose
82 verbose output
83
84 --debug
85 for debugging purposes : do not remove temporary files at end of
86 work
87
88 -V, --version
89 output version information and exit.
90
91 -w, --warning
92 display some warnings if it detects a potential problem (for
93 example, spec file which contains filename with globbing char).
94
95 -y, --verify=<yes|no>
96 Turn on/off package verifying before processing. Default: yes.
97 Can be turn off to get better performance.
98
99 PLUGINS OPTION
100
101 rpmrebuild use may be extended with plugins. Plugins are searched in
102 /usr/lib/rpmrebuild/plugins and then in $PATH
103
104 --change-files=<command>
105 Invoke plugin which change package's files. Note, that these
106 files are copied before to the temporary location, so installed
107 package's files not changed.
108 Can't be used with --spec-only
109
110 --change-spec-whole=<command>
111 --edit-whole
112 Invoke plugin or editor to change specfile.
113
114 --change-spec-preamble=<command>
115 --edit-preamble
116
117 --change-spec-conflicts=<command>
118 --edit-conflicts
119
120 --change-spec-obsoletes=<command>
121 --edit-obsoletes
122
123 --change-spec-provides=<command>
124 --edit-provides
125
126 --change-spec-requires=<command>
127 --edit-requires
128
129 --change-spec-description=<command>
130 --edit-description
131
132 --change-spec-files=<command>
133 --edit-files
134
135 --change-spec-triggers=<command>
136 --edit-triggers
137
138 --change-spec-pre=<command>
139 --edit-pre
140
141 --change-spec-post=<command>
142 --edit-post
143
144 --change-spec-preun=<command>
145 --edit-preun
146
147 --change-spec-postun=<command>
148 --edit-postun
149
150 --change-spec-verifyscript=<command>
151 --edit-verifyscript
152
153 --change-spec-changelog=<command>
154 --edit-changelog
155
156 Invoke plugin or editor to change preamble, conflicts, obso‐
157 letes, provides, requires, description, files, triggers, prein‐
158 stall, postinstall, preuninstall, postuninstall, verifyscript or
159 changelog.
160 None of these options can be specified after --change-spec-whole
161 or --edit-whole.
162
164 Any of the rpmrebuild's LONG option can be specified on the command
165 line or in the include file (file specified with -i/--include option).
166
167 Include files are also searched in the /usr/lib/rpmrebuild/plugins
168 directory.
169
170 Include file has following syntax.
171
172 comments
173 Any line begin with '#' or some number of whitespace and '#'.
174
175 empty line
176 empty line are ignored.
177
178 option line
179 option line is very similar to the option written on the command
180 line. the limitation of the option line in the file are:
181
182 long option
183 should be used ONLY long options WITHOUT leading --.
184
185 option's argument
186 option's argument should not be quoted.
187
188 separator
189 option's argument should be separated from option by spa‐
190 ces or tabs, not by equal ('=') sign.
191
192 non-optional argument(s)
193 package name (non-optional argument) shouldn't be speci‐
194 fied in the include file.
195
196 For example, if command line looks like:
197 rpmrebuild --change-files="pgm1 a b c" --change-spec-pre="pgm2
198 bb" pkg
199
200 Then include file should be written like:
201 change-files pgm1 a b c
202 change-spec-pre pgm2 bb
203
205 ~/.rpmmacros
206 is used by rpm when building packages (macros)
207
208 $RPMREBUILD_TMPDIR/work
209 directory where rpmrebuild put temporary files.
210
212 RPMREBUILD_TMPDIR
213 Directory for temporal files. If not set ~/.tmp/rpmrebuild.$$ is
214 used.
215
216 VISUAL used to specify an editor for specfile. if not set EDITOR vari‐
217 able examined.
218
219 EDITOR used to specify an editor for specfile. if not set vi used.
220
222 Build an rpm package as closed as possible to original one:
223
224 rpmrebuild --batch package
225
226 Build a modified package:
227
228 rpmrebuild --keep-perm package
229
230 Build a rpm from another rpm file:
231
232 rpmrebuild --package --filter filter /usr/src/redhat/i386/pack‐
233 age-i386.rpm
234
235 rebuild and sign the bash package
236
237 rpmrebuild --additional "--sign" bash
238
239 Rebuild rpm as legacy (rpm[23]) package:
240
241 rpmrebuild --additional "--nodirtokens" bash
242
243 Specify generated rpm name:
244
245 rpmrebuild --define "_rpmfilename %%{NAME}.rpm" bash
246
247 Change package interactive
248
249 rpmrebuild --package --change-files "/bin/bash" /some/place/bash.rpm
250
251 Change package non-interactive
252
253 rpmrebuild --package --change-files "a.sh && b.sh" /some/place/bash.rpm
254
255 if you have problem with rpm building, and if you know specfile syntax,
256 you can also edit it:
257
258 rpmrebuild --edit-whole package
259
260 batch change of version tag
261
262 rpmrebuild --change-spec-preamble='sed -e "s/^Version:.*/Version:
263 YourVersion/"' YourPackage
264
266 Eric Gerbier <gerbier@users.sourceforge.net>
267 Valery Reznic <valery_reznic@users.sourceforge.net>
268
269 See <URL:http://rpmrebuild.sourceforge.net/>.
270
272 rpmrebuild can not reproduce exactly a package, so
273 - md5 checksum will not match original ones.
274 - gpg or pgp signatures are lost
275
276
277 packages which contains file with globbing characters (* .. ? ) will
278 not build
279
281 rpmrebuild is copyright (C) 2002 by Eric Gerbier.
282 this program is distributed under GNU General Public License
283 It is provided "as is", without any express or implied warranties.
284 See the file COPYING for details.
285
287 rpm(8), rpmbuild(8), rpmrebuild_plugins(1), 'man -k rrp' for plugins
288 specific manpages.
289
290
291
292
293Eric Gerbier 2.4 rpmrebuild(1)