From e87169bc4cb32b787f10209a34eeb66e0b1ff3ee Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 26 May 2023 18:45:40 +0200 Subject: [PATCH 1/9] rename ACPU to APCu Signed-off-by: Simon L --- README.md | 2 +- i18n/README-zh_CN.md | 2 +- i18n/README-zh_TW.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index af00e6293..00f734042 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Please reach out in the [Matrix][chat-matrix-wiki] or [Telegram][chat-telegram-w * Redis memory cache * ncp-config TUI for easy setup ( RAM logs, USB drive and more ) * Automatic redirection to HTTPS - * ACPU PHP cache + * APCu PHP cache * PHP Zend OPcache enabled with file cache * HSTS * Cron jobs for Nextcloud diff --git a/i18n/README-zh_CN.md b/i18n/README-zh_CN.md index 6b48e8721..d4c1d171f 100644 --- a/i18n/README-zh_CN.md +++ b/i18n/README-zh_CN.md @@ -23,7 +23,7 @@ NextCloudPi 是一款适用于 Raspberry Pi、Odroid HC1、rock64 等其他板 * Redis memory cache * 用于简单设置的 ncp-config 命令(RAM 日志,USB 驱动及其他) * 自动重定向到 HTTPS - * ACPU PHP cache + * APCu PHP cache * PHP Zend OPcache enabled with file cache * HSTS * Cron jobs for Nextcloud diff --git a/i18n/README-zh_TW.md b/i18n/README-zh_TW.md index f906f2d61..0bdfed835 100644 --- a/i18n/README-zh_TW.md +++ b/i18n/README-zh_TW.md @@ -28,7 +28,7 @@ NextCloudPi 是專門為 Raspberry Pi、Odroid HC1、rock64 以及其它單板 * 4.9 Linux Kernel ( NEW 03-13-2017 ) * ncp-config for easy setup ( RAM logs, USB drive and more ) * Automatic redirection to HTTPS - * ACPU PHP cache + * APCu PHP cache * PHP Zend OPcache enabled with file cache * HSTS * Cron jobs for Nextcloud From 05ad72685a0abae9a55fda3909e5eb3f32b3d70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Kn=C3=B6ppler?= <6317548+theCalcaholic@users.noreply.github.com> Date: Wed, 12 Jul 2023 11:23:17 +0200 Subject: [PATCH 2/9] ncp-check-version: Check for docker-stable branch if running docker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com> --- bin/ncp-check-version | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/ncp-check-version b/bin/ncp-check-version index bf738f445..9a470cb76 100755 --- a/bin/ncp-check-version +++ b/bin/ncp-check-version @@ -5,7 +5,10 @@ TMPDIR="$( mktemp -d /tmp/ncp-check.XXXXXX || ( echo "Failed to create temp dir. Exiting" >&2; exit 1 ) )" trap "rm -rf \"${TMPDIR}\"; exit 0" 0 1 2 3 15 -git clone --depth 20 -q --bare https://github.com/nextcloud/nextcloudpi.git "$TMPDIR" || { +BRANCH="master" +is_docker && BRANCH="docker-stable" + +git clone -b "$BRANCH" --depth 20 -q --bare https://github.com/nextcloud/nextcloudpi.git "$TMPDIR" || { echo "The git clone command failed: No connectivity to https://github.com ?" >&2 exit 1 } From 3742689ea5a6bd9e1c843d98f0a3111456101e28 Mon Sep 17 00:00:00 2001 From: Tobias K <6317548+theCalcaholic@users.noreply.github.com> Date: Fri, 14 Jul 2023 13:32:56 +0200 Subject: [PATCH 3/9] tests/nextcloud_tests.py: Fix deprecated syntax --- tests/nextcloud_tests.py | 5 +---- tests/requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/nextcloud_tests.py b/tests/nextcloud_tests.py index 6005595de..d5360e163 100755 --- a/tests/nextcloud_tests.py +++ b/tests/nextcloud_tests.py @@ -21,10 +21,7 @@ import signal import re from selenium import webdriver -from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By -from selenium.webdriver.support import expected_conditions as EC -from selenium.webdriver.common.service import Service from selenium.webdriver.firefox.webdriver import WebDriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.firefox.options import Options @@ -233,7 +230,7 @@ def test_nextcloud(IP: str, nc_port: str, driver: WebDriver): print("Nextcloud tests " + tc.yellow + IP + tc.normal) print("---------------------------") - driver = webdriver.Firefox(service_log_path='/dev/null', options=options) + driver = webdriver.Firefox(options=options) try: test_nextcloud(IP, nc_port, driver) except Exception as e: diff --git a/tests/requirements.txt b/tests/requirements.txt index 6adc4eb50..233f7aefc 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,2 +1,2 @@ -selenium~=4.7 -robotframework~=6.0 \ No newline at end of file +selenium +robotframework \ No newline at end of file From 16e5de770bf61570a365998916905f51f6dc9043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Kn=C3=B6ppler?= <6317548+theCalcaholic@users.noreply.github.com> Date: Sun, 16 Jul 2023 22:06:30 +0200 Subject: [PATCH 4/9] updates/1.52.1.sh: Only set BACKUPHOUR if missing from config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com> --- updates/1.52.1.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 updates/1.52.1.sh diff --git a/updates/1.52.1.sh b/updates/1.52.1.sh new file mode 100644 index 000000000..243687708 --- /dev/null +++ b/updates/1.52.1.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +source /usr/local/etc/library.sh + +jq '.params[].id' "$CFGDIR/nc-backup-auto.cfg" | grep BACKUPHOUR || \ + set_app_param nc-backup-auto BACKUPHOUR 3 From e9624fd9f7e95ebbbbb85b1a03fd2fccd0826b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Kn=C3=B6ppler?= <6317548+theCalcaholic@users.noreply.github.com> Date: Sun, 16 Jul 2023 22:12:46 +0200 Subject: [PATCH 5/9] ncp-backup: Fix expansion of tar exclude parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com> --- bin/ncp-backup | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/ncp-backup b/bin/ncp-backup index f7e22a431..e09cfc7f6 100755 --- a/bin/ncp-backup +++ b/bin/ncp-backup @@ -75,15 +75,17 @@ tar $compress_arg -cf "$destfile" \ "$dbbackup" \ \ --exclude "$data/.opcache" \ - --exclude "$data/{access,error,nextcloud}.log" \ - --exclude "$data/access.log" \ + --exclude "nextcloud/data/access.log" \ + --exclude "nextcloud/data/error.log" \ + --exclude "nextcloud/data/nextcloud.log" \ --exclude "$data/ncp-update-backups" \ -C "$(dirname "$datadir"/)" $data \ \ --exclude "nextcloud/data/*/files/*" \ --exclude "nextcloud/data/.opcache" \ - --exclude "nextcloud/data/{access,error,nextcloud}.log" \ --exclude "nextcloud/data/access.log" \ + --exclude "nextcloud/data/error.log" \ + --exclude "nextcloud/data/nextcloud.log" \ --exclude "nextcloud/data/appdata_*/preview/*" \ --exclude "nextcloud/data/*/uploads/*" \ --exclude "nextcloud/data/*/cache/*" \ @@ -101,4 +103,4 @@ rm "$dbbackup" chmod 640 "$destfile" chown :www-data "$destfile" -echo "backup $destfile generated" \ No newline at end of file +echo "backup $destfile generated" From f31529726ac8c5567c7b7a113d9408029f6ce753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Kn=C3=B6ppler?= <6317548+theCalcaholic@users.noreply.github.com> Date: Sun, 16 Jul 2023 22:19:18 +0200 Subject: [PATCH 6/9] Add support for ZFS for the data directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com> --- bin/ncp-restore | 2 +- bin/ncp/CONFIG/nc-database.sh | 2 +- bin/ncp/CONFIG/nc-datadir.sh | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/ncp-restore b/bin/ncp-restore index a9c1afa89..0e0c88516 100755 --- a/bin/ncp-restore +++ b/bin/ncp-restore @@ -17,7 +17,7 @@ DIR="$( cd "$( dirname "$BACKUPFILE" )" &>/dev/null && pwd )" #abspath [[ "$DIR" =~ "$NCDIR".* ]] && { echo "Refusing to restore from $NCDIR"; exit 1; } TMPDIR="$( mktemp -d "$( dirname "$BACKUPFILE" )"/ncp-restore.XXXXXX )" || { echo "Failed to create temp dir" >&2; exit 1; } -grep -q -e ext -e btrfs -e zfs <( stat -fc%T "$TMPDIR" ) || { echo "Can only restore from ext/btrfs/zfs filesystems (found '$(stat -fc%T "${TMPDIR}")" >&2; exit 1; } +[[ "$(stat -fc%T "${BASEDIR}")" =~ ext|btrfs|zfs ]] || { echo "Can only restore from ext/btrfs/zfs filesystems (found '$(stat -fc%T "${TMPDIR}")" >&2; exit 1; } TMPDIR="$( cd "$TMPDIR" &>/dev/null && pwd )" || { echo "$TMPDIR not found"; exit 1; } #abspath cleanup(){ local RET=$?; echo "Cleanup..."; rm -rf "${TMPDIR}"; trap "" EXIT; exit $RET; } diff --git a/bin/ncp/CONFIG/nc-database.sh b/bin/ncp/CONFIG/nc-database.sh index 013cdf44f..04ae9f092 100644 --- a/bin/ncp/CONFIG/nc-database.sh +++ b/bin/ncp/CONFIG/nc-database.sh @@ -37,7 +37,7 @@ configure() local BASEDIR=$( dirname "$DBDIR" ) mkdir -p "$BASEDIR" - grep -q -e ext -e btrfs <( stat -fc%T "$BASEDIR" ) || { echo -e "Only ext/btrfs filesystems can hold the data directory (found '$(stat -fc%T "${BASEDIR}")"; return 1; } + [[ "$(stat -fc%T "${BASEDIR}")" =~ ext|btrfs|zfs ]] || { echo -e "Only ext/btrfs/zfs filesystems can hold the data directory (found '$(stat -fc%T "${BASEDIR}")"; return 1; } sudo -u mysql test -x "$BASEDIR" || { echo -e "ERROR: the user mysql does not have access permissions over $BASEDIR"; return 1; } diff --git a/bin/ncp/CONFIG/nc-datadir.sh b/bin/ncp/CONFIG/nc-datadir.sh index aa4c99e5e..0853a485e 100644 --- a/bin/ncp/CONFIG/nc-datadir.sh +++ b/bin/ncp/CONFIG/nc-datadir.sh @@ -79,8 +79,8 @@ configure() ENCDIR="${BASEDIR}"/ncdata_enc # checks - [[ "$DISABLE_FS_CHECK" == 1 ]] || grep -q -e ext -e btrfs <( stat -fc%T "${BASEDIR}" ) || { - echo -e "Only ext/btrfs filesystems can hold the data directory (found '$(stat -fc%T "${BASEDIR}")')" + [[ "$DISABLE_FS_CHECK" == 1 ]] || [[ "$(stat -fc%T "${BASEDIR}")" =~ ext|btrfs|zfs ]] || { + echo -e "Only ext/btrfs/zfs filesystems can hold the data directory (found '$(stat -fc%T "${BASEDIR}")')" return 1 } @@ -126,7 +126,7 @@ configure() # datadir ncc config:system:set datadirectory --value="${DATADIR}" \ || sed -i "s|'datadirectory' =>.*|'datadirectory' => '${DATADIR}',|" "${NCDIR?}"/config/config.php - + ncc config:system:set logfile --value="${DATADIR}/nextcloud.log" \ || sed -i "s|'logfile' =>.*|'logfile' => '${DATADIR}/nextcloud.log',|" "${NCDIR?}"/config/config.php set_ncpcfg datadir "${DATADIR}" From dfc5f18ef3020cd80f9cd7a5ef6144c2a0b5aa8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Kn=C3=B6ppler?= <6317548+theCalcaholic@users.noreply.github.com> Date: Sun, 16 Jul 2023 22:38:41 +0200 Subject: [PATCH 7/9] build-sd-images.yml: Use ubuntu-20.04 runner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com> --- .github/workflows/build-sd-images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-sd-images.yml b/.github/workflows/build-sd-images.yml index 6a6c35f7f..d2c2dd3f0 100644 --- a/.github/workflows/build-sd-images.yml +++ b/.github/workflows/build-sd-images.yml @@ -23,7 +23,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 env: VERSION: "${{ inputs.git_ref }}" LOG_GUEST: "\\033[1;34mGUEST::\\033[0m" @@ -132,7 +132,7 @@ jobs: test: needs: build - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 env: VERSION: "${{ inputs.git_ref }}" ARTIFACT_ID: ${{ needs.build.outputs.artifact_name }} From 6657adbd76da71be764153bd63ebc355fb7af9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Kn=C3=B6ppler?= <6317548+theCalcaholic@users.noreply.github.com> Date: Mon, 17 Jul 2023 22:04:04 +0200 Subject: [PATCH 8/9] release.yml: Remove docker images from release notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f51db60c8..353240d61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -394,7 +394,7 @@ jobs: hub release create --draft -F - "${{ env.VERSION }}" < Date: Mon, 17 Jul 2023 22:37:24 +0200 Subject: [PATCH 9/9] Add support for NC 26.0.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com> --- changelog.md | 14 +++++++++++++- etc/ncp-config.d/nc-nextcloud.cfg | 2 +- etc/ncp.cfg | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 5b0d73621..ca228bf85 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,18 @@ # NextcloudPi Changelog -## [v1.52.0](https://github.com/nextcloud/nextcloudpi/tree/v1.51.3) (2023-05-01) Add support for Nextcloud 26.0.1 +## [v1.52.1](https://github.com/nextcloud/nextcloudpi/tree/v1.52.1) (2023-07-17) Add support for Nextcloud 26.0.3 + +### Changes + +- Adds support for NC 26.0.3 +- Add ZFS support for the data directory (#1767) + +### Fixes + +- Fix bug in ncp-backup (#1791) +- Fix missing configuration field for nc-backup-auto (#1787) + +## [v1.52.0](https://github.com/nextcloud/nextcloudpi/tree/v1.52.0) (2023-05-01) Add support for Nextcloud 26.0.1 ### Changes diff --git a/etc/ncp-config.d/nc-nextcloud.cfg b/etc/ncp-config.d/nc-nextcloud.cfg index 6d85f60cd..c56985b54 100644 --- a/etc/ncp-config.d/nc-nextcloud.cfg +++ b/etc/ncp-config.d/nc-nextcloud.cfg @@ -9,7 +9,7 @@ { "id": "VER", "name": "Version", - "value": "26.0.1" + "value": "26.0.3" }, { "id": "MAXFILESIZE", diff --git a/etc/ncp.cfg b/etc/ncp.cfg index dc39c1f03..313ac1a23 100644 --- a/etc/ncp.cfg +++ b/etc/ncp.cfg @@ -1,5 +1,5 @@ { - "nextcloud_version": "26.0.1", + "nextcloud_version": "26.0.3", "php_version": "8.1", "release": "bullseye" }