Bug 1235364 - Review Request: python-mysql - Python interface to MySQL
Summary: Review Request: python-mysql - Python interface to MySQL
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 226179 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-24 15:27 UTC by Jakub Dorňák
Modified: 2016-12-01 00:58 UTC (History)
4 users (show)

Fixed In Version: python-mysql-1.3.6-4.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-23 08:58:10 UTC
Type: ---
Embargoed:
zbyszek: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Jakub Dorňák 2015-06-24 15:27:15 UTC
Spec URL: http://jdornak.fedorapeople.org/python-mysql.spec
SRPM URL: http://jdornak.fedorapeople.org/python-mysql-1.3.6-4.fc22.src.rpm
Description: Python interface to MySQL

MySQLdb is an interface to the popular MySQL database server for Python.
The design goals are:

-     Compliance with Python database API version 2.0
-     Thread-safety
-     Thread-friendliness (threads will not block each other)
-     Compatibility with MySQL 3.23 and up

This module should be mostly compatible with an older interface
written by Joe Skinner and others. However, the older version is
a) not thread-friendly, b) written for MySQL 3.21, c) apparently
not actively maintained. No code from that version is used in MySQLdb.

Fedora Account System Username: jdornak

Please note that this is a renamed package MySQL-python.

Comment 1 Zbigniew Jędrzejewski-Szmek 2015-07-02 20:32:15 UTC
*** Bug 226179 has been marked as a duplicate of this bug. ***

Comment 2 Zbigniew Jędrzejewski-Szmek 2015-07-02 20:39:45 UTC
Since this is a rename review request, I'm mostly looking at the relevant parts:
+ obsoletes/provides look correct
+ new names is OK according to python guidelines
+ license matches
- license is not installed: please use %license for the license file [https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text]

Questions:
Can the text about compatibility with "older interface written by J. Skinner" be removed? It was probably useful in 2001, but maybe nobody remembers the older interface now.

Since the same documentation files are installed for both subpackages, I'd suggest adding %global _docdir_fmt %{name} to avoid duplication.

Comment 3 Jakub Dorňák 2015-07-03 09:46:27 UTC
Thank You, I have made these changes to the spec file.
(The URL remains the same.)

Comment 4 Zbigniew Jędrzejewski-Szmek 2015-07-04 18:26:17 UTC
Issues:
=======
- Package does not contain duplicates in %files.
  Note: warning: File listed twice: /usr/lib64/python2.7/site-
  packages/mysqlclient-1.3.6-py2.7.egg-info/PKG-INFO
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#DuplicateFiles

I guess that this comes from the file being listed twice in INSTALLED_FILES_2...
Not terribly important.

$ rpm -qpl python3-mysql-1.3.6-4.fc23.x86_64.rpm
/usr/lib64/python3.4/site-packages/MySQLdb/__init__.py
...
/usr/lib64/python3.4/site-packages/__pycache__
/usr/lib64/python3.4/site-packages/__pycache__/_mysql_exceptions.cpython-34.pyc
/usr/lib64/python3.4/site-packages/__pycache__/_mysql_exceptions.cpython-34.pyo
/usr/lib64/python3.4/site-packages/_mysql.cpython-34m.so
/usr/lib64/python3.4/site-packages/_mysql_exceptions.py

Two issues here:
1. /usr/lib64/python3.4/site-packages/MySQLdb is not owned by the package.
2. /usr/lib64/python3.4/site-packages/_mysql is a fucking crazy idea for a module name. Why is the module putting private modules in the global namespace?!

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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
OK.

[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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: "GPL (v2 or later)", "Unknown or generated". 26 files have
     unknown license. Detailed output of licensecheck in /var/tmp/1235364
     -python-mysql/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/lib64/python3.4/site-
     packages/MySQLdb/constants, /usr/lib64/python3.4/site-packages/MySQLdb
Both should be owned by the package.

[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib64/python3.4/site-
     packages/MySQLdb/constants, /usr/lib64/python3.4/site-packages/MySQLdb
See comment above.

[ ]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by: /usr/lib64/python3.4/site-
     packages/MySQLdb/__pycache__(MySQL-python3), /usr/lib64/python2.7
     /site-packages/MySQLdb/constants(MySQL-python), /usr/lib64/python3.4
     /site-packages/MySQLdb/constants/__pycache__(MySQL-python3),
     /usr/lib64/python3.4/site-packages/__pycache__(python3-libs),
     /usr/lib64/python2.7/site-packages/MySQLdb(MySQL-python),
     /usr/lib64/python3.4/site-packages/mysqlclient-1.3.6-py3.4.egg-info
     (MySQL-python3), /usr/lib64/python2.7/site-
     packages/mysqlclient-1.3.6-py2.7.egg-info(MySQL-python)
[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
[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.
[x]: 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]: Useful -debuginfo package or justification otherwise.
[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 122880 bytes in 20 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]: 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 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

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep

Rpmlint
-------
Checking: python-mysql-1.3.6-4.fc23.x86_64.rpm
          python-mysql-debug-1.3.6-4.fc23.x86_64.rpm
          python3-mysql-1.3.6-4.fc23.x86_64.rpm
          python3-mysql-debug-1.3.6-4.fc23.x86_64.rpm
          python-mysql-1.3.6-4.fc23.src.rpm
python-mysql.x86_64: W: wrong-file-end-of-line-encoding /usr/share/doc/python-mysql/MySQLdb.constants.rst
python-mysql.x86_64: W: wrong-file-end-of-line-encoding /usr/share/doc/python-mysql/MySQLdb.rst
python-mysql.x86_64: E: non-standard-executable-perm /usr/lib64/python2.7/site-packages/_mysql.so 0775L
python-mysql.x86_64: W: wrong-file-end-of-line-encoding /usr/share/doc/python-mysql/_mysql_exceptions.rst
python-mysql.x86_64: W: wrong-file-end-of-line-encoding /usr/share/doc/python-mysql/modules.rst
python-mysql-debug.x86_64: W: spelling-error Summary(en_US) runtime -> run time, run-time, rudiment
python-mysql-debug.x86_64: W: spelling-error %description -l en_US runtime -> run time, run-time, rudiment
python-mysql-debug.x86_64: W: no-documentation
python-mysql-debug.x86_64: E: non-standard-executable-perm /usr/lib64/python2.7/site-packages/_mysql_d.so 0775L
python3-mysql.x86_64: W: wrong-file-end-of-line-encoding /usr/share/doc/python-mysql/_mysql_exceptions.rst
python3-mysql.x86_64: E: non-standard-executable-perm /usr/lib64/python3.4/site-packages/_mysql.cpython-34m.so 0775L
python3-mysql.x86_64: W: wrong-file-end-of-line-encoding /usr/share/doc/python-mysql/MySQLdb.constants.rst
python3-mysql.x86_64: W: wrong-file-end-of-line-encoding /usr/share/doc/python-mysql/MySQLdb.rst
python3-mysql.x86_64: W: wrong-file-end-of-line-encoding /usr/share/doc/python-mysql/modules.rst
python3-mysql-debug.x86_64: W: spelling-error Summary(en_US) runtime -> run time, run-time, rudiment
python3-mysql-debug.x86_64: W: spelling-error %description -l en_US runtime -> run time, run-time, rudiment
python3-mysql-debug.x86_64: W: no-documentation
python3-mysql-debug.x86_64: E: non-standard-executable-perm /usr/lib64/python3.4/site-packages/_mysql.cpython-34dm.so 0775L
python3-mysql-debug.x86_64: E: non-standard-executable-perm /usr/lib64/python3.4/site-packages/_mysql.cpython-34m.so 0775L
python-mysql.src: W: strange-permission mysqlclient-1.3.6.tar.gz 0444L
5 packages and 0 specfiles checked; 5 errors, 15 warnings.

All minor issues.

Rpmlint (debuginfo)
-------------------
Checking: python-mysql-debuginfo-1.3.6-4.fc23.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.


Requires
--------
python3-mysql-debug (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libcrypto.so.10()(64bit)
    libdl.so.2()(64bit)
    libm.so.6()(64bit)
    libmysqlclient.so.18()(64bit)
    libmysqlclient.so.18(libmysqlclient_18)(64bit)
    libpthread.so.0()(64bit)
    libpython3.4dm.so.1.0()(64bit)
    libpython3.4m.so.1.0()(64bit)
    libssl.so.10()(64bit)
    libz.so.1()(64bit)
    python(abi)
    python3-mysql(x86-64)
    rtld(GNU_HASH)

python-mysql (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libcrypto.so.10()(64bit)
    libdl.so.2()(64bit)
    libm.so.6()(64bit)
    libmysqlclient.so.18()(64bit)
    libmysqlclient.so.18(libmysqlclient_18)(64bit)
    libpthread.so.0()(64bit)
    libpython2.7.so.1.0()(64bit)
    libssl.so.10()(64bit)
    libz.so.1()(64bit)
    python(abi)
    rtld(GNU_HASH)

python3-mysql (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libcrypto.so.10()(64bit)
    libdl.so.2()(64bit)
    libm.so.6()(64bit)
    libmysqlclient.so.18()(64bit)
    libmysqlclient.so.18(libmysqlclient_18)(64bit)
    libpthread.so.0()(64bit)
    libpython3.4m.so.1.0()(64bit)
    libssl.so.10()(64bit)
    libz.so.1()(64bit)
    python(abi)
    rtld(GNU_HASH)

python-mysql-debug (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libcrypto.so.10()(64bit)
    libdl.so.2()(64bit)
    libm.so.6()(64bit)
    libmysqlclient.so.18()(64bit)
    libmysqlclient.so.18(libmysqlclient_18)(64bit)
    libpthread.so.0()(64bit)
    libpython2.7_d.so.1.0()(64bit)
    libssl.so.10()(64bit)
    libz.so.1()(64bit)
    python(abi)
    python-mysql(x86-64)
    rtld(GNU_HASH)

Provides
--------
python3-mysql-debug:
    MySQL-python3-debug
    python3-mysql-debug
    python3-mysql-debug(x86-64)

python-mysql:
    MySQL-python
    python-mysql
    python-mysql(x86-64)

python3-mysql:
    MySQL-python3
    python3-mysql
    python3-mysql(x86-64)

python-mysql-debug:
    MySQL-python-debug
    python-mysql-debug
    python-mysql-debug(x86-64)

Unversioned so-files
--------------------
python-mysql: /usr/lib64/python2.7/site-packages/_mysql.so
python-mysql-debug: /usr/lib64/python2.7/site-packages/_mysql_d.so
python3-mysql: /usr/lib64/python3.4/site-packages/_mysql.cpython-34m.so
python3-mysql-debug: /usr/lib64/python3.4/site-packages/_mysql.cpython-34dm.so
python3-mysql-debug: /usr/lib64/python3.4/site-packages/_mysql.cpython-34m.so

OK.

---

So there are some small issues with %files section... Please fix that.
The other problem, much more important imho, is the upstream idea of putting private modules in the global namespace. They *should* be moved to be under MySQLdb namespace. Nevertheless, such changes should be done upstream, so this is not relevant to the review.
Package is APPROVED.

Comment 5 Jakub Dorňák 2015-07-07 15:30:33 UTC
New Package SCM Request
=======================
Package Name: python-mysql
Short Description: Python interface to MySQL
Upstream URL: https://github.com/PyMySQL/mysqlclient-python
Owners: jdornak
Branches: f22
InitialCC:

Comment 6 Gwyn Ciesla 2015-07-08 12:07:02 UTC
Git done (by process-git-requests).

Comment 7 Fedora Update System 2015-07-08 13:40:35 UTC
python-mysql-1.3.6-4.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/python-mysql-1.3.6-4.fc22

Comment 8 Fedora Update System 2015-07-13 19:12:31 UTC
python-mysql-1.3.6-4.fc22 has been pushed to the Fedora 22 testing repository.

Comment 9 Fedora Update System 2015-07-23 08:58:10 UTC
python-mysql-1.3.6-4.fc22 has been pushed to the Fedora 22 stable repository.


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