"NextCloud". What does <flavor> : <package> means in FreshPorts? e.g. pkg install <php82 vs nextcloud-php82>

Looking at this freshports package.

It has the following info, plus a bunch version histories on nextcloud.
PKGNAME: nextcloud-php82
Package flavors (: )

  • php82: nextcloud-php82
  • php81: nextcloud-php81
  • php83: nextcloud-php83
  • php84: nextcloud-php84

Questions:

  1. What’s the differences between pkg install php82 vs pkg install nextcloud-php82?
    Is it first one install just php8.2? Second one install latest version nextcloud and php8.2?

  2. How do I control the version of next cloud I am trying to install with pkg install nextcloud-php<XX>? For example if I would like to install NextCloud 26 with PHP8.2 together, what do I use?

  3. What does “flavor” and “package” mean? With above package link, I think:
    We are installing nextcloud “package”, but you can choose a “flavor” basically the php version you would like.

  4. Will pkg install nextcloud-php<x.x> does a similar process to the official upgrade manually instructions provided by nextcloud? Which includes putting server in maintenance mode, download newer version, change folder permission, moving files and deactivate maintenance mode.

Plan to checkout @dan’s script for some inspiration on how do I manage upgrade NC automatically in the future.

I have a long ways to go to bring my NC to current version. I did research on which PHP version is supported for each NC version. And what other dependencies I need to update. My plans are as following, and I completed NC 24 → 25 without issue. Currently on PHP7.4 :face_with_open_eyes_and_hand_over_mouth:

[DONE] NextCloud 24 —> 25

PHP 7.4 —> 8.1

NextCloud 25 —> 26 —> 27 —> 28 —>29

PHP 8.3

PostgreSQL 9.4 no longer supported

MariaDB 10.3 and 10.5 are no longer supported.

Web server configuration
Make sure that your web server is serving files with the webp extension (WebP images) correctly as static assets. This is included in the shipped .htaccess file but if you use another web server or custom configuration you need to check this manually.

NextCloud 29 —> 30 —> 31

I’d think, really, that your questions would be better directed to the package maintainer, but here are my best guesses:

I believe that’s correct. The former definitely is; I’m not certain about the latter, but expect so.

I don’t expect you do–it would install the latest packaged version of Nextcloud.

In the case of this package, “flavor” refers to which version of PHP you want, and “package” is the name of the package you’d install to get that version.

I’m not sure my script would help in that regard.

Thanks Dan for answering them question by question. Nextcloud doesn’t allow jumping major versions. I fall behind the upgrade. I will do them manually this time to bring system up to date to NC 31.

In the future I may do a cron task and use pkg install nextcloud to upgrade both php and nextcloud together automatically.

Looks like pkg install nextcloud-phpx.x is best for new install situation. In the freshport page itself. Down at the bottom. It recommends using occ upgrade which is basically the Upgrade Manually instructions. Won’t help me in my case of upgrading.

If upgrading
After a version migration you should upgrade your nextcloud instance
using command line:

occ upgrade

Merge any changes to /usr/local/www/nextcloud/.htaccess.dist into .htaccess (above the
‘#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####’ divider if it exists)
and update the dynamic part of the file using the commandline:

occ maintenance:update:htaccess

I will jsut do a pkg install php8.2 and do this whole thing step by step.