Bug 2247877 - Review Request: JUnitParams - Parameterized Java tests
Summary: Review Request: JUnitParams - Parameterized Java tests
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-11-04 01:50 UTC by Jerry James
Modified: 2023-12-13 01:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-12-13 01:25:27 UTC
Type: ---
Embargoed:
orion: fedora-review+


Attachments (Terms of Use)
Example Doxygen configuration file (122.59 KB, text/plain)
2023-11-18 18:20 UTC, Benson Muite
no flags Details
Updated spec file to create documentation using doxygen (3.29 KB, text/plain)
2023-11-18 18:21 UTC, Benson Muite
no flags Details

Description Jerry James 2023-11-04 01:50:23 UTC
Spec URL: https://jjames.fedorapeople.org/JUnitParams/JUnitParams.spec
SRPM URL: https://jjames.fedorapeople.org/JUnitParams/JUnitParams-1.1.1-1.fc40.src.rpm
Fedora Account System Username: jjames
Description: The JUnitParams project adds a new runner to JUnit and provides much easier and more readable parameterized tests for JUnit >= 4.12.

The main differences with the standard JUnit Parameterized runner are:
- more explicit - params are in test method params, not class fields
- less code - you don't need a constructor to set up parameters
- you can mix parameterized with non-parameterized methods in one class
- params can be passed as a CSV string or from a parameters provider class
- parameters provider class can have as many parameters providing methods as you want, so that you can group different cases
- you can have a test method that provides parameters (no external classes or statics anymore)
- you can see actual parameter values in your IDE (in JUnit's Parameterized, it's only consecutive numbers of parameters)

Comment 1 Benson Muite 2023-11-12 18:04:20 UTC
fedora-review warnings:

- Javadoc documentation files are generated and included in -javadoc
  subpackage
  Note: No javadoc subpackage present. Note: Javadocs are optional for
  Fedora versions >= 21
  See: https://fedoraproject.org/wiki/Packaging:Java#Javadoc_installation
- Javadocs are placed in %{_javadocdir}/%{name} (no -%{version} symlink)
  Note: No javadoc subpackage present
  See: https://fedoraproject.org/wiki/Packaging:Java#Javadoc_installation

Probably an error with fedora-review as a javadoc package is present. The javadoc
package bundles jquery and a number of other javascript files. Probably at least
jquery should be indicated as bundled.

rpm -qL JUnitParams-javadoc-1.1.1-1.fc40.noarch.rpm
/usr/share/licenses/JUnitParams/LICENSE.txt

but there is another license file

/usr/share/javadoc/JUnitParams/legal/LICENSE

Should this also be marked as a license file?

Comment 2 Jerry James 2023-11-13 21:39:33 UTC
Thank you Benson!  I'm not sure what is going on here.  The contents of /usr/share/javadoc/JUnitParams/legal appear to apply to the JDK itself.  None of that content is derived from the JUnitParams sources.  I'm not sure why xmvn decided to include it.

In any case, I seriously doubt anybody will want to see the javadocs for this particular package, so let's make things simpler and not ship it.  The same URLs as above apply.  That is the only change I made.

Comment 3 Benson Muite 2023-11-17 18:48:41 UTC
Issues:
=======
- Javadoc documentation files are generated and included in -javadoc
  subpackage
  Note: No javadoc subpackage present. Note: Javadocs are optional for
  Fedora versions >= 21
  See: https://fedoraproject.org/wiki/Packaging:Java#Javadoc_installation
- Javadocs are placed in %{_javadocdir}/%{name} (no -%{version} symlink)
  Note: No javadoc subpackage present
  See: https://fedoraproject.org/wiki/Packaging:Java#Javadoc_installation


===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "*No copyright* Apache License 2.0".
     174 files have unknown license. Detailed output of licensecheck in
     /home/fedora/2247877-JUnitParams/licensecheck.txt
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[-]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[ ]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 11038 bytes in 2 files.
[ ]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[x]: 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 %license.
[x]: The License field must be a valid SPDX expression.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Java:
[x]: Bundled jar/class files should be removed before build
[x]: Packages have proper BuildRequires/Requires on javapackages-tools
     (jpackage-utils)
     Note: Maven packages do not need to (Build)Require jpackage-utils. It
     is pulled in by maven-local

Maven:
[x]: If package contains pom.xml files install it (including metadata) even
     when building with ant
[x]: POM files have correct Maven mapping
[x]: Maven packages should use new style packaging
[x]: Old add_to_maven_depmap macro is not being used
[x]: Packages DO NOT have Requires(post) and Requires(postun) on jpackage-
     utils for %update_maven_depmap macro
[x]: Package DOES NOT use %update_maven_depmap in %post/%postun
[x]: Packages use .mfiles file list instead of %{_datadir}/maven2/poms

===== SHOULD items =====

Generic:
[x]: 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]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: Spec use %global instead of %define unless justified.

Java:
[ ]: Package uses upstream build method (ant/maven/etc.)
[x]: Packages are noarch unless they use JNI

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: JUnitParams-1.1.1-1.fc40.noarch.rpm
          JUnitParams-1.1.1-1.fc40.src.rpm
========================================= rpmlint session starts ========================================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmp4fkao6vd')]
checks: 31, packages: 2

========== 2 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.2 s =========




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 1

 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.0 s 



Source checksums
----------------
https://github.com/Pragmatists/JUnitParams/archive/JUnitParams-1.1.1.tar.gz :
  CHECKSUM(SHA256) this package     : 458fc35c5dfa5f32e44e52be592cd17486775bda2632ff10e98ec3c509dd78d8
  CHECKSUM(SHA256) upstream package : 458fc35c5dfa5f32e44e52be592cd17486775bda2632ff10e98ec3c509dd78d8


Requires
--------
JUnitParams (rpmlib, GLIBC filtered):
    (java-headless or java-21-headless or java-17-headless or java-11-headless or java-1.8.0-headless)
    javapackages-filesystem
    mvn(junit:junit)



Provides
--------
JUnitParams:
    JUnitParams
    mvn(pl.pragmatists:JUnitParams)
    mvn(pl.pragmatists:JUnitParams:pom:)
    osgi(pl.pragmatists.JUnitParams)



Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/usr/bin/fedora-review -b 2247877
Buildroot used: fedora-rawhide-aarch64
Active plugins: Java, Shell-api, Generic
Disabled plugins: Ocaml, R, Python, Haskell, Perl, C/C++, PHP, SugarActivity, fonts
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comments:
a) Doxygen can generate man pages and latex documentation from java sources. Just need to add 
Doxygen to build dependencies and create a configuration file.
b) It also seems possible to create HTML documentation without javascript using Doxygen, probably also using javadoc

Comment 4 Benson Muite 2023-11-17 18:56:08 UTC
Let me know if can review one of:
https://bugzilla.redhat.com/show_bug.cgi?id=2249249
https://bugzilla.redhat.com/show_bug.cgi?id=2250223

Comment 5 Jerry James 2023-11-17 21:40:15 UTC
(In reply to Benson Muite from comment #3)
> Issues:
> =======
> - Javadoc documentation files are generated and included in -javadoc
>   subpackage
>   Note: No javadoc subpackage present. Note: Javadocs are optional for
>   Fedora versions >= 21
>   See: https://fedoraproject.org/wiki/Packaging:Java#Javadoc_installation
> - Javadocs are placed in %{_javadocdir}/%{name} (no -%{version} symlink)
>   Note: No javadoc subpackage present
>   See: https://fedoraproject.org/wiki/Packaging:Java#Javadoc_installation

These aren't really issues since, as noted, Javadocs are optional for Fedora versions >= 21.  I'm opting to not include them.

> Comments:
> a) Doxygen can generate man pages and latex documentation from java sources.
> Just need to add 
> Doxygen to build dependencies and create a configuration file.
> b) It also seems possible to create HTML documentation without javascript
> using Doxygen, probably also using javadoc

I'd rather not drag doxygen into this package.  It's just a little package of test utilities I need to run tests for another package.  Is it okay with you if we leave things as they are?

Comment 6 Benson Muite 2023-11-18 18:20:15 UTC
Created attachment 2000165 [details]
Example Doxygen configuration file

Comment 7 Benson Muite 2023-11-18 18:21:03 UTC
Created attachment 2000166 [details]
Updated spec file to create documentation using doxygen

Comment 8 Benson Muite 2023-11-18 18:25:18 UTC
Added example of changes that can be made to generate documentation.  This seems like something that
can/should be used for many Java packages.  Rather than include the configuration file as an additional
file, it can be generated during the build process and modified using sed or some other similar tool.
If you can take a look and possibly include some version, it would be great and possibly helpful
for Java ecosystem in Fedora.

Comment 9 Jerry James 2023-11-21 16:03:16 UTC
Thank you, Benson.  While I appreciate your enthusiasm, I don't really want to pioneer the use of doxygen for building javadocs, at least not with this package.  I just need this to run a few tests.  Please, can we proceed with the package as it is?

Comment 10 Benson Muite 2023-11-26 07:23:20 UTC
Have unassigned myself since believe it is good to have
documentation of some form. Did give a positive review:
https://bugzilla.redhat.com/show_bug.cgi?id=2251092
Happy to review other items.  Will find out more about
java packaging since it would be good to have bazel.

Comment 11 Orion Poplawski 2023-12-04 02:04:59 UTC
I'll take this.

Comment 12 Orion Poplawski 2023-12-04 02:43:44 UTC
While I think it's laudable to work toward a replacement javadoc generator, I don't think this review is the place to do it.  Rest looks good as noted.  Approved.

Comment 13 Jerry James 2023-12-04 16:01:30 UTC
Thank you for the review, Orion!  Much appreciated.

Comment 14 Fedora Admin user for bugzilla script actions 2023-12-04 16:02:50 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/JUnitParams

Comment 15 Fedora Update System 2023-12-04 16:42:49 UTC
FEDORA-2023-b53875bae0 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-b53875bae0

Comment 16 Fedora Update System 2023-12-05 03:19:32 UTC
FEDORA-2023-b53875bae0 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-b53875bae0 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-b53875bae0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2023-12-13 01:25:27 UTC
FEDORA-2023-b53875bae0 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


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