diff options
-rw-r--r-- | owncloud-463e2ea-php71-backport.patch | 22 | ||||
-rw-r--r-- | owncloud-9.1.2-dont_warn_about_php_versions.patch | 89 | ||||
-rw-r--r-- | owncloud-9.1.2-dont_warn_php54_eol.patch | 18 | ||||
-rw-r--r-- | owncloud-b129d5d-php71-backport.patch | 13 | ||||
-rw-r--r-- | owncloud-defaults.inc | 13 | ||||
-rw-r--r-- | owncloud.spec | 30 |
6 files changed, 159 insertions, 26 deletions
diff --git a/owncloud-463e2ea-php71-backport.patch b/owncloud-463e2ea-php71-backport.patch new file mode 100644 index 0000000..1a24d73 --- /dev/null +++ b/owncloud-463e2ea-php71-backport.patch @@ -0,0 +1,22 @@ +From 463e2ea15d6fb71b96363d60c7e4bdc2c020eddf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20M=C3=BCller?= <thomas.mueller@tmit.eu> +Date: Mon, 4 Jul 2016 13:47:03 +0200 +Subject: [PATCH] Initialize array elements properly + +--- + lib/private/App/InfoParser.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/private/App/InfoParser.php b/lib/private/App/InfoParser.php +index c158e5c..843ed02 100644 +--- a/lib/private/App/InfoParser.php ++++ b/lib/private/App/InfoParser.php +@@ -141,7 +141,7 @@ function xmlToArray($xml) { + $totalElement = count($xml->{$element}); + + if (!isset($array[$element])) { +- $array[$element] = ""; ++ $array[$element] = $totalElement > 1 ? [] : ""; + } + /** @var \SimpleXMLElement $node */ + // Has attributes diff --git a/owncloud-9.1.2-dont_warn_about_php_versions.patch b/owncloud-9.1.2-dont_warn_about_php_versions.patch new file mode 100644 index 0000000..8788818 --- /dev/null +++ b/owncloud-9.1.2-dont_warn_about_php_versions.patch @@ -0,0 +1,89 @@ +diff --git a/console.php b/console.php +index 7235965..1f4b721 100644 +--- a/console.php ++++ b/console.php +@@ -33,21 +33,6 @@ use Symfony\Component\Console\Output\ConsoleOutput; + + define('OC_CONSOLE', 1); + +-// Show warning if a PHP version below 5.4.0 is used, this has to happen here +-// because base.php will already use 5.4 syntax. +-if (version_compare(PHP_VERSION, '5.4.0') === -1) { +- echo 'This version of ownCloud requires at least PHP 5.4.0'.PHP_EOL; +- echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.'.PHP_EOL; +- return; +-} +- +-// Show warning if PHP 7.1 is used as ownCloud is not compatible with PHP 7.1 until +-// version 9.2.0. +-if (version_compare(PHP_VERSION, '7.1.0') !== -1) { +- echo 'This version of ownCloud is not compatible with PHP 7.1.<br/>'; +- echo 'You are currently running ' . PHP_VERSION . '. Please use at least ownCloud 9.2.0.'; +- return; +-} + + function exceptionHandler($exception) { + echo "An unhandled exception has been thrown:" . PHP_EOL; +@@ -78,7 +63,7 @@ try { + echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL; + echo "Current user: " . $user['name'] . PHP_EOL; + echo "Owner of config.php: " . $configUser['name'] . PHP_EOL; +- echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL; ++ echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL; + exit(0); + } + } +diff --git a/index.php b/index.php +index 136ddcb..5230cb2 100644 +--- a/index.php ++++ b/index.php +@@ -24,31 +24,9 @@ + * + */ + +-// Show warning if a PHP version below 5.4.0 is used, this has to happen here +-// because base.php will already use 5.4 syntax. +-if (version_compare(PHP_VERSION, '5.4.0') === -1) { +- echo 'This version of ownCloud requires at least PHP 5.4.0<br/>'; +- echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.'; +- return; +-} +- +-// Show warning if PHP 7.1 is used as ownCloud is not compatible with PHP 7.1 until +-// version 9.2.0. +-if (version_compare(PHP_VERSION, '7.1.0') !== -1) { +- echo 'This version of ownCloud is not compatible with PHP 7.1.<br/>'; +- echo 'You are currently running ' . PHP_VERSION . '. Please use at least ownCloud 9.2.0.'; +- return; +-} +- +-// running oC on Windows is unsupported since 8.1, this has to happen here because +-// is seems that the autoloader on Windows fails later and just throws an exception. +-if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { +- echo 'ownCloud Server does not support Microsoft Windows.'; +- return; +-} + + try { +- ++ + require_once 'lib/base.php'; + + OC::handleRequest(); +diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php +index 52ef34d..e39fdf2 100644 +--- a/settings/Controller/CheckSetupController.php ++++ b/settings/Controller/CheckSetupController.php +@@ -349,11 +349,7 @@ Raw output + protected function isEndOfLive() { + $eol = false; + +- //PHP 5.4 is EOL on 14 Sep 2015 +- if (version_compare(PHP_VERSION, '5.5.0') === -1) { +- $eol = true; +- return $eol; +- } ++ // Red Hat support PHP so don't EOL + return $eol; + } + } diff --git a/owncloud-9.1.2-dont_warn_php54_eol.patch b/owncloud-9.1.2-dont_warn_php54_eol.patch deleted file mode 100644 index efb3c80..0000000 --- a/owncloud-9.1.2-dont_warn_php54_eol.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- ./settings/Controller/CheckSetupController.php.old 2016-11-08 13:57:55.244970190 +0100 -+++ ./settings/Controller/CheckSetupController.php 2016-11-08 13:57:59.087987805 +0100 -@@ -347,13 +347,8 @@ - * @return bool - */ - protected function isEndOfLive() { -- $eol = false; - -- //PHP 5.4 is EOL on 14 Sep 2015 -- if (version_compare(PHP_VERSION, '5.5.0') === -1) { -- $eol = true; -- return $eol; -- } -- return $eol; -+ // Red Hat provide support for the system PHP so never eol -+ return false; - } - } diff --git a/owncloud-b129d5d-php71-backport.patch b/owncloud-b129d5d-php71-backport.patch new file mode 100644 index 0000000..734b51c --- /dev/null +++ b/owncloud-b129d5d-php71-backport.patch @@ -0,0 +1,13 @@ +diff --git a/settings/Controller/SecuritySettingsController.php b/settings/Controller/SecuritySettingsController.php +index 88b2803..5c6f174 100644 +--- a/settings/Controller/SecuritySettingsController.php ++++ b/settings/Controller/SecuritySettingsController.php +@@ -60,7 +60,7 @@ protected function returnSuccess() { + * @return array + */ + public function trustedDomains($newTrustedDomain) { +- $trustedDomains = $this->config->getSystemValue('trusted_domains'); ++ $trustedDomains = $this->config->getSystemValue('trusted_domains', []); + $trustedDomains[] = $newTrustedDomain; + $this->config->setSystemValue('trusted_domains', $trustedDomains); + diff --git a/owncloud-defaults.inc b/owncloud-defaults.inc index f502ffd..4c7290f 100644 --- a/owncloud-defaults.inc +++ b/owncloud-defaults.inc @@ -36,6 +36,19 @@ ErrorDocument 404 /owncloud/core/templates/404.php </IfModule> </IfModule> +<IfModule mod_php7.c> + php_value upload_max_filesize 10G + php_value post_max_size 10G + php_value memory_limit 512M + php_value mbstring.func_overload 0 + php_value always_populate_raw_post_data -1 + php_value default_charset 'UTF-8' + php_value output_buffering off + <IfModule mod_env.c> + SetEnv htaccessWorking true + </IfModule> +</IfModule> + # The rewrites for legacy caldav and carddav URLs are omitted here # because they do not work with Fedora's ownCloud directory layout. # See https://github.com/owncloud/core/issues/243#issuecomment-75426453 diff --git a/owncloud.spec b/owncloud.spec index c26ee92..5d97283 100644 --- a/owncloud.spec +++ b/owncloud.spec @@ -9,7 +9,7 @@ # Name: owncloud Version: 9.1.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Private file sync and share server Group: Applications/Internet @@ -59,13 +59,19 @@ Patch5: %{name}-9.1.0-amazon-autoloader.patch Patch6: %{name}-8.2.3-correct-cli-upgrade-command.patch # Disable the integrity checking whilst a better way to deal with it is found -Patch8: %{name}-9.1.0-default_integrity_check_disabled.patch +Patch7: %{name}-9.1.0-default_integrity_check_disabled.patch -# Need to work around an NSS issue in el7.2, due to be fix el7.3 bz#1241172 -Patch9: %{name}-9.1.1-work-arround-nss-issue.patch +# No need to check PHP versions, Fedora maintainers are on the job +Patch8: %{name}-9.1.2-dont_warn_about_php_versions.patch -# RH provide support for php54 so don't tell users it's EOL -Patch10: %{name}-9.1.2-dont_warn_php54_eol.patch +#Backport of php7.1 fixes +Patch9: %{name}-b129d5d-php71-backport.patch +Patch10: %{name}-463e2ea-php71-backport.patch + +# Need to work around an NSS issue +# fixed in 7.3 https://bugzilla.redhat.com/1241172, +# not yet fixed in 6.8 https://bugzilla.redhat.com/1260678 +Patch11: %{name}-9.1.1-work-arround-nss-issue.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -251,7 +257,8 @@ Requires: php-composer(patchwork/jsqueeze) >= 2.0 Requires: php-composer(patchwork/jsqueeze) < 3.0 # "kriswallsmith/assetic": "1.3.2" -Requires: php-composer(kriswallsmith/assetic) >= 1.3.2 +# Need release 3 for the autoloader fix to avoid it spamming the logs +Requires: php-composer(kriswallsmith/assetic) >= 1.3.2-3 Requires: php-composer(kriswallsmith/assetic) < 2.0 # "sabre/dav" : "3.0.8" @@ -421,9 +428,10 @@ work with an SQLite 3 database stored on the local system. %patch5 -p1 %patch6 -p1 %patch8 -p1 -%if 0%{?rhel} %patch9 -p1 %patch10 -p1 +%if 0%{?rhel} >= 5 && 0%{?rhel} <= 6 +%patch11 -p1 %endif # patch backup files and .git stuff @@ -738,6 +746,12 @@ rm -rf %{buildroot} %changelog +* Wed Dec 14 2016 James Hogarth <james.hogarth@gmail.com> - 9.1.3-1 +- Fix bz#1404441 - php7 does not get the httpd php settings +- No need to check PHP versions within the code +- Backport php7.1 fixes +- Update to 9.1.3 + * Tue Dec 13 2016 Remi Collet <remi@fedoraproject.org> - 9.1.3-1 - Update to 9.1.3 - fix autoloader to ensure Guzzle v5 is used by updater |