I'm not convinced this is a good idea.
@ask-update is problematic because it blocks updates of packages unless
there's manual intervention. For someone who adds pkg_add -u to
rc.firsttime or uses configuration management to update packages this adds
things which are awkward to automate.
PostgreSQL is special because, in some cases, you need to take extra steps
*before* the upgrade. (pg_upgrade/postgresql-previous can't easily be made
to work with compiled add-on modules). Quite often you can't just install
the old postgresql package again because the compiled binaries won't always
run on the updated OS which is less of a problem with PHP. It is common for
ports to need extra steps after upgrading, there's nothing particularly
unusual about nextcloud in that respect.
--
Sent from a phone, apologies for poor formatting.
On 27 May 2021 11:20:29 Marcus MERIGHI <[email protected]> wrote:
Hello!
I think updates of nextcloud (recently 6.8 -> 6.9 and yesterday/today)
are somewhat special, as they need manual intervention afterwards.
Therefore I suggest a warning like the one with postgresql-server.
I've just copied the PLIST lines over from postgresql-server and
adjusted them, no testing done.
Patch inline below and attached, too.
Marcus
Index: 20/pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/nextcloud/20/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -u -r1.3 PLIST
--- 20/pkg/PLIST 25 May 2021 08:13:16 -0000 1.3
+++ 20/pkg/PLIST 27 May 2021 10:15:42 -0000
@@ -1,6 +1,7 @@
@comment $OpenBSD: PLIST,v 1.3 2021/05/25 08:13:16 gonzalo Exp $
@option is-branch
@conflict nextcloud-*
+@ask-update nextcloud-<${V_MAJOR} Updating will need manual intervention,
see the pkg-readme
@pkgpath www/nextcloud
@unexec-delete rm -f ${PREFIX}/conf/modules/httpd-nextcloud.conf
@unexec-delete rm -f ${PREFIX}/conf/modules/apache-nextcloud.conf
Index: 21/pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/nextcloud/21/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -u -r1.3 PLIST
--- 21/pkg/PLIST 25 May 2021 08:13:16 -0000 1.3
+++ 21/pkg/PLIST 27 May 2021 10:15:44 -0000
@@ -1,6 +1,7 @@
@comment $OpenBSD: PLIST,v 1.3 2021/05/25 08:13:16 gonzalo Exp $
@option is-branch
@conflict nextcloud-*
+@ask-update nextcloud-<${V_MAJOR} Updating will need manual intervention,
see the pkg-readme
@unexec-delete rm -f ${PREFIX}/conf/modules/httpd-nextcloud.conf
@unexec-delete rm -f ${PREFIX}/conf/modules/apache-nextcloud.conf
conf/modules.sample/