nextcloudpi icon indicating copy to clipboard operation
nextcloudpi copied to clipboard

Debian 12 Bookworm Support

Open sunjam opened this issue 2 years ago • 26 comments

For internal testing and notes. Do not expect support!!!!!! Please do report testing issues here.

Debian 12 Bookworm - release schedule June 10th release date from https://wiki.debian.org/DebianBookworm Assume mid-2023 for formal stable.

sunjam avatar Feb 11 '23 18:02 sunjam

@theoriginalguy Debian 12 is not supported by NCP yet. If you are upgrading manually, you are doing so on your own account (and things are likely to break).

I doubt that we will upgrade to Debian 12 until we have progressed on the ongoing architectural changes (i.e. containerizing most of the included services), because that will make system upgrades a lot less risky.

theCalcaholic avatar Jun 14 '23 06:06 theCalcaholic

I'm looking to run initial install of NCP. Should I opt for Debian 11 as of today since NCP does not support Debian 12 yet or will I be fine setting up NCP on a clean install on the latest Debian 12?

abmusse avatar Aug 05 '23 00:08 abmusse

I've tried it today on clean Debian 12 - bookworm (Armbian 23.5.1) and after commenting section about checking version install script crashed after dependancy issue due tu php-8.1 version. So it looks that I have to w8 till you support bookworm.. :-(

tom-i avatar Aug 06 '23 13:08 tom-i

Finally, I’ve managed to do it myself :-) Few problems occurs, but it was ok I’ve solve them without problem, mainly about different name of php libs, exfat utils and so on. Some problem with installing and starting up dnsmasq service. One issue after installing with activating, but this thread helped: NextCloudPlus not yet initialized, trying again in a few seconds So actually I’m on NCP 27.0.1 on Debian 12 - Bookworm.

tom-i avatar Aug 06 '23 17:08 tom-i

Finally, I’ve managed to do it myself :-) Few problems occurs, but it was ok I’ve solve them without problem, mainly about different name of php libs, exfat utils and so on. Some problem with installing and starting up dnsmasq service. One issue after installing with activating, but this thread helped: NextCloudPlus not yet initialized, trying again in a few seconds So actually I’m on NCP 27.0.1 on Debian 12 - Bookworm.

Would you share your modified script?

SHA-NDY avatar Aug 28 '23 10:08 SHA-NDY

Meanwhile I upgraded from Bullseye to Bookworm. Everything seems to be fine. NC instance is reachable and all NCP settings are ok.

image

SHA-NDY avatar Aug 28 '23 17:08 SHA-NDY

Bookworm is now the default release with raspberry pi os. But NextcloudPi installer script fails to launch because of an "Error: distro not supported" message. I will try to bypass this check

morgan-germain avatar Oct 15 '23 09:10 morgan-germain

NextcloudPi only supports Bullseye at this point. There are still a number of things that I need to address before working on support for Bookworm.

If you perform the update manually, you are free to do so, but keep in mind, that your setup might break during NCP updates and make sure to have good backups!

theCalcaholic avatar Oct 18 '23 15:10 theCalcaholic

Update: If all goes well with the next releases, I see ourselves supporting Debian Bookworm in 2024-03

theCalcaholic avatar Dec 27 '23 16:12 theCalcaholic

Thx for your efforts! I appreciate your work, but It feels not good to be without security updates for 3 months.

FloKoll avatar Jan 04 '24 22:01 FloKoll

@FloKoll Debian bullseye has security support until 2024-05 (including May), so that shouldn't be the case :)

theCalcaholic avatar Jan 07 '24 07:01 theCalcaholic

@theCalcaholic Thank you for replying to my post. Yes, but - as far as I understand it correctly - support for Nextcloud 25 expired in October 2023. That means there are no more security fixes coming. Probably tens of thousands or more Raspberry Pis can't upgrade easily to Netxcloud 26 or higher because of the PHP version in Bullseye, which - it seems to me - makes the whole thing a veritable security risk. But maybe my worries are unfounded?

FloKoll avatar Jan 09 '24 10:01 FloKoll

@FloKoll NextcloudPi supports Nextcloud 27, though, except for the NCP docker container, which is discontinued.

theCalcaholic avatar Jan 09 '24 13:01 theCalcaholic

@theCalcaholic I'm no expert, but the problem seems to be that all machines running Bullseye with php 7.4 are not offered the update to NC 26 at all. This should affect a lot of people who, like me, have their small server running at home. I could of course update to Bookworm, but I'm afraid that there will be problems with Nextcloudpi.

Best regards

FloKoll avatar Jan 09 '24 20:01 FloKoll

@FloKoll NextcloudPi uses PHP 8.1 (from the sury repositories) currently, not 7.4. The PHP version will automatically be updated when updating nextcloud to v24 or later

theCalcaholic avatar Jan 09 '24 21:01 theCalcaholic

@theCalcaholic Interesting! I have always worked with "sudo -u www-data php occ upgrade" and not with ncp-config. That will probably be the reason why PHP has not been pulled from the Sury repos. I'll try it with your tool. Thanks for your patience and advice.

FloKoll avatar Jan 09 '24 21:01 FloKoll

@theCalcaholic Running nc-update-nextcloud Upgrade cannot skip major versions. Please upgrade one major version at a time Done. Press any key...

I read https://help.nextcloud.com/t/staying-up-to-date/126259 and tried it with the code 0. But it didn't work. At the moment my nc-version ist NextCloudPi 25.0.13 (Debian Bullseye)

FloKoll avatar Jan 12 '24 22:01 FloKoll

Is there another code I could choose?

FloKoll avatar Jan 12 '24 22:01 FloKoll

@FloKoll The updater doesn't currently support selecting the next major version automatically. Try putting 26.0.10, then 27.1.5 (or 0, which should update to 27.1.3 atm)

theCalcaholic avatar Jan 12 '24 23:01 theCalcaholic

running nc-update-nextcloud Current Nextcloud version 25.0.13.2 Available Nextcloud version 26.0.10 Download Nextcloud 26.0.10... Back up current instance... check free space... Maintenance mode enabled backup database... backup files... backup /var/www/nextcloud-bkp_20240113_1705107484.tar.gz generated Maintenance mode disabled Storing backup at '/var/www/nextcloud-bkp_20240113_1705107484-25.0.13.2.tar.gz'... Install Nextcloud 26.0.10... Fix permissions... Upgrade... This version of Nextcloud requires at least PHP 8.0
You are currently running 7.4.33. Please update your PHP version.Abort Clean up... Rolling back to backup /var/www/nextcloud-bkp_20240113_1705107484-25.0.13.2.tar.gz... check free space... extracting backup file /var/www/nextcloud-bkp_20240113_1705107484-25.0.13.2.tar.gz... restore files... restore database... No datadir found in backup Maintenance mode disabled Starting scan for user 1 out of 4 [...]

@theCalcaholic It seems to me that the updater does not automatically fetch PHP 8.1 from the Sury repository. I understood you above to mean that this is what you intended.

FloKoll avatar Jan 13 '24 09:01 FloKoll

@FloKoll huh, weird... Could you run DBG=X ncp-update 26.0.10 be post the output here?

theCalcaholic avatar Jan 13 '24 11:01 theCalcaholic

@theCalcaholic Sure!

sudo DBG=X ncp-update 26.0.10 /usr/local/bin/ncp-update: line 5: set: -X: invalid option set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] INFO: updating to development branch '26.0.10' Downloading updates warning: Could not find remote branch 26.0.10 to clone. fatal: Remote branch 26.0.10 not found in upstream origin No internet connectivity

FloKoll avatar Jan 14 '24 08:01 FloKoll

I am amazed that it says there is no internet connection available. The server is online and I can access it. App updates and ncp-updates also work without any problems. Perhaps useful additional information could be that in my case the DynDNS account is set up on the server itself and not on the router, as the combination of STRATO provider and AVM Fritzbox made this necessary.

FloKoll avatar Jan 14 '24 08:01 FloKoll

@FloKoll Sorry, that was my autocorrect messing with me 🙈. The x is supposed to be lower case. That, and the command was wrong, it's ncp-update-nc not ncp-update.

So the correct command would be DBG=x ncp-update-nc 26.0.10

theCalcaholic avatar Jan 14 '24 12:01 theCalcaholic

@theCalcaholic

sudo DBG=x ncp-update-nc 26.0.10

  • VER=26.0.10
  • BIN=ncp-update-nc
  • source /usr/local/etc/library.sh ++ export CFGDIR=/usr/local/etc/ncp-config.d ++ CFGDIR=/usr/local/etc/ncp-config.d ++ export BINDIR=/usr/local/bin/ncp ++ BINDIR=/usr/local/bin/ncp ++ export NCDIR=/var/www/nextcloud ++ NCDIR=/var/www/nextcloud ++ export ncc=/usr/local/bin/ncc ++ ncc=/usr/local/bin/ncc ++ export NCPCFG=etc/ncp.cfg ++ NCPCFG=etc/ncp.cfg +++ dpkg --print-architecture ++ export ARCH=arm64 ++ ARCH=arm64 ++ [[ arm64 =~ ^(armhf|arm)$ ]] ++ [[ arm64 == \a\r\m\6\4 ]] ++ ARCH=aarch64 ++ [[ aarch64 == \a\m\d\6\4 ]] ++ export SYSTEMD_PAGER= ++ SYSTEMD_PAGER= ++ [[ -f etc/ncp.cfg ]] ++ export NCPCFG=/usr/local/etc/ncp.cfg ++ NCPCFG=/usr/local/etc/ncp.cfg ++ [[ -f /usr/local/etc/ncp.cfg ]] +++ ps -p 1 --no-headers -o %c ++ [[ systemd == \s\y\s\t\e\m\d ]] ++ [[ -d /run/systemd/system ]] ++ [[ -d /run/systemd/system ]] ++ INIT_SYSTEM=systemd ++ export INIT_SYSTEM ++ command -v jq +++ jq -r .nextcloud_version ++ NCLATESTVER=27.1.3 +++ jq -r .php_version ++ PHPVER=7.4 +++ jq -r .release ++ RELEASE=bullseye ++ grep -Eh '^deb ' /etc/apt/sources.list ++ grep bullseye-security ++ RELEASE=bullseye-security ++ command -v ncc +++ ncc status +++ grep version: +++ awk '{ print $3 }' ++ NCVER=25.0.13.2
  • [[ 26.0.10 == '' ]]
  • [[ -f /.docker-image ]]
  • BASEDIR=/var/www
  • cd /var/www ++ get_nc_config_value datadirectory ++ sudo -u www-data php -r 'include("/var/www/nextcloud/config/config.php"); echo($CONFIG["datadirectory"]);'
  • DATADIR=/media/Daten-Festplatte/ncdata/data
  • ncc status
  • [[ -d /var/www/nextcloud-old ]]
  • [[ -d /var/www/nextcloud ]]
  • [[ -d /media/Daten-Festplatte/ncdata/data ]]
  • [[ 0 -eq 0 ]]
  • SUDO='sudo -u www-data' ++ sudo -u www-data php /var/www/nextcloud/occ status ++ awk '{ print $3 }' ++ grep version:
  • CURRENT=25.0.13.2 ++ cut -d. -f1
  • MAJOR_CUR=25 ++ cut -d. -f1
  • MAJOR_NEW=26
  • [[ 1 -gt 1 ]]
  • [[ 26 -ge 24 ]] ++ lsb_release -r
  • [[ Release: 11 =~ .*10 ]]
  • grep -qP '\d+.\d+.\d+'
  • grep -qP '\d+.\d+.\d+'
  • echo 'Current Nextcloud version 25.0.13.2' Current Nextcloud version 25.0.13.2
  • echo 'Available Nextcloud version 26.0.10' Available Nextcloud version 26.0.10
  • is_more_recent_than 26.0.10 25.0.13.2
  • local version_A=26.0.10
  • local version_B=25.0.13.2 ++ cut -d. -f1
  • local major_a=26 ++ cut -d. -f2
  • local minor_a=0 ++ cut -d. -f3
  • local patch_a=10 ++ cut -d. -f1
  • local major_b=25 ++ cut -d. -f2
  • local minor_b=0 ++ cut -d. -f3
  • local patch_b=13
  • '[' 25 -gt 26 ']'
  • '[' 25 -eq 26 ']'
  • '[' 25 -eq 26 ']'
  • return 0
  • is_more_recent_than 25.0.0 26.0.10
  • local version_A=25.0.0
  • local version_B=26.0.10 ++ cut -d. -f1
  • local major_a=25 ++ cut -d. -f2
  • local minor_a=0 ++ cut -d. -f3
  • local patch_a=0 ++ cut -d. -f1
  • local major_b=26 ++ cut -d. -f2
  • local minor_b=0 ++ cut -d. -f3
  • local patch_b=10
  • '[' 26 -gt 25 ']'
  • return 1
  • is_more_recent_than 8.1.0 7.4.0
  • local version_A=8.1.0
  • local version_B=7.4.0 ++ cut -d. -f1
  • local major_a=8 ++ cut -d. -f2
  • local minor_a=1 ++ cut -d. -f3
  • local patch_a=0 ++ cut -d. -f1
  • local major_b=7 ++ cut -d. -f2
  • local minor_b=4 ++ cut -d. -f3
  • local patch_b=0
  • '[' 7 -gt 8 ']'
  • '[' 7 -eq 8 ']'
  • '[' 7 -eq 8 ']'
  • return 0
  • is_docker
  • [[ -f /.dockerenv ]]
  • [[ -f /.docker-image ]]
  • [[ '' == 1 ]]
  • pgrep -cf cron.php
  • pgrep -cf cron.php
  • mysql nextcloud
  • trap cleanup EXIT
  • URL=https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2
  • echo 'Download Nextcloud 26.0.10...' Download Nextcloud 26.0.10...
  • wget -q https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2 -O nextcloud.tar.bz2
  • BKPDIR=/var/www
  • WITH_DATA=no
  • COMPRESSED=yes
  • LIMIT=0
  • echo 'Back up current instance...' Back up current instance...
  • set +eE
  • ncp-backup /var/www no yes 0 check free space... Maintenance mode enabled backup database... backup files... backup /var/www/nextcloud-bkp_20240114_1705240186.tar.gz generated Maintenance mode disabled
  • RET=0
  • sync
  • set -eE ++ head -1 ++ ls -1t /var/www/nextcloud-bkp_20240114_1705240186.tar.gz
  • BKP_=/var/www/nextcloud-bkp_20240114_1705240186.tar.gz
  • [[ -f /var/www/nextcloud-bkp_20240114_1705240186.tar.gz ]]
  • [[ 0 -ne 0 ]] ++ dirname /var/www/nextcloud-bkp_20240114_1705240186.tar.gz ++ basename /var/www/nextcloud-bkp_20240114_1705240186.tar.gz .tar.gz
  • BKP=/var/www/nextcloud-bkp_20240114_1705240186-25.0.13.2.tar.gz
  • echo 'Storing backup at '''/var/www/nextcloud-bkp_20240114_1705240186-25.0.13.2.tar.gz'''...' Storing backup at '/var/www/nextcloud-bkp_20240114_1705240186-25.0.13.2.tar.gz'...
  • mv /var/www/nextcloud-bkp_20240114_1705240186.tar.gz /var/www/nextcloud-bkp_20240114_1705240186-25.0.13.2.tar.gz
  • trap rollback_simple INT TERM HUP ERR
  • echo 'Install Nextcloud 26.0.10...' Install Nextcloud 26.0.10...
  • mv -T nextcloud nextcloud-old
  • tar -xf nextcloud.tar.bz2
  • rm -rf /var/www/nextcloud.tar.bz2
  • cp nextcloud-old/config/config.php nextcloud/config/
  • cp -raT nextcloud-old/themes/ nextcloud/themes/
  • for app in nextcloudpi previewgenerator
  • [[ -d nextcloud-old/apps/nextcloudpi ]]
  • cp -r -L nextcloud-old/apps/nextcloudpi /var/www/nextcloud/apps/
  • for app in nextcloudpi previewgenerator
  • [[ -d nextcloud-old/apps/previewgenerator ]]
  • cp -r -L nextcloud-old/apps/previewgenerator /var/www/nextcloud/apps/
  • [[ /media/Daten-Festplatte/ncdata/data == /\v\a\r/\w\w\w/\n\e\x\t\c\l\o\u\d/\d\a\t\a ]]
  • [[ /media/Daten-Festplatte/ncdata/data == /\d\a\t\a/\n\e\x\t\c\l\o\u\d/\d\a\t\a ]]
  • trap rollback INT TERM HUP ERR
  • echo 'Fix permissions...' Fix permissions...
  • chown -R www-data:www-data nextcloud
  • find nextcloud/ -type d -exec chmod 750 '{}' ';'
  • find nextcloud/ -type f -exec chmod 640 '{}' ';'
  • echo Upgrade... Upgrade...
  • ncc='sudo -u www-data php nextcloud/occ'
  • sudo -u www-data php nextcloud/occ upgrade This version of Nextcloud requires at least PHP 8.0
    You are currently running 7.4.33. Please update your PHP version.++ rollback ++ set +eE ++ trap '' INT TERM HUP ERR EXIT ++ echo -e 'Abort\nClean up...' Abort Clean up... ++ rm -rf /var/www/nextcloud.tar.bz2 /var/www/nextcloud-old ++ echo 'Rolling back to backup /var/www/nextcloud-bkp_20240114_1705240186-25.0.13.2.tar.gz...' Rolling back to backup /var/www/nextcloud-bkp_20240114_1705240186-25.0.13.2.tar.gz... ++ local TMPDATA ++ mkdir -p /var/www/recovery/ +++ mktemp -d /var/www/recovery/ncp-data.XXXXXX ++ TMPDATA=/var/www/recovery/ncp-data.9kBLQV ++ [[ /media/Daten-Festplatte/ncdata/data == /\v\a\r/\w\w\w/\n\e\x\t\c\l\o\u\d/\d\a\t\a ]] ++ ncp-restore /var/www/nextcloud-bkp_20240114_1705240186-25.0.13.2.tar.gz check free space... extracting backup file /var/www/nextcloud-bkp_20240114_1705240186-25.0.13.2.tar.gz... restore files... restore database... No datadir found in backup Maintenance mode disabled Starting scan for user 1 out of 4 [censored] Starting scan for user 2 out of 4 [censored] Starting scan for user 3 out of 4 [censored] Starting scan for user 4 out of 4 [censored] +---------+-------+--------------+ | Folders | Files | Elapsed time | +---------+-------+--------------+ | 15160 | 96812 | 00:02:30 | +---------+-------+--------------+ Installing template 'php/opcache.ini.sh'... System config value tempdirectory set to string /media/Daten-Festplatte/ncdata/data/tmp System config value logfile set to string /media/Daten-Festplatte/ncdata/data/nextcloud.log System config value trusted_domains => 11 set to string 2a01:c23:c4d6:b600:fba5:a881:b460:a634 System config value trusted_domains => 1 set to string 192.168.178.20 System config value trusted_domains => 14 set to string nextcloudpi Scanning AppData for files

+---------+-------+--------------+ | Folders | Files | Elapsed time | +---------+-------+--------------+ | 93836 | 21383 | 00:07:50 | +---------+-------+--------------+ Cleanup... ++ [[ /media/Daten-Festplatte/ncdata/data == /\v\a\r/\w\w\w/\n\e\x\t\c\l\o\u\d/\d\a\t\a ]] ++ rm /var/www/nextcloud-bkp_20240114_1705240186-25.0.13.2.tar.gz ++ echo 'Rollback successful. Nothing was updated' Rollback successful. Nothing was updated ++ exit 1

FloKoll avatar Jan 14 '24 15:01 FloKoll

@theCalcaholic I seem to have the same issue as @FloKoll (no PHP 8). I'm on NC v25.0.9.2 and debugging output looks fairly identical to the comment just above this one. Happy to provide additional information if that's useful.

pkra avatar Jan 23 '24 11:01 pkra

@pkra, @FloKoll Have you tried to install or switch to php8.1 manuell? Maybe it's already installed on your system and you only must switch to php8.1 as default (see https://think.unblog.ch/en/php-versions-switching-on-debian-with-apache2/). Maybe update packaged before: sudo apt update && sudo apt upgrade -y

christoph-bittmann avatar Mar 06 '24 19:03 christoph-bittmann

@christoph-bittmann @theCalcaholic

Thank you very much for your answer. I had feared that my request had come to a dead end. PHP 8.1 isn't installed and not in the bullseye repositories. I fear that things might break in the future if I use other sources.

apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu-bc/oldstable,now 1.0.5-5 arm64 [installed,automatic] php-apcu/oldstable,now 5.1.19+4.0.11-3 arm64 [installed] php-common/oldstable,oldstable,now 2:76 all [installed,automatic] php-igbinary/oldstable,now 3.2.1+2.0.8-2 arm64 [installed,automatic] php-imagick/oldstable,now 3.4.4+php8.0+3.4.4-2+deb11u2 arm64 [installed] php-redis/oldstable,now 5.3.2+4.3.0-2+deb11u1 arm64 [installed] php7.4-bcmath/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-bz2/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-cli/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-common/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-curl/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-fpm/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-gd/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-gmp/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-intl/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-json/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-ldap/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-mbstring/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-mysql/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-opcache/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-readline/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed,automatic] php7.4-xml/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4-zip/oldstable,oldstable-security,now 7.4.33-1+deb11u4 arm64 [installed] php7.4/oldstable,oldstable,oldstable-security,oldstable-security,now 7.4.33-1+deb11u4 all [installed]

FloKoll avatar Mar 12 '24 20:03 FloKoll

@christoph-bittmann thanks for following up. I have a similar apt list output as @FloKoll, i.e., only php 7.4.

A while back (when nextcloud first required it), I had tried to manually upgrade to php 8.1 and my inexperience had messed up my system. If there's a recommended guide, I'd be willing to try again.

pkra avatar Mar 13 '24 09:03 pkra

Update: If all goes well with the next releases, I see ourselves supporting Debian Bookworm in 2024-03

I would be very interested too. Can you tell if it's coming soon ?

Thanks for what you're doing !

kevinestel avatar Mar 16 '24 18:03 kevinestel