Bug 532527

Summary: Review request: junit-addons - JUnitX helper classes for JUnit
Product: [Fedora] Fedora Reporter: Mary Ellen Foster <mefoster>
Component: Package ReviewAssignee: David A. Wheeler <dwheeler>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: akurtako, dwheeler, fedora-package-review, notting
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-17 12:52:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 201449    

Description Mary Ellen Foster 2009-11-02 18:01:08 UTC
Spec URL: http://www.macs.hw.ac.uk/~mef3/review/junit-addons.spec
SRPM URL: http://www.macs.hw.ac.uk/~mef3/review/junit-addons-1.4-5.fc12.src.rpm
Description:
JUnit-addons is a collection of helper classes for JUnit. 
This library can be used with both JUnit 3.7 and JUnit 3.8.x



This package was imported from JPackage

Comment 1 David A. Wheeler 2010-01-27 23:57:16 UTC
Hi - I'm looking over your package now.

Looking at the Java guidelines:
https://fedoraproject.org/wiki/Packaging/Java

This spec doesn't say, per a MUST, that:
It says that "At a minimum, Java packages MUST..."
 BuildRequires: java-devel [>= specific_version] 
 Requires:  java >= specific_version
 Requires:  jpackage-utils
It ends up having "Requires: jpackage-utils" through dependencies,
and "ant" ends up forcing a BuildRequires on java-devel, but
I think it'd be better to explicitly meet this guideline.

The Java guidelines also (still) recommend adding the GCJ bits.
Can you add them? (Frankly, I think it's a legitimate question to
ask if this SHOULD is appropriate... but as long as it's a guideline,
I feel I should make that request.)

It built fine, and with no rpmlint warnings/errors:
rpmlint junit-addons.spec ../RPMS/noarch/junit-addons-* ../SRPMS/junit-addons-1.4-5.fc12.src.rpm 
3 packages and 1 specfiles checked; 0 errors, 0 warnings.

Comment 2 David A. Wheeler 2010-01-28 00:07:46 UTC
The "Release" number here is a simple integer.
But my understanding is that the Fedora policy on packages
derived from JPackage must have X.Y numbering, as described here:
  http://fedoraproject.org/wiki/Packaging/JPackagePolicy

That way, the Fedora packages can be updated while the derived JPackage number stays the same.

The spec file immediately deletes all the .jar files, which is good, that helps get rid of the standard Java bugaboo (gazillions of local copies of JARs).

Comment 3 David A. Wheeler 2010-01-28 22:27:07 UTC
It seems to meet most of the Java guidelines. Package name == JAR name,
JAR file in %{_javadir}.

So the only Java-specific guidelines issues I see are the ones I already complained about: the release# (make it JPP number.1), missing BuildRequires/Requires, and lack of GCJ bits.

The licensing seems okay.
The .spec file claims that the license is ASL 1.1.
The BUILD includes a LICENSE file that is indeed ASL 1.1
(I checked with http://www.apache.org/licenses/LICENSE -- it's the same
text except for template instantiation, e.g., different copyright holder).
I did a spot-check of source code in src, seemed to match:
src/main/junitx/tool/TestClassValidator.java
src/main/junitx/framework/NamingAssert.java
Some source files had no license, but given that they're in a larger
package WITH a license, and no reason to believe that they had a different
one, the license info seems to check out.

Comment 4 David A. Wheeler 2010-01-28 22:51:46 UTC
Here's my formal review, per: http://fedoraproject.org/wiki/Packaging:ReviewGuidelines ...
Again, I have issues with the release#, missing BuildRequires/Requires, and lack of GCJ bits.  Also, the %install doesn't include an:
 %add_to_maven_depmap ....
shouldn't it?


    * MUST: rpmlint must be run on every package. The output should be posted in the review.[1]

No rpmlint warnings/errors:
rpmlint junit-addons.spec ../RPMS/noarch/junit-addons-*
../SRPMS/junit-addons-1.4-5.fc12.src.rpm 
3 packages and 1 specfiles checked; 0 errors, 0 warnings.

    * MUST: The package must be named according to the Package Naming Guidelines .
OK

    * MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption. [2]

OK

    * MUST: The package must meet the Packaging Guidelines .

ISSUES.  See my previous comments (release#, missing BuildRequires/Requires, and lack of GCJ bits).

Also, the %install doesn't include an:
 %add_to_maven_depmap ....
shouldn't it?

    * MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines .

OK.  ASL 1.1.  See comment 3.

    * MUST: The License field in the package spec file must match the actual license. [3]

OK.  See comment 3.

    * 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 must be included in %doc.[4]

OK.
It installs /usr/share/doc/junit-addons-1.4/LICENSE

    * MUST: The spec file must be written in American English. [5]
OK

    * MUST: The spec file for the package MUST be legible. [6]
OK

    * MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use md5sum for this task. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this.

OK:
wget 'http://downloads.sourceforge.net/project/junit-addons/JUnit-addons/JUnit-addons%201.4/junit-addons-1.4.zip'
sha256sum junit-addons-1.4.zip ~/rpmbuild/SOURCES/junit-addons-1.4.zip 
8a7456eaabf1c3528b8e73c15df1b8a467386cbf3905b1d5df536201f1981990  junit-addons-1.4.zip
8a7456eaabf1c3528b8e73c15df1b8a467386cbf3905b1d5df536201f1981990  /home/rpmbuilder/rpmbuild/SOURCES/junit-addons-1.4.zip

    * MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture. [7]

OK
    * MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch. Each architecture listed in ExcludeArch MUST have a bug filed in bugzilla, describing the reason that the package does not compile/build/work on that architecture. The bug number MUST be placed in a comment, next to the corresponding ExcludeArch line. [8]

NA. It's a noarch.

    * MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense.

OK.  Tested using mock build (results listed below).

    * MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.[9]

NA.  No /locale/.

    * MUST: Every binary RPM package (or subpackage) which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun. [10]

NA.  No shared library files, just JARs.

    * MUST: Packages must NOT bundle copies of system libraries.[11]
OK.  It removes *.jar files during %prep.

    * MUST: If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package. Without this, use of Prefix: /usr is considered a blocker. [12]

NA

    * MUST: A package must own all directories that it creates. If it does not create a directory that it uses, then it should require a package which does create that directory. [13]

OK

    * MUST: A Fedora package must not list a file more than once in the spec file's %files listings. [14]

OK

    * MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example. Every %files section must include a %defattr(...) line. [15]

OK

    * MUST: Each package must have a %clean section, which contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT). [16]
OK

    * MUST: Each package must consistently use macros. [17]
OK.  $RPM_BUILD_ROOT style.

    * MUST: The package must contain code, or permissable content. [18]
OK

    * MUST: Large documentation files must go in a -doc subpackage. (The definition of large is left up to the packager's best judgement, but is not restricted to size. Large can refer to either size or quantity). [19]

OK.  It doesn't have -doc; it does have -javadoc.

    * MUST: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present. [19]
OK

    * MUST: Header files must be in a -devel package. [20]

NA.  There are no separate header files in Java.

    * MUST: Static libraries must be in a -static package. [21]
NA

    * MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability). [22]

NA

    * MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package. [20]

NA

    * MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release} [23]

NA

    * MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.[21]

OK

    * MUST: Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section. If you feel that your packaged GUI application does not need a .desktop file, you must put a comment in the spec file with your explanation. [24]

NA

    * MUST: Packages must not own files or directories already owned by other packages. The rule of thumb here is that the first package to be installed should own the files or directories that other packages may rely upon. This means, for example, that no package in Fedora should ever share ownership with any of the files or directories owned by the filesystem or man package. If you feel that you have a good reason to own a file or directory that another package owns, then please present that at package review time. [25]

OK

    * MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot} (or $RPM_BUILD_ROOT). [26]
OK

    * MUST: All filenames in rpm packages must be valid UTF-8. [27]
OK


SHOULD Items:
Items marked as SHOULD are things that the package (or reviewer) SHOULD do, but is not required to do.

    * 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. [28]

NA, has separate file.

    * SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available. [29]

NO.

    * SHOULD: The reviewer should test that the package builds in mock. [30]

OK. Built fine:
$ mock --rebuild ~/rpmbuild/SRPMS/junit-addons-1.4-5.fc12.src.rpm 
X11 connection rejected because of wrong authentication.
INFO: mock.py version 1.0.2 starting...
State Changed: init plugins
State Changed: start
INFO: Start(/home/rpmbuilder/rpmbuild/SRPMS/junit-addons-1.4-5.fc12.src.rpm)  Config(fedora-12-x86_64)
State Changed: lock buildroot
State Changed: clean
State Changed: init
State Changed: lock buildroot
Mock Version: 1.0.2
INFO: Mock Version: 1.0.2
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: setup
State Changed: build
INFO: Done(/home/rpmbuilder/rpmbuild/SRPMS/junit-addons-1.4-5.fc12.src.rpm) Config(default) 3 minutes 23 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-12-x86_64/result

    * SHOULD: The package should compile and build into binary rpms on all supported architectures. [31]

NA - it's a noarch.
It clearly compiles and builds in one.

    * SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.

Didn't do that.

    * SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity. [32]

OK. Seems sane.

    * SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency. [23]

OK.  It does NOT require them for -javadoc, but I think that's reasonable.  Maybe they just want to read the docs, without downloading the actual library.

    * SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and this is usually for development purposes, so should be placed in a -devel pkg. A reasonable exception is that the main pkg itself is a devel tool not installed in a user runtime, e.g. gcc or gdb. [22]

NA. No .pc files.

    * SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself. [33]

NA.  All package dependencies are by package name.

    * SHOULD: your package should contain man pages for binaries/scripts. If it doesn't, work with upstream to add them where they make sense.[34]

No man page.
But this is a java library with javadoc, so that seems okay.

Comment 5 Alexander Kurtakov 2010-06-06 05:52:42 UTC
David, Please change the status to Assigned when you take some review bug.

Thanks,
Alexander Kurtakov

Comment 6 Alexander Kurtakov 2010-07-19 14:02:41 UTC
mefoster, can we get this fixed soon ?

Comment 7 Alexander Kurtakov 2010-07-19 14:03:29 UTC
Oh, and please add/install a pom and depmap I need this for one of the maven plugins.

Comment 8 Alexander Kurtakov 2010-12-17 12:52:44 UTC
mefoster has just orphaned all her packages. So this review is not going to be finished by her.
Closing.