Skip to content

Commit

Permalink
Merge pull request #1796 from nextcloud/devel
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
theCalcaholic authored Jul 17, 2023
2 parents f99bb37 + 4fd410e commit 8c068cf
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-sd-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ jobs:
hub release create --draft -F - "${{ env.VERSION }}" <<EOF
${subject:-No message found}
${body:+${body}${separator}}[Docker images](https://hub.docker.com/r/ownyourbits/nextcloudpi)
${body:+${body}${separator}}
[Changelog](https://github.com/nextcloud/nextcloudpi/blob/${{ env.VERSION }}/changelog.md)
EOF
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions bin/ncp-backup
Original file line number Diff line number Diff line change
Expand Up @@ -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/*" \
Expand All @@ -101,4 +103,4 @@ rm "$dbbackup"
chmod 640 "$destfile"
chown :www-data "$destfile"

echo "backup $destfile generated"
echo "backup $destfile generated"
5 changes: 4 additions & 1 deletion bin/ncp-check-version
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion bin/ncp-restore
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion bin/ncp/CONFIG/nc-database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down
6 changes: 3 additions & 3 deletions bin/ncp/CONFIG/nc-datadir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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}"
Expand Down
14 changes: 13 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion etc/ncp-config.d/nc-nextcloud.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"id": "VER",
"name": "Version",
"value": "26.0.1"
"value": "26.0.3"
},
{
"id": "MAXFILESIZE",
Expand Down
2 changes: 1 addition & 1 deletion etc/ncp.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"nextcloud_version": "26.0.1",
"nextcloud_version": "26.0.3",
"php_version": "8.1",
"release": "bullseye"
}
2 changes: 1 addition & 1 deletion i18n/README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion i18n/README-zh_TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions tests/nextcloud_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
selenium~=4.7
robotframework~=6.0
selenium
robotframework
6 changes: 6 additions & 0 deletions updates/1.52.1.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8c068cf

Please sign in to comment.