[owncloud] revise and rename composer loader patch with latest changes, adjust others
Adam Williamson
adamwill at fedoraproject.org
Fri Aug 29 06:23:01 UTC 2014
commit 24586e3c3f78554741d9d40d8e37cf70f4071190
Author: Adam Williamson <awilliam at redhat.com>
Date: Thu Aug 28 21:02:35 2014 -0700
revise and rename composer loader patch with latest changes, adjust others
I've revised the use-composer-autoloader-for-3rdparty pull request upstream.
Replacing the git patch for just one commit with a 'git diff master' of all
the changes in that PR minus the changes to the test suite which we don't
ship, and adjusting other patches to match.
...r-autoloader-not-OC-for-non-Composer-3rdp.patch | 12 ++++++------
....patch => owncloud-7.0.2-autoloader_paths.patch | 6 +++---
...ch => owncloud-7.0.2-composer_includepath.patch | 6 +++---
owncloud.spec | 6 +++---
4 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/0001-use-Composer-autoloader-not-OC-for-non-Composer-3rdp.patch b/0001-use-Composer-autoloader-not-OC-for-non-Composer-3rdp.patch
index ca38efd..ef3e9e6 100644
--- a/0001-use-Composer-autoloader-not-OC-for-non-Composer-3rdp.patch
+++ b/0001-use-Composer-autoloader-not-OC-for-non-Composer-3rdp.patch
@@ -56,9 +56,9 @@ index afa498e..943fa3f 100644
// make a dummy session available as early as possible since error pages need it
@@ -485,14 +479,21 @@ class OC {
- } catch (\Exception $ex) {
- }
- }
+ self::initPaths();
+ self::registerAutoloaderCache();
+
- OC_Util::isSetLocaleWorking();
// setup 3rdparty autoloader
@@ -76,9 +76,9 @@ index afa498e..943fa3f 100644
+ OC_Util::isSetLocaleWorking();
+
- // set debug mode if an xdebug session is active
- if (!defined('DEBUG') || !DEBUG) {
- if (isset($_COOKIE['XDEBUG_SESSION'])) {
+ if (!defined('PHPUNIT_RUN')) {
+ OC\Log\ErrorHandler::setLogger(OC_Log::$object);
+ if (defined('DEBUG') and DEBUG) {
--
2.0.1
diff --git a/owncloud-7.0.0-autoloader_paths.patch b/owncloud-7.0.2-autoloader_paths.patch
similarity index 77%
rename from owncloud-7.0.0-autoloader_paths.patch
rename to owncloud-7.0.2-autoloader_paths.patch
index 4380f8d..bd1bf04 100644
--- a/owncloud-7.0.0-autoloader_paths.patch
+++ b/owncloud-7.0.2-autoloader_paths.patch
@@ -7,6 +7,6 @@
+ $loader->add('Pimple', '/usr/share/php/Pimple');
+ $loader->add('Sabre', '/usr/share/php');
+ $loader->add('Sabre\VObject', '/usr/share/pear');
- }
-
- OC_Util::isSetLocaleWorking();
+ } else {
+ OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
+ OC_Template::printErrorPage('Composer autoloader not found, unable to continue.');
diff --git a/owncloud-7.0.0-composer_includepath.patch b/owncloud-7.0.2-composer_includepath.patch
similarity index 66%
rename from owncloud-7.0.0-composer_includepath.patch
rename to owncloud-7.0.2-composer_includepath.patch
index a401242..c1cb04e 100644
--- a/owncloud-7.0.0-composer_includepath.patch
+++ b/owncloud-7.0.2-composer_includepath.patch
@@ -5,6 +5,6 @@
$loader->add('Sabre', '/usr/share/php');
$loader->add('Sabre\VObject', '/usr/share/pear');
+ $loader->setUseIncludePath(true);
- }
-
- OC_Util::isSetLocaleWorking();
+ } else {
+ OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
+ OC_Template::printErrorPage('Composer autoloader not found, unable to continue.');
diff --git a/owncloud.spec b/owncloud.spec
index 5875775..a06985b 100644
--- a/owncloud.spec
+++ b/owncloud.spec
@@ -29,7 +29,7 @@ Patch1: %{name}-6.0.2-videoviewer_noplugins.patch
# Submitted upstream: https://github.com/owncloud/core/pull/9994
# Uses Composer's autoloader, not OC's, for loading non Composer-managed
# 3rdparty includes: it's better at it.
-Patch10: 0001-use-Composer-autoloader-not-OC-for-non-Composer-3rdp.patch
+Patch10: owncloud-7.0.2-composer_3rdparty_autoloader.patch
# Ugly way to deal with Pimple 1.x's lack of PSR-0 compliance. Also forces the
# paths to Sabre deps: /usr/share/php for most of Sabre (to ensure php-sabre-dav
# package, 1.8 version, is used), /usr/share/pear for Sabre\VObject (to ensure
@@ -37,12 +37,12 @@ Patch10: 0001-use-Composer-autoloader-not-OC-for-non-Composer-3rdp.patch
# and *test* if changing this; test with all versions of all Sabre packages
# installed to make sure it DTRT. Keep an eye on upstream for future changes
# also.
-Patch11: %{name}-7.0.0-autoloader_paths.patch
+Patch11: %{name}-7.0.2-autoloader_paths.patch
# Turn on include path usage for the Composer autoloader (so it'll find
# systemwide PSR-0 and PSR-4 compliant libraries)
# Upstream wouldn't likely take this, they probably only care about their
# bundled copies
-Patch12: %{name}-7.0.0-composer_includepath.patch
+Patch12: %{name}-7.0.2-composer_includepath.patch
# Submitted upstream: https://github.com/owncloud/core/pull/6618
# Makes several points where apps load 3rdparty includes better for
# unbundling, replaces older separate patches for this purpose
More information about the scm-commits
mailing list