Nextcloud - Install-script using obsolete flag "--no-app-disable" which breaks automatic update

Put my turris in storage for almost a year, moved in to new place and it updated to latest software, didn’t think too much about it for about a month until i was gonna test nextcloud.

Apparently 2 major releases had happened, nextcloud database was still at major version 18 and i had version 20 installed and it refused to jump 2 releases so i had to dig around and figure out how to install an older release…

Long story short, found version 19 on archive, installed it and could run the upgrade. Index of /archive/5.2.0/omnia/packages/turrispackages/

… split into multiple posts since the forum refuses to let me post more than 2 “links” in a post…

… Continued…

But i noticed this error-message:

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
The current PHP memory limit is below the recommended value of 512MB.

  The "--no-app-disable" option does not exist.

upgrade

I always thought it was weird that nextcloud would update and i’d get stuck on this page which required me to push a button to run the upgrade… But apparently the installer tries to run the upgrade but fails since it’s using an obsolete commandline flag since nextcloud v14:

  • occ upgrade does not have the option --no-app-disable anymore (it is used for PHP 7+ anyways already) (#7955)

It’s still there in latest nextcloud package:

cetex@cetex-ThinkPad-X1-Nano-Gen-1:~/nextcloud_20.0.4-3$ cat control
Package: nextcloud
Version: 20.0.4-3
Depends: libc, php7-mod-opcache, php7-fpm, php7-cli, sudo, php7-mod-ctype, php7-mod-fileinfo, php7-mod-xmlreader, php7-mod-openssl, php7-mod-hash, php7-mod-gd, php7-mod-xml, php7-mod-xmlwriter, php7-mod-json, php7-mod-mbstring, php7-mod-pcntl, php7-mod-opcache, php7-mod-session, php7-mod-simplexml, php7-mod-iconv, php7-mod-curl, php7-mod-zip, php7-mod-dom, coreutils-stat, php7, lighttpd-mod-access, php7-mod-intl, icu-full-data
Source: feeds/turrispackages/net/nextcloud
SourceName: nextcloud
License: AGPL-3.0
LicenseFiles: COPYING
Section: net
Maintainer: CZ.NIC <packaging@turris.cz>
Architecture: arm_cortex-a9_vfpv3-d16
Installed-Size: 127976908
LinkSignature: d41d8cd98f00b204e9800998ecf8427e
FilesSignature: 8a1e427a26a4e3d4b081136e22bc5683
Description:  A safe home for all your data.

cetex@cetex-ThinkPad-X1-Nano-Gen-1:~/nextcloud_20.0.4-3$ cat postinst-pkg
#!/bin/sh
# check if we are on real system
if [ -z "$IPKG_INSTROOT" ]; then
	if [ -f /srv/www/nextcloud/config/config.php ]; then
		cd /srv/www/nextcloud/
		VER="`cat ./config/config.php | sed -n 's|.*version[^0-9]*\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\..*|\1\2\3|p'`"
		sed -i 's|\(.*dbhost.*=>.*\)localhost\(.\),|\1127.0.0.1\2,|' config/config.php
		if [ -n "$VER" ] && [ $VER -lt "`echo 20.0.4 | sed 's|\.||g'`" ]; then
			sudo -u nobody php-cli ./occ upgrade --no-app-disable --no-interaction
		fi
	fi
fi
chown -R nobody "$IPKG_INSTROOT"/srv/www/nextcloud/
chown nobody "$IPKG_INSTROOT"/usr/bin/nextcloud-cron.sh

Could someone remove the flag in the postinstall-pkg script next release so we get automagic upgrades again?