summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-07-19 17:33:34 +0200
committerRemi Collet <fedora@famillecollet.com>2016-07-19 17:33:34 +0200
commitdaf8e49c619ae75bf8128b67b388f116c1ea11e5 (patch)
treebfc31869f3eb4fed99b53950966e3d8a2ba75a2b
parent46a1fc5cd56def1c6c370c4f9d8a0c46c89fdd8e (diff)
owncloud: 9.0.4 (backported from Fedora)
-rw-r--r--owncloud-9.0.4-further_htaccess_cleanup.patch81
-rw-r--r--owncloud-9.0.4-no_3rdparty_repairs.patch59
-rw-r--r--owncloud.spec21
3 files changed, 156 insertions, 5 deletions
diff --git a/owncloud-9.0.4-further_htaccess_cleanup.patch b/owncloud-9.0.4-further_htaccess_cleanup.patch
new file mode 100644
index 0000000..b709102
--- /dev/null
+++ b/owncloud-9.0.4-further_htaccess_cleanup.patch
@@ -0,0 +1,81 @@
+commit a8c9a64d54bbf547017f58a943e04efcb3d8d6f5
+Author: James Hogarth <james.hogarth@gmail.com>
+Date: Tue Jul 19 12:34:06 2016 +0100
+
+ kill htaccess updates
+
+diff --git a/lib/private/setup.php b/lib/private/setup.php
+index a2f8fdd..f5be6e2 100644
+--- a/lib/private/setup.php
++++ b/lib/private/setup.php
+@@ -396,69 +396,7 @@ class Setup {
+ * Append the correct ErrorDocument path for Apache hosts
+ */
+ public static function updateHtaccess() {
+- $config = \OC::$server->getConfig();
+-
+- // For CLI read the value from overwrite.cli.url
+- if(\OC::$CLI) {
+- $webRoot = $config->getSystemValue('overwrite.cli.url', '');
+- if($webRoot === '') {
+- return;
+- }
+- $webRoot = parse_url($webRoot, PHP_URL_PATH);
+- $webRoot = rtrim($webRoot, '/');
+- } else {
+- $webRoot = !empty(\OC::$WEBROOT) ? \OC::$WEBROOT : '/';
+- }
+-
+- $setupHelper = new \OC\Setup($config, \OC::$server->getIniWrapper(),
+- \OC::$server->getL10N('lib'), new \OC_Defaults(), \OC::$server->getLogger(),
+- \OC::$server->getSecureRandom());
+-
+- $htaccessContent = file_get_contents($setupHelper->pathToHtaccess());
+- $content = "#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####\n";
+- $htaccessContent = explode($content, $htaccessContent, 2)[0];
+-
+- //custom 403 error page
+- $content.= "\nErrorDocument 403 ".$webRoot."/core/templates/403.php";
+-
+- //custom 404 error page
+- $content.= "\nErrorDocument 404 ".$webRoot."/core/templates/404.php";
+-
+- // Add rewrite rules if the RewriteBase is configured
+- $rewriteBase = $config->getSystemValue('htaccess.RewriteBase', '');
+- if($rewriteBase !== '') {
+- $content .= "\n<IfModule mod_rewrite.c>";
+- $content .= "\n Options -MultiViews";
+- $content .= "\n RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]";
+- $content .= "\n RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]";
+- $content .= "\n RewriteCond %{REQUEST_FILENAME} !\\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$";
+- $content .= "\n RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$";
+- $content .= "\n RewriteCond %{REQUEST_FILENAME} !/remote.php";
+- $content .= "\n RewriteCond %{REQUEST_FILENAME} !/public.php";
+- $content .= "\n RewriteCond %{REQUEST_FILENAME} !/cron.php";
+- $content .= "\n RewriteCond %{REQUEST_FILENAME} !/core/ajax/update.php";
+- $content .= "\n RewriteCond %{REQUEST_FILENAME} !/status.php";
+- $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php";
+- $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php";
+- $content .= "\n RewriteCond %{REQUEST_FILENAME} !/updater/";
+- $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs-provider/";
+- $content .= "\n RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*";
+- $content .= "\n RewriteRule . index.php [PT,E=PATH_INFO:$1]";
+- $content .= "\n RewriteBase " . $rewriteBase;
+- $content .= "\n <IfModule mod_env.c>";
+- $content .= "\n SetEnv front_controller_active true";
+- $content .= "\n <IfModule mod_dir.c>";
+- $content .= "\n DirectorySlash off";
+- $content .= "\n </IfModule>";
+- $content .= "\n </IfModule>";
+- $content .= "\n</IfModule>";
+- }
+-
+- if ($content !== '') {
+- //suppress errors in case we don't have permissions for it
+- @file_put_contents($setupHelper->pathToHtaccess(), $htaccessContent.$content . "\n");
+- }
+-
++ return true;
+ }
+
+ public static function protectDataDirectory() {
diff --git a/owncloud-9.0.4-no_3rdparty_repairs.patch b/owncloud-9.0.4-no_3rdparty_repairs.patch
new file mode 100644
index 0000000..e1382d6
--- /dev/null
+++ b/owncloud-9.0.4-no_3rdparty_repairs.patch
@@ -0,0 +1,59 @@
+commit 85baad4c378d359e497eff2206ac083ab2bd1f7e
+Author: James Hogarth <james.hogarth@gmail.com>
+Date: Tue Jul 19 12:37:00 2016 +0100
+
+ no need to do a repair of 3rd party
+
+diff --git a/lib/private/repair/brokenupdaterrepair.php b/lib/private/repair/brokenupdaterrepair.php
+index 0e4431f..3ec1027 100644
+--- a/lib/private/repair/brokenupdaterrepair.php
++++ b/lib/private/repair/brokenupdaterrepair.php
+@@ -46,47 +46,7 @@ class BrokenUpdaterRepair extends BasicEmitter implements \OC\RepairStep {
+ * @return bool True if action performed, false otherwise
+ */
+ private function manuallyCopyThirdPartyFiles() {
+- $resourceDir = __DIR__ . '/../../../resources/updater-fixes/';
+- $thirdPartyDir = __DIR__ . '/../../../3rdparty/';
+-
+- $filesToCopy = [
+- // Composer updates
+- 'composer.json',
+- 'composer.lock',
+- 'composer/autoload_classmap.php',
+- 'composer/installed.json',
+- 'composer/LICENSE',
+- // Icewind stream library
+- 'icewind/streams/src/DirectoryFilter.php',
+- 'icewind/streams/src/DirectoryWrapper.php',
+- 'icewind/streams/src/RetryWrapper.php',
+- 'icewind/streams/src/SeekableWrapper.php',
+- // Sabre update
+- 'sabre/dav/CHANGELOG.md',
+- 'sabre/dav/composer.json',
+- 'sabre/dav/lib/CalDAV/Plugin.php',
+- 'sabre/dav/lib/CardDAV/Backend/PDO.php',
+- 'sabre/dav/lib/DAV/CorePlugin.php',
+- 'sabre/dav/lib/DAV/Version.php',
+- ];
+-
+- // Check the hash for the autoload_classmap.php file, if the hash does match
+- // the expected value then the third-party folder has already been copied
+- // properly.
+- if(hash_file('sha512', $thirdPartyDir . '/composer/autoload_classmap.php') === 'abe09be19b6d427283cbfa7c4156d2c342cd9368d7d0564828a00ae02c435b642e7092cef444f94635f370dbe507eb6b2aa05109b32d8fb5d8a65c3a5a1c658f') {
+- $this->emit('\OC\Repair', 'info', ['Third-party files seem already to have been copied. No repair necessary.']);
+- return false;
+- }
+-
+- foreach($filesToCopy as $file) {
+- $state = copy($resourceDir . '/' . $file, $thirdPartyDir . '/' . $file);
+- if($state === true) {
+- $this->emit('\OC\Repair', 'info', ['Successfully replaced '.$file.' with new version.']);
+- } else {
+- $this->emit('\OC\Repair', 'warning', ['Could not replace '.$file.' with new version.']);
+- }
+- }
+- return true;
++ return false;
+ }
+
+ /**
diff --git a/owncloud.spec b/owncloud.spec
index cd2a2cb..2ffb461 100644
--- a/owncloud.spec
+++ b/owncloud.spec
@@ -8,8 +8,8 @@
# Please preserve changelog entries
#
Name: owncloud
-Version: 9.0.3
-Release: 3%{?dist}
+Version: 9.0.4
+Release: 1%{?dist}
Summary: Private file sync and share server
Group: Applications/Internet
@@ -61,11 +61,17 @@ 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.0.2-default_integrity_check_disabled.patch
+# There's additional htaccess calls to clean up
+Patch9: %{name}-9.0.4-further_htaccess_cleanup.patch
+
+# Since we unbundle we don't want 3rdparty libraries to be repaired
+Patch10: %{name}-9.0.4-no_3rdparty_repairs.patch
+
# Need to work around an NSS issue in el7.2, due to be fix el7.3 bz#1241172
-Patch10: %{name}-8.1.6-work-arround-nss-issue.patch
+Patch11: %{name}-8.1.6-work-arround-nss-issue.patch
# RH provide support for php54 so don't tell users it's EOL
-Patch11: %{name}-8.2.3-dont_warn_php54_eol.patch
+Patch12: %{name}-8.2.3-dont_warn_php54_eol.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -427,9 +433,11 @@ 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}
%patch11 -p1
+%patch12 -p1
%endif
# patch backup files and .git stuff
@@ -741,6 +749,9 @@ rm -rf %{buildroot}
%changelog
+* Tue Jul 19 2016 James Hogarth <james.hogarth@gmail.com> - 9.0.4-1
+- New release 9.0.4
+
* Tue Jul 12 2016 James Hogarth <james.hogarth@gmail.com> - 9.0.3-3
- Added selinux remote DB details to readme bz#1349700