git: 053deaf42fd2 - main - www/nextcloud: Add occ wrapper
Bernard Spil
brnrd at freebsd.org
Sun Sep 12 19:24:25 UTC 2021
Gleb Popov schreef op 2021-09-12 16:23:
> On Sun, Sep 12, 2021 at 3:58 PM Bernard Spil <brnrd at 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 at FreeBSD.org>
>> AuthorDate: 2021-09-12 12:58:09 +0000
>> Commit: Bernard Spil <brnrd at 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.
More information about the dev-commits-ports-all
mailing list