Unable to upgrade Nextcloud when going from Buster to Bookworm #25
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
When I upgraded from Bullseye to Bookworm today, it broke Nextcloud because Nextcloud can not handle multiple major version changes at once. In the jurisic.org apt repo, the latest on Bullseye is v25, the oldest (and only) version on bookworm is 29.
Suggested fix
Use the
-m
flag when runningdpkg-scanpackages
on the apt repo. This will allow multiple versions to be served up and thus users who are upgrading from Bullseye to Bookworm can explicitly request Nextcloud v26, then 27 and so on until they get fully updated.This also assumes that the intermediate .deb packages are still on the apt server. I was unable to confirm this on account of directory indexes being disabled.
GitLab has this exact same problem of not being able to skip major versions during an upgrade and their answer is to allow users to use apt to explicitly select the version they want to install.
Workaround
People can build and host their own apt repos with these intermediate versions of the Nextcloud package.
Here is a tested (on a fresh Debian 12 system) way to build nextcloud v26 using this repo:
This same process (starting from the
uscan
command) can be used to build versions 27, 28, and any other versions for that matter.An alternative approach would be to check out specific releases from this repo and build those. This limits the versions which are available (e.g. there are no releases in this repo for versions 26.0.5 - 26.0.13), but it's possible to build enough major releases to get up to date. You can either browse though the releases to find old version numbers or browse the tags.
Here are the commands I used to take this approach:
Again, these commands were tested on a fresh Debian 12 system. Continuing to show the full upgrade path...
If anyone is in this exact same situation, feeling lazy, and wants to trust another apt repo, you can use my repo, which now has the versions above. Keep jurisic's apt repo too, as I'm just hosting these so I can upgrade my own server, and I don't plan on keeping Nextcloud updated in my repo.
Logs
Below are the logs when running
apt upgrade
on a Debian 12 system (freshly upgraded from Debian 11).Latest version for Buster is v23.x not v25.x, in that case upgrade proces need start from v24,v25,v26,v27,v28,v29.
🤦♂️ I kept writing Buster when I meant Bullseye. Too many consecutive codenames that start with the letter "B"! Edited my initial post to correct that error.
I'n case to upgrade from Bullseye (nextcloud-server-25.0.13-1~deb11) to Bookworm need to rebuild packages with order v26.0.x,v27.0.x,v27.1.x,v28.0.x and v29.0.x or can use rebuilded packages from my repository:
Example:
Disable my repository (if using), upgrade Debian from Bullseye to Bookworm.
Expect You have NC 25.0.13 installed , now need to upgrade step by step:
wget https://apt.jurisic.org/debian/pool/main/n/nextcloud-server/nextcloud-server_26.0.4-1
deb12_all.debdeb12_all.debdpkg -i nextcloud-server_26.0.4-1
wget https://apt.jurisic.org/debian/pool/main/n/nextcloud-server/nextcloud-server_27.0.2-1
deb12_all.debdeb12_all.debdpkg -i nextcloud-server_27.0.2-1
wget https://apt.jurisic.org/debian/pool/main/n/nextcloud-server/nextcloud-server_27.1.6-1
deb12_all.debdeb12_all.debdpkg -i nextcloud-server_27.1.6-1
wget https://apt.jurisic.org/debian/pool/main/n/nextcloud-server/nextcloud-server_28.0.2-1
deb12_all.debdeb12_all.debdpkg -i nextcloud-server_28.0.2-1
wget https://apt.jurisic.org/debian/pool/main/n/nextcloud-server/nextcloud-server_29.0.0-1
deb12_all.debdeb12_all.debdpkg -i nextcloud-server_29.0.0-1