summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-16 17:04:51 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-16 17:04:51 +0200
commit434a1205344a71a0750c283fe9fac70f3ff82cfc (patch)
tree3ebb0fce321c8957336d92b4889bebb808b02448
parentbcfe6f7686289cccf41c2810ed8bf503131f7daa (diff)
owncloud: sync with Fedora
-rw-r--r--owncloud-8.2.2-drop-AWS-autoloader.patch58
-rw-r--r--owncloud-8.2.2-google_autoload.patch14
-rw-r--r--owncloud-8.2.3-amazon-autoloader.patch15
-rw-r--r--owncloud-8.2.3-composer_include_path.patch16
-rw-r--r--owncloud-8.2.3-dropbox-autoloader.patch (renamed from owncloud-8.2.3-drop-dropbox-autoloader.patch)0
-rw-r--r--owncloud-8.2.3-google-autoloader.patch29
-rw-r--r--owncloud-8.2.3-icewind-streams-encryption.patch40
-rw-r--r--owncloud-8.2.3-unbundle-files-external.patch67
-rw-r--r--owncloud-8.2.3-use_system_assetic.patch11
-rw-r--r--owncloud-8.2.3-use_system_phpparser.patch14
-rw-r--r--owncloud-8.2.3-use_system_psr_libraries.patch31
-rw-r--r--owncloud-fedora-autoloader.php72
-rw-r--r--owncloud.spec194
13 files changed, 279 insertions, 282 deletions
diff --git a/owncloud-8.2.2-drop-AWS-autoloader.patch b/owncloud-8.2.2-drop-AWS-autoloader.patch
deleted file mode 100644
index 1db87a7..0000000
--- a/owncloud-8.2.2-drop-AWS-autoloader.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-diff --git a/apps/files_external/3rdparty/aws-sdk-php/aws-autoloader.php b/apps/files_external/3rdparty/aws-sdk-php/aws-autoloader.php
-deleted file mode 100644
-index 8072b11..0000000
---- a/apps/files_external/3rdparty/aws-sdk-php/aws-autoloader.php
-+++ /dev/null
-@@ -1,37 +0,0 @@
--<?php
--/**
-- * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
-- *
-- * Licensed under the Apache License, Version 2.0 (the "License").
-- * You may not use this file except in compliance with the License.
-- * A copy of the License is located at
-- *
-- * http://aws.amazon.com/apache2.0
-- *
-- * or in the "license" file accompanying this file. This file is distributed
-- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-- * express or implied. See the License for the specific language governing
-- * permissions and limitations under the License.
-- */
--
--require_once __DIR__ . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
--
--if (!defined('AWS_FILE_PREFIX')) {
-- define('AWS_FILE_PREFIX', __DIR__);
--}
--
--$classLoader = new Symfony\Component\ClassLoader\UniversalClassLoader();
--$classLoader->registerNamespaces(array(
-- 'Aws' => AWS_FILE_PREFIX,
-- 'Guzzle' => AWS_FILE_PREFIX,
-- 'Symfony' => AWS_FILE_PREFIX,
--
-- // Not needed for basic S3-functionality.
-- //'Doctrine' => AWS_FILE_PREFIX,
-- //'Psr' => AWS_FILE_PREFIX,
-- //'Monolog' => AWS_FILE_PREFIX
--));
--
--$classLoader->register();
--
--return $classLoader;
-diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
-index 0091514..4106191 100644
---- a/apps/files_external/lib/amazons3.php
-+++ b/apps/files_external/lib/amazons3.php
-@@ -35,10 +35,6 @@
-
- namespace OC\Files\Storage;
-
--set_include_path(get_include_path() . PATH_SEPARATOR .
-- \OC_App::getAppPath('files_external') . '/3rdparty/aws-sdk-php');
--require 'aws-autoloader.php';
--
- use Aws\S3\S3Client;
- use Aws\S3\Exception\S3Exception;
- use Icewind\Streams\IteratorDirectory;
diff --git a/owncloud-8.2.2-google_autoload.patch b/owncloud-8.2.2-google_autoload.patch
deleted file mode 100644
index 6b31a17..0000000
--- a/owncloud-8.2.2-google_autoload.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
-index eba2ee7..93a2096 100644
---- a/apps/files_external/lib/google.php
-+++ b/apps/files_external/lib/google.php
-@@ -37,8 +37,7 @@ use Icewind\Streams\IteratorDirectory;
-
- set_include_path(get_include_path().PATH_SEPARATOR.
- \OC_App::getAppPath('files_external').'/3rdparty/google-api-php-client/src');
--require_once 'Google/Client.php';
--require_once 'Google/Service/Drive.php';
-+require_once 'Google/autoload.php';
-
- class Google extends \OC\Files\Storage\Common {
-
diff --git a/owncloud-8.2.3-amazon-autoloader.patch b/owncloud-8.2.3-amazon-autoloader.patch
new file mode 100644
index 0000000..1ddf8cc
--- /dev/null
+++ b/owncloud-8.2.3-amazon-autoloader.patch
@@ -0,0 +1,15 @@
+diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
+index 0091514..4106191 100644
+--- a/apps/files_external/lib/amazons3.php
++++ b/apps/files_external/lib/amazons3.php
+@@ -35,10 +35,6 @@
+
+ namespace OC\Files\Storage;
+
+-set_include_path(get_include_path() . PATH_SEPARATOR .
+- \OC_App::getAppPath('files_external') . '/3rdparty/aws-sdk-php');
+-require 'aws-autoloader.php';
+-
+ use Aws\S3\S3Client;
+ use Aws\S3\Exception\S3Exception;
+ use Icewind\Streams\IteratorDirectory;
diff --git a/owncloud-8.2.3-composer_include_path.patch b/owncloud-8.2.3-composer_include_path.patch
deleted file mode 100644
index 7832dc8..0000000
--- a/owncloud-8.2.3-composer_include_path.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/lib/base.php b/lib/base.php
-index 5ce5fae..544e159 100644
---- a/lib/base.php
-+++ b/lib/base.php
-@@ -498,7 +498,10 @@ class OC {
- if (!file_exists($vendorAutoLoad)) {
- throw new \RuntimeException('Composer autoloader not found, unable to continue. Check the folder "3rdparty". Running "git submodule update --init" will initialize the git submodule that handles the subfolder "3rdparty".');
- }
-- require_once $vendorAutoLoad;
-+ $loader = require_once $vendorAutoLoad;
-+ $loader->add('Sabre', '/usr/share/php');
-+ $loader->add('Sabre\VObject', '/usr/share/php');
-+ $loader->setUseIncludePath(true);
-
- } catch (\RuntimeException $e) {
- OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
diff --git a/owncloud-8.2.3-drop-dropbox-autoloader.patch b/owncloud-8.2.3-dropbox-autoloader.patch
index 8cfd754..8cfd754 100644
--- a/owncloud-8.2.3-drop-dropbox-autoloader.patch
+++ b/owncloud-8.2.3-dropbox-autoloader.patch
diff --git a/owncloud-8.2.3-google-autoloader.patch b/owncloud-8.2.3-google-autoloader.patch
new file mode 100644
index 0000000..bf94192
--- /dev/null
+++ b/owncloud-8.2.3-google-autoloader.patch
@@ -0,0 +1,29 @@
+diff --git a/apps/files_external/ajax/oauth2.php b/apps/files_external/ajax/oauth2.php
+index fbe60e1..bc7d285 100644
+--- a/apps/files_external/ajax/oauth2.php
++++ b/apps/files_external/ajax/oauth2.php
+@@ -25,9 +25,6 @@
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+-set_include_path(get_include_path().PATH_SEPARATOR.
+- \OC_App::getAppPath('files_external').'/3rdparty/google-api-php-client/src');
+-require_once 'Google/Client.php';
+
+ OCP\JSON::checkAppEnabled('files_external');
+ OCP\JSON::checkLoggedIn();
+diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
+index eba2ee7..9ed0de1 100644
+--- a/apps/files_external/lib/google.php
++++ b/apps/files_external/lib/google.php
+@@ -35,10 +35,6 @@ namespace OC\Files\Storage;
+
+ use Icewind\Streams\IteratorDirectory;
+
+-set_include_path(get_include_path().PATH_SEPARATOR.
+- \OC_App::getAppPath('files_external').'/3rdparty/google-api-php-client/src');
+-require_once 'Google/Client.php';
+-require_once 'Google/Service/Drive.php';
+
+ class Google extends \OC\Files\Storage\Common {
+
diff --git a/owncloud-8.2.3-icewind-streams-encryption.patch b/owncloud-8.2.3-icewind-streams-encryption.patch
new file mode 100644
index 0000000..177aad2
--- /dev/null
+++ b/owncloud-8.2.3-icewind-streams-encryption.patch
@@ -0,0 +1,40 @@
+diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
+index e0d263d..4c32899 100644
+--- a/lib/private/files/stream/encryption.php
++++ b/lib/private/files/stream/encryption.php
+@@ -471,4 +471,13 @@ protected function parentStreamSeek($position) {
+ return parent::stream_seek($position);
+ }
+
++ /**
++ * @param string $path
++ * @param array $options
++ * @return bool
++ */
++ public function dir_opendir($path, $options) {
++ return false;
++ }
++
+ }
+diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
+index 4c32899..585a697 100644
+--- a/lib/private/files/stream/encryption.php
++++ b/lib/private/files/stream/encryption.php
+@@ -167,7 +167,7 @@ public static function wrap($source, $internalPath, $fullPath, array $header,
+ )
+ ));
+
+- return self::wrapSource($source, $mode, $context, 'ocencryption', $wrapper);
++ return self::wrapSource($source, $context, 'ocencryption', $wrapper, $mode);
+ }
+
+ /**
+@@ -181,7 +181,7 @@ public static function wrap($source, $internalPath, $fullPath, array $header,
+ * @return resource
+ * @throws \BadMethodCallException
+ */
+- protected static function wrapSource($source, $mode, $context, $protocol, $class) {
++ protected static function wrapSource($source, $context, $protocol, $class, $mode = 'r+') {
+ try {
+ stream_wrapper_register($protocol, $class);
+ if (@rewinddir($source) === false) {
diff --git a/owncloud-8.2.3-unbundle-files-external.patch b/owncloud-8.2.3-unbundle-files-external.patch
deleted file mode 100644
index 8d6eace..0000000
--- a/owncloud-8.2.3-unbundle-files-external.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -rup owncloud.old/apps/files_external/ajax/oauth1.php owncloud/apps/files_external/ajax/oauth1.php
---- owncloud.old/apps/files_external/ajax/oauth1.php 2016-03-08 15:12:48.000000000 +0100
-+++ owncloud/apps/files_external/ajax/oauth1.php 2016-03-24 07:09:08.151200875 +0100
-@@ -23,7 +23,7 @@
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
--require_once __DIR__ . '/../3rdparty/Dropbox/autoload.php';
-+require_once '/usr/share/pear/Dropbox/autoload.php';
-
- OCP\JSON::checkAppEnabled('files_external');
- OCP\JSON::checkLoggedIn();
-diff -rup owncloud.old/apps/files_external/ajax/oauth2.php owncloud/apps/files_external/ajax/oauth2.php
---- owncloud.old/apps/files_external/ajax/oauth2.php 2016-03-08 15:12:48.000000000 +0100
-+++ owncloud/apps/files_external/ajax/oauth2.php 2016-03-24 07:09:27.973288077 +0100
-@@ -25,9 +25,7 @@
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
--set_include_path(get_include_path().PATH_SEPARATOR.
-- \OC_App::getAppPath('files_external').'/3rdparty/google-api-php-client/src');
--require_once 'Google/Client.php';
-+require_once '/usr/share/php/Google/autoload.php';
-
- OCP\JSON::checkAppEnabled('files_external');
- OCP\JSON::checkLoggedIn();
-diff -rup owncloud.old/apps/files_external/lib/amazons3.php owncloud/apps/files_external/lib/amazons3.php
---- owncloud.old/apps/files_external/lib/amazons3.php 2016-03-08 15:12:48.000000000 +0100
-+++ owncloud/apps/files_external/lib/amazons3.php 2016-03-24 07:08:38.075068563 +0100
-@@ -35,9 +35,7 @@
-
- namespace OC\Files\Storage;
-
--set_include_path(get_include_path() . PATH_SEPARATOR .
-- \OC_App::getAppPath('files_external') . '/3rdparty/aws-sdk-php');
--require 'aws-autoloader.php';
-+require '/usr/share/php/Aws/autoload.php';
-
- use Aws\S3\S3Client;
- use Aws\S3\Exception\S3Exception;
-diff -rup owncloud.old/apps/files_external/lib/dropbox.php owncloud/apps/files_external/lib/dropbox.php
---- owncloud.old/apps/files_external/lib/dropbox.php 2016-03-08 15:12:48.000000000 +0100
-+++ owncloud/apps/files_external/lib/dropbox.php 2016-03-24 07:07:41.210818403 +0100
-@@ -31,7 +31,7 @@ namespace OC\Files\Storage;
-
- use Icewind\Streams\IteratorDirectory;
-
--require_once __DIR__ . '/../3rdparty/Dropbox/autoload.php';
-+require_once '/usr/share/pear/Dropbox/autoload.php';
-
- class Dropbox extends \OC\Files\Storage\Common {
-
-diff -rup owncloud.old/apps/files_external/lib/google.php owncloud/apps/files_external/lib/google.php
---- owncloud.old/apps/files_external/lib/google.php 2016-03-08 15:12:48.000000000 +0100
-+++ owncloud/apps/files_external/lib/google.php 2016-03-24 07:06:22.995474314 +0100
-@@ -35,10 +35,7 @@ namespace OC\Files\Storage;
-
- use Icewind\Streams\IteratorDirectory;
-
--set_include_path(get_include_path().PATH_SEPARATOR.
-- \OC_App::getAppPath('files_external').'/3rdparty/google-api-php-client/src');
--require_once 'Google/Client.php';
--require_once 'Google/Service/Drive.php';
-+require_once '/usr/share/php/Google/autoload.php';
-
- class Google extends \OC\Files\Storage\Common {
-
diff --git a/owncloud-8.2.3-use_system_assetic.patch b/owncloud-8.2.3-use_system_assetic.patch
deleted file mode 100644
index d30cbfb..0000000
--- a/owncloud-8.2.3-use_system_assetic.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/3rdparty/composer/autoload_files.php b/3rdparty/composer/autoload_files.php
-index eda4201..d87ed77 100644
---- a/3rdparty/composer/autoload_files.php
-+++ b/3rdparty/composer/autoload_files.php
-@@ -9,6 +9,5 @@ return array(
- 'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
- 'e40631d46120a9c38ea139981f8dab26' => $vendorDir . '/ircmaxell/password-compat/lib/password.php',
- '2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
-- 'ce89ac35a6c330c55f4710717db9ff78' => $vendorDir . '/kriswallsmith/assetic/src/functions.php',
- );
-
diff --git a/owncloud-8.2.3-use_system_phpparser.patch b/owncloud-8.2.3-use_system_phpparser.patch
deleted file mode 100644
index 716bd8d..0000000
--- a/owncloud-8.2.3-use_system_phpparser.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/3rdparty/composer/autoload_files.php b/3rdparty/composer/autoload_files.php
-index 3408e4c..eda4201 100644
---- a/3rdparty/composer/autoload_files.php
-+++ b/3rdparty/composer/autoload_files.php
-@@ -7,8 +7,8 @@ $baseDir = $vendorDir;
-
- return array(
- 'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
-- 'fe1bcd0336136e435eaf197895daf81a' => $vendorDir . '/nikic/php-parser/lib/bootstrap.php',
- 'e40631d46120a9c38ea139981f8dab26' => $vendorDir . '/ircmaxell/password-compat/lib/password.php',
- '2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
- 'ce89ac35a6c330c55f4710717db9ff78' => $vendorDir . '/kriswallsmith/assetic/src/functions.php',
- );
-+
diff --git a/owncloud-8.2.3-use_system_psr_libraries.patch b/owncloud-8.2.3-use_system_psr_libraries.patch
deleted file mode 100644
index 6448b24..0000000
--- a/owncloud-8.2.3-use_system_psr_libraries.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/3rdparty/composer/autoload_psr4.php b/3rdparty/composer/autoload_psr4.php
-index 50419c3..0c50d0a 100644
---- a/3rdparty/composer/autoload_psr4.php
-+++ b/3rdparty/composer/autoload_psr4.php
-@@ -6,26 +6,4 @@ $vendorDir = dirname(dirname(__FILE__));
- $baseDir = $vendorDir;
-
- return array(
-- 'phpseclib\\' => array($vendorDir . '/phpseclib/phpseclib/phpseclib'),
-- 'ownCloud\\TarStreamer\\' => array($vendorDir . '/deepdiver1975/tarstreamer/src'),
-- 'bantu\\IniGetWrapper\\' => array($vendorDir . '/bantu/ini-get-wrapper/src'),
-- 'ZipStreamer\\' => array($vendorDir . '/mcnetic/zipstreamer/src'),
-- 'SuperClosure\\' => array($vendorDir . '/jeremeamia/SuperClosure/src'),
-- 'Sabre\\VObject\\' => array($vendorDir . '/sabre/vobject/lib'),
-- 'Sabre\\HTTP\\' => array($vendorDir . '/sabre/http/lib'),
-- 'Sabre\\Event\\' => array($vendorDir . '/sabre/event/lib'),
-- 'Sabre\\DAV\\' => array($vendorDir . '/sabre/dav/lib/DAV'),
-- 'Sabre\\DAVACL\\' => array($vendorDir . '/sabre/dav/lib/DAVACL'),
-- 'Sabre\\CardDAV\\' => array($vendorDir . '/sabre/dav/lib/CardDAV'),
-- 'Sabre\\CalDAV\\' => array($vendorDir . '/sabre/dav/lib/CalDAV'),
-- 'React\\Promise\\' => array($vendorDir . '/react/promise/src'),
-- 'Punic\\' => array($vendorDir . '/punic/punic/code'),
-- 'Patchwork\\' => array($vendorDir . '/patchwork/jsqueeze/src'),
-- 'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
-- 'InterfaSys\\LogNormalizer\\' => array($vendorDir . '/interfasys/lognormalizer/src'),
-- 'Icewind\\Streams\\Tests\\' => array($vendorDir . '/icewind/streams/tests'),
-- 'Icewind\\Streams\\' => array($vendorDir . '/icewind/streams/src'),
-- 'GuzzleHttp\\Stream\\' => array($vendorDir . '/guzzlehttp/streams/src'),
-- 'GuzzleHttp\\Ring\\' => array($vendorDir . '/guzzlehttp/ringphp/src'),
-- 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
- );
diff --git a/owncloud-fedora-autoloader.php b/owncloud-fedora-autoloader.php
new file mode 100644
index 0000000..6b6e23e
--- /dev/null
+++ b/owncloud-fedora-autoloader.php
@@ -0,0 +1,72 @@
+<?php
+$vendor = '##DATADIR##/php';
+
+if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
+ if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
+ require_once $vendor . '/Symfony/Component/ClassLoader/ClassLoader.php';
+ }
+
+ $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
+ $fedoraClassLoader->register();
+}
+
+// For PEAR components
+$fedoraClassLoader->setUseIncludePath(true);
+
+// Dependencies from 3rdparty composer.json
+// "sabre/dav"
+require_once $vendor . '/Sabre/DAV/autoload.php';
+// "doctrine/dbal"
+require_once $vendor . '/Doctrine/DBAL/autoload.php';
+// mcnetic/zipstreamer"
+require_once $vendor . '/ZipStreamer/autoload.php';
+// "phpeclib/phpseclib"
+require_once $vendor . '/phpseclib/autoload.php';
+// "rackspace/php-opencloud"
+require_once $vendor . '/OpenCloud/autoload.php';
+// "james-heinrich/getid3"
+require_once $vendor . '/getid3/getid3.php';
+// "jeremeamia/superclosure"
+require_once $vendor . '/SuperClosure/autoload.php';
+// "ircmaxell/random-lib"
+require_once $vendor . '/RandomLib/autoload.php';
+// "bantu/ini-get-wrapper"
+require_once $vendor . '/bantu/IniGetWrapper/IniGetWrapper.php';
+// "natxet/CssMin"
+require_once $vendor . '/natxet/CssMin/src/CssMin.php';
+// "punic/punic"
+require_once $vendor . '/Punic/autoload.php';
+// "patchwork/utf8"
+require_once $vendor . '/Patchwork/autoload.php';
+// "symfony/console"
+require_once $vendor . '/Symfony/Component/Console/autoload.php';
+// "symfony/event-dispatcher"
+require_once $vendor . '/Symfony/Component/EventDispatcher/autoload.php';
+// "symfony/routing"
+require_once $vendor . '/Symfony/Component/Routing/autoload.php';
+// "symfony/process"
+require_once $vendor . '/Symfony/Component/Process/autoload.php';
+// "pimple/pimple"
+require_once $vendor . '/Pimple/autoload.php';
+// "ircmaxell/password-compat"
+require_once $vendor . '/password_compat/password.php';
+// "nikic/php-parser"
+require_once $vendor . '/PhpParser/autoload.php';
+// "icewind/Streams"
+require_once $vendor . '/Icewind/Streams/autoload.php';
+// "swiftmailer/swiftmailer
+require_once $vendor . '/Swift/swift_required.php';
+// "guzzlehttp/guzzle"
+require_once $vendor . '/GuzzleHttp/autoload.php';
+// "league/flysystem"
+require_once $vendor . '/League/Flysystem/autoload.php';
+// "interfasys/lognormalizer"
+require_once $vendor . '/InterfaSys/LogNormalizer/autoload.php';
+// "deepdiver1975/TarSTreamer"
+require_once $vendor . '/ownCloud/TarStreamer/autoload.php';
+// "patchwork/jsqueeze"
+require_once $vendor . '/Patchwork/JSqueeze.php';
+// "kriswallsmith/assetic"
+require_once $vendor . '/Assetic/autoload.php';
+
+
diff --git a/owncloud.spec b/owncloud.spec
index 973fbfa..1cf1435 100644
--- a/owncloud.spec
+++ b/owncloud.spec
@@ -9,7 +9,7 @@
#
Name: owncloud
Version: 8.2.3
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Private file sync and share server
Group: Applications/Internet
@@ -42,37 +42,38 @@ Source5: %{name}-postgresql.txt
# initial setup will fill out other settings appropriately
Source7: %{name}-config.php
+# Our autoloader for core
+Source8: %{name}-fedora-autoloader.php
+
# Adjust mediaelement not to use its SWF and Silverlight plugins. This
# changes 'plugins:["flash,"silverlight","youtube","vimeo"]' to
# 'plugins:["youtube","vimeo"]'
Patch1: %{name}-8.2.3-videoviewer_noplugins.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
-Patch2: %{name}-8.2.3-composer_include_path.patch
+
# Stop OC from trying to do stuff to .htaccess files. Just calm down, OC.
# Distributors are on the case.
-Patch3: %{name}-8.2.2-dont_update_htacess.patch
+Patch2: %{name}-8.2.2-dont_update_htacess.patch
-# Owncloud should use the system libraries with psr
-Patch4: %{name}-8.2.3-use_system_psr_libraries.patch
+# Remove explicit load of dropbox
+Patch3: %{name}-8.2.3-dropbox-autoloader.patch
-# Owncloud should use the system autoloaded react-promise and nitic-phpParser
-Patch5: %{name}-8.2.3-use_system_phpparser.patch
+# Remove explicit load of google
+Patch4: %{name}-8.2.3-google-autoloader.patch
-# Unbundle Google, Dropbox and AVS from app/files_external
-Patch6: %{name}-8.2.3-unbundle-files-external.patch
-
-# unbundle php-Assetic to use the system autoloader
-Patch7: %{name}-8.2.3-use_system_assetic.patch
+# Remove explicit load of aws
+Patch5: %{name}-8.2.3-amazon-autoloader.patch
# Display the appropriate upgrade command for fedora/epel users bz#1321417
-Patch8: %{name}-8.2.3-correct-cli-upgrade-command.patch
+Patch6: %{name}-8.2.3-correct-cli-upgrade-command.patch
+
+# Backport commit ca6bd5c and cfdf2b9 since icewind/streams added function in 0.3.0+
+# breaking interface from 0.2.0 and OC method spamming logs
+Patch7: %{name}-8.2.3-icewind-streams-encryption.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
+
# expand pear macros on install
BuildRequires: php-pear
# For sanity check
@@ -110,17 +111,13 @@ Requires: php-filter
# Ordering requires to match composer.json
# "sabre/dav" : "2.1.9"
-# pulls in sabre event, http and vobject as deps
+# pulls in sabre event, http and vobject as strict requires
Requires: php-composer(sabre/dav) >= 2.1.9
Requires: php-composer(sabre/dav) < 2.2
-Requires: php-composer(sabre/vobject) >= 3.3.4
-Requires: php-composer(sabre/vobject) < 4.0.0
-Requires: php-composer(sabre/event) >= 2.0.0
-Requires: php-composer(sabre/event) < 3.0.0
-Requires: php-composer(sabre/http) >= 3.0.0
-Requires: php-composer(sabre/http) < 4.0.0
# "doctrine/dbal": "2.5.1"
+# pulls in doctrine/common as a strict requires
+# which pulls in doctrine/{annotations,inflector,cache,collections,lexer} as strict requires
Requires: php-composer(doctrine/dbal) >= 2.5.1
Requires: php-composer(doctrine/dbal) < 2.6
@@ -132,10 +129,9 @@ Requires: php-composer(phpseclib/phpseclib) >= 2.0
Requires: php-composer(phpseclib/phpseclib) < 3.0
#Requires: php-composer(rackspace/php-opencloud) >= 1.9.2
-# pulls in guzzle/http as a dep
+# pulls in guzzle/http as a strict requires
+# guzzle/http package include common, parser and stream too
Requires: php-opencloud >= 1.9.2
-Requires: php-composer(guzzle/http) >= 3.8.0
-Requires: php-composer(guzzle/http) < 4.0.0
#"james-heinrich/getid3": "dev-master"
# fedora has 1.9.8 but current release 1.9.12
@@ -146,10 +142,9 @@ Requires: php-composer(james-heinrich/getid3)
Requires: php-composer(jeremeamia/superclosure) >= 2.0
# "ircmaxell/random-lib": "~1.1"
-# Also pulls in ircmaxell/security-lib which is a dep
+# Also pulls in ircmaxell/security-lib which is a strict requires
Requires: php-composer(ircmaxell/random-lib) >= 1.1
Requires: php-composer(ircmaxell/random-lib) < 2.0
-Requires: php-composer(ircmaxell/security-lib) >= 1.0
# "bantu/ini-get-wrapper": "v1.0.1"
Requires: php-composer(bantu/ini-get-wrapper) >= 1.0.1
@@ -171,14 +166,13 @@ Requires: php-composer(patchwork/utf8) >= 1.1
Requires: php-composer(patchwork/utf8) < 2.0
# "symfony/console": "2.6.4"
-# pulls in symfony/event-dispatcher as a dep
-# pulls in symfony/process as a dep
Requires: php-composer(symfony/console) >= 2.6.4
+# "symfony/event-dispatcher": "2.6.4"
Requires: php-composer(symfony/event-dispatcher) >= 2.6.4
-Requires: php-composer(symfony/process) >= 2.6.4
-
# "symfony/routing": "2.6.4"
Requires: php-composer(symfony/routing) >= 2.6.4
+# "symfony/process": "2.6.4"
+Requires: php-composer(symfony/process) >= 2.6.4
# "pimple/pimple": "~3.0"
Requires: php-composer(pimple/pimple) >= 3.0
@@ -199,16 +193,10 @@ Requires: php-composer(icewind/streams) >= 0.2
Requires: php-composer(swiftmailer/swiftmailer) >= 5.4.1
# "guzzlehttp/guzzle": "~5.0"
-# pulls in guzzlehttp/ringphp as a dep
-# ringphp pulls in guzzlehttp/streams and react/promise
+# pulls in guzzlehttp/ringphp as strict requires
+# ringphp pulls in guzzlehttp/streams and react/promise as strict requires
Requires: php-composer(guzzlehttp/guzzle) >= 5.0
Requires: php-composer(guzzlehttp/guzzle) < 6.0
-Requires: php-composer(guzzlehttp/ringphp) >= 1.1
-Requires: php-composer(guzzlehttp/ringphp) < 2.0
-Requires: php-composer(guzzlehttp/streams) >= 3.0
-Requires: php-composer(guzzlehttp/streams) < 4.0
-Requires: php-composer(react/promise) >= 2.2
-Requires: php-composer(react/promise) < 3.0
# "league/flysystem": "1.0.4"
Requires: php-composer(league/flysystem) >= 1.0.4
@@ -253,6 +241,9 @@ Requires: php-pecl(smbclient) >= 0.8.0
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
Requires: samba-common-tools
Requires: samba-client
+%else
+Requires: %{_bindir}/net
+Requires: %{_bindir}/smbclient
%endif
## Note these next bits are not listed in composer but manually dropped in place
@@ -266,6 +257,10 @@ Requires: php-google-apiclient >= 1.0.3
## AWS S3 external storage
Requires: php-aws-sdk >= 2.7.0
+## For dependency of apps/gallery
+# "symfony/yaml": "~2.6"
+Requires: php-composer(symfony/yaml) >= 2.6.0
+Requires: php-composer(symfony/yaml) < 3.0.0
%if 0%{?rhel}
Requires(post): policycoreutils-python
@@ -369,7 +364,6 @@ work with an SQLite 3 database stored on the local system.
%patch5 -p1
%patch6 -p1
%patch7 -p1
-%patch8 -p1
# prepare package doc
cp %{SOURCE3} README.fedora
@@ -377,34 +371,79 @@ cp %{SOURCE4} README.mysql
cp %{SOURCE5} README.postgresql
-# Strip bundled libraries from global 3rdparty dir
-find 3rdparty -mindepth 1 -maxdepth 1 -type d ! -name composer -exec rm -r "{}" \;
-
-# we need to symlink some annoying files back here, though...direct file
-# autoloading sucks. "files" sections of "autoload" statements in
-# composer.json files cause composer to basically hardcode the path to a
-# given file and require that exact path *every time the autoloader is
-# invoked*: I can't see an elegant way around that. "classmap" does much
-# the same. If we unbundle *all* of the 'files' or 'classmap' bundled
-# deps in such a way that they're laid out exactly the same as upstream
-# relative to /usr/share/php, then instead of doing this we could patch
-# $vendorDir in the composer loader files to be /usr/share/php.
-mkdir -p 3rdparty/natxet/CssMin/src
-mkdir -p 3rdparty/james-heinrich/getid3/getid3
-mkdir -p 3rdparty/swiftmailer/swiftmailer/lib
-mkdir -p 3rdparty/ircmaxell/password-compat/lib
-mkdir -p 3rdparty/react/promise/src
-
-# individual core apps now bundle libs as well - yay
-rm -rf apps/files_external/3rdparty/{icewind,Dropbox,google-api-php-client,aws-sdk-php,composer*}
+# Explicitly remove the bundled libraries we're aware of
+pushd 3rdparty
+rm -r sabre/{dav,event,http,vobject}
+rm -r doctrine/{annotations,cache,collections,common,dbal,inflector,lexer}
+rm -r mcnetic/zipstreamer
+rm -r phpseclib/phpseclib
+rm -r rackspace/php-opencloud guzzle/{http,common,parser,stream}
+rm -r james-heinrich/getid3
+rm -r jeremeamia/SuperClosure
+rm -r ircmaxell/{random-lib,security-lib}
+rm -r bantu/ini-get-wrapper
+rm -r natxet/CssMin
+rm -r punic/punic
+rm -r pear/archive_tar
+rm -r patchwork/utf8
+rm -r symfony/console
+rm -r symfony/event-dispatcher
+rm -r symfony/routing
+rm -r symfony/process
+rm -r pimple/pimple
+rm -r ircmaxell/password-compat
+rm -r nikic/php-parser
+rm -r icewind/streams
+rm -r swiftmailer/swiftmailer
+rm -r guzzlehttp/{guzzle,ringphp,streams} react/promise
+rm -r league/flysystem
+rm -r pear/{pear-core-minimal,console_getopt,pear_exception}
+rm -r interfasys/lognormalizer
+rm -r deepdiver1975/tarstreamer
+rm -r patchwork/jsqueeze
+rm -r kriswallsmith/assetic
+
+# remove composer stuff
+rm -r composer*
+
+# clean up any empty directories
+find -type d -empty -delete
+
+# remove extraneous files now we've cleaned up
+rm "LICENSE INFO" patches.txt
+
+# add our Fedora autoloader
+cp %{SOURCE8} ./autoload.php
+
+# Set the vendor directory to macro based datadir in our autoloader
+sed -i "s,##DATADIR##,%{_datadir}," autoload.php
+popd
+
+
+# remove files_external bundled libraries
+rm -r apps/files_external/3rdparty/{icewind,Dropbox,google-api-php-client,aws-sdk-php,composer*}
# create autoloader, from composer.json, "require": {
# "icewind/smb": "1.0.4",
# "icewind/streams": "0.2"
+# include stuff required directly but not in composer too
cat << 'EOF' | tee apps/files_external/3rdparty/autoload.php
<?php
require_once '%{_datadir}/php/Icewind/Streams/autoload.php';
require_once '%{_datadir}/php/Icewind/SMB/autoload.php';
+require_once '%{_datadir}/pear/Dropbox/autoload.php';
+require_once '%{_datadir}/php/Google/autoload.php';
+require_once '%{_datadir}/php/Aws/autoload.php';
+EOF
+
+# remove gallery external bundled libraries
+rm -r apps/gallery/vendor/{symfony,composer*}
+
+# create autoloader, from composer.json, "require": {
+# "symfony/yaml": "_2.6"
+cat << 'EOF' | tee apps/gallery/vendor/autoload.php
+<?php
+require_once '%{_datadir}/php/Symfony/Component/Yaml/autoload.php';
EOF
# clean up content
@@ -429,6 +468,7 @@ rm -r apps/updater
%check
+# files_external checks
nb=$(ls %{buildroot}%{_datadir}/%{name}/apps/files_external/3rdparty | wc -l)
if [ $nb -gt 1 ]; then
false apps/files_external/3rdparty must only have autoload.php
@@ -439,8 +479,23 @@ if grep -r 3rdparty %{buildroot}%{_datadir}/%{name}/apps/files_external \
false Patch needs to be adapted
fi
-php %{buildroot}%{_datadir}/%{name}/apps/files_external/3rdparty/autoload.php
+#php %{buildroot}%{_datadir}/%{name}/apps/files_external/3rdparty/autoload.php
+
+# gallery checks
+nb=$(ls %{buildroot}%{_datadir}/%{name}/apps/gallery/vendor | wc -l)
+if [ $nb -gt 1 ]; then
+ false apps/gallery/vendor must only have autoload.php
+fi
+
+#php %{buildroot}%{_datadir}/%{name}/apps/gallery/vendor/autoload.php
+
+# core checks
+nb=$(ls %{buildroot}%{_datadir}/%{name}/3rdparty | wc -l)
+if [ $nb -gt 1 ]; then
+ false core 3rdparty must only have autoload.php
+fi
+#php %{buildroot}%{_datadir}/%{name}/3rdparty/autoload.php
%build
@@ -489,14 +544,6 @@ install -Dpm 644 %{SOURCE100} %{SOURCE101} %{SOURCE102} %{SOURCE103} \
install -Dpm 644 %{SOURCE6} \
%{buildroot}%{_sysconfdir}/nginx/conf.d/%{name}.conf
-# symlink 3rdparty libs - if possible
-# global
-ln -s %{_datadir}/php/natxet/CssMin/src/CssMin.php %{buildroot}%{_datadir}/%{name}/3rdparty/natxet/CssMin/src/
-ln -s %{_datadir}/php/getid3/getid3.php %{buildroot}%{_datadir}/%{name}/3rdparty/james-heinrich/getid3/getid3/
-ln -s %{_datadir}/php/Swift/swift_required.php %{buildroot}%{_datadir}/%{name}/3rdparty/swiftmailer/swiftmailer/lib/swift_required.php
-ln -s %{_datadir}/php/password_compat/password.php %{buildroot}%{_datadir}/%{name}/3rdparty/ircmaxell/password-compat/lib/password.php
-ln -s %{_datadir}/php/React/Promise/functions_include.php %{buildroot}%{_datadir}/%{name}/3rdparty/react/promise/src/functions_include.php
-
%if 0%{?rhel} < 7
%post
@@ -596,6 +643,11 @@ rm -rf %{buildroot}
%changelog
+* Tue Apr 12 2016 James Hogarth <james.hogarth@gmail.com> - 8.2.3-5
+- Add autoloader based external libraries for core and gallery
+- Add checks to catch future added dependencies
+- Backport encryption patches from 9.0.x to support php-icewind-streams > 0.3.0
+
* Fri Apr 01 2016 James Hogarth <james.hogarth@gmail.com> - 8.2.3-4
- Update to new dependency versions now packaged
- Add fedora autoloader based external_files