From owner-dev-commits-ports-all@freebsd.org Sun Sep 12 19:24:25 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F20C66C379; Sun, 12 Sep 2021 19:24:25 +0000 (UTC) (envelope-from brnrd@freebsd.org) Received: from smtp-out04.qsp.nl (smtp-out04.qsp.nl [193.254.214.168]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4H700m6Kfvz3J09; Sun, 12 Sep 2021 19:24:24 +0000 (UTC) (envelope-from brnrd@freebsd.org) Received: from smtp.brnrd.eu (5921114a.static.cust.trined.nl [89.33.17.74]) by smtp02.qsp.nl (Postfix) with ESMTPSA id 3EA652C5B; Sun, 12 Sep 2021 21:24:17 +0200 (CEST) Received: from mail.bachfreund.nl (php.brnrd.eu [172.17.2.10]) by smtp.brnrd.eu (Postfix) with ESMTPSA id 4H700X61WLzF4N; Sun, 12 Sep 2021 19:24:12 +0000 (UTC) MIME-Version: 1.0 Date: Sun, 12 Sep 2021 21:24:12 +0200 From: Bernard Spil To: Gleb Popov Cc: ports-committers , dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Subject: Re: git: 053deaf42fd2 - main - www/nextcloud: Add occ wrapper In-Reply-To: References: <202109121258.18CCwquw080465@gitrepo.freebsd.org> Message-ID: <9bc00fa89410f62b82e69a6906a96094@freebsd.org> X-Sender: brnrd@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4H700m6Kfvz3J09 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2021 19:24:25 -0000 Gleb Popov schreef op 2021-09-12 16:23: > On Sun, Sep 12, 2021 at 3:58 PM Bernard Spil wrote: > >> The branch main has been updated by brnrd: >> >> URL: >> https://cgit.FreeBSD.org/ports/commit/?id=053deaf42fd2b9034fc52402296098e023f77fdd >> >> commit 053deaf42fd2b9034fc52402296098e023f77fdd >> Author: Bernard Spil >> AuthorDate: 2021-09-12 12:58:09 +0000 >> Commit: Bernard Spil >> 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 >> 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.