diff --git a/.github/workflows/test-stable.yml b/.github/workflows/test-stable.yml index 641a1270..6a2b7d9f 100644 --- a/.github/workflows/test-stable.yml +++ b/.github/workflows/test-stable.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: php-versions: ["8.2", "8.3"] - nextcloud-versions: ["26", "27", "28"] + nextcloud-versions: ["26", "27", "31"] exclude: - php-versions: "8.3" nextcloud-versions: "26" diff --git a/.gitignore b/.gitignore index 75a13176..8b6e4ea9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors # SPDX-FileCopyrightText: 2015 ownCloud, Inc. # SPDX-License-Identifier: AGPL-3.0-or-later +/.idea /box /lib/Version.php /tests/data diff --git a/Makefile b/Makefile index 273f7e7c..3978439a 100644 --- a/Makefile +++ b/Makefile @@ -33,8 +33,8 @@ test-stable26: updater.phar test/vendor test-stable27: updater.phar test/vendor cd tests && ../vendor/bin/behat features/stable27.feature -test-stable28: updater.phar test/vendor - cd tests && ../vendor/bin/behat features/stable28.feature +test-stable31: updater.phar test/vendor + cd tests && ../vendor/bin/behat features/stable31.feature test-master: updater.phar test/vendor cd tests && ../vendor/bin/behat features/master.feature diff --git a/README.md b/README.md index 4c23de2e..b09c7fc1 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The Updater can be accessed via the Web UI as well as the command line. It may b ## Known issues -* The `createBackup` step, which is **not** intended to backup user data, currently can slow down the larger the `datadirectory` gets (nextcloud/updater#507) +* The `createBackup` step, which is **not** intended to backup user data, currently can slow down the larger the `datadirectory` gets (nextcloud/updater#507) * The `deleteOldFiles` step, which does not actually touch user data, currently can slow down the larger the `datadirectory` gets (nextcloud/updater#397) * Multiple `*.config.php` files are currently not supported / ignored (nextcloud/updater#384) * In some environments, the current iterator implementation may fail (nextcloud/updater#519) @@ -236,7 +236,7 @@ check in the resulting `/updater.phar`. #### Server components -Keep in mind that for the update/upgrade process there are some additional components that aren't part of the Updater app (nor necessarily part of +Keep in mind that for the update/upgrade process there are some additional components that aren't part of the Updater app (nor necessarily part of `occ upgrade` itself): * The Web-based update overview/notification page: @@ -281,7 +281,7 @@ The available test targets are: | `make test-cli` | Runs only the CLI updater tests (`features/cli.feature`) | | `make test-stable26` | Tests update path for stable26 | | `make test-stable27` | Tests update path for stable27 | -| `make test-stable28` | Tests update path for stable28 | +| `make test-stable31` | Tests update path for stable31 | | `make test-master` | Tests update path for master | | `make test-user.ini` | Tests `.user.ini` handling (`features/user.ini.feature`) | | `make check-same-code-base` | Verifies `/index.php` is in sync with `/lib/*.php` + `/index.web.php` | @@ -352,14 +352,14 @@ usually means: ### Unable to use the built-in Updater If the built-in Updater does not function reliably for your environment, the old reliable (albeit admittedly tedious) [manual update](https://docs.nextcloud.com/server/latest/admin_manual/maintenance/manual_upgrade.html) process may be your best alternative. -This was the primary way of keeping Nextcloud Server up-to-date before the automated Updater was developed. In addition, if Updater does not work in your environment, report the details of your situation to https://github.com/nextcloud/updater/issues so that +This was the primary way of keeping Nextcloud Server up-to-date before the automated Updater was developed. In addition, if Updater does not work in your environment, report the details of your situation to https://github.com/nextcloud/updater/issues so that consideration can be given to adapting Updater to a wider variety of environments. ### Updater != `occ upgrade` The `occ upgrade` command runs the database migrations which adapt your existing database to the updated version Nextcloud Server that is deployed by the Updater (or via a manual update). -Despite the confusing naming - which makes sense technically, but in hindsight may not have been the best to avoid confusion - the Updater *must* run (and completely successfully) before `occ upgrade` will have anything to do. +Despite the confusing naming - which makes sense technically, but in hindsight may not have been the best to avoid confusion - the Updater *must* run (and completely successfully) before `occ upgrade` will have anything to do. ## Help & Contributing diff --git a/composer.json b/composer.json index d05b7108..f22114c7 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "symfony/console": "^6.4" }, "scripts": { - "box": "box compile -c box.json", + "box": "@php box compile -c box.json", "cs:check": "php-cs-fixer fix --dry-run --diff", "cs:fix": "php-cs-fixer fix", "lint": "find . -name \\*.php -not -path './vendor*' -not -path './build/*' -not -path './node_modules/*' -print0 | xargs -0 -n1 php -l", diff --git a/tests/features/bootstrap/FeatureContext.php b/tests/features/bootstrap/FeatureContext.php index f8560815..86878d47 100644 --- a/tests/features/bootstrap/FeatureContext.php +++ b/tests/features/bootstrap/FeatureContext.php @@ -242,18 +242,24 @@ public function getSignatureForVersion(string $version): string { vJJ8XVSDOlNNKjcgvcUMrsDItXioSwBst6vTdR5IKLAFivlb7HYLUN48R9h57QM2 v8X/N49mF+Wk3PQa19wBVsUFYkaQuG9FTjUVgvp8bgv3s9rhrOLJa5KUOpdcodgZ faeql723PcZEzPJ3dzisSw==', - '28.0.0beta4' => 'tguTYQ9w6cpQITNbVphOYsHGTvYPDi8aznjUM8Xyxi0HTIuK3WPBTdgrn7jPTC5+ -JlwoyTQTRI2ut0SvEzVK5OrKTotPtNaNRSwpo0VAtuavEAWK6ZtH0g5oujHDyn/7 -7S149qpPkbir6Lf7qMSSje92CF1LFOQDEqXW9HibfRVzMvTk2iTz//cTVcnyTxgi -QbK5O5wLmo7Gp8UNZsHL6CXTHo7p8zd8I2T86poJAttgwGIGJ0rQe1AYh/kJEOEz -CAzl6Rd033pBht1t9Y9mFfnWd70a4v9stSdhCwVo08fqxOcoJrCZQ4wwEWN3ReYj -/xB2sIdvkLkDyESNNzmhmg==', '28.0.14' => 'e3wnEZE0ooyNX8CpsSEgXafLoOU/U+zORUyeqKczWuuf2Srq4edl2SCaQgvdSLsG DZo8h9LLEsh544/NyS8VOY7aJVqR2JOC4bUyztfNTnlppRLVTCIXx053Eht9+neN pYlPy8hBK+KBLoN7q3WYcWL1QOIrUAzgxhjwshMrTxNrHi8Nq7g37iZUzhPU5HWw MUID9gsQnT+aFurooLVvWMM8Ad0RkU72i5Y7I80c+v/2MYE9rxUmNC54noVePvrj R8zf/PC+Yj1vxFZ0hYAtweLgBxfwU5cNBYfH7M1I9FLlb88p/XDWx6XaBz4Ql6LK lbpDxNE9UiM09JG1dU7Ebg==', + '31.0.7' => 'G1fL3cfRZNJt9yidE5cw5q/H+QSgyBZlo7KcUC0oZv0KB38P13h81myb9Ynf6r+f +dojgY+VJr7ioKzjohjG0BBzZNGl08mdECywI0DrVEwwYOg5x4BYvUIyGpAuQgijW +SoNnqZDlStK5tE70PKPR6s5KbA+aKyFmuchQrQCbWnhyAfyiYEZBATt4Rkdk3neP +t3sSM5Io+IwcD+aURjrCFd+j2JBvBKZi0dDwsQ81kUAF8CibVtQRRFJPSDeBZi2Q ++VMklACmI5DrMYwR+JA9q4l8XztwGanC97OT0glU/esvMccJ6qgSb0sFziDsiK28 +h4+1uFMEVz5dK0TY59GYLg==', + '31.0.14' => 'oM4xe+KQxwzwGXq0JwYbt6xRsgu4Ejf9vrdNrNPZB/dnEDq/EWFLBJXoiq4Hfq+x +IrJz+Cok4RjPg/NdNl/A+fWC47aJh+gPZUw0BITf8GZ/BeAzdlyxUG9+VrIMYEAR +r93DL16y1mCk7dkkMC/a8DT5/orqXnWIP38wgXzbU+DcyA9eCq28+aSz25MLYSHR +edNnmki3ovqsa4K6/5D+RvcXXwn4/xnk5Dboi8akNSEnXfmTpTJs8D8HqAXBrukl +PA45206JcfSACC5ePc0ZfUPrV3ToKFlijsBdIsuNgpzmOIwukB4MUO+RLyk4lPOG +ZwCpfYewGDvrElT50aJYkA==', ]; return $signatures[$version] ?? ''; diff --git a/tests/features/stable27.feature b/tests/features/stable27.feature index ce643178..b22827f1 100644 --- a/tests/features/stable27.feature +++ b/tests/features/stable27.feature @@ -2,16 +2,6 @@ # SPDX-License-Identifier: AGPL-3.0-or-later Feature: CLI updater - stable27 base - Scenario: Update is available - 27.0.0 beta1 to 27.0.1 RC1 - Given the current installed version is 27.0.0beta1 - And there is an update to prerelease version "27.0.1rc1" available - And the version number is decreased in the config.php to enforce upgrade - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 27.0 - And maintenance mode should be off - And upgrade is not required - Scenario: Update is available but unexpected folder found - 27.1.6 to 27.1.11 Given the current installed version is 27.1.6 And there is an update to version 27.1.11 available @@ -44,7 +34,7 @@ Feature: CLI updater - stable27 base And upgrade is not required Scenario: Update is available - 27.1.0 to beta - Given the current installed version is 27.1.0rc1 + Given the current installed version is 27.1.0 And PHP is at least in version 8.0 And the current channel is "beta" And there is an update to version 28.0.14 available diff --git a/tests/features/stable28.feature b/tests/features/stable28.feature deleted file mode 100644 index 289694e8..00000000 --- a/tests/features/stable28.feature +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: AGPL-3.0-or-later -Feature: CLI updater - stable28 base - - Scenario: Update is available - 28.0.0 beta 3 to 28.0.0 beta 4 - Given the current installed version is 28.0.0beta3 - And there is an update to prerelease version "28.0.0beta4" available - And the version number is decreased in the config.php to enforce upgrade - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 28.0 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available - 28.0.0 RC 1 to 28.0.14 - Given the current installed version is 28.0.0rc1 - And there is an update to version 28.0.14 available - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 28.0 - And maintenance mode should be off - And upgrade is not required diff --git a/tests/features/stable31.feature b/tests/features/stable31.feature new file mode 100644 index 00000000..3b72eede --- /dev/null +++ b/tests/features/stable31.feature @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: AGPL-3.0-or-later +Feature: CLI updater - stable31 base + + Scenario: Update is available - 31.0.7 to 31.0.14 + Given the current installed version is 31.0.7 + And there is an update to version 31.0.14 available + When the CLI updater is run successfully + And the output should contain "Update successful" + Then the installed version should be 31.0.14 + And maintenance mode should be off + And upgrade is not required + +Scenario: Update is available - 30.0.17 to 31.0.14 + Given the current installed version is 30.0.17 + And there is an update to version 31.0.14 available + When the CLI updater is run successfully + And the output should contain "Update successful" + Then the installed version should be 31.0.14 + And maintenance mode should be off + And upgrade is not required diff --git a/tests/features/user.ini.feature b/tests/features/user.ini.feature index e391bb40..2bb40d3e 100644 --- a/tests/features/user.ini.feature +++ b/tests/features/user.ini.feature @@ -3,7 +3,7 @@ Feature: CLI updater - user.ini retention test Scenario: User.ini retention after update - Given the current installed version is 26.0.0rc1 + Given the current installed version is 26.0.2 Given the config key "user_ini_additional_lines" is set to "upload_max_filesize = 10G\npost_max_size = 10G" of type "string" And there is an update to version 26.0.13 available When the CLI updater is run successfully diff --git a/updater.phar b/updater.phar index 3d00cc69..11bd0f4b 100755 Binary files a/updater.phar and b/updater.phar differ