summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-01 14:23:16 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-01 14:23:16 +0200
commitbcfe6f7686289cccf41c2810ed8bf503131f7daa (patch)
treed0842aa9091a5deed8e20abc906cbd2684431a9d
parentb9a9de1ab929bbe922ae2e26fbb2b678f84110dc (diff)
owncloud: sync with Fedora
-rw-r--r--owncloud-8.2.3-correct-cli-upgrade-command.patch13
-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.spec93
4 files changed, 160 insertions, 24 deletions
diff --git a/owncloud-8.2.3-correct-cli-upgrade-command.patch b/owncloud-8.2.3-correct-cli-upgrade-command.patch
new file mode 100644
index 0000000..95779fd
--- /dev/null
+++ b/owncloud-8.2.3-correct-cli-upgrade-command.patch
@@ -0,0 +1,13 @@
+diff --git a/core/templates/update.admin.php b/core/templates/update.admin.php
+index fbd3025..b9b00ef 100644
+--- a/core/templates/update.admin.php
++++ b/core/templates/update.admin.php
+@@ -37,7 +37,7 @@
+ <input class="updateButton" type="button" value="<?php p($l->t('Start update')) ?>">
+ <div class="infogroup">
+ <?php p($l->t('To avoid timeouts with larger installations, you can instead run the following command from your installation directory:')) ?>
+- <pre>./occ upgrade</pre>
++ <pre>sudo -u apache php /usr/share/owncloud/occ upgrade</pre>
+ </div>
+ </div>
+
diff --git a/owncloud-8.2.3-unbundle-files-external.patch b/owncloud-8.2.3-unbundle-files-external.patch
new file mode 100644
index 0000000..8d6eace
--- /dev/null
+++ b/owncloud-8.2.3-unbundle-files-external.patch
@@ -0,0 +1,67 @@
+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
new file mode 100644
index 0000000..d30cbfb
--- /dev/null
+++ b/owncloud-8.2.3-use_system_assetic.patch
@@ -0,0 +1,11 @@
+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.spec b/owncloud.spec
index 5ce12f9..973fbfa 100644
--- a/owncloud.spec
+++ b/owncloud.spec
@@ -9,7 +9,7 @@
#
Name: owncloud
Version: 8.2.3
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Private file sync and share server
Group: Applications/Internet
@@ -51,32 +51,34 @@ Patch1: %{name}-8.2.3-videoviewer_noplugins.patch
# Upstream wouldn't likely take this, they probably only care about their
# bundled copies
Patch2: %{name}-8.2.3-composer_include_path.patch
-# Drop use of dropbox's unnecessary autoloader (composer will find the
-# systemwide copy). This is not upstreamable, but see
-# https://github.com/owncloud/core/pull/12113 with similar effect for 8.1+
-Patch3: %{name}-8.2.3-drop-dropbox-autoloader.patch
-# Drop use of aws-sdk's dead autoloader (composer will find the systemwide copy)
-Patch4: %{name}-8.2.2-drop-AWS-autoloader.patch
# Stop OC from trying to do stuff to .htaccess files. Just calm down, OC.
# Distributors are on the case.
-Patch5: %{name}-8.2.2-dont_update_htacess.patch
-# Use Google autoloader instead of including particular files. Upstream
-# no longer has each file include all others it needs, they expect you
-# to use the autoloader. Can't go upstream until upstream bumps to a
-# version of the lib that actually includes the autoloader...
-Patch6: %{name}-8.2.2-google_autoload.patch
+Patch3: %{name}-8.2.2-dont_update_htacess.patch
# Owncloud should use the system libraries with psr
-Patch7: %{name}-8.2.3-use_system_psr_libraries.patch
+Patch4: %{name}-8.2.3-use_system_psr_libraries.patch
-# Owncloud shoudl use the system autoloaded react-promise and nitic-phpParser
-Patch8: %{name}-8.2.3-use_system_phpparser.patch
+# Owncloud should use the system autoloaded react-promise and nitic-phpParser
+Patch5: %{name}-8.2.3-use_system_phpparser.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
+
+# Display the appropriate upgrade command for fedora/epel users bz#1321417
+Patch8: %{name}-8.2.3-correct-cli-upgrade-command.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# expand pear macros on install
BuildRequires: php-pear
+# For sanity check
+BuildRequires: php-cli
+BuildRequires: php-composer(icewind/smb) >= 1.0.4
+BuildRequires: php-composer(icewind/streams) >= 0.2
Requires: %{name}-webserver = %{version}-%{release}
Requires: %{name}-database = %{version}-%{release}
@@ -111,6 +113,12 @@ Requires: php-filter
# pulls in sabre event, http and vobject as deps
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"
Requires: php-composer(doctrine/dbal) >= 2.5.1
@@ -124,8 +132,10 @@ 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/guzzle as a dep
+# pulls in guzzle/http as a dep
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
@@ -139,6 +149,7 @@ Requires: php-composer(jeremeamia/superclosure) >= 2.0
# Also pulls in ircmaxell/security-lib which is a dep
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
@@ -161,8 +172,10 @@ Requires: php-composer(patchwork/utf8) < 2.0
# "symfony/console": "2.6.4"
# pulls in symfony/event-dispatcher as a dep
-# pulls in symfony/event-process as a dep
+# pulls in symfony/process as a dep
Requires: php-composer(symfony/console) >= 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
@@ -182,6 +195,7 @@ Requires: php-composer(nikic/php-parser) < 2.0
Requires: php-composer(icewind/streams) >= 0.2
# "swiftmailer/swiftmailer": "@stable"
+# Version 5.4.1 for autoloader in /usr/share/php
Requires: php-composer(swiftmailer/swiftmailer) >= 5.4.1
# "guzzlehttp/guzzle": "~5.0"
@@ -189,6 +203,12 @@ Requires: php-composer(swiftmailer/swiftmailer) >= 5.4.1
# ringphp pulls in guzzlehttp/streams and react/promise
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
@@ -211,9 +231,7 @@ Requires: php-composer(patchwork/jsqueeze) >= 2.0
Requires: php-composer(patchwork/jsqueeze) < 3.0
# "kriswallsmith/assetic": "^1.3"
-# Only 1.2 is in Fedora right now and testing oC appears to work with that
-# Ticket open for the update is bz#1153986
-Requires: php-composer(kriswallsmith/assetic) >= 1.2
+Requires: php-composer(kriswallsmith/assetic) >= 1.3
Requires: php-composer(kriswallsmith/assetic) < 2.0
@@ -371,7 +389,6 @@ find 3rdparty -mindepth 1 -maxdepth 1 -type d ! -name composer -exec rm -r "{}"
# 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/kriswallsmith/assetic/src
mkdir -p 3rdparty/natxet/CssMin/src
mkdir -p 3rdparty/james-heinrich/getid3/getid3
mkdir -p 3rdparty/swiftmailer/swiftmailer/lib
@@ -379,7 +396,16 @@ 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}
+rm -rf 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"
+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';
+EOF
# clean up content
for f in {l10n.pl,init.sh,setup_owncloud.sh,image-optimization.sh,install_dependencies.sh}; do
@@ -402,6 +428,21 @@ rm apps/files_videoviewer/js/silverlightmediaelement.xap
rm -r apps/updater
+%check
+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
+fi
+
+if grep -r 3rdparty %{buildroot}%{_datadir}/%{name}/apps/files_external \
+ | grep -v 3rdparty/autoload.php; then
+ false Patch needs to be adapted
+fi
+
+php %{buildroot}%{_datadir}/%{name}/apps/files_external/3rdparty/autoload.php
+
+
+
%build
# Nothing to build
@@ -450,7 +491,6 @@ install -Dpm 644 %{SOURCE6} \
# symlink 3rdparty libs - if possible
# global
-ln -s %{_datadir}/php/Assetic/functions.php %{buildroot}%{_datadir}/%{name}/3rdparty/kriswallsmith/assetic/src/functions.php
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
@@ -556,6 +596,11 @@ rm -rf %{buildroot}
%changelog
+* 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
+- Add patch to fix bz#1321417
+
* Thu Mar 24 2016 James Hogarth <james.hogarth@gmail.com> - 8.2.3-3
- Add typical appstore issue to readme
- Clean up spec to make it easier to follow the requires from unbundling