1fedora-review(1) General Commands Manual fedora-review(1)
2
3
4
6 fedora-review - Customized review template for Fedora packages
7
8
10 fedora-review [options] -b <bug>
11 fedora-review [options] [--prebuilt] -n <package name>
12 fedora-review [options] [--prebuilt] -rn <srpm path>
13 fedora-review [options] -u <url>
14
15
17 Makes reviews of rpm packages for Fedora easier by providing a custom‐
18 ized review template, automating some trivial tasks. The tool runs a
19 number of checks to test whether a package complies to the Fedora Pack‐
20 aging Guidelines before creating the template. Through a bash API the
21 checks can be extended. We have at the moment checks for C/C++, R, Java
22 and Perl packages.
23
24
26 Basic usage:
27
28 $ fedora-review -b <bug number>
29 $ fedora-review -u <url>
30
31 Will download the SPEC & SRPM files from the Bugzilla report, build
32 them in mock, run a number of tests and generate a template.
33
34 Not all bugzillas support the -b option. The -u option is available for
35 these. See --url usage notes below.
36
37 $ fedora-review -n <package name>
38
39 This alternative usage expects <package name>.spec and source rpm in
40 current directory. By adding the -p switch, fedora-review uses already
41 built rpms in current directory instead of building using mock.
42
43 $ fedora-review --rpm-spec -n <srpm path>
44
45 This form accepts a single path to a source rpm. It uses the specfile
46 bundled in the srpm package.
47
48 You will need to have mock installed and be member of the mock group
49 for the build to work. Run as root:
50
51 # usermod -a -G mock [your user name]
52
53 After this, you will need to logout and login again (or use newgrp(1))
54 - the changes in user's group list is not read until a new login.
55
57 -b, --bug <bug nr>
58 Run against Fedora bugzilla at bugzilla.redhat.com, using the
59 bugzilla bug number
60
61 --copr-build <build_descriptor>
62 Run against COPR build identified by its ID, frontend build uri, or
63 backend build chroot uri. Checks for overall build success and
64 looks up rawhide build results of the client machine arch. Implies
65 --prebuilt.
66
67 -n, --name <name>
68 Runs the checks against the named spec and source rpm located in
69 the current working directory. The files are expected to have the
70 names <name>.spec and <name>*.src.rpm. When used together with
71 --rpm-spec/-r, name can also be a complete path to a source rpm.
72
73 -u url, --url <url>
74 Fetch data from given url, typically another bugzilla instance such
75 as rpmfusion. Before using this, first try the more convenient
76 --bug <bug nr> --other-bz <url>. The option tries to retrieve the
77 URL:s by scanning the page. See URL Limitations for how the url
78 must look to be found.
79
80 -d, --display-checks
81 List all available checks, usable as arguments to --exclude and
82 --single
83
84 -f, --display-flags
85 List all available flags, usable as arguments to --define or -D.
86
87 -g, --display-plugins
88 List all plugins which can be enabled/disabled using --plugins.
89
90 -V, --version
91 Show version info
92
94 -B, --no-colors
95 Disable use of ansi colors in console output.
96
97 -c, --cache
98 Do not redownload the files from bugzilla or upstream, use the
99 local ones from previous run instead.
100
101 -D, --define <flag[=value]>
102 Define a flag e. g., EPEL7. A flag can either just be activated
103 using flag or set to a value using flag=value. --display-flags
104 shows available flags.
105
106 -k, --checksum <md5|sha1|sha224|sha256|sha384|sha512>
107 Algorithm used for checksum.
108
109 -L, --local-repo <rpm directory>
110 Directory with rpms to install together with reviewed package dur‐
111 ing build and install phases.
112
113 -m, --mock-config <configuration>
114 Specify which mock config to use, one of the files in /etc/mock,
115 with the .cfg suffix stripped. Defaults to the root defined in
116 /etc/mock/default.cfg
117
118 -o, --mock-options options...
119 Mock options for the build. Defaults to --no-cleanup-after --no-
120 clean, for use with mock >= 1.4.1 --no-bootstrap-chroot addition‐
121 ally, you might want this along with other options you provide.
122
123 --no-report
124 Do not generate the review template.
125
126 --no-build
127 Do not rebuild or install the source rpm, instead use the last
128 installed package available in mock. Implies --cache.
129
130 --other_bz
131 Url of alternative bugzilla, instead of using default
132 https://bugzilla.redhat.com
133
134 -p, --prebuilt
135 When using -n <name>, use prebuilt rpms in current directory
136 instead of building new ones in mock
137
138 -P, --plugins
139 Normally, the right plugin(s) to run are autodetected. Using
140 --plugins overrides the decision to run a plugin or not. The argu‐
141 ment is a comma-separated list of plugins, each possibly with a
142 :off suffix e. g.,
143
144 --plugins Java:off,C/C++
145
146 Use --display-plugins to see available plugins. Enabling plugins
147 has no well-defined semantics: some tests might leave no trace in
148 the report even though they are actually run.
149
150 -r, --rpm-spec
151 Instead of using a spec file URL, use the spec file bundled in the
152 srpm file.
153
154 -s test, --single test
155 Run a single test, as listed by --display-checks. Does not run
156 dependencies, only the given test.
157
158 -v, --verbose
159 Provides a more detailed output of what's going on.
160
161 -x test1, test2, ... , --exclude test1, test2, ...
162 Comma-separated list of test(s) to exclude, as listed by --display-
163 checks. A test which depends on an excluded test, will run.
164
166 The review directory is created with a name corresponding to the com‐
167 mand line options. The package name is always part of the name, some‐
168 times also the bug number. Here is:
169
170 review.txt
171 The review template
172
173 report.xml
174 Report with failed issues based on the firehose xml format. This is
175 as yet experimental and not stable. See https://github.com/fedora-
176 static-analysis/firehose.
177
178 srpm directory
179 Holds whats downloaded, normally a src.rpm and a spec file. When
180 using --rpm-spec, here is no .spec file.
181
182 srpm-unpacked directory
183 Holds the unpacked content of the src.rpm file.
184
185 upstream directory
186 contains sources downloaded from the Source: url in the spec file.
187
188 upstream-unpacked directory
189 Occasionally contains the unpacked sources, but is normally empty.
190
191 dependencies
192 Used for dependencies specfiles when EXARCH flag is set, otherwise
193 empty.
194
195 BUILD link
196 Points to the mock directory containing the sources used in the
197 build. These sources have been created and modified by the %prep
198 stuff in the spec file. The link is only valid direct after the
199 run, it's overwritten next time mock executes.
200
201 results directory
202 Contains the result from the build, logs and rpm packages.
203
205 Normally, the Source0 (or others SourceX) in the specfile contains an
206 URL to the upstream source. fedora-review uses this url to download the
207 upstream source and then compare md5sum with source in rpm.
208
209 However, in some cases the Source0: is just a filename e. g., when
210 sources are generated from git, svn or similar tools. In these cases,
211 fedora-review will look for a file matching the Source0 in current
212 directory. If it exists, it's used as upstream source. This way, a
213 reviewer can generate the source according the comments in the spec
214 before running fedora-review and then have it checked.
215
217 It's possible to use koji to build packages instead of mock when using
218 fedora-review. The basic idea is to run a koji scratch build, download
219 the built packages and invoke fedora-review on these. This workflow
220 uses the --prebuilt option, and has some limitations on checks per‐
221 formed since fedora-review cannot access the build directories.
222
223 The workflow:
224
225 · Invoke koji, note the task number:
226
227 koji build --scratch my-package.src.rpm
228
229 · Download the results:
230
231 koji-download-scratch <task number>
232
233 · Invoke fedora-review using --prebuilt, --name options and --rpm-
234 spec:
235
236 fedora-review --rpm-spec --prebuilt --name my-package
237
238
240 fedora-review handles two types of URLs: the spec and srpm url found in
241 e. g., the bugzilla page and the source url(s) found in the spec file.
242
243 For the srpm and spec file url:
244
245 · The parameters (i. e., the ? and everything beyond) is removed.
246
247 · The rest must end with /*.spec or /*.src.rpm
248
249
250 For the source url, possible parameters are not removed. It must end
251 with /filename, typically something like /package-2.0.1.tar.gz
252
253
255 Make a report template for Fedora bug 817271:
256
257 $ fedora-review -b 817271
258
259 fetches spec and srpm file from bugzilla.redhat.com and makes a report.
260 To instead handle a bug at rpmfusion use something like
261
262 $ fedora-review --url \
263 https://bugzilla.rpmfusion.org/show_bug.cgi?id=2150 \
264 --mock-config fedora-16-i386-rpmfusion_free
265
266 Occasionally, fedora-review isn't able to pick up the links e. g., when
267 the links does not end in .spec and/or .src.rpm. In these case you need
268 to download files manually. Using --rpm-spec only the srpm is needed:
269
270 $ wget https://somewhere.com/bad-srpmlink -O my-package-1.2-1.fc16.src.rpm
271 $ fedora-review --rpm-spec -n my-package-1.2-1.fc16.src.rpm
272
273 You can use this command to run a review against a COPR build with a
274 given ID (the ID 670893 is just an example one):
275
276 $ fedora-review --copr-build 670893
277
278
280 ~/.cache/fedora-review.log
281 Debug logging from last session.
282 /usr/share/fedora-review/plugins
283 System-wide python plugins directory
284 /usr/share/fedora-review/scripts
285 System-wide scripts directory
286 ~/.local/share/fedora-review/plugins/
287 User supplied directory for python plugins
288 ~/.local/share/fedora-review/scripts/
289 User supplied directory with shell-based plugins
290
291
292
294 REVIEW_LOGLEVEL
295 loglevel used when not using -v/--verbose. A logging.* value
296 like 'DEBUG', 'Info', or 'warning'. Setting REVIEW_LOGLEVEL to
297 'debug' is the same as providing the -v/--verbose option.
298
299 REVIEW_NO_MOCKGROUP_CHECK
300 Normally, fedora-review checks that user is member of the mock
301 group before proceeding since this is required to run mock in
302 most setups. In cases this check is not useful it can be sup‐
303 pressed by this variable.
304
305 XDG_DATA_HOME
306 fedora-review respects XDG_DATA_HOME which defaults to
307 ~/.local/share. E. g., the personal data directory with plugins
308 is by default ~/.local/share/fedora-review/plugins, but is
309 $XDG_DATA_HOME/fedora-review/plugins if XDG_DATA_HOME is set.
310 See FILES.
311
312 XDG_CACHE_HOME
313 If set, defines the directory where the logfile fedora-
314 review.log is written. Defaults to ~/.cache.
315
316
318 Original author: Tim Lauridsen <tim.lauridsen@gmail.com>
319
320 Developers:
321 Pierre-Yves Chibon <pingou@pingoured.fr>
322 Alec Leamas <leamas.alec@maybe.gmail>
323 Stanislav Ochotnicky <sochotnicky@redhat.com>
324
325
326 For a list of all contributors see AUTHORS file
327
328
330 bugzilla(1)
331 CLI tool to create and modify bugzilla bug tickets.
332
333 bugz(1)
334 Another CLI tool to create and modify bugzilla bug tickets.
335
336 https://pagure.io/FedoraReview/
337 source, issue tracker, etc.
338
339 https://docs.fedoraproject.org/en-US/packaging-guidelines/
340 Rules for Fedora packages.
341
342
343
344 fedora-review(1)