From 0d336cb8f89df468d0cf3baf3cfa634b3527fa03 Mon Sep 17 00:00:00 2001 From: Christopher Engelhard Date: Tue, 10 Nov 2020 11:01:35 +0100 Subject: [PATCH] add patch to allow updates across multiple versions --- 0000-disable-update-version-check.patch | 20 ++++++++++++++++++++ nextcloud.spec | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 0000-disable-update-version-check.patch diff --git a/0000-disable-update-version-check.patch b/0000-disable-update-version-check.patch new file mode 100644 index 0000000..fa63f39 --- /dev/null +++ b/0000-disable-update-version-check.patch @@ -0,0 +1,20 @@ +diff -Naur a/lib/private/Updater.php b/lib/private/Updater.php +--- a/lib/private/Updater.php 2020-10-24 10:37:44.000000000 +0200 ++++ b/lib/private/Updater.php 2020-11-10 10:51:10.511861549 +0100 +@@ -197,14 +197,11 @@ + } + + if ($currentVendor === 'nextcloud') { +- return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) +- && (version_compare($oldVersion, $newVersion, '<=') || +- $this->config->getSystemValue('debug', false)); ++ return true; + } + + // Check if the instance can be migrated +- return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) || +- isset($allowedPreviousVersions[$currentVendor][$oldVersion]); ++ return true; + } + + /** diff --git a/nextcloud.spec b/nextcloud.spec index 498f65d..5a6476b 100644 --- a/nextcloud.spec +++ b/nextcloud.spec @@ -37,6 +37,10 @@ Source8: %{name}-fedora-autoloader.php Source10: %{name}-systemd-timer.service Source11: %{name}-systemd-timer.timer +# Remove updater version check, we know that updates across more than one +# version are possible +Patch00: 0000-disable-update-version-check.patch + BuildArch: noarch # For the systemd macros