Bug 1231457

Summary: Review Request: rescu - Lightweight Rest client utility for Java
Product: [Fedora] Fedora Reporter: Jonny Heggheim <hegjon>
Component: Package ReviewAssignee: gil cattaneo <puntogil>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: akurtako, matija.mazi, package-review, puntogil
Target Milestone: ---Flags: puntogil: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-03 23:58:00 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:
Attachments:
Description Flags
MIT License none

Description Jonny Heggheim 2015-06-13 13:57:44 UTC
Spec URL: https://raw.githubusercontent.com/hegjon/rescu-rpm/master/rescu.spec
SRPM URL: https://raw.githubusercontent.com/hegjon/rescu-rpm/master/rescu-1.7.2-1.fc22.src.rpm
Description: ResCU enables the user to create a proxy Rest client in run-time directly from a JAX-RS annotated interface. ResCU is mostly focused on json-based services, and uses Jackson for json-to-object mapping.
Fedora Account System Username: jonny

Koji build link: http://koji.fedoraproject.org/koji/taskinfo?taskID=10041137

I need a sponsor since this is my second package. My first one have not been reviewed

Comment 1 gil cattaneo 2015-06-13 14:46:34 UTC
Spec file seem ok, with an exception:
Requires: java-headless >= 1:1.6.0 should be removed, this is handled by Java tools
Group: System Environment/Libraries should be removed, no more required

%dir %{_javadir}/%{name} should be removed, this is handled by Java tools

Comment 2 gil cattaneo 2015-06-13 14:50:50 UTC
there is an issues related the missing license file.
see https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging/LicensingGuidelines#License_Text

i quote from the guide: "If the source package does not include the text of the license(s), the packager should contact upstream and encourage them to correct this mistake. "

Comment 3 gil cattaneo 2015-06-13 15:07:15 UTC
Found a problem in the source: package bundle 
src/main/java/si/mazi/rescu/utils/Base64.java available as java-base64. Please remove and use that library
rescu/src/main/java/si/mazi/rescu/utils/AssertUtil.java this, instead i don't know where/what is the original package @ http://xeiam.com

see https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Why_no_Bundled_Libraries

Comment 4 Jonny Heggheim 2015-06-13 15:14:23 UTC
I have contacted upstream and asked them to include a file containing the license

Comment 5 gil cattaneo 2015-06-13 15:18:25 UTC
(In reply to Jonny Heggheim from comment #4)
> I have contacted upstream and asked them to include a file containing the
> license
Great! add a comment in the spec file related this problem with the reference of that bug.
should explain in the spec file why dont package tje latest release (1.8.1) as comment

Comment 6 gil cattaneo 2015-06-13 15:33:04 UTC
build fine with:

BuildRequires: mvn(net.iharder:base64)

rm -rf src/main/java/si/mazi/rescu/utils/Base64.java
find ./ -name "*.java" -exec sed -i "s/si.mazi.rescu.utils.Base64/net.iharder.Base64/g" {} +
%pom_add_dep net.iharder:base64:2.3.8

Comment 7 gil cattaneo 2015-06-13 15:49:06 UTC
Created attachment 1038368 [details]
MIT License

Until upstream don't include the license file should be used the attached file

e.g.
Source1: rescu-LICENSE
...
%setup -q -n rescu-rescu-%{version}
cp -p %{SOURCE1} LICENSE
...
%doc README.md
%license LICENSE

%files javadoc -f .mfiles-javadoc
%doc README.md
%license LICENSE

Comment 8 Jonny Heggheim 2015-06-13 16:07:26 UTC
Thanks for all your feedback and suggestions. I have pushed some updates. The only issue is AssertUtil.java

Comment 9 gil cattaneo 2015-06-14 02:10:41 UTC
(In reply to Jonny Heggheim from comment #8)
> Thanks for all your feedback and suggestions. I have pushed some updates.
> The only issue is AssertUtil.java

Seem a customization of https://github.com/timmolter/XChange/blob/develop/xchange-core/src/main/java/com/xeiam/xchange/utils/Assert.java

Comment 10 gil cattaneo 2015-06-14 02:18:20 UTC
Bundle also other parts of the xchange code
src/main/java/si/mazi/rescu/serialization/jackson/serializers
xchange-core/src/main/java/com/xeiam/xchange/utils/jackson

Comment 11 gil cattaneo 2015-06-14 02:36:04 UTC
Seem rescu and xchange have circular dependency cycle
https://github.com/timmolter/XChange/blob/xchange-3.0.0/xchange-core/pom.xml
maybe is possible requested a temporary FPC exception
see https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Exceptions
e.g. https://fedorahosted.org/fpc/ticket/510

Comment 12 Jonny Heggheim 2015-06-14 09:59:34 UTC
xchange is on my TODO list. Maybe I should try to communicate with upstream with both projects and see if we are able to find a better solution.

Comment 13 Jonny Heggheim 2015-06-15 19:57:15 UTC
Upstream have added a file containing the license

Comment 14 Matija Mazi 2015-06-16 11:35:59 UTC
Hi, I'm the author of rescu and a contributing developer at XChange.

I've fixed the following issues in rescu:
- Added LINCESE.txt,
- removed AssertUtil.java,
- added a dependency on net.iharder:base64 and removed Base64.java from rescu.

I've created a pull request in XChange that removes the duplicated jackson serializers:
https://github.com/timmolter/XChange/pull/994

I think this covers the above mentioned issues (when the Pull Request is pulled). Please let me know if there is anything else that needs to be done.

Thanks for the Fedora packaging effort!

Comment 15 Jonny Heggheim 2015-06-16 16:20:58 UTC
Thanks a lot! :)

I will update the SPEC file to point to a non released version and bump it when the next version have been released.

Comment 16 Jonny Heggheim 2015-06-16 21:02:02 UTC
I updated the SPEC file to the latest SNAPSHOT, I had to disable the unit test because we do not have all the test dependencies yet.

Koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=10074380

Comment 17 gil cattaneo 2015-06-16 23:07:46 UTC
(In reply to Jonny Heggheim from comment #16)
> I updated the SPEC file to the latest SNAPSHOT, I had to disable the unit
> test because we do not have all the test dependencies yet.
> 
> Koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=10074380

"Each step" should be commented in the spec file.

Please, remove: Source1...

See https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Pre-Release_packages

Spec file change in:
...
Release: 0.1%{?dist}
...
%changelog
* Tue Jun 16 2015 Jonny Heggheim <hegjon> - 1.8.2-0.1
...

Comment 18 gil cattaneo 2015-06-16 23:13:51 UTC
> (In reply to Jonny Heggheim from comment #16)
> > I had to disable the unit test because we do not have all the test dependencies yet.

than you should use: %mvn_build -f

see https://fedorahosted.org/released/javapackages/doc/
    https://fedorahosted.org/released/javapackages/doc/#packaging_maven_project

Comment 19 gil cattaneo 2015-06-16 23:18:28 UTC
(In reply to Matija Mazi from comment #14)
> Hi, I'm the author of rescu and a contributing developer at XChange.
> 
> I've fixed the following issues in rescu:

> - added a dependency on net.iharder:base64 and removed Base64.java from
> rescu.
> 
other way is use jvm apis
http://pkgs.fedoraproject.org/cgit/py4j.git/tree/py4j-Base64-java7.patch
http://pkgs.fedoraproject.org/cgit/py4j.git/tree/py4j-Base64-java8.patch
> 
> Thanks for the Fedora packaging effort!
glad to help

Comment 20 Jonny Heggheim 2015-06-17 07:13:14 UTC
Thanks for the pointers, I have updated the SPEC file

Comment 21 Jonny Heggheim 2015-08-07 18:35:00 UTC
Bumped to latest version and fixed issues that was found in #1230949

Spec URL: https://raw.githubusercontent.com/hegjon/rescu-rpm/master/rescu.spec
SRPM URL: https://raw.githubusercontent.com/hegjon/rescu-rpm/master/rescu-1.8.2-0.1.gitbeb9897.fc22.src.rpm

Comment 22 Alexander Kurtakov 2015-08-17 14:23:19 UTC
Removing FE-NEEDSPONSOR as I sponsored Jonny.

Comment 23 gil cattaneo 2015-08-17 14:40:47 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: "MIT/X11 (BSD like)", "Unknown or generated". 2 files have
     unknown license. Detailed output of licensecheck in
     /home/gil/1231457-rescu/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 1 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: There are rpmlint messages (see attachment).
[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 rescu-
     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.
[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: rescu-1.8.2-0.1.gitbeb9897.fc24.noarch.rpm
          rescu-javadoc-1.8.2-0.1.gitbeb9897.fc24.noarch.rpm
          rescu-1.8.2-0.1.gitbeb9897.fc24.src.rpm
rescu.noarch: W: spelling-error %description -l en_US json -> son, j son
rescu.src: W: spelling-error %description -l en_US json -> son, j son
3 packages and 0 specfiles checked; 0 errors, 2 warnings.




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



Requires
--------
rescu-javadoc (rpmlib, GLIBC filtered):
    jpackage-utils

rescu (rpmlib, GLIBC filtered):
    java-headless
    jpackage-utils
    mvn(com.fasterxml.jackson.core:jackson-databind)
    mvn(com.google.code.findbugs:jsr305)
    mvn(javax.ws.rs:jsr311-api)
    mvn(net.iharder:base64)
    mvn(org.slf4j:slf4j-api)



Provides
--------
rescu-javadoc:
    rescu-javadoc

rescu:
    mvn(com.github.mmazi:rescu)
    mvn(com.github.mmazi:rescu:pom:)
    rescu



Source checksums
----------------
https://github.com/mmazi/rescu/archive/beb9897f079d03f585633672fd9d2be1f8ed8e33.tar.gz :
  CHECKSUM(SHA256) this package     : 39fca4da362548f12eea83731004eb97a813de5f538473e2fe6c2e926774079b
  CHECKSUM(SHA256) upstream package : 39fca4da362548f12eea83731004eb97a813de5f538473e2fe6c2e926774079b


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/bin/fedora-review -b 1231457 --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 24 gil cattaneo 2015-08-17 14:42:25 UTC
Seem all fine. Approved.

Comment 25 Jonny Heggheim 2015-08-18 20:37:27 UTC
Thanks!

Comment 26 Jonny Heggheim 2015-08-19 07:10:48 UTC
New Package SCM Request
=======================
Package Name: rescu
Short Description: Lightweight Rest client utility for Java
Upstream URL: https://github.com/mmazi/rescu
Owners: jonny
Branches: f23

Comment 27 Gwyn Ciesla 2015-08-20 13:32:06 UTC
Git done (by process-git-requests).