summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--f8c1d77efa988974026189bf8214ef0fecaf1522.patch27
-rw-r--r--php-doctrine-dbal.spec21
2 files changed, 46 insertions, 2 deletions
diff --git a/f8c1d77efa988974026189bf8214ef0fecaf1522.patch b/f8c1d77efa988974026189bf8214ef0fecaf1522.patch
new file mode 100644
index 0000000..c6dfc27
--- /dev/null
+++ b/f8c1d77efa988974026189bf8214ef0fecaf1522.patch
@@ -0,0 +1,27 @@
+From f8c1d77efa988974026189bf8214ef0fecaf1522 Mon Sep 17 00:00:00 2001
+From: Vincent Petry <PVince81@yahoo.fr>
+Date: Tue, 1 Jul 2014 13:14:38 +0200
+Subject: [PATCH] Fix escaping of column name for specific alter table case
+
+When changing the length of a field, the column name needs to be escaped
+properly.
+---
+ lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+index 916e857..c3015b5 100644
+--- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
++++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+@@ -467,7 +467,7 @@
+ }
+
+ if ($columnDiff->hasChanged('length')) {
+- $query = 'ALTER ' . $column->getName() . ' TYPE ' . $column->getType()->getSqlDeclaration($column->toArray(), $this);
++ $query = 'ALTER ' . $oldColumnName . ' TYPE ' . $column->getType()->getSqlDeclaration($column->toArray(), $this);
+ $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query;
+ }
+ }
+--
+2.0.3
+
diff --git a/php-doctrine-dbal.spec b/php-doctrine-dbal.spec
index 59c73fa..d338c1c 100644
--- a/php-doctrine-dbal.spec
+++ b/php-doctrine-dbal.spec
@@ -29,7 +29,7 @@
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 4%{?github_release}%{?dist}
+Release: 6%{?github_release}%{?dist}
Summary: Doctrine Database Abstraction Layer (DBAL)
Group: Development/Libraries
@@ -41,6 +41,10 @@ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_co
# but immediately reverted in
# https://github.com/doctrine/dbal/commit/894493b285c71a33e6ed29994ba415bad5e0a457
Patch0: %{name}-2.4.2-primary_index.patch
+# From upstream master (2.5), not yet backported to 2.4 upstream. Required for
+# OwnCloud (pgsql-backed OC 6.x upgrades to 7.x fail without it.) Rediffed
+# https://github.com/doctrine/dbal/commit/f8c1d77efa988974026189bf8214ef0fecaf1522
+Patch1: f8c1d77efa988974026189bf8214ef0fecaf1522.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -80,6 +84,7 @@ extension under the hood.
%prep
%setup -qn %{github_name}-%{github_commit}
%patch0 -p3 -b .primary_index
+%patch1 -p1 -b .escape_column
# Make a single executable
echo '#!%{_bindir}/php' > bin/doctrine-dbal
@@ -118,12 +123,24 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
-%doc LICENSE *.md UPGRADE composer.json
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc *.md UPGRADE composer.json
%{_datadir}/php/Doctrine/DBAL
%{_bindir}/doctrine-dbal
%changelog
+* Thu Jul 31 2014 Remi Collet <rpms@famillecollet.com> 2.4.2-6
+- backport for remi repo
+- fix license handling
+
+* Tue Jul 29 2014 Adam Williamson <awilliam@redhat.com> - 2.4.2-6
+- really apply the patch
+
+* Tue Jul 29 2014 Adam Williamson <awilliam@redhat.com> - 2.4.2-5
+- backport another OwnCloud-related pgsql fix from upstream master
+
* Fri Jun 20 2014 Shawn Iwinski <shawn.iwinski@gmail.com> - 2.4.2-4
- Added php-composer(%%{composer_vendor}/%%{composer_project}) virtual provide
- Updated Doctrine dependencies to use php-composer virtual provides