Bug 1291558 - Review Request: mariadb-java-client - MariaDB connector for java
Summary: Review Request: mariadb-java-client - MariaDB connector for java
Keywords:
Status: CLOSED ERRATA
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: 2015-12-15 07:12 UTC by Tomas Repik
Modified: 2016-04-22 12:15 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-04-06 17:20:38 UTC
Type: ---
Embargoed:
puntogil: fedora-review+


Attachments (Terms of Use)

Description Tomas Repik 2015-12-15 07:12:02 UTC
Spec URL: https://github.com/trepik/tmp/blob/master/mariadb-java-client.spec
SRPM URL: https://www.dropbox.com/s/nghaa0mtwaarl04/mariadb-java-client-1.3.3-1.fc22.src.rpm?dl=0
Description:
MariaDB Connector/J is a Type 4 JDBC driver, also known as the Direct to
Database Pure Java Driver. It was developed specifically as a lightweight
JDBC connector for use with MySQL and MariaDB database servers.

Packaged based on: Bug 1185620 - Feature Request: Include JDBC drivers in mariadb
https://bugzilla.redhat.com/show_bug.cgi?id=1185620
Fedora Account System Username: trepik

Comment 1 gil cattaneo 2015-12-15 19:29:49 UTC
hi

you must remove:
%global _mavenmetadir /usr/share/maven-metadata
you must explain (as comment in the spec file) why test suite is not executed

you must install license file with %license macro (*also* in javadoc sub package)

you should remove unnecessary:
# Cleanup
find . -name "*.class" -print -delete
find . -name "*.jar" -print -delete

you should use (to keep timestamp when converting from dos to unix line ending):
for file in README.md documentation/*.md; do
 sed -i.orig 's|\r||g' $file
 touch -r $file.orig $file
 rm $file.orig
done

instead of
sed -i 's/\r$//' README.md
sed -i 's/\r$//' documentation/Use-MariaDB-Connector-j-driver.md
sed -i 's/\r$//' documentation/About-MariaDB-Connector-J.md
sed -i 's/\r$//' documentation/Developers-Guide.md
sed -i 's/\r$//' documentation/Failover-and-high-availability.md

Comment 2 gil cattaneo 2015-12-15 19:35:30 UTC
you must add also these missing buildrequires:
mvn(com.google.code.maven-replacer-plugin:replacer)

Comment 3 Tomas Repik 2015-12-16 14:13:30 UTC
Spec URL: https://github.com/trepik/tmp/blob/master/mariadb-java-client.spec
SRPM URL: https://www.dropbox.com/s/szbs7qtwkh5we7h/mariadb-java-client-1.3.3-2.fc22.src.rpm?dl=0

fixed issues mentioned above

also, temporarly removed checkstyle plugin unitl I find a way to get it working

Comment 4 Upstream Release Monitoring 2015-12-16 21:07:31 UTC
gil's scratch build of mariadb-java-client-1.3.3-1.fc23.src.rpm for rawhide failed http://koji.fedoraproject.org/koji/taskinfo?taskID=12218814

Comment 5 Upstream Release Monitoring 2015-12-16 21:29:01 UTC
gil's scratch build of mariadb-java-client-1.3.3-1.fc23.src.rpm for rawhide failed http://koji.fedoraproject.org/koji/taskinfo?taskID=12218956

Comment 6 gil cattaneo 2015-12-16 21:31:57 UTC
To package should at least use the latest stable version of Fedora (F23)
see also https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group

Other tricks:

use
%pom_add_dep net.java.dev.jna:jna-platform:'${jna.version}' . "<optional>true</optional>"

because also net.java.dev.jna:jna have the same purpose

remove preconfigured OSGi manifest file and generate OSGi manifest file with maven-bundle-plugin instead of using maven-jar-plugin

rm src/main/resources/META-INF/MANIFEST.MF
%pom_remove_plugin :maven-jar-plugin
%pom_xpath_set "pom:packaging" bundle
%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.5.4 . '
<extensions>true</extensions>
<configuration>
  <instructions>
    <Bundle-SymbolicName>${project.groupId}</Bundle-SymbolicName>
    <Bundle-Name>MariaDB JDBC Client</Bundle-Name>
    <Bundle-Version>${project.version}.0</Bundle-Version>
    <Export-Package>org.mariadb.jdbc.*</Export-Package>
    <Import-Package>
      !com.sun.jna.*,
      javax.net;resolution:=optional,
      javax.net.ssl;resolution:=optional,
      javax.sql;resolution:=optional,
      javax.transaction.xa;resolution:=optional
    </Import-Package>
  </instructions>
</configuration>
<executions>
  <execution>
    <id>bundle-manifest</id>
    <phase>process-classes</phase>
    <goals>
      <goal>manifest</goal>
    </goals>
  </execution>
</executions>'

Comment 7 Upstream Release Monitoring 2015-12-16 21:37:14 UTC
gil's scratch build of mariadb-java-client-1.3.3-1.fc23.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=12218973

Comment 8 Tomas Repik 2016-01-20 09:16:18 UTC
Spec URL: https://trepik.fedorapeople.org/mariadb-java-client.spec
SRPM URL: https://trepik.fedorapeople.org/mariadb-java-client-1.3.3-3.fc23.src.rpm

* Wed Jan 20 2016 Tomáš Repík <trepik> - 1.3.3-3
- generating OSGi manifest file with maven-bundle-plugin

also checkstyle plugin removed permanently, it's useless.

Comment 9 gil cattaneo 2016-02-13 13:09:19 UTC
is available https://downloads.mariadb.com/files/MariaDB/connector-java-1.3.5

Comment 10 Tomas Repik 2016-02-15 12:11:31 UTC
Spec URL: https://trepik.fedorapeople.org/mariadb-java-client.spec
SRPM URL: https://trepik.fedorapeople.org/mariadb-java-client-1.3.5-1.fc23.src.rpm

* Mon Feb 15 2016 Tomas Repik <trepik> - 1.3.5-1
- version update

Comment 11 Tomas Repik 2016-03-10 14:33:24 UTC
Spec URL: https://trepik.fedorapeople.org/mariadb-java-client/v1/mariadb-java-client.spec
SRPM URL: https://trepik.fedorapeople.org/mariadb-java-client/v1/mariadb-java-client-1.3.6-1.fc23.src.rpm

* Thu Mar 10 2016 Tomas Repik <trepik> - 1.3.6-1
- version update

Comment 12 gil cattaneo 2016-03-17 14:22:18 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.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "LGPL (v2.1 or later)", "LGPL", "Unknown or generated", "BSD (3
     clause) LGPL (v2.1 or later)". 84 files have unknown license. Detailed
     output of licensecheck in /home/gil/1291558-mariadb-java-
     client/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[?]: 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 870400 bytes in 8 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 mariadb-
     java-client-javadoc
[x]: Package functions as described.
[x]: Latest version is packaged.
[?]: 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: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: mariadb-java-client-1.3.6-1.fc25.noarch.rpm
          mariadb-java-client-javadoc-1.3.6-1.fc25.noarch.rpm
          mariadb-java-client-1.3.6-1.fc25.src.rpm
mariadb-java-client.noarch: W: only-non-binary-in-usr-lib
3 packages and 0 specfiles checked; 0 errors, 1 warnings.




Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
mariadb-java-client.noarch: W: only-non-binary-in-usr-lib
2 packages and 0 specfiles checked; 0 errors, 1 warnings.



Requires
--------
mariadb-java-client (rpmlib, GLIBC filtered):
    java-headless
    javapackages-tools
    mariadb

mariadb-java-client-javadoc (rpmlib, GLIBC filtered):
    javapackages-tools



Provides
--------
mariadb-java-client:
    mariadb-java-client
    mvn(mariadb:mariadb-connector-java)
    mvn(mariadb:mariadb-connector-java:pom:)
    mvn(org.mariadb.jdbc:mariadb-java-client)
    mvn(org.mariadb.jdbc:mariadb-java-client:pom:)
    osgi(org.mariadb.jdbc)

mariadb-java-client-javadoc:
    mariadb-java-client-javadoc



Source checksums
----------------
https://github.com/MariaDB/mariadb-connector-j/archive/1.3.6.tar.gz :
  CHECKSUM(SHA256) this package     : a11f4fca22a1fc3019bb90694196ad769220d12d62d5997d4abec07df8e1a6ec
  CHECKSUM(SHA256) upstream package : a11f4fca22a1fc3019bb90694196ad769220d12d62d5997d4abec07df8e1a6ec


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -b 1291558 --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 13 gil cattaneo 2016-03-17 14:32:11 UTC
BLOCKING issues:

[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "LGPL (v2.1 or later)", "LGPL", "Unknown or generated", "BSD (3
     clause) LGPL (v2.1 or later)". 84 files have unknown license. Detailed
     output of licensecheck in /home/gil/1291558-mariadb-java-
     client/licensecheck.txt

The following source files are without license headers:

./src/main/java/org/mariadb/jdbc/MariaXaResource.java
./src/main/java/org/mariadb/jdbc/MariaXaConnection.java
./src/main/java/org/mariadb/jdbc/MariaDbXid.java
./src/main/java/org/mariadb/jdbc/MariaDbPooledConnection.java
./src/main/java/org/mariadb/jdbc/MariaDbClob.java
./src/main/java/org/mariadb/jdbc/MariaDbCallableStatement.java
./src/main/java/org/mariadb/jdbc/HostAddress.java
./src/main/java/org/mariadb/jdbc/internal/packet/result/LocalInfilePacket.java
./src/main/java/org/mariadb/jdbc/internal/packet/dao/parameters/ParameterWriter.java
./src/main/java/org/mariadb/jdbc/internal/protocol/AbstractQueryProtocol.java
./src/main/java/org/mariadb/jdbc/internal/queryresults/ColumnNameMap.java
./src/main/java/org/mariadb/jdbc/internal/queryresults/StreamingSelectResult.java
./src/main/java/org/mariadb/jdbc/internal/queryresults/ValueObject.java
./src/main/java/org/mariadb/jdbc/internal/socket/NamedPipeSocket.java
./src/main/java/org/mariadb/jdbc/internal/socket/NamedPipeSocket.java
./src/main/java/org/mariadb/jdbc/internal/socket/SharedMemorySocket.java
./src/main/java/org/mariadb/jdbc/internal/socket/UnixDomainSocket.java
./src/main/java/org/mariadb/jdbc/internal/stream/CompressOutputStream.java
./src/main/java/org/mariadb/jdbc/internal/stream/DecompressInputStream.java
./src/main/java/org/mariadb/jdbc/internal/stream/PacketOutputStream.java
./src/main/java/org/mariadb/jdbc/internal/util/constant/Version.java

Please, ask to upstream to include license headers where are missing

https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging/LicensingGuidelines#License_Clarification

License field is not correct as reported in the license header "This particular MariaDB Client for Java file is work
derived from a Drizzle-JDBC. Drizzle-JDBC file which is covered by subject to
the following copyright and notice provisions: ...."
Please, change license field in "License:        BSD and LGPLv2+"
and adding a motivation of the cause (as commented note)

Comment 14 gil cattaneo 2016-03-17 14:36:53 UTC
NON blocking issues:
Please, use 
%setup -q -n mariadb-connector-j-%{version}
instead of
%setup -qcn %{name}-%{version}
mv mariadb-connector-j-%{version}/* .
rm -r mariadb-connector-j-%{version}

Comment 15 Tomas Repik 2016-03-23 13:23:37 UTC
Spec URL: https://trepik.fedorapeople.org/mariadb-java-client/v2/mariadb-java-client.spec
SRPM URL: https://trepik.fedorapeople.org/mariadb-java-client/v2/mariadb-java-client-1.3.7-1.fc23.src.rpm

* Wed Mar 23 2016 Tomas Repik <trepik> - 1.3.7-1
- version update
- BSD license added
- cosmetic updates in prep phase

Also asked upstream for license headers inclusion: 
https://jira.mariadb.org/browse/CONJ-268

Thank you for the review.

Comment 16 gil cattaneo 2016-03-23 18:43:56 UTC
Approved
Have time for this https://bugzilla.redhat.com/show_bug.cgi?id=1316196 ?

Comment 17 Gwyn Ciesla 2016-03-24 22:35:33 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/mariadb-java-client

Comment 18 Fedora Update System 2016-03-29 11:15:37 UTC
mariadb-java-client-1.3.7-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e2af160b9b

Comment 19 Fedora Update System 2016-03-30 00:26:04 UTC
mariadb-java-client-1.3.7-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e2af160b9b

Comment 20 Fedora Update System 2016-04-06 17:20:36 UTC
mariadb-java-client-1.3.7-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, 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.