Bug 816907 - Review Request: powermock - Powerful mocking framework
Review Request: powermock - Powerful mocking framework
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Radej
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-27 05:42 EDT by Roman Kennke
Modified: 2013-01-14 10:06 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-14 10:06:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
tradej: fedora‑review+
limburgher: fedora‑cvs+


Attachments (Terms of Use)
List of files with invalid license (6.22 KB, text/plain)
2012-05-07 09:31 EDT, Tomas Radej
no flags Details

  None (edit)
Description Roman Kennke 2012-04-27 05:42:24 EDT
Spec URL: http://rkennke.fedorapeople.org/powermock/1/powermock.spec
SRPM URL: http://rkennke.fedorapeople.org/powermock/1/powermock-1.4.12-1.fc16.src.rpm
Description: PowerMock is a framework that extend other mock libraries
such as EasyMock with more powerful capabilities. PowerMock uses a
custom classloader and bytecode manipulation to enable mocking of
static methods, constructors, final classes and methods, private
methods, removal of static initializers and more.

The package creates several sub-packages:
powermock-reflect and powermock-core contains the PowerMock core code that all other depend on.
powermock-common contains a bunch of POMs to ensure the Maven dependencies can all be resolved.
powermock-junit4 contains the JUnit4 module.
powermock-api-support and powermock-api-mockito contain the API extension for Mockito.

Important notice: There would be a powermock-testng package next to powermock-junit4, but this had compilation problems. This will be resolved in a later release of the package. Powermock also contains powermock-junit4-legacy and powermock-junit3 modules, I did not bother about those since it's only for old code. Also, there's an API extension for easymock, but it requires easymock3, which is not yet available as RPM, but is in the review process already.
Comment 1 Tomas Radej 2012-04-27 09:36:35 EDT
Taking it.
Comment 2 Roman Kennke 2012-04-30 04:43:43 EDT
Forgot to build javadoc subpackage. Added it to version 2:

SPEC: http://rkennke.fedorapeople.org/powermock/2/powermock.spec
SRPM: http://rkennke.fedorapeople.org/powermock/2/powermock-1.4.12-2.fc16.src.rpm

I was unsure whether to make one javadoc subpackage that includes the API docs for all the modules, or if I should provide one -javadoc subpackage per module. I chose to build one javadoc subpackage for all powermock modules.
Comment 3 Tomas Radej 2012-05-07 09:31:20 EDT
Created attachment 582664 [details]
List of files with invalid license


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 %build honors applicable compiler flags or justifies otherwise.
[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.
[x]: 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
[x]: MUST Macros in Summary, %description expandable at SRPM build time.
[x]: MUST Package requires other packages for directories it uses.
[x]: MUST Package uses nothing in %doc for runtime.
[x]: 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
[x]: MUST Large documentation files are in a -doc subpackage, if required.
[x]: 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.
[x]: MUST License file installed when any subpackage combination is installed.
[x]: MUST Package consistently uses macros (instead of hard-coded directory
     names).
[x]: MUST Package is named according to the Package Naming Guidelines.
[x]: MUST Package does not generate any conflict.
[x]: MUST Package obeys FHS, except libexecdir and /usr/target.
[x]: MUST Package must own all directories that it creates.
[x]: MUST Package does not own files or directories owned by other packages.
[x]: MUST Package installs properly.
[x]: MUST Requires correct, justified where necessary.
[!]: MUST Rpmlint output is silent.

rpmlint powermock-core-1.4.12-2.fc18.noarch.rpm

powermock-core.noarch: W: spelling-error %description -l en_US classloader -> class loader, class-loader, classless
powermock-core.noarch: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
powermock-core.noarch: W: spelling-error %description -l en_US initializers -> initializes, initialize rs, initialize-rs
powermock-core.noarch: W: class-path-in-manifest /usr/share/java/powermock-core.jar
1 packages and 0 specfiles checked; 0 errors, 4 warnings.


rpmlint powermock-reflect-1.4.12-2.fc18.noarch.rpm

powermock-reflect.noarch: W: spelling-error %description -l en_US classloader -> class loader, class-loader, classless
powermock-reflect.noarch: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
powermock-reflect.noarch: W: spelling-error %description -l en_US initializers -> initializes, initialize rs, initialize-rs
1 packages and 0 specfiles checked; 0 errors, 3 warnings.


rpmlint powermock-junit4-1.4.12-2.fc18.noarch.rpm

powermock-junit4.noarch: W: spelling-error %description -l en_US classloader -> class loader, class-loader, classless
powermock-junit4.noarch: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
powermock-junit4.noarch: W: spelling-error %description -l en_US initializers -> initializes, initialize rs, initialize-rs
1 packages and 0 specfiles checked; 0 errors, 3 warnings.


rpmlint powermock-api-support-1.4.12-2.fc18.noarch.rpm

powermock-api-support.noarch: W: spelling-error %description -l en_US classloader -> class loader, class-loader, classless
powermock-api-support.noarch: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
powermock-api-support.noarch: W: spelling-error %description -l en_US initializers -> initializes, initialize rs, initialize-rs
1 packages and 0 specfiles checked; 0 errors, 3 warnings.


rpmlint powermock-javadoc-1.4.12-2.fc18.noarch.rpm

powermock-javadoc.noarch: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
powermock-javadoc.noarch: W: spelling-error %description -l en_US initializers -> initializes, initialize rs, initialize-rs
1 packages and 0 specfiles checked; 0 errors, 2 warnings.


rpmlint powermock-api-mockito-1.4.12-2.fc18.noarch.rpm

powermock-api-mockito.noarch: E: explicit-lib-dependency cglib
powermock-api-mockito.noarch: W: spelling-error %description -l en_US classloader -> class loader, class-loader, classless
powermock-api-mockito.noarch: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
powermock-api-mockito.noarch: W: spelling-error %description -l en_US initializers -> initializes, initialize rs, initialize-rs
1 packages and 0 specfiles checked; 1 errors, 3 warnings.


rpmlint powermock-common-1.4.12-2.fc18.noarch.rpm

powermock-common.noarch: W: spelling-error %description -l en_US classloader -> class loader, class-loader, classless
powermock-common.noarch: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
powermock-common.noarch: W: spelling-error %description -l en_US initializers -> initializes, initialize rs, initialize-rs
1 packages and 0 specfiles checked; 0 errors, 3 warnings.


rpmlint powermock-1.4.12-2.fc18.src.rpm

powermock.src: W: spelling-error %description -l en_US classloader -> class loader, class-loader, classless
powermock.src: W: spelling-error %description -l en_US bytecode -> byte code, byte-code, decorate
powermock.src: W: spelling-error %description -l en_US initializers -> initializes, initialize rs, initialize-rs
powermock.src: W: invalid-url Source0: powermock-1.4.12.tar.xz
1 packages and 0 specfiles checked; 0 errors, 4 warnings.


[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: 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.
[-]: MUST Useful -debuginfo package or justification otherwise.
[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.
[x]: SHOULD No file requires outside of /etc, /bin, /sbin, /usr/bin,
     /usr/sbin.
[x]: SHOULD Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[?]: SHOULD Package functions as described.
[x]: SHOULD Latest version is packaged.
[x]: SHOULD Package does not include license text files separate from
     upstream.
[x]: SHOULD Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[!]: SHOULD SourceX / PatchY prefixed with %{name}.
     Note: Source0: powermock-%{version}.tar.xz (powermock-%{version}.tar.xz)
     Source1: make-powermock-sourcetarball.sh (make-powermock-
     sourcetarball.sh) Patch0: powermock-disable-broken-tests.patch
     (powermock-disable-broken-tests.patch) Patch1: powermock-disable-
     modules.patch (powermock-disable-modules.patch) Patch2: powermock-fix-
     cglib-mockito.patch (powermock-fix-cglib-mockito.patch) Patch3:
     powermock-fix-junit3-compat.patch (powermock-fix-junit3-compat.patch)
[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.
[x]: SHOULD Package should compile and build into binary rpms on all supported
     architectures.
[-]: SHOULD %check is present and all tests pass.
[x]: SHOULD Packages should try to preserve timestamps of original installed
     files.
[x]: SHOULD Spec use %global instead of %define.


==== Java ====
[x]: MUST If source tarball includes bundled jar/class files these need to be
     removed prior to building
[x]: MUST Packages have proper BuildRequires/Requires on jpackage-utils
[x]: MUST Fully versioned dependency in subpackages, if present.
[x]: MUST Javadoc documentation files are generated and included in -javadoc
     subpackage
[x]: MUST Javadoc subpackages have Requires: jpackage-utils
[x]: MUST Javadocs are placed in %{_javadocdir}/%{name} (no -%{version}
     symlink)
[x]: SHOULD Package has BuildArch: noarch (if possible)
[x]: SHOULD Package uses upstream build method (ant/maven/etc.)


==== Maven ====
[!]: MUST Pom files have correct add_maven_depmap call
     Note: Some add_maven_depmap calls found. Please check if they are correct
[x]: MUST Old add_to_maven_depmap macro is not being used
[x]: MUST Packages DOES NOT have Requires(post) and Requires(postun) on
     jpackage-utils for %update_maven_depmap macro
[x]: MUST If package contains pom.xml files install it (including depmaps)
     even when building with ant
[x]: MUST Package DOES NOT use %update_maven_depmap in %post/%postun
[x]: MUST Packages use %{_mavenpomdir} instead of %{_datadir}/maven2/poms

Issues:
[!]: MUST Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[!]: MUST License field in the package spec file matches the actual license.
>>>> There are packages with a different license (see attached list)

[!]: MUST Package contains no bundled libraries.
[!]: MUST Sources contain only permissible code or content.
>>>> Please, remove bundled libraries' source where possible and use instead
>>>> Fedora-provided packages as (Build)Requires

[!]: MUST Rpmlint output is silent.
>>>> Ignore the warnings

[!]: If the number of installed JAR files exceeds two, creating
     a subdirectory is required
[!]: MUST Pom files have correct add_maven_depmap call
>>>> You need to make a subdirectory for the JAR files if their
>>>> number exceeds two, therefore the depmap calls must be altered too

See https://fedoraproject.org/wiki/Packaging:Java#Installation_directory

Generated by fedora-review 0.1.3
External plugins:

*** NOT APPROVED ***
Comment 4 Roman Kennke 2012-05-07 11:07:21 EDT
Thanks for review.

1 & 2. I will remove the offending source files, they are not packaged anyway.
3. How do I 'Ignore the warnings' ?
4. I will put the JARs into subdirectories.

Will post updated package as soon as it's done.
Comment 5 Tomas Radej 2012-05-07 11:19:32 EDT
3. You just don't do anything :) . I mention it there only because rpmlint's output for this package isn't clean, but consists only of warnings about spelling, and these are irrelevant.
Comment 6 Roman Kennke 2012-05-07 12:17:25 EDT
Fixed all the above:

SPEC: http://rkennke.fedorapeople.org/powermock/3/powermock.spec
SRPM: http://rkennke.fedorapeople.org/powermock/3/powermock-1.4.12-3.fc16.src.rpm

In addition to that, I also removed .svn dirs from the created source package (and adjusted the script accordingly).

Ok to go in now?
Comment 7 Stanislav Ochotnicky 2012-05-10 04:25:20 EDT
For the record, you wanted to use "svn export ..." instead of "svn co". It doesn't create .svn directories
Comment 8 Tomas Radej 2012-05-17 11:10:13 EDT
I might not made myself clear enough - the attached list only contained files with license other than stated. The directory ./modules/module-impl contains many more bundled libraries. Please remove everything in ./modules/module-impl and replace it with (Build)Requires on respective packages.

Also, please use svn export as Stanislav suggests.

Other than that, seems good.

*** NOT APPROVED ***
Comment 9 Roman Kennke 2012-05-18 04:38:00 EDT
SPEC: http://rkennke.fedorapeople.org/powermock/4/powermock.spec
SRPM:
http://rkennke.fedorapeople.org/powermock/4/powermock-1.4.12-4.fc16.src.rpm

I only found 2 more 3rd party files, which I removed now. Please notice that the various submodules junit3, junit4, testng, etc do *not* contain further 3rd party code. Those are support modules for using powermock with those test frameworks.

Good now?
Comment 10 Tomas Radej 2012-05-18 05:07:15 EDT
Oh, sorry, my bad. It's good to go then.

*** APPROVED ***
Comment 11 Roman Kennke 2012-05-24 09:21:07 EDT
New Package SCM Request
=======================
Package Name: powermock
Short Description: Powerful mocking framework
Owners: rkennke neugens
Branches: f17
InitialCC: java-sig
Comment 12 Gwyn Ciesla 2012-05-24 10:46:57 EDT
Git done (by process-git-requests).

Note You need to log in before you can comment on or make changes to this bug.