Bug 1999177 - Review Request: system-rules - A collection of JUnit rules for testing code which uses java.lang.System
Summary: Review Request: system-rules - A collection of JUnit rules for testing code w...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2005183
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-30 15:41 UTC by Didik Supriadi
Modified: 2022-03-08 07:57 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-08 07:57:58 UTC
Type: ---
Embargoed:
redhat: fedora-review+


Attachments (Terms of Use)

Description Didik Supriadi 2021-08-30 15:41:06 UTC
Spec URL: https://didiksupriadi41.fedorapeople.org/system-rules.spec
SRPM URL: https://didiksupriadi41.fedorapeople.org/system-rules-1.19.0-1.fc34.src.rpm

Description:
System Rules is a collection of JUnit rules for testing code which uses
java.lang.System.

Fedora Account System Username: didiksupriadi41

Comment 1 Didik Supriadi 2021-08-30 15:41:09 UTC
This package built on koji:  https://koji.fedoraproject.org/koji/taskinfo?taskID=74810416

Comment 2 Robert Scheck 2021-10-19 20:47:55 UTC
As mentioned in bug #2000976, I'm not experienced in Java (packaging), I've read https://docs.fedoraproject.org/en-US/java-packaging-howto/manpages/, and I'll try to review this...hopefully.

> %pom_xpath_inject pom:project '<groupId>com.github.stefanbirkner</groupId>'
> %pom_remove_plugin :animal-sniffer-maven-plugin
> %pom_add_dep org.apache.commons:commons-lang3
> %pom_xpath_inject 'pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId="maven-surefire-plugin"]' '<version>any</version>'

Why are these POM changes needed? Does it make sense to put the reason/explanation into comments inside the spec file?

Comment 3 Didik Supriadi 2021-10-23 10:16:43 UTC
(In reply to Robert Scheck from comment #2)
> As mentioned in bug #2000976, I'm not experienced in Java (packaging), I've
> read https://docs.fedoraproject.org/en-US/java-packaging-howto/manpages/,
> and I'll try to review this...hopefully.
> 
> > %pom_xpath_inject pom:project '<groupId>com.github.stefanbirkner</groupId>'
> > %pom_remove_plugin :animal-sniffer-maven-plugin
> > %pom_add_dep org.apache.commons:commons-lang3
> > %pom_xpath_inject 'pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId="maven-surefire-plugin"]' '<version>any</version>'
> 
> Why are these POM changes needed? Does it make sense to put the
> reason/explanation into comments inside the spec file?

I've fixed some issues and added explanations for each pom_*

Spec URL: https://didiksupriadi41.fedorapeople.org/system-rules.spec
SRPM URL: https://didiksupriadi41.fedorapeople.org/system-rules-1.19.0-2.fc34.src.rpm

Comment 4 Robert Scheck 2022-02-02 22:01:13 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


===== 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", "Common Public License 1.0", "*No
     copyright* Apache License 2.0". 48 files have unknown license.
[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
[x]: 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.
[x]: 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: There are rpmlint messages (see below).
[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]: 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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[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:
[?]: 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:
[-]: 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 below).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %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]: Spec use %global instead of %define unless justified.

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

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

Generic:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     diff below).
     -> Even there is a small difference, it doesn't have an impact for the packaged result.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see below).


Rpmlint
-------
system-rules-javadoc.noarch: W: package-with-huge-docs:  99%
system-rules.noarch: W: no-documentation
system-rules-javadoc.noarch: E: files-duplicated-waste 287630
system-rules-javadoc.noarch: W: files-duplicate /usr/share/javadoc/system-rules/jquery/jquery-3.5.1.js /usr/share/javadoc/system-rules/jquery/external/jquery/jquery.js
system-rules-javadoc.noarch: W: file-not-utf8 /usr/share/javadoc/system-rules/member-search-index.zip
system-rules-javadoc.noarch: W: file-not-utf8 /usr/share/javadoc/system-rules/package-search-index.zip
system-rules-javadoc.noarch: W: file-not-utf8 /usr/share/javadoc/system-rules/type-search-index.zip

-> I don't think the -javadoc issues can be addressed via the spec file, as the package is automatically generated using Fedora RPM macros


Rpmlint (installed packages)
----------------------------
system-rules-javadoc.noarch: W: package-with-huge-docs:  99%
system-rules.noarch: W: no-documentation
system-rules-javadoc.noarch: E: files-duplicated-waste 287630
system-rules-javadoc.noarch: W: files-duplicate /usr/share/javadoc/system-rules/jquery/jquery-3.5.1.js /usr/share/javadoc/system-rules/jquery/external/jquery/jquery.js
system-rules-javadoc.noarch: W: file-not-utf8 /usr/share/javadoc/system-rules/member-search-index.zip
system-rules-javadoc.noarch: W: file-not-utf8 /usr/share/javadoc/system-rules/package-search-index.zip
system-rules-javadoc.noarch: W: file-not-utf8 /usr/share/javadoc/system-rules/type-search-index.zip

-> I don't think the -javadoc issues can be addressed via the spec file, as the package is automatically generated using Fedora RPM macros


Source checksums
----------------
https://github.com/stefanbirkner/system-rules/archive/system-rules-1.19.0/system-rules-1.19.0.tar.gz :
  CHECKSUM(SHA256) this package     : 09c39af89b4ffb2cdd50bbfc6d89472efc985538ab1762f4d1e4f7725010bc56
  CHECKSUM(SHA256) upstream package : 09c39af89b4ffb2cdd50bbfc6d89472efc985538ab1762f4d1e4f7725010bc56


Requires
--------
system-rules (rpmlib, GLIBC filtered):
    (java-headless or java-11-headless)
    javapackages-filesystem
    mvn(junit:junit)



Provides
--------
system-rules:
    mvn(com.github.stefanbirkner:system-rules)
    mvn(com.github.stefanbirkner:system-rules:pom:)
    system-rules



Diff spec file in url and in SRPM
---------------------------------
--- srpm/system-rules.spec      2022-02-02 21:58:50.885288158 +0100
+++ srpm-unpacked/system-rules.spec     2021-10-23 12:09:36.000000000 +0200
@@ -33,10 +33,10 @@
 %pom_xpath_inject pom:project '<groupId>com.github.stefanbirkner</groupId>'

-# add version to remove warning about unversioned plugin
-%pom_xpath_inject 'pom:plugin[pom:artifactId = "maven-surefire-plugin"]' '<version>3.0.0-M5</version>'
-
 # remove forkMode (deprecated)
 %pom_xpath_remove 'pom:plugin[pom:artifactId = "maven-surefire-plugin"]/pom:configuration/pom:forkMode'

+# add version to remove warning about unversioned plugin
+%pom_xpath_inject 'pom:plugin[pom:artifactId = "maven-surefire-plugin"]' '<version>3.0.0-M5</version>'
+
 # alias for junit
 # this PR will solve this in the future: https://src.fedoraproject.org/rpms/junit/pull-request/4


Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1999177
Buildroot used: fedora-rawhide-x86_64
Active plugins: Java, Generic, Shell-api
Disabled plugins: R, C/C++, Haskell, Perl, SugarActivity, fonts, PHP, Python, Ocaml
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH


-> APPROVED


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