Bug 974889 - Review Request: rubygem-mysql2 - A simple, fast Mysql library for Ruby, binding to libmysql
Summary: Review Request: rubygem-mysql2 - A simple, fast Mysql library for Ruby, bindi...
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review   
(Show other bugs)
Version: rawhide
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
: 989433 (view as bug list)
Depends On:
Blocks: 787887
TreeView+ depends on / blocked
 
Reported: 2013-06-17 03:26 UTC by Alex Chernyakhovsky
Modified: 2013-09-24 00:26 UTC (History)
6 users (show)

Fixed In Version: rubygem-mysql2-0.3.13-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-24 00:24:33 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
msuchy: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Alex Chernyakhovsky 2013-06-17 03:26:19 UTC
Spec URL: http://web.mit.edu/achernya/www/fedora/rubygem-mysql2.spec
SRPM URL: http://web.mit.edu/achernya/www/fedora/rubygem-mysql2-0.3.11-1.fc19.src.rpm
Description:
The Mysql2 gem is meant to serve the extremely common use-case of
connecting, querying and iterating on results. Some database libraries
out there serve as direct 1:1 mappings of the already complex C API\'s
available. This one is not.
Fedora Account System Username: achernya

Note that this package upload will fix #787887, reducing the number of unpackaged gems that need to be installed to run rails.

Comment 1 Vít Ondruch 2013-06-19 10:45:41 UTC
I'll take this for a review.

Comment 2 Vít Ondruch 2013-06-19 12:04:09 UTC
* Test suite
  - I'd love to see the test suite executed during build, since it is quite
    important component and DB failures might result in data loss.
  - We are running test suite of rubygem-pg during build, so I'd love to see
    the test suite of rubygem-mysql2 executed as well.

* License file in main package
  - The %{gem_instdir}/MIT-LICENSE should go into main package [1].

* Move only .so file into %{gem_extdir_mri}
  - Only the platform specific files belongs to %{gem_extdir_mri}, so you
    should do:

    mkdir -p %{buildroot}%{gem_extdir_mri}/lib/mysql2
    mv %{buildroot}%{gem_instdir}/lib/mysql2/mysql2.so \
        %{buildroot}%{gem_extdir_mri}/lib/mysql2

* Documentation should be marked as %doc
  - Please mark a documentation files (README.md MIT-LICENSE CHANGELOG.md)
    as a %doc.

* rpmlint issues
  - There used to be bug in gem2rpm which causes:

    ./rubygem-mysql2.spec:48: W: macro-in-comment %gem_dir

    Please escape the macro properly.
  - Macros in comments should be escaped properly (but this gets solved as soon
    as the test suite will be executed during build ;)

    ./rubygem-mysql2.spec:68: W: macro-in-comment %{buildroot}
    ./rubygem-mysql2.spec:68: W: macro-in-comment %{gem_extdir_mri}




[1] https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text

Comment 3 Alex Chernyakhovsky 2013-06-19 20:25:06 UTC
Hi Vit,

Thanks for taking the time to review. I've corrected all of the issues except for the tests so far, because I'm running into an issue: installing mariadb-server doesn't start mysqld, and when I try to "systemctl start mysqld.service", I get:

DEBUG: + systemctl start mysqld.service
DEBUG: Failed to get D-Bus connection: No connection to service manager.
DEBUG: error: Bad exit status from /var/tmp/rpm-tmp.fk7C3X (%check)

Do you have any suggestions on how I can/should start mysqld in mock in a consistent manner? This is the original reason I left the tests out.

Thanks,
-Alex

Comment 4 Vít Ondruch 2013-06-20 05:40:15 UTC
Thanks.

I was afraid that it was the reason ;) Anyway, you should be able to run /usr/libexec/mysqld daemon manually with some parameters such as --socket --datadir etc. Then you should provide corresponding configuration.yml [1, 2].

You can take inspiration how it is done in pg test suite [3].

I would say that this is worth of querying upstream for such support as well.


[1] https://github.com/brianmario/mysql2#development
[2] https://github.com/brianmario/mysql2/blob/master/spec/configuration.yml.example
[3] https://bitbucket.org/ged/ruby-pg/src/e4465a9779faed39825213d140df6b1531bb1e68/spec/lib/helpers.rb?at=default#cl-179

Comment 5 Ken Dreyer 2013-07-27 20:54:48 UTC
Hi Vít, I've tried quite hard to get mysqld to properly start and stop in mock, without success. Also, I don't think that the tests ought to hold up the package review. Do you agree?

Alex, can you please post links to your latest spec and SRPM?

Comment 6 Alex Chernyakhovsky 2013-07-28 00:41:05 UTC
Hi Ken,

I've updated the latest at the same URLs as before:

Spec URL: http://web.mit.edu/achernya/www/fedora/rubygem-mysql2.spec
SRPM URL: http://web.mit.edu/achernya/www/fedora/rubygem-mysql2-0.3.11-1.fc19.src.rpm

Comment 7 Achilleas Pipinellis 2013-07-29 18:47:45 UTC
*** Bug 989433 has been marked as a duplicate of this bug. ***

Comment 8 Miroslav Suchý 2013-07-30 12:18:21 UTC
I agree with #5 that running test in this case is little bit problematic.
Please note that there is new version available 0.3.13

Comment 9 Miroslav Suchý 2013-08-23 13:14:48 UTC
Vit does not have time, I will do the review. Taking.

Comment 10 Miroslav Suchý 2013-08-23 15:04:19 UTC
I really try to make test working. I got this:
%check
DIR=$(mktemp -d)
/bin/chmod 0755 $DIR
chown mysql $DIR

cat <<EOF > /tmp/my.cnf
[mysqld]
user=root
datadir=$DIR
socket=/var/lib/mysql/mysql.sock

[mysqld_safe]
socket=/var/lib/mysql/mysql.sock
EOF
/usr/bin/mysql_install_db --datadir=$DIR --force --defaults-file=/tmp/my.cnf

/usr/bin/mysqld_safe --defaults-file=/tmp/my.cnf --external-locking --datadir=$DIR &

cat <<EOF > spec/configuration.yml
root:
  host: localhost
  username: root
  password:
  database:
EOF

rspec -I%{buildroot}%{gem_extdir_mri}/lib/ spec

But tests are unable to connect even if I am able to connect from command line. :(
I'm really giving up. No tests.

So rest of the package:

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.
[-]: 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.
[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]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf %{buildroot} present but not required
[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 requires other packages for directories it uses.
[x]: Package uses nothing in %doc for runtime.
[x]: Package is not known to require ExcludeArch.
[-]: Fully versioned dependency in subpackages, if present.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in rubygem-
     mysql2-doc
[x]: Package complies to the Packaging Guidelines
[x]: License field in the package spec file matches the actual license.
[x]: License file installed when any subpackage combination is installed.
[x]: Package consistently uses macro is (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]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[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]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Each %files section contains %defattr if rpm < 4.4
[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]: 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 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]: Large documentation must go in a -doc subpackage.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local
[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).

Ruby:
[x]: Platform dependent files must all go under %{gem_extdir}, platform
     independent under %{gem_dir}.
[x]: Gem package must not define a non-gem subpackage
[x]: Gem package is named rubygem-%{gem_name}
[x]: Package contains BuildRequires: rubygems-devel.
[x]: Gem package must define %{gem_name} macro.

===== 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).
[?]: Package functions as described.
[!]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: 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]: Dist tag is present.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: SourceX tarball generation or download is documented.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define.

Ruby:
[x]: Specfile should use macros from rubygem-devel package.
     Note: The specfile doesn't use these macros: %exclude %{gem_cache},
     %{gem_spec}, %doc %{gem_docdir}, %{gem_libdir}
[!]: Test suite of the library should be run.
[x]: Gem package should exclude cached Gem.

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

Generic:
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[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.

APPROVED

When you will push package in dist-git please rebase to lates version 0.3.13 (since that is minor release I do not require rebase during review).

Comment 11 Alex Chernyakhovsky 2013-08-24 21:59:36 UTC
New Package SCM Request
=======================
Package Name: rubygem-mysql2
Short Description:  A simple, fast Mysql library for Ruby, binding to libmysql
Owners: achernya
Branches: f19 f20
InitialCC:

Comment 12 Alex Chernyakhovsky 2013-08-24 22:02:29 UTC
Miroslav, would you like to co-maintain this package?

Comment 13 Miroslav Suchý 2013-08-26 08:15:11 UTC
Yes.
I will apply in pkgdb as soon as your package will be created.

Comment 14 Gwyn Ciesla 2013-08-26 12:20:35 UTC
Git done (by process-git-requests).

Comment 15 Miroslav Suchý 2013-09-09 11:52:06 UTC
Ping. Alex? Can you upload and build the package please?

Comment 16 Fedora Update System 2013-09-12 00:49:40 UTC
rubygem-mysql2-0.3.13-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/rubygem-mysql2-0.3.13-1.fc19

Comment 17 Fedora Update System 2013-09-12 00:51:01 UTC
rubygem-mysql2-0.3.13-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/rubygem-mysql2-0.3.13-1.fc20

Comment 18 Fedora Update System 2013-09-12 16:28:05 UTC
rubygem-mysql2-0.3.13-1.fc20 has been pushed to the Fedora 20 testing repository.

Comment 19 Fedora Update System 2013-09-24 00:24:33 UTC
rubygem-mysql2-0.3.13-1.fc19 has been pushed to the Fedora 19 stable repository.

Comment 20 Fedora Update System 2013-09-24 00:26:17 UTC
rubygem-mysql2-0.3.13-1.fc20 has been pushed to the Fedora 20 stable repository.


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