Bug 1133950 - Review Request: mariadb-connector-c - The MariaDB Native Client library (C driver)
Summary: Review Request: mariadb-connector-c - The MariaDB Native Client library (C dr...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Honza Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-26 14:04 UTC by Matej Mužila
Modified: 2016-02-13 20:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-13 20:43:29 UTC
Type: ---
Embargoed:
hhorak: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Matej Mužila 2014-08-26 14:04:34 UTC
Spec URL: https://mmuzila.fedorapeople.org/mariadb_client.spec
SRPM URL: https://mmuzila.fedorapeople.org/mariadb_client-2.0.0-1.src.rpm
Description:  

Hi,
I would appreciate a review so that I can get mariadb_client into Fedora.

The MariaDB Native Client library (C driver) is used to connect applications developed in C/C++ to MariaDB and MySQL databases.

Fedora Account System Username: mmuzila

Comment 1 Christopher Meng 2014-08-26 15:26:18 UTC
1. Do not use "-f install_manifest.txt", list files explicitly.

2. BuildRequires: bzr >= 2.0

Why?

3. BuildRequires: libtool >= 1.5.24

Why?

4. BuildRequires: bison ncurses zlib-devel autoconf automake cmake

ncurses is wrong, should be ncurses-devel

autoconf and automake are needed by projects using autofools. This project uses cmake. I couldn't see reasons of BRing them.

5. Use %cmake instead of cmake . -DCMAKE_INSTALL_PREFIX=/usr 

6. Drop [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

7. changelog section invalid syntax.

8. License: LGPLv2.1 LGPLv2.1

Wrong

9. Release: 1

Wrong

10. Too long:

Summary: Client library used to connect apps. developed in C/C++ to MariaDB and MySQL databases

Comment 2 Honza Horak 2014-09-03 12:10:07 UTC
Some notes before doing a proper formal review. Matej, please, look at them and the issues already reported by Christopher and I'll do a proper formal review after these issues are fixed.

* Name of the package should be the same as upstream project name if possible, but I'm not sure if tar ball name actually is that name, I'd rather use launchpad's project name mariadb-native-client [1] or even consult the name with upstream.

* There should be -devel sub-package created that would include mariadb_config script, header files and unversioned library (link) [2].

* Changelog should contain version-release after packager contact [3].

* Removing $RPM_BUILD_ROOT is not necessary in %install nor %clean have be there any more [4].

* Build should use default compiler flags [5].

* Static libraries should be removed or disabled in cmake, if it is possible, but definitely not packaged [6].

* The tar ball bundles zlib, just be sure it is not compiled and used, and system zlib is used instead.

* The doc in xml needs to be generated into html doc first (which needs xmlto package as BuildRequires). The generated docs could be included in the -devel or in a separeted subpackage.

* The path to installed libraries is /usr/lib instead of /usr/lib64 on x86_64, some cmake option will have to be used maybe.

[1] https://launchpad.net/mariadb-native-client
[2] https://fedoraproject.org/wiki/Packaging:Guidelines#Devel_Packages
[3] https://fedoraproject.org/wiki/Packaging:Guidelines#Changelogs
[4] https://fedoraproject.org/wiki/Packaging:Guidelines#.25clean
[5] https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags
[6] https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries

Comment 3 Matej Mužila 2014-09-10 12:32:58 UTC
I've made required changes. Names of SRPM and SPEC file were changed too.

SRPM URL: https://mmuzila.fedorapeople.org/mariadb-connector-c-2.0.0-1.src.rpm
SPEC URL: https://mmuzila.fedorapeople.org/mariadb-connector-c.spec

Comment 4 Honza Horak 2014-09-12 11:14:51 UTC
Issues that should be fixed before acking the review:
- LGPLv2+ should be used as a license IMHO
- mariadb_config should be in -devel subpackage.
- ncurses may be removed
- Directory without known owners: /usr/lib64/mariadb
- %{?_smp_mflags} should be used in make call
- there is a typo: '==' instead of '=' in the -devel requirement on the base package

Things to do, that do not block review (might be done later):
- necessary changes (patch, removing wrongly installed files, incorrect-fsf-address) should be reported to upstream
- the summary might be shorter, e.g.: The MariaDB Native Client library (C driver)
- there is %clean; well, it is empty, but should be removed entirely
- egrep can be replaced by grep

Few another suggestions:
- docs can be build using make:
pushd docs
%cmake .
make
popd
- removing files in %install and listing files in %files section is better to be done by name, more specifically,  since that brings it to maintainer's attention when upstream makes some changes, so e.g.:
%files
%{_libdir}/mariadb/libmariadb.so.2
%{_bindir}/mariadb_config
%doc README COPYING.LIB
%files  devel
%{_libdir}/mariadb/libmariadb.so
%{_libdir}/mariadb/libmysql.so
%{_libdir}/mariadb/libmysqlclient.so
%{_libdir}/mariadb/libmysqlclient_r.so
%{_includedir}/mariadb
%doc docs/html


Package Review
==============

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



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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

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 or later)", "Unknown or generated", "LGPL (v2 or later) (with
     incorrect FSF address)", "zlib/libpng", "BSD (2 clause)", "*No copyright*
     LGPL (v2 or later) (with incorrect FSF address)", "PHP (v3.01) LGPL (v2
     or later)", "PHP (v3.01)". 21 files have unknown license. Detailed output
     of licensecheck in /home/hhorak/tmp/mariadb-native/1133950-mariadb-
     connector-c/licensecheck.txt
- LGPLv2+ should be used as a license IMHO
[x]: License file installed when any subpackage combination is installed.
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib64/mariadb
[x]: %build honors applicable compiler flags or justifies otherwise.
[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
- mariadb_config should be in -devel subpackage.
[-]: 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.
[!]: Requires correct, justified where necessary.
- ncurses may be removed
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 532480 bytes in 100 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 %doc.
[x]: Package requires other packages for directories it uses.
[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]: 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 do not use a name that already exist
[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

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

Generic:
[!]: Uses parallel make %{?_smp_mflags} macro.
- %{?_smp_mflags} should be used in make call
[-]: 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-
     connector-c-devel
- there is a typo: '==' instead of '='
[-]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[!]: Patches link to upstream bugs/comments/lists or are otherwise justified.
- necessary changes (patch, removing wrongly installed files) should be reported to upstream
[!]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
- the summary might be shorter, e.g.: The MariaDB Native Client library (C driver)
[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
[!]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
- there is %clean; well, it is empty, but should be removed entirely
[x]: Dist tag is present (not strictly required in GL).
[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.

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

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
- egrep can be replaced by grep
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: mariadb-connector-c-2.0.0-1.fc20.x86_64.rpm
          mariadb-connector-c-devel-2.0.0-1.fc20.x86_64.rpm
          mariadb-connector-c-2.0.0-1.fc20.src.rpm
mariadb-connector-c.x86_64: E: summary-too-long C Client library used to connect apps. developed in C/C++ to MariaDB and MySQL databases
mariadb-connector-c.x86_64: W: invalid-license LGPLv2.1
mariadb-connector-c.x86_64: W: no-manual-page-for-binary mariadb_config
mariadb-connector-c-devel.x86_64: W: summary-ended-with-dot C Development files for mariadb-connector-c.
mariadb-connector-c-devel.x86_64: W: invalid-license LGPLv2.1
mariadb-connector-c-devel.x86_64: W: only-non-binary-in-usr-lib
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/violite.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/mysql/plugin_auth.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_dir.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_global.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_base.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/m_ctype.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/mysql/plugin_auth_common.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/m_string.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_stmt.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/mysys_err.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/getopt.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/config-win.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/errmsg.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/thr_alarm.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_pthread.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/ma_common.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/dbug.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/global.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_net.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_list.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/mysql.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_sys.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_no_pthread.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_alarm.h
mariadb-connector-c.src: E: summary-too-long C Client library used to connect apps. developed in C/C++ to MariaDB and MySQL databases
mariadb-connector-c.src: W: invalid-license LGPLv2.1
mariadb-connector-c.src:45: W: deprecated-grep [u'egrep']
mariadb-connector-c.src:47: W: deprecated-grep [u'egrep']
3 packages and 0 specfiles checked; 26 errors, 8 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint mariadb-connector-c mariadb-connector-c-devel
mariadb-connector-c.x86_64: E: summary-too-long C Client library used to connect apps. developed in C/C++ to MariaDB and MySQL databases
mariadb-connector-c.x86_64: W: invalid-license LGPLv2.1
mariadb-connector-c.x86_64: W: no-manual-page-for-binary mariadb_config
mariadb-connector-c-devel.x86_64: W: summary-ended-with-dot C Development files for mariadb-connector-c.
mariadb-connector-c-devel.x86_64: W: invalid-license LGPLv2.1
mariadb-connector-c-devel.x86_64: W: only-non-binary-in-usr-lib
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/violite.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/mysql/plugin_auth.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_dir.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_global.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_base.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/m_ctype.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/mysql/plugin_auth_common.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/m_string.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_stmt.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/mysys_err.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/getopt.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/config-win.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/errmsg.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/thr_alarm.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_pthread.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/ma_common.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/dbug.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/global.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_net.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_list.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/mysql.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_sys.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_no_pthread.h
mariadb-connector-c-devel.x86_64: E: incorrect-fsf-address /usr/include/mariadb/my_alarm.h
2 packages and 0 specfiles checked; 25 errors, 5 warnings.
# echo 'rpmlint-done:'

Comment 6 Honza Horak 2014-09-19 06:28:43 UTC
I don't want to be nit-picker, just few details that would make the spec more close to form what we usually use in Fedora, not that the last one would be explicitly. Just feel free to adopt the changes if you like.

Also I've noticed that generated html files have different IDs for every build, which will cause issues on multilib systems. This is not issue for review, but we should take a look to make it work on multilib systems, since -devel packages are often installed this way.

Anyway, I don't see any issues blocking the review, so giving ACK.

Comment 7 Matej Mužila 2014-09-23 13:42:19 UTC
New Package SCM Request
=======================
Package Name: mariadb-connector-c
Short Description: The MariaDB Native Client library (C driver)
Upstream URL: https://mariadb.org/
Owners: mmuzila
Branches: f19 f20 f21
InitialCC: mmuzila

Comment 8 Gwyn Ciesla 2014-09-23 14:37:01 UTC
WARNING: Requested package name mariadb-connector-c doesn't match bug summary
mariadb_client, please correct.

Comment 9 Gwyn Ciesla 2014-09-23 19:22:51 UTC
Git done (by process-git-requests).

Comment 10 Honza Horak 2016-02-13 20:43:29 UTC
Already built, closing.


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