fedora-review

Herramienta para revisión de paquetes rpm. Este paquete contiene herramientas para ayudar en el proceso de revisión de paquete para el Fedora Package Collection.

Esta herramienta automatiza mucho del trabajo sucio cuando se hace una revisión de paquete, tal como:

  • Descarga de SRPM y SPEC desde el reporte Bugzilla
  • Descarga de los fuentes (upstream).
  • Verificar sumas md5.
  • Generar un reporte de revisión con verificación manuales y automatizadas listo para ser completado y pegado en el reporte Bugzilla.

Esta herramienta puede ser extendida con plugins para cada lenguaje de programación. También tiene soporte para plugins externos que pueden ser escritos en cualquier lenguaje que soporpte el formato JSON.

Para empaquetadores

Para los empaquetadores es saludable correr fedora-review sobre sus nuevos spec/srpm, la manera es colocar ambos archivos en un mismo directorio e invocar con el nombre base precedido por -n.

$ fedora-review -n rubygem-jnunemaker-matchy
Building ./rubygem-jnunemaker-matchy-0.4.0-1.fc16.src.rpm using mock fedora-rawhide-i386
INFO: mock.py version 1.1.19 starting...
State Changed: init plugins
INFO: selinux disabled
State Changed: start
INFO: Start(./rubygem-jnunemaker-matchy-0.4.0-1.fc16.src.rpm)  Config(fedora-rawhide-i386)
State Changed: lock buildroot
State Changed: clean
State Changed: unlock buildroot
State Changed: init
State Changed: lock buildroot
Mock Version: 1.1.19
INFO: Mock Version: 1.1.19
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled yum cache
State Changed: cleaning yum metadata
INFO: enabled ccache
State Changed: running yum
...

Cambio de configuración mock con --mock-config:

$ fedora-review --mock-config fedora-16-x86_64 -n rubygem-jnunemaker-matchy
Building ./rubygem-jnunemaker-matchy-0.4.0-1.fc16.src.rpm using mock fedora-16-x86_64
INFO: mock.py version 1.1.19 starting...
State Changed: init plugins
INFO: selinux disabled
State Changed: start
INFO: Start(./rubygem-jnunemaker-matchy-0.4.0-1.fc16.src.rpm)  Config(fedora-16-x86_64)
State Changed: lock buildroot
State Changed: clean
INFO: chroot (/var/lib/mock/fedora-16-x86_64) unlocked and deleted
State Changed: unlock buildroot
State Changed: init
State Changed: lock buildroot
Mock Version: 1.1.19
INFO: Mock Version: 1.1.19
INFO: calling preinit hooks
INFO: enabled root cache
State Changed: unpacking root cache
INFO: enabled yum cache
State Changed: cleaning yum metadata
INFO: enabled ccache
State Changed: running yum
State Changed: unlock buildroot
INFO: Installed packages:
State Changed: setup
State Changed: build
INFO: Done(./rubygem-jnunemaker-matchy-0.4.0-1.fc16.src.rpm) Config(fedora-16-x86_64) 1 minutes 26 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-16-x86_64/result
State Changed: end
Build completed ok
Downloading (Source0): http://rubygems.org/gems/jnunemaker-matchy-0.4.0.gem
Running checks and generate report

Checking source md5 : /tmp/jnunemaker-matchy-0.4.0.gem
Review in: ./rubygem-jnunemaker-matchy-review.txt

Para revisores

Use -b con el número de reporte Bugzilla.

$ fedora-review --mock-config fedora-16-x86_64 -b 785462
Processing review bug : 785462
Getting .spec and .srpm Urls from bug report : 785462
Downloading .spec and .srpm files
...

Salida ejemplo

Package Review
==============

Key:
- = N/A
x = Pass
! = Fail
? = Not evaluated

==== Generic ====
[ ]: MUST Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: MUST Package successfully compiles and builds into binary rpms on at
     least one supported primary architecture.
[x]: MUST All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: MUST Buildroot is not present
     Note: Unless packager wants to package for EPEL5 this is fine
[ ]: MUST Package contains no bundled libraries.
[ ]: MUST Changelog in prescribed format.
[x]: MUST Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: Clean would be needed if support for EPEL is required
[ ]: MUST Sources contain only permissible code or content.
[x]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: Note: defattr macros not found. They would be needed for EPEL5
[ ]: MUST Macros in Summary, %description expandable at SRPM build time.
[ ]: MUST Package requires other packages for directories it uses.
[ ]: MUST Package uses nothing in %doc for runtime.
[ ]: MUST Package is not known to require ExcludeArch.
[x]: MUST Permissions on files are set properly.
[x]: MUST Package does not contain duplicates in %files.
[x]: MUST Spec file lacks Packager, Vendor, PreReq tags.
[x]: MUST Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf would be needed if support for EPEL5 is required
[ ]: MUST If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %doc.
[ ]: MUST License field in the package spec file matches the actual license.
[ ]: MUST License file installed when any subpackage combination is installed.
[ ]: MUST Package consistently uses macros (instead of hard-coded directory
     names).
[ ]: MUST Package meets the Packaging Guidelines.
[x]: MUST Package is named according to the Package Naming Guidelines.
[ ]: MUST Package does not generates any conflict.
[ ]: MUST Package obeys FHS, except libexecdir and /usr/target.
[ ]: MUST Package must own all directories that it creates.
[ ]: MUST Package does not own files or directories owned by other packages.
[ ]: MUST Package installs properly.
[ ]: MUST Requires correct, justified where necessary.
[!]: MUST Rpmlint output is silent.

rpmlint rubygem-jnunemaker-matchy-doc-0.4.0-1.fc16.noarch.rpm

rubygem-jnunemaker-matchy-doc.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/jnunemaker-matchy-0.4.0/ri/Matchy/MatcherBuilder/pass%21-i.yaml %21
rubygem-jnunemaker-matchy-doc.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/jnunemaker-matchy-0.4.0/ri/Matchy/MatcherBuilder/matches%3f-i.yaml %3f
rubygem-jnunemaker-matchy-doc.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/jnunemaker-matchy-0.4.0/ri/Matchy/Expectations/OperatorExpectation/fail%21-i.yaml %21
rubygem-jnunemaker-matchy-doc.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/jnunemaker-matchy-0.4.0/ri/Matchy/Expectations/OperatorExpectation/pass%21-i.yaml %21
rubygem-jnunemaker-matchy-doc.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/jnunemaker-matchy-0.4.0/ri/Matchy/MatcherBuilder/fail%21-i.yaml %21
1 packages and 0 specfiles checked; 0 errors, 5 warnings.

rpmlint rubygem-jnunemaker-matchy-0.4.0-1.fc16.noarch.rpm

rubygem-jnunemaker-matchy.noarch: W: spelling-error Summary(en_US) RSpec -> R Spec, Spec
rubygem-jnunemaker-matchy.noarch: W: spelling-error Summary(en_US) esque -> ques
rubygem-jnunemaker-matchy.noarch: W: spelling-error Summary(en_US) matchers -> marchers, matches, catchers
rubygem-jnunemaker-matchy.noarch: W: spelling-error %description -l en_US RSpec -> R Spec, Spec
rubygem-jnunemaker-matchy.noarch: W: spelling-error %description -l en_US esque -> ques
rubygem-jnunemaker-matchy.noarch: W: spelling-error %description -l en_US matchers -> marchers, matches, catchers
1 packages and 0 specfiles checked; 0 errors, 6 warnings.

rpmlint rubygem-jnunemaker-matchy-0.4.0-1.fc16.src.rpm

rubygem-jnunemaker-matchy.src: W: spelling-error Summary(en_US) RSpec -> R Spec, Spec
rubygem-jnunemaker-matchy.src: W: spelling-error Summary(en_US) esque -> ques
rubygem-jnunemaker-matchy.src: W: spelling-error Summary(en_US) matchers -> marchers, matches, catchers
rubygem-jnunemaker-matchy.src: W: spelling-error %description -l en_US RSpec -> R Spec, Spec
rubygem-jnunemaker-matchy.src: W: spelling-error %description -l en_US esque -> ques
rubygem-jnunemaker-matchy.src: W: spelling-error %description -l en_US matchers -> marchers, matches, catchers
1 packages and 0 specfiles checked; 0 errors, 6 warnings.

[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
/tmp/jnunemaker-matchy-0.4.0.gem :
  MD5SUM this package     : 19ccfeffb107d59fe0d477b39fe5686f
  MD5SUM upstream package : 19ccfeffb107d59fe0d477b39fe5686f

[ ]: MUST Spec file is legible and written in American English.
[x]: MUST Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[ ]: MUST Package contains a SysV-style init script if in need of one.
[x]: MUST File names are valid UTF-8.
[x]: SHOULD Reviewer should test that the package builds in mock.
[ ]: SHOULD If the source package does not include license text(s) as a
     separate file from upstream, the packager SHOULD query upstream to
     include it.
[x]: SHOULD Dist tag is present.
[ ]: SHOULD No file requires outside of /etc, /bin, /sbin, /usr/bin,
     /usr/sbin.
[ ]: SHOULD Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[ ]: SHOULD Package functions as described.
[ ]: SHOULD Package does not include license text files separate from
     upstream.
[x]: SHOULD SourceX is a working URL.
[ ]: SHOULD Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[ ]: SHOULD Package should compile and build into binary rpms on all supported
     architectures.
[ ]: SHOULD %check is present and all tests pass.
[ ]: SHOULD Packages should try to preserve timestamps of original installed
     files.
[x]: SHOULD Spec use %global instead of %define.

Issues:
[!]: MUST Rpmlint output is silent.

rpmlint rubygem-jnunemaker-matchy-doc-0.4.0-1.fc16.noarch.rpm

rubygem-jnunemaker-matchy-doc.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/jnunemaker-matchy-0.4.0/ri/Matchy/MatcherBuilder/pass%21-i.yaml %21
rubygem-jnunemaker-matchy-doc.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/jnunemaker-matchy-0.4.0/ri/Matchy/MatcherBuilder/matches%3f-i.yaml %3f
rubygem-jnunemaker-matchy-doc.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/jnunemaker-matchy-0.4.0/ri/Matchy/Expectations/OperatorExpectation/fail%21-i.yaml %21
rubygem-jnunemaker-matchy-doc.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/jnunemaker-matchy-0.4.0/ri/Matchy/Expectations/OperatorExpectation/pass%21-i.yaml %21
rubygem-jnunemaker-matchy-doc.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/jnunemaker-matchy-0.4.0/ri/Matchy/MatcherBuilder/fail%21-i.yaml %21
1 packages and 0 specfiles checked; 0 errors, 5 warnings.

rpmlint rubygem-jnunemaker-matchy-0.4.0-1.fc16.noarch.rpm

rubygem-jnunemaker-matchy.noarch: W: spelling-error Summary(en_US) RSpec -> R Spec, Spec
rubygem-jnunemaker-matchy.noarch: W: spelling-error Summary(en_US) esque -> ques
rubygem-jnunemaker-matchy.noarch: W: spelling-error Summary(en_US) matchers -> marchers, matches, catchers
rubygem-jnunemaker-matchy.noarch: W: spelling-error %description -l en_US RSpec -> R Spec, Spec
rubygem-jnunemaker-matchy.noarch: W: spelling-error %description -l en_US esque -> ques
rubygem-jnunemaker-matchy.noarch: W: spelling-error %description -l en_US matchers -> marchers, matches, catchers
1 packages and 0 specfiles checked; 0 errors, 6 warnings.

rpmlint rubygem-jnunemaker-matchy-0.4.0-1.fc16.src.rpm

rubygem-jnunemaker-matchy.src: W: spelling-error Summary(en_US) RSpec -> R Spec, Spec
rubygem-jnunemaker-matchy.src: W: spelling-error Summary(en_US) esque -> ques
rubygem-jnunemaker-matchy.src: W: spelling-error Summary(en_US) matchers -> marchers, matches, catchers
rubygem-jnunemaker-matchy.src: W: spelling-error %description -l en_US RSpec -> R Spec, Spec
rubygem-jnunemaker-matchy.src: W: spelling-error %description -l en_US esque -> ques
rubygem-jnunemaker-matchy.src: W: spelling-error %description -l en_US matchers -> marchers, matches, catchers
1 packages and 0 specfiles checked; 0 errors, 6 warnings.

Generated by fedora-review 0.1.2
External plugins: