You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dist upgrades from Bookworm to Trixie are broken on images newer than v1.56.0 #2149
While trying to upgrade a Raspberry pi 4 from Bookworm to Trixie recently I ran into an issue where ncp-dist-upgrade would only install some PHP packages from Trixie, but not anything else. This Raspberry was initially installed with NextcloudPi image v1.56.0. After some investigating I found out that an Armbian change to support deb822 APT sources changed the file in which they were stored, which in turn broke logic in the dist-upgrade script that NextcloudPi uses.
Analysis
The upgrade to Trixie was triggered from the commandline with the ncp-dist-upgrade script. That in turn (in the case of Bookworm) runs debian-12.sh. That script does a couple of things, amongst them is updating the APT sources, changing them from bookworm to trixie: https://github.com/nextcloud/nextcloudpi/blob/master/bin/ncp-dist-upgrade.d/debian-12.sh#L25. The script only does this search & replace in very specific files though: sources.list, php.list, armbian.list and raspi.list. However, in the case of images newer than v1.56.0 only php.list exists:
armbi_root/etc/apt
❯ cat sources.list; ls sources.list.d
cat: sources.list: No such file or directory
armbian-config.sources armbian.sources debian.sources php.list
(this output is from the image mounted on my desktop)
A bit of digging revealed that this commit to the Armbian build repository seems to be the cause: armbian/build@8e75c8e#diff-4263fe64648fb4289813ee051ac4f42a334c828ed68fa9caa2a47a0ddb6be21eR102. Before this commit the sources.list file was populated with the distro's main APT sources, but after this commit those are instead stored in debian.sources (for the NextcloudPi image at least, the exact name depends on the distro). The v1.55.3 image was created before this change was introduced to the Armbian build repository and does contain the files that the dist-upgrade script expects.
I have not yet confirmed whether all images are affected by this, I only checked the Raspberry pi 4+ images
How to reproduce
Install NextcloudPi using one of the images (>=v.1.56.0)
Attempt to perform a dist upgrade using the ncp-dist-upgrade script
Suggested solution
I think the easiest fix would be to include the sources files in the search & replace logic as well. That would fix the upgrade for systems that haven't attempted the dist-upgrade yet. For installations that have already attempted the dist-upgrade some logic may be needed to restore the APT sources and re-create /usr/local/etc/ncp-recommended.cfg & /etc/update-motd.d/30ncp-dist-upgrade.
Activity