Bug 1302144 - Review Request: openshift-restclient-java - OpenShift Java REST Client
Summary: Review Request: openshift-restclient-java - OpenShift Java REST Client
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: gil cattaneo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-26 22:27 UTC by mk
Modified: 2016-08-22 20:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-22 20:42:57 UTC
Type: ---
Embargoed:
puntogil: fedora-review+


Attachments (Terms of Use)

Description mk 2016-01-26 22:27:48 UTC
Spec URL: https://www.acc.umu.se/~mk/fedora/openshift-restclient-java/openshift-restclient-java.spec
SRPM URL: https://www.acc.umu.se/~mk/fedora/openshift-restclient-java/openshift-restclient-java-3.0.1-1.fc24.src.rpm
Description: This is the Java REST client for the version 3 architecture of OpenShift based on Kubernetes. The implementation is a work in progress to provide functionality and features of the command-line interface and is used by JBoss Tools for OpenShift.
Fedora Account System Username: marcusk
Koji build URL: http://koji.fedoraproject.org/koji/taskinfo?taskID=12693842

Comment 1 gil cattaneo 2016-01-27 10:08:04 UTC
Hi,
jsch should be already listed as requires. you could remove:
Requires: jsch
you can also remove:
BuildRequires: mvn(org.apache.maven.plugins:maven-resources-plugin)
license file is part of the license stuff, you should handle it with %license macro
regards

Comment 2 gil cattaneo 2016-01-27 10:15:02 UTC
maybe you can use BuildRequires: mvn(com.jcraft:jsch) instead of BuildRequires: jsch. Reading the pom file properties-maven-plugin should be not involved as build tool, and should be removed

Comment 3 gil cattaneo 2016-01-27 10:20:16 UTC
these BRs deps are not listed:

mvn(commons-codec:commons-codec)
mvn(commons-lang:commons-lang)
mvn(org.apache.commons:commons-compress)
mvn(org.apache.httpcomponents:httpclient)
mvn(org.apache.httpcomponents:httpcore)
mvn(org.slf4j:slf4j-api)

Comment 4 Upstream Release Monitoring 2016-01-31 21:39:43 UTC
marcusk's scratch build of openshift-restclient-java-3.0.1-1.fc24.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=12763777

Comment 5 mk 2016-01-31 21:49:02 UTC
Thanks. I agree with all your suggestions and I've updated the spec to address them.

Updated spec URL: https://www.acc.umu.se/~mk/fedora/openshift-restclient-java/openshift-restclient-java.spec
Updated SRPM URL: https://www.acc.umu.se/~mk/fedora/openshift-restclient-java/openshift-restclient-java-3.0.1-1.fc24.src.rpm
Updated Koji build URL: http://koji.fedoraproject.org/koji/taskinfo?taskID=12763777

Here is a diff of the spec file from the original version:

--- SPECS/openshift-restclient-java.spec.old	2016-01-31 19:25:16.342412006 +0100
+++ SPECS/openshift-restclient-java.spec	2016-01-31 19:32:33.512994198 +0100
@@ -12,16 +12,19 @@
 BuildArch:      noarch
 
 BuildRequires: maven-local
-BuildRequires: jsch
+BuildRequires: mvn(com.jcraft:jsch)
+BuildRequires: mvn(commons-codec:commons-codec)
+BuildRequires: mvn(commons-io:commons-io)
+BuildRequires: mvn(commons-lang:commons-lang)
+BuildRequires: mvn(junit:junit)
+BuildRequires: mvn(log4j:log4j)
+BuildRequires: mvn(org.apache.commons:commons-compress)
+BuildRequires: mvn(org.apache.httpcomponents:httpclient)
+BuildRequires: mvn(org.apache.httpcomponents:httpcore)
 BuildRequires: mvn(org.jboss:jboss-dmr)
 BuildRequires: mvn(org.mockito:mockito-core)
-BuildRequires: mvn(junit:junit)
+BuildRequires: mvn(org.slf4j:slf4j-api)
 BuildRequires: mvn(org.slf4j:slf4j-log4j12)
-BuildRequires: mvn(log4j:log4j)
-BuildRequires: mvn(org.codehaus.mojo:properties-maven-plugin)
-BuildRequires: mvn(commons-io:commons-io)
-BuildRequires: mvn(org.apache.maven.plugins:maven-resources-plugin)
-Requires: jsch
 
 %description
 This is the Java REST client for the version 3 architecture of OpenShift based
@@ -38,7 +41,7 @@
 
 %prep
 %setup -qn %{name}-%{name}-%{version}.%{rls_tag}
-chmod -x license
+chmod -x license README.md
 
 %pom_remove_dep org.easytesting:fest-assert
 
@@ -52,11 +55,11 @@
 
 %files -f .mfiles
 %dir %{_javadir}/%{name}
-%license epl-v10.html
-%doc license
+%license epl-v10.html license
+%doc README.md DESIGN.md
 
 %files javadoc -f .mfiles-javadoc
-%license epl-v10.html
+%license epl-v10.html license
 
 %changelog
 * Sun Jan 10 2016 Marcus Karlsson <mk.se> - 3.0.1-1

Comment 6 gil cattaneo 2016-02-11 12:29:21 UTC
can you take this for me https://bugzilla.redhat.com/show_bug.cgi?id=1264337 ?

Comment 7 gil cattaneo 2016-02-11 13:38:52 UTC
Missing license headers in 
openshift-restclient-java-openshift-restclient-java-3.0.1.Final/src/main/java/com/openshift/internal/restclient/model/DeploymentConfig.java
Would you please contact upstream to fix it?
https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging/LicensingGuidelines#License_Clarification

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: "Apache (v2.0)", "Unknown or generated". 285 files have unknown
     license. Detailed output of licensecheck in /home/gil/1302144
     -openshift-restclient-java/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[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.
[x]: 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 10240 bytes in 2 files.
[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: 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]: 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]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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 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 jpackage-utils
     Note: Maven packages do not need to (Build)Require jpackage-utils. It
     is pulled in by maven-local
[x]: Javadoc documentation files are generated and included in -javadoc
     subpackage
[x]: Javadoc subpackages should not have Requires: jpackage-utils
[x]: Javadocs are placed in %{_javadocdir}/%{name} (no -%{version} symlink)

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:
[-]: 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).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     openshift-restclient-java-javadoc
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: 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.
 Test suite skipped
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[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]: 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:
[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: openshift-restclient-java-3.0.1-1.fc24.noarch.rpm
          openshift-restclient-java-javadoc-3.0.1-1.fc24.noarch.rpm
          openshift-restclient-java-3.0.1-1.fc24.src.rpm
3 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: File o directory non esistente
2 packages and 0 specfiles checked; 0 errors, 0 warnings.



Requires
--------
openshift-restclient-java (rpmlib, GLIBC filtered):
    java-headless
    jpackage-utils
    mvn(com.jcraft:jsch)
    mvn(com.sun:tools)
    mvn(commons-codec:commons-codec)
    mvn(commons-io:commons-io)
    mvn(commons-lang:commons-lang)
    mvn(log4j:log4j)
    mvn(org.apache.commons:commons-compress)
    mvn(org.apache.httpcomponents:httpclient)
    mvn(org.apache.httpcomponents:httpcore)
    mvn(org.jboss:jboss-dmr)
    mvn(org.slf4j:slf4j-api)
    mvn(org.slf4j:slf4j-log4j12)

openshift-restclient-java-javadoc (rpmlib, GLIBC filtered):
    jpackage-utils



Provides
--------
openshift-restclient-java:
    mvn(com.openshift:openshift-restclient-java)
    mvn(com.openshift:openshift-restclient-java:pom:)
    openshift-restclient-java

openshift-restclient-java-javadoc:
    openshift-restclient-java-javadoc



Source checksums
----------------
https://github.com/openshift/openshift-restclient-java/archive/openshift-restclient-java-3.0.1.Final.tar.gz :
  CHECKSUM(SHA256) this package     : 61ea5ebf39cd33103504f69a59c12dd1c3b6be2992799e3e85f967776d221303
  CHECKSUM(SHA256) upstream package : 61ea5ebf39cd33103504f69a59c12dd1c3b6be2992799e3e85f967776d221303


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -b 1302144 --plugins Java -m fedora-rawhide-i386
Buildroot used: fedora-rawhide-i386
Active plugins: Generic, Shell-api, Java
Disabled plugins: C/C++, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 8 gil cattaneo 2016-02-11 13:43:13 UTC
NON blocking issues:
Should be remove Group fileds, are unneccessary.
Blocking issues:
Missing license headers in 
openshift-restclient-java-openshift-restclient-java-3.0.1.Final/src/main/java/com/openshift/internal/restclient/model/DeploymentConfig.java
Would you please contact upstream to fix it?
https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging/LicensingGuidelines#License_Clarification

Why you can't run test suite? Is strictly related at Junit version?
Can you try to explain more in detail in the spec file?

Comment 9 Upstream Release Monitoring 2016-03-02 21:55:42 UTC
marcusk's scratch build of openshift-restclient-java-3.0.1-1.fc25.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=13205948

Comment 10 mk 2016-03-02 23:14:56 UTC
Thanks for the review, and sorry for the delay on my end. I have updated the spec file as follows:

I have received a license clarification from upstream developer André Dietisheim who confirmed that the license of DeploymentConfig.java as included in the tarball is EPL. I have included the email that I received complete with all headers as a source file and marked as %license in the package. The license header had already been added to the file in the upstream repository.

It turns out the comment in the spec regarding the tests were not entirely correct. They fail to run but it's not because of JUnit, it's because of a missing dependency on an assert from fest-assert which has not been packaged. I have included a patch which rewrites the test cases that uses the assertion so that they instead use equivalent JUnit assertions. I have also added a second patch that fixes three failing test cases, which to my understanding is because of an inconsistency between the test cases and the sample data which they operate on. The failing tests had also already been fixed in the upstream repository.

Also, the group field has been removed.

Updated SPEC URL: https://www.acc.umu.se/~mk/fedora/openshift-restclient-java/openshift-restclient-java.spec
Updated SRPM URL: https://www.acc.umu.se/~mk/fedora/openshift-restclient-java/openshift-restclient-java-3.0.1-1.fc25.src.rpm
Updated Koji URL: http://koji.fedoraproject.org/koji/taskinfo?taskID=13206620

Here is a diff of the spec file from the last version:

--- openshift-restclient-java.spec.orig	2016-03-02 23:39:44.225597729 +0100
+++ openshift-restclient-java.spec	2016-03-02 23:55:08.077415306 +0100
@@ -5,26 +5,35 @@
 Release:        1%{?dist}
 Summary:        OpenShift Java REST Client
 
-Group:          Development/Libraries
 License:        EPL
 URL:            https://github.com/openshift/openshift-restclient-java
 Source0:        https://github.com/openshift/%{name}/archive/%{name}-%{version}.%{rls_tag}.tar.gz
+
+# Clarification of license of src/main/java/com/openshift/internal/restclient/model/DeploymentConfig.java
+Source1:        license-clarification.txt
+
 BuildArch:      noarch
 
-BuildRequires: maven-local
-BuildRequires: mvn(com.jcraft:jsch)
-BuildRequires: mvn(commons-codec:commons-codec)
-BuildRequires: mvn(commons-io:commons-io)
-BuildRequires: mvn(commons-lang:commons-lang)
-BuildRequires: mvn(junit:junit)
-BuildRequires: mvn(log4j:log4j)
-BuildRequires: mvn(org.apache.commons:commons-compress)
-BuildRequires: mvn(org.apache.httpcomponents:httpclient)
-BuildRequires: mvn(org.apache.httpcomponents:httpcore)
-BuildRequires: mvn(org.jboss:jboss-dmr)
-BuildRequires: mvn(org.mockito:mockito-core)
-BuildRequires: mvn(org.slf4j:slf4j-api)
-BuildRequires: mvn(org.slf4j:slf4j-log4j12)
+# Remove dependency on fest-assert since it's not packaged.
+Patch0:         %{name}-test-fest-assert.patch
+
+# Fix failing tests in ImageStreamingTest. They are already fixed in upstream git.
+Patch1:         %{name}-test-imagestreamtest.patch
+
+BuildRequires:  maven-local
+BuildRequires:  mvn(com.jcraft:jsch)
+BuildRequires:  mvn(commons-codec:commons-codec)
+BuildRequires:  mvn(commons-io:commons-io)
+BuildRequires:  mvn(commons-lang:commons-lang)
+BuildRequires:  mvn(junit:junit)
+BuildRequires:  mvn(log4j:log4j)
+BuildRequires:  mvn(org.apache.commons:commons-compress)
+BuildRequires:  mvn(org.apache.httpcomponents:httpclient)
+BuildRequires:  mvn(org.apache.httpcomponents:httpcore)
+BuildRequires:  mvn(org.jboss:jboss-dmr)
+BuildRequires:  mvn(org.mockito:mockito-core)
+BuildRequires:  mvn(org.slf4j:slf4j-api)
+BuildRequires:  mvn(org.slf4j:slf4j-log4j12)
 
 %description
 This is the Java REST client for the version 3 architecture of OpenShift based
@@ -41,25 +50,27 @@
 
 %prep
 %setup -qn %{name}-%{name}-%{version}.%{rls_tag}
+cp %{SOURCE1} .
 chmod -x license README.md
 
+%patch0 -p1
+%patch1 -p1
+
 %pom_remove_dep org.easytesting:fest-assert
 
 %build
-# Tests skipped because of wrong junit version
-# (Fedora is 4.10, this expects 4.8)
-%mvn_build --skip-tests
+%mvn_build
 
 %install
 %mvn_install
 
 %files -f .mfiles
 %dir %{_javadir}/%{name}
-%license epl-v10.html license
+%license epl-v10.html license license-clarification.txt
 %doc README.md DESIGN.md
 
 %files javadoc -f .mfiles-javadoc
-%license epl-v10.html license
+%license epl-v10.html license license-clarification.txt
 
 %changelog
 * Sun Jan 10 2016 Marcus Karlsson <mk.se> - 3.0.1-1

Comment 11 gil cattaneo 2016-03-03 05:57:13 UTC
NON blocking issues:
Should be remove Group fileds, no longer needed.

%package javadoc
-Group:          Documentation
Summary:        Javadoc for %{name}

Thanks for your work.
Approved

Comment 12 mk 2016-03-03 16:06:08 UTC
Thanks, I missed the one in the javadoc package. I'll remove it too.

Comment 13 Gwyn Ciesla 2016-03-03 19:20:29 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/openshift-restclient-java

Comment 14 Fedora Update System 2016-03-19 11:04:18 UTC
openshift-restclient-java-3.0.1-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-729f5f7830


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