Nextcloud 28 integration (Do NOT upgrade to 28 yet)
Nextcloud 28 has made some changes:
- It recommends php-bz2 (easy fix)
- It modifies .htaccess files in the webroot (we use nginx, so this would do nothing for us; mount -obind a modified lib/private/Setup.php that skips this step to avoid writing to a read-only location). This is due to upstream commit 4c522f0f654c, which added a test to see if there is enough free space to modify the .htaccess files. We fail that, because squashfs have 0 free space. For whatever reason, not having permission (which is checked just after) does not result in an exception.
- There might be some issue with
ReverseGeoCoderService
, I have not investigated.
This is addressed in 0.1.16~alpha1
.
If you already tried (and failed) to upgrade, the fix is easy, once the new version is installed. Just run, as root:
cp /usr/share/nextcloud-server/webroot/lib/private/Setup.php /var/cache/nextcloud-server/Setup.php
sed -i s'/public static function updateHtaccess() {/public static function updateHtaccess() { return true;/' /var/cache/nextcloud-server/Setup.php
mount -tnone -obind /var/cache/nextcloud-server/Setup.php /usr/share/nextcloud-server/webroot/lib/private/Setup.php
nextcloud-server occ upgrade
umount /usr/share/nextcloud-server/webroot/lib/private/Setup.php
rm /var/cache/nextcloud-server/Setup.php
These The first three and last two lines of the above are the meat of commit 18e01864, which simply replaces the php update logic with a short-circuit return.
Edited by Antonio Russo