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 lo‐
99 cal 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 us‐
103 ing flag or set to a value using flag=value. --display-flags shows
104 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, you might want this along with other options you provide.
121
122 --no-report
123 Do not generate the review template.
124
125 --no-build
126 Do not rebuild or install the source rpm, instead use the last in‐
127 stalled package available in mock. Implies --cache.
128
129 --other_bz
130 Url of alternative bugzilla, instead of using default
131 https://bugzilla.redhat.com
132
133 -p, --prebuilt
134 When using -n <name>, use prebuilt rpms in current directory in‐
135 stead of building new ones in mock
136
137 -P, --plugins
138 Normally, the right plugin(s) to run are autodetected. Using
139 --plugins overrides the decision to run a plugin or not. The argu‐
140 ment is a comma-separated list of plugins, each possibly with a
141 :off suffix e. g.,
142
143 --plugins Java:off,C/C++
144
145 Use --display-plugins to see available plugins. Enabling plugins
146 has no well-defined semantics: some tests might leave no trace in
147 the report even though they are actually run.
148
149 -r, --rpm-spec
150 Instead of using a spec file URL, use the spec file bundled in the
151 srpm file.
152
153 -s test, --single test
154 Run a single test, as listed by --display-checks. Does not run de‐
155 pendencies, only the given test.
156
157 -v, --verbose
158 Provides a more detailed output of what's going on.
159
160 -x test1, test2, ... , --exclude test1, test2, ...
161 Comma-separated list of test(s) to exclude, as listed by --display-
162 checks. A test which depends on an excluded test, will run.
163
165 The review directory is created with a name corresponding to the com‐
166 mand line options. The package name is always part of the name, some‐
167 times also the bug number. Here is:
168
169 review.txt
170 The review template
171
172 report.xml
173 Report with failed issues based on the firehose xml format. This is
174 as yet experimental and not stable. See https://github.com/fedora-
175 static-analysis/firehose.
176
177 srpm directory
178 Holds whats downloaded, normally a src.rpm and a spec file. When
179 using --rpm-spec, here is no .spec file.
180
181 srpm-unpacked directory
182 Holds the unpacked content of the src.rpm file.
183
184 upstream directory
185 contains sources downloaded from the Source: url in the spec file.
186
187 upstream-unpacked directory
188 Occasionally contains the unpacked sources, but is normally empty.
189
190 dependencies
191 Used for dependencies specfiles when EXARCH flag is set, otherwise
192 empty.
193
194 BUILD link
195 Points to the mock directory containing the sources used in the
196 build. These sources have been created and modified by the %prep
197 stuff in the spec file. The link is only valid direct after the
198 run, it's overwritten next time mock executes.
199
200 results directory
201 Contains the result from the build, logs and rpm packages.
202
204 Normally, the Source0 (or others SourceX) in the specfile contains an
205 URL to the upstream source. fedora-review uses this url to download the
206 upstream source and then compare md5sum with source in rpm.
207
208 However, in some cases the Source0: is just a filename e. g., when
209 sources are generated from git, svn or similar tools. In these cases,
210 fedora-review will look for a file matching the Source0 in current di‐
211 rectory. If it exists, it's used as upstream source. This way, a re‐
212 viewer can generate the source according the comments in the spec be‐
213 fore running fedora-review and then have it checked.
214
216 It's possible to use koji to build packages instead of mock when using
217 fedora-review. The basic idea is to run a koji scratch build, download
218 the built packages and invoke fedora-review on these. This workflow
219 uses the --prebuilt option, and has some limitations on checks per‐
220 formed since fedora-review cannot access the build directories.
221
222 The workflow:
223
224 • Invoke koji, note the task number:
225
226 koji build --scratch my-package.src.rpm
227
228 • Download the results:
229
230 koji-download-scratch <task number>
231
232 • Invoke fedora-review using --prebuilt, --name options and --rpm-
233 spec:
234
235 fedora-review --rpm-spec --prebuilt --name my-package
236
237
239 fedora-review handles two types of URLs: the spec and srpm url found in
240 e. g., the bugzilla page and the source url(s) found in the spec file.
241
242 For the srpm and spec file url:
243
244 • The parameters (i. e., the ? and everything beyond) is removed.
245
246 • The rest must end with /*.spec or /*.src.rpm
247
248
249 For the source url, possible parameters are not removed. It must end
250 with /filename, typically something like /package-2.0.1.tar.gz
251
252
254 Make a report template for Fedora bug 817271:
255
256 $ fedora-review -b 817271
257
258 fetches spec and srpm file from bugzilla.redhat.com and makes a report.
259 To instead handle a bug at rpmfusion use something like
260
261 $ fedora-review --url \
262 https://bugzilla.rpmfusion.org/show_bug.cgi?id=2150 \
263 --mock-config fedora-16-i386-rpmfusion_free
264
265 Occasionally, fedora-review isn't able to pick up the links e. g., when
266 the links does not end in .spec and/or .src.rpm. In these case you need
267 to download files manually. Using --rpm-spec only the srpm is needed:
268
269 $ wget https://somewhere.com/bad-srpmlink -O my-package-1.2-1.fc16.src.rpm
270 $ fedora-review --rpm-spec -n my-package-1.2-1.fc16.src.rpm
271
272 You can use this command to run a review against a COPR build with a
273 given ID (the ID 670893 is just an example one):
274
275 $ fedora-review --copr-build 670893
276
277
279 ~/.cache/fedora-review.log
280 Debug logging from last session.
281 /usr/share/fedora-review/plugins
282 System-wide python plugins directory
283 /usr/share/fedora-review/scripts
284 System-wide scripts directory
285 ~/.local/share/fedora-review/plugins/
286 User supplied directory for python plugins
287 ~/.local/share/fedora-review/scripts/
288 User supplied directory with shell-based plugins
289
290
291
293 REVIEW_LOGLEVEL
294 loglevel used when not using -v/--verbose. A logging.* value
295 like 'DEBUG', 'Info', or 'warning'. Setting REVIEW_LOGLEVEL to
296 'debug' is the same as providing the -v/--verbose option.
297
298 REVIEW_NO_MOCKGROUP_CHECK
299 Normally, fedora-review checks that user is member of the mock
300 group before proceeding since this is required to run mock in
301 most setups. In cases this check is not useful it can be sup‐
302 pressed by this variable.
303
304 XDG_DATA_HOME
305 fedora-review respects XDG_DATA_HOME which defaults to ~/.lo‐
306 cal/share. E. g., the personal data directory with plugins is by
307 default ~/.local/share/fedora-review/plugins, but is
308 $XDG_DATA_HOME/fedora-review/plugins if XDG_DATA_HOME is set.
309 See FILES.
310
311 XDG_CACHE_HOME
312 If set, defines the directory where the logfile fedora-re‐
313 view.log is written. Defaults to ~/.cache.
314
315
317 Original author: Tim Lauridsen <tim.lauridsen@gmail.com>
318
319 Developers:
320 Pierre-Yves Chibon <pingou@pingoured.fr>
321 Alec Leamas <leamas.alec@maybe.gmail>
322 Stanislav Ochotnicky <sochotnicky@redhat.com>
323
324
325 For a list of all contributors see AUTHORS file
326
327
329 fedora-create-review(1)
330 Automatically create RPM review request for Fedora.
331
332 bugzilla(1)
333 CLI tool to create and modify bugzilla bug tickets.
334
335 bugz(1)
336 Another CLI tool to create and modify bugzilla bug tickets.
337
338 https://pagure.io/FedoraReview/
339 source, issue tracker, etc.
340
341 https://docs.fedoraproject.org/en-US/packaging-guidelines/
342 Rules for Fedora packages.
343
344
345
346 fedora-review(1)