Date: Sun, 12 Sep 2021 21:24:12 +0200 From: Bernard Spil <brnrd@freebsd.org> To: Gleb Popov <arrowd@freebsd.org> Cc: ports-committers <ports-committers@freebsd.org>, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Subject: Re: git: 053deaf42fd2 - main - www/nextcloud: Add occ wrapper Message-ID: <9bc00fa89410f62b82e69a6906a96094@freebsd.org> In-Reply-To: <CALH631kdeVSf1%2BHe%2BXJU=vurh_XOL1R5Ag13QZjF6J3W-4F2CA@mail.gmail.com> References: <202109121258.18CCwquw080465@gitrepo.freebsd.org> <CALH631kdeVSf1%2BHe%2BXJU=vurh_XOL1R5Ag13QZjF6J3W-4F2CA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Gleb Popov schreef op 2021-09-12 16:23: > On Sun, Sep 12, 2021 at 3:58 PM Bernard Spil <brnrd@freebsd.org> wrote: > >> The branch main has been updated by brnrd: >> >> URL: >> https://cgit.FreeBSD.org/ports/commit/?id=053deaf42fd2b9034fc52402296098e023f77fdd >> >> commit 053deaf42fd2b9034fc52402296098e023f77fdd >> Author: Bernard Spil <brnrd@FreeBSD.org> >> AuthorDate: 2021-09-12 12:58:09 +0000 >> Commit: Bernard Spil <brnrd@FreeBSD.org> >> CommitDate: 2021-09-12 12:58:09 +0000 >> >> www/nextcloud: Add occ wrapper >> --- >> www/nextcloud/Makefile | 4 +++- >> www/nextcloud/files/occ.in | 13 +++++++++++++ >> www/nextcloud/files/pkg-message.in | 5 ++--- >> www/nextcloud/pkg-plist | 1 + >> 4 files changed, 19 insertions(+), 4 deletions(-) >> >> diff --git a/www/nextcloud/Makefile b/www/nextcloud/Makefile >> index f812e213ba58..d698c562901a 100644 >> --- a/www/nextcloud/Makefile >> +++ b/www/nextcloud/Makefile >> @@ -1,5 +1,6 @@ >> PORTNAME= nextcloud >> PORTVERSION= 22.1.1 >> +PORTREVISION= 1 >> CATEGORIES= www >> MASTER_SITES= https://download.nextcloud.com/server/releases/ >> PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} >> @@ -21,7 +22,7 @@ NEXTCLOUD_GROUPNAME?= ${WWWGRP} >> WRKSRC= ${WRKDIR}/${PORTNAME} >> NO_BUILD= yes >> NO_ARCH= yes >> -SUB_FILES= config.sample.php pkg-message plist.post >> +SUB_FILES= config.sample.php occ pkg-message plist.post >> SUB_LIST= NEXTCLOUD_USERNAME=${NEXTCLOUD_USERNAME} \ >> NEXTCLOUD_GROUPNAME=${NEXTCLOUD_GROUPNAME} >> PLIST_SUB= ${SUB_LIST} >> @@ -81,5 +82,6 @@ do-install: >> -e '/^\.\/config\/config\.sample\.php/d' \ >> -e 's,^\.,${WWWDIR_REL},' >> ${TMPPLIST} >> ${CAT} ${WRKDIR}/plist.post >> ${TMPPLIST} >> + ${INSTALL_SCRIPT} ${WRKDIR}/occ >> ${STAGEDIR}${LOCALBASE}/bin/occ >> >> .include <bsd.port.mk> >> diff --git a/www/nextcloud/files/occ.in b/www/nextcloud/files/occ.in >> new file mode 100644 >> index 000000000000..dbf4550b8c6b >> --- /dev/null >> +++ b/www/nextcloud/files/occ.in >> @@ -0,0 +1,13 @@ >> +#/bin/sh >> + >> +args= >> +for arg in "$@" ; do >> + if [ "${arg#* }" != "${arg}" ] ; then >> + args="${args} '${arg}'" >> + else >> + args="${args} ${arg}" >> + fi >> +done >> + >> +cd %%WWWDIR%% >> +su -m %%NEXTCLOUD_USERNAME%% -c "%%LOCALBASE%%/bin/php %%WWWDIR%%/occ >> ${args}" > > On some of my servers I had to add `--define apc.enable_cli=1` to the > occ command line. It'd be harder to do this now. > Can anything be done about this? Hi Gleb, That's something that should be arranged via `${LOCALBASE}/etc/php.ini` where > apc.enable_cli=1 should be set. Seems I have added that manually. Discriminating which options are for PHP vs. which are arguments to occ seems neigh impossible to do reliably. If someone comes up with a reliable method, I'd be happy to accept patches. There's still the option to run `su -m www -c 'php ./occ --define apc.enable_cli=1'`, the occ addition is just a helper function. Cheers, Bernard.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9bc00fa89410f62b82e69a6906a96094>