Bug 225959 - www/nextcloud: Add OpCode cache menu, optional OpCache dependency w/config
Summary: www/nextcloud: Add OpCode cache menu, optional OpCache dependency w/config
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Bernard Spil
URL:
Keywords:
Depends on: 227133
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-16 20:11 UTC by fsbruva
Modified: 2018-04-04 09:59 UTC (History)
2 users (show)

See Also:
fsbruva: maintainer-feedback-


Attachments
Add opcode menu (2.06 KB, patch)
2018-02-16 20:11 UTC, fsbruva
no flags Details | Diff
CORRECTION: Add opcode menu (4.96 KB, patch)
2018-02-16 20:15 UTC, fsbruva
no flags Details | Diff
CORRECTION: Add opcode menu (4.96 KB, patch)
2018-02-16 20:31 UTC, fsbruva
no flags Details | Diff
Unified svn diff (2.07 KB, patch)
2018-03-21 02:38 UTC, fsbruva
no flags Details | Diff
Updated svn diff (adds missing files) (4.97 KB, patch)
2018-03-31 15:15 UTC, fsbruva
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fsbruva 2018-02-16 20:11:09 UTC
Created attachment 190699 [details]
Add opcode menu

The Nextcloud admin manual recommends the use of OPcache, along with minimum recommended settings.

This patch adds a menu to select an opcode cache (none, OPcache, or OPcache with example config). Default setting is for "none", preserving the current port behavior and dependencies.

Tested for all three options on 11.1-RELEASE-p6 amd64, according to steps in Chapter 3, section 4 of porters handbook.
Comment 1 fsbruva 2018-02-16 20:15:13 UTC
Created attachment 190700 [details]
CORRECTION: Add opcode menu

Uploaded wrong patch.
Comment 2 fsbruva 2018-02-16 20:31:16 UTC
Created attachment 190701 [details]
CORRECTION: Add opcode menu

Noticed a logic error, used ${PREFIX} in one place, but ${PHPBASE} elsewhere. Corrected patch to only use ${PHPBASE}.
Comment 3 fsbruva 2018-03-21 02:38:02 UTC
Created attachment 191680 [details]
Unified svn diff

Updated patch to work on Nextcloud 13.

Build works on 11.1-RELEASE-p6.
Comment 4 fsbruva 2018-03-21 02:39:06 UTC
Requesting maintainer timeout. No response received in over a month.
Comment 5 loic.blot 2018-03-21 08:49:38 UTC
Hello
no timeout i'm there.

Is this compatible with PHP 5.6 to 7.2 ?
Comment 6 Bernard Spil freebsd_committer freebsd_triage 2018-03-31 13:31:52 UTC
Hi Matt,

Adding an OPCACHE knob to the 13.0.1 update as I think that makes sense.

Your patch is missing the www_nextcloud_opcache.ini.sample file.

I don't think we should go into adding the file itself, the Nextcloud Admin pages provide enough info for a user to properly configure opcache.

loic: there's a php56-opcache port as well.

Cheers, Bernard.
Comment 7 Bernard Spil freebsd_committer freebsd_triage 2018-03-31 13:48:19 UTC
Hi Matt,

Adding an OPCACHE knob to the 13.0.1 update as I think that makes sense.

Your patch is missing the www_nextcloud_opcache.ini.sample file.

I don't think we should go into adding the file itself, the Nextcloud Admin pages provide enough info for a user to properly configure opcache.

loic: there's a php56-opcache port as well.

Cheers, Bernard.
Comment 8 fsbruva 2018-03-31 15:15:26 UTC
Created attachment 192006 [details]
Updated svn diff (adds missing files)

Bernard-

Thanks for catching that - I have updated the diff. However, I don't entirely agree with your comment about "not go into adding the file itself". Obviously, since I made the patch this way :-). If we give the (informed) user the option to use a stub config, why is that not acceptable? 

If the decision it to not include the actual file, then: that will change the option to a simple binary, and the '@sample' needs to be omitted from the pkg-plist.