Bug 816907 - Review Request: powermock - Powerful mocking framework
Summary: Review Request: powermock - Powerful mocking framework
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tomas 'Sheldon' Radej
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-27 09:42 UTC by Roman Kennke
Modified: 2013-01-14 15:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-14 15:06:25 UTC
Type: ---
Embargoed:
tradej: fedora-review+
gwync: fedora-cvs+


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

Description Roman Kennke 2012-04-27 09:42:24 UTC
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 'Sheldon' Radej 2012-04-27 13:36:35 UTC
Taking it.

Comment 2 Roman Kennke 2012-04-30 08:43:43 UTC
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 'Sheldon' Radej 2012-05-07 13:31:20 UTC
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 15:07:21 UTC
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 'Sheldon' Radej 2012-05-07 15:19:32 UTC
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 16:17:25 UTC
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 08:25:20 UTC
For the record, you wanted to use "svn export ..." instead of "svn co". It doesn't create .svn directories

Comment 8 Tomas 'Sheldon' Radej 2012-05-17 15:10:13 UTC
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 08:38:00 UTC
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 'Sheldon' Radej 2012-05-18 09:07:15 UTC
Oh, sorry, my bad. It's good to go then.

*** APPROVED ***

Comment 11 Roman Kennke 2012-05-24 13:21:07 UTC
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 14:46:57 UTC
Git done (by process-git-requests).


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