Bug 1047110 (php-doctrine-dbal) - Review Request: php-doctrine-dbal - Doctrine Database Abstraction Layer (DBAL)
Summary: Review Request: php-doctrine-dbal - Doctrine Database Abstraction Layer (DBAL)
Keywords:
Status: CLOSED RAWHIDE
Alias: php-doctrine-dbal
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Remi Collet
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: php-doctrine-common
Blocks: php-doctrine-orm
TreeView+ depends on / blocked
 
Reported: 2013-12-29 06:23 UTC by Shawn Iwinski
Modified: 2014-01-08 03:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-07 16:47:42 UTC
Type: ---
Embargoed:
fedora: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)
php-doctrine-DoctrineDBAL.repoquery.txt (3.34 KB, text/plain)
2013-12-29 06:26 UTC, Shawn Iwinski
no flags Details
phpci.log (62.17 KB, text/plain)
2014-01-04 08:06 UTC, Remi Collet
no flags Details
review.txt (8.68 KB, text/plain)
2014-01-04 08:07 UTC, Remi Collet
no flags Details

Description Shawn Iwinski 2013-12-29 06:23:20 UTC
Spec URL: https://raw.github.com/siwinski/rpms/1ec41e8e5728d432aacacd7eabbf75dcede2c271/php-doctrine-dbal.spec

SRPM URL: http://siwinski.fedorapeople.org/SRPMS/php-doctrine-dbal-2.4.1-1.fc20.src.rpm

Description:
The Doctrine database abstraction & access layer (DBAL) offers a lightweight
and thin runtime layer around a PDO-like API and a lot of additional, horizontal
features like database schema introspection and manipulation through an OO API.

The fact that the Doctrine DBAL abstracts the concrete PDO API away through the
use of interfaces that closely resemble the existing PDO API makes it possible
to implement custom drivers that may use existing native or self-made APIs. For
example, the DBAL ships with a driver for Oracle databases that uses the oci8
extension under the hood.


Fedora Account System Username: siwinski

*** NOTE: Rename/repackage because upstream dropped PEAR packaging as of version 2.4.0

Comment 1 Shawn Iwinski 2013-12-29 06:26:34 UTC
Created attachment 842930 [details]
php-doctrine-DoctrineDBAL.repoquery.txt

repoquery of pkgs requiring php-doctrine-DoctrineDBAL

Comment 3 Adam Williamson 2013-12-30 20:18:59 UTC
I've added comments upstream asking if the fixes that have been merged to master but not yet 2.4 branch can be added to 2.4. Note that https://github.com/doctrine/dbal/commit/e1cd82a50cc9f020b45fe8229afe7c60d3945718 is the upstream equivalent of https://github.com/owncloud/3rdparty/commit/25e8568d41a9b9a6d1662ccf33058822a890e7f5 , which Gregor did not find and listed as 'not found upstream'.

Comment 4 Adam Williamson 2013-12-30 20:44:51 UTC
Hum, let me clean that up a bit, it's quite confusing :(

I would suggest we need the following commits beyond what's already in the spec:

1. https://github.com/doctrine/dbal/commit/5156391b5686a2b3bba628bb0bc1fece63409a44.patch "Quote Old column Names when generating ALTER TABLE SQL" (matches OwnCloud "Use quoted column name for alter table")

2. https://github.com/doctrine/dbal/commit/e1cd82a50cc9f020b45fe8229afe7c60d3945718.patch "Fix issue with drop constraint + column ordering in ALTER TABLE of PostgreSQL." (matches OwnCloud "Dropped indexes can have constraints, drop those first if they exist")

3. https://github.com/owncloud/3rdparty/commit/39314855aa5475c016ffae1f747f903db1ee1685.patch "Add 'bigint unsigned' mapping to Doctrine SqlitePlatform" (appears to have no upstream pull request)

4. *POSSIBLY* https://github.com/doctrine/dbal/commit/3da7d2ffec4a90854f2e09f58eef2ff24e5f436a.patch "Besides the table name, the column name has to be quoted in column comments." (matches OwnCloud "Use quoted column identifier for adding comment to column", but OC later reverted that change without explaining why; I added a comment asking for an explanation)

5. https://github.com/doctrine/dbal/commit/17edd0d54a16338738274161c422ba5486e2766b.patch "fix column default value lifecycle" (matches OwnCloud "fix drop default on postgresql when default value is removed")

I'm going to get in touch with the relevant parties about having as many of the fixes as possible sent to upstream's 2.4 branch, so we don't need to carry them downstream all the way up until 2.5...

Comment 5 Adam Williamson 2013-12-30 21:11:30 UTC
There's also:

https://github.com/owncloud/3rdparty/commit/7ae81563894b971e51cee7bdb0ac2da83ecc5149.patch "Fix quoting of identifiers in OraclePlatform"

not sure if we really need this one, if OraclePlatform is for Oracle SQL, but hey. It does not appear to have been sent upstream. I've now sent out a mail to all relevant parties summarizing the divergences between OC's patch set and upstream DBAL 2.4 and asking if they can be resolved so we could hopefully have OC running against an unpatched DBAL 2.4.

Comment 6 Adam Williamson 2013-12-31 09:42:06 UTC
Upstream responded very quickly to my mail and have now pulled in everything except the OraclePlatform quoting issue, see:

https://github.com/doctrine/dbal/commits/2.4

so now all we really need to do is pull the patches straight from there.

Comment 7 Remi Collet 2014-01-04 08:06:40 UTC
Created attachment 845221 [details]
phpci.log

phpcompatinfo version 2.26.0.

Comment 8 Remi Collet 2014-01-04 08:07:12 UTC
Created attachment 845222 [details]
review.txt

Generated by fedora-review 0.5.0 (920221d) last change: 2013-08-30
Command line :/usr/bin/fedora-review -b 1047110

Comment 9 Remi Collet 2014-01-04 08:10:11 UTC
[!]: Package installs properly.
  Need all the new stack.

[!]: Dist tag is present (not strictly required in GL).


@adamw: can you check that all the patch needed by owncloud are present ?
if ok, as no blocker, I will approve this package.

Comment 10 Remi Collet 2014-01-04 08:12:10 UTC
@adam, @shawn, isn't an update to 2.4.2 (release 2 days ago) not simpler ?

Comment 11 Remi Collet 2014-01-04 08:14:49 UTC
@shawn: Minor bash style, instead of "cat foo | sed xxx >bar", simply use "sed xxx foo >bar"
So: 

sed 's#Doctrine/Common/ClassLoader.php#%{_datadir}/php/Doctrine/Common/ClassLoader.php#' \
   bin/doctrine-dbal.php >> bin/doctrine-dbal

Comment 12 Remi Collet 2014-01-04 08:16:01 UTC
also: "install -pm 755" seems simpler than "chmod + cp"

Comment 13 Adam Williamson 2014-01-04 08:16:57 UTC
Yeah, I think a bump to 2.4.2 would save us shipping a bunch of patches.

Sorry I didn't get around to testing OC 6 + Doctrine 2.4 yet, I got sidetracked by the autoloader black hole. I'll try and get to this tomorrow, if I don't have any real work to do. :)

Comment 14 Shawn Iwinski 2014-01-05 05:08:29 UTC
(In reply to Remi Collet from comment #10)
> @adam, @shawn, isn't an update to 2.4.2 (release 2 days ago) not simpler ?

Yep!  I did not notice the release announcement.  THANKS!

(In reply to Remi Collet from comment #11)
(In reply to Remi Collet from comment #12)

Updated.



Updates:
- Updated to 2.4.2
- Conditional %{?dist}

Spec Diffs:
- https://github.com/siwinski/rpms/compare/82df10ec8d3d744848659485a4cd1000981357a1...9872cb2f77b8146ae4709ca1fd7f7e83c500910f
- https://github.com/siwinski/rpms/commit/e03241263b7ff8685a3b9c01e8ee4ce15848dc62

Upstream diff: https://github.com/doctrine/dbal/compare/d08b11c7eaab4b0509752638b7d60d4b97bd94d4...v2.4.2



Spec URL: https://raw.github.com/siwinski/rpms/e03241263b7ff8685a3b9c01e8ee4ce15848dc62/php-doctrine-dbal.spec

SRPM URL: http://siwinski.fedorapeople.org/SRPMS/php-doctrine-dbal-2.4.2-1.fc20.src.rpm

Comment 15 Adam Williamson 2014-01-05 05:24:37 UTC
if it's not too much trouble can you stick a build in your repo? then I can do some testing on my test OC instance. thanks!

Comment 16 Shawn Iwinski 2014-01-05 06:05:23 UTC
(In reply to Adam Williamson from comment #15)
> if it's not too much trouble can you stick a build in your repo? then I can
> do some testing on my test OC instance. thanks!

Completed. Enjoy! :)

Comment 17 Remi Collet 2014-01-05 06:12:01 UTC
== APPROVED ==

Comment 18 Adam Williamson 2014-01-05 06:53:20 UTC
Works fine installed as an update to a running OC 6.0.0a+mariadb instance. Now testing upgrade from OC 5.1.4a+mariadb+dbal 2.3 to OC 6.0.0a+mariadb+dbal 2.4. I'll try sqlite and pgsql later tonight, or tomorrow.

Comment 19 Adam Williamson 2014-01-05 07:20:52 UTC
Hum, upgrade from 5.0.14a to 6.0.0a still fails with DBAL 2.4.2. The error is the "An exception occurred while executing 'ALTER TABLE `oc_appconfig` DROP PRIMARY KEY': SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'PRIMARY'; check that column/key exists" error I got with my initial tests before figuring out we had to patch Doctrine, even though I thought 2.4.2 should have all the essential patches.

It's getting late here, I'll take another cut at this tomorrow and see if I can find a patch we're missing, or if perhaps upstream's patches don't quite achieve the same as all of OC's Doctrine patches.

Comment 20 Shawn Iwinski 2014-01-06 04:50:53 UTC
Remi -- THANKS for the review!

Adam -- Are you OK for the entire new Doctrine tree to be built in rawhide?  I would like to get an email out to the devel list for testing there.



New Package SCM Request
=======================
Package Name: php-doctrine-dbal
Short Description: Doctrine Database Abstraction Layer (DBAL)
Owners: siwinski
Branches: f19 f20 el6
InitialCC:

Comment 21 Adam Williamson 2014-01-06 07:10:25 UTC
sure, all's I really care about it for is OC. I didn't get time to do any more testing today, I'm sorry - turned out to be a busy day for errands :/

Comment 22 Gwyn Ciesla 2014-01-06 13:40:37 UTC
Git done (by process-git-requests).

Comment 23 Shawn Iwinski 2014-01-07 16:32:34 UTC
Adam -- The full Doctrine tree has been built in rawhide.  Would you mind if I marked this review request as "Closed > Rawhide"?  If you have any patches etc. that need to be added just open a new bug?

Comment 24 Adam Williamson 2014-01-07 16:40:07 UTC
absolutely, go for it.

Comment 25 Adam Williamson 2014-01-08 00:35:25 UTC
Ah, so I think I found out what happened. Upstream Doctrine reverted one of the OwnCloud fixes immediately after applying it:

https://github.com/doctrine/dbal/pull/363#issuecomment-31794747

I'll test a build with that patch re-added.

Comment 26 Adam Williamson 2014-01-08 01:37:40 UTC
Yup, works. Sent to Rawhide. Also tested an OC 5.0.14a to 6.0.0a upgrade with sqlite successfully, will test pgsql if I can.

Comment 27 Adam Williamson 2014-01-08 03:24:07 UTC
I tried testing pgsql, but couldn't get initial setup with OC 5 to work at all. Kept complaining about the pgsql username/password being wrong, even though it worked at a console. I probably don't grok pgsql setup, it seems arcane.


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