From owner-svn-ports-head@freebsd.org Sun Oct 14 15:27:59 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B43210D7FF2; Sun, 14 Oct 2018 15:27:59 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FB568C820; Sun, 14 Oct 2018 15:27:59 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2AA1A200EC; Sun, 14 Oct 2018 15:27:59 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9EFRxNT074688; Sun, 14 Oct 2018 15:27:59 GMT (envelope-from brnrd@FreeBSD.org) Received: (from brnrd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9EFRwxP074681; Sun, 14 Oct 2018 15:27:58 GMT (envelope-from brnrd@FreeBSD.org) Message-Id: <201810141527.w9EFRwxP074681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brnrd set sender to brnrd@FreeBSD.org using -f From: Bernard Spil Date: Sun, 14 Oct 2018 15:27:58 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r482045 - in head/www/nextcloud: . files X-SVN-Group: ports-head X-SVN-Commit-Author: brnrd X-SVN-Commit-Paths: in head/www/nextcloud: . files X-SVN-Commit-Revision: 482045 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2018 15:27:59 -0000 Author: brnrd Date: Sun Oct 14 15:27:57 2018 New Revision: 482045 URL: https://svnweb.freebsd.org/changeset/ports/482045 Log: www/nextcloud: Fix fresh installs - Add minimal configuration sample for bundled installer - Fix default logging configuration - Old sample configuration is actually documentation Reported by: miwi Approved by: miwi Added: head/www/nextcloud/files/config.sample.php.in (contents, props changed) head/www/nextcloud/files/patch-config_config.documented.php - copied, changed from r482044, head/www/nextcloud/files/patch-config_config.sample.php Deleted: head/www/nextcloud/files/patch-config_config.sample.php Modified: head/www/nextcloud/Makefile head/www/nextcloud/files/pkg-message.in head/www/nextcloud/pkg-plist Modified: head/www/nextcloud/Makefile ============================================================================== --- head/www/nextcloud/Makefile Sun Oct 14 14:54:59 2018 (r482044) +++ head/www/nextcloud/Makefile Sun Oct 14 15:27:57 2018 (r482045) @@ -2,6 +2,7 @@ PORTNAME= nextcloud DISTVERSION= 14.0.1 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= https://download.nextcloud.com/server/releases/ PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} @@ -22,7 +23,7 @@ NEXTCLOUD_GROUPNAME?= ${WWWGRP} WRKSRC= ${WRKDIR}/${PORTNAME} NO_BUILD= yes NO_ARCH= yes -SUB_FILES= pkg-message +SUB_FILES= config.sample.php pkg-message PLIST_SUB= NEXTCLOUD_USERNAME=${NEXTCLOUD_USERNAME} \ NEXTCLOUD_GROUPNAME=${NEXTCLOUD_GROUPNAME} @@ -67,15 +68,21 @@ RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/apcu . endif .endif +post-extract: + @${MV} ${WRKSRC}/config/config.sample.php ${WRKSRC}/config/config.documented.php + post-patch: - @${REINPLACE_CMD} -e 's|/var/www/${PORTNAME}|${WWWDIR}|' ${WRKSRC}/config/config.sample.php + @${REINPLACE_CMD} -e 's|/var/www/${PORTNAME}|${WWWDIR}|;s|/var/log/|/var/log/${PORTNAME}/|' \ + ${WRKSRC}/config/config.documented.php @${MV} ${WRKSRC}/apps ${WRKSRC}/apps-pkg do-install: @${MKDIR} -m 0755 ${STAGEDIR}${WWWDIR} @cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR} + @${INSTALL_SCRIPT} ${WRKDIR}/config.sample.php ${STAGEDIR}${WWWDIR}/config/config.sample.php @${RM} ${STAGEDIR}${WWWDIR}/updater/updater.phar @${MKDIR} ${STAGEDIR}${WWWDIR}/data @${MKDIR} ${STAGEDIR}${WWWDIR}/apps + @${MKDIR} ${STAGEDIR}/var/log/${PORTNAME} .include Added: head/www/nextcloud/files/config.sample.php.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nextcloud/files/config.sample.php.in Sun Oct 14 15:27:57 2018 (r482045) @@ -0,0 +1,32 @@ + + array ( + 0 => + array ( + 'path' => '%%WWWDIR%%/apps', + 'url' => '/apps', + 'writable' => true, + ), + 1 => + array ( + 'path' => '%%WWWDIR%%/apps-pkg', + 'url' => '/apps-pkg', + 'writable' => false, + ), + ), + +/** Log-files belong in the appropriate location + */ + 'logfile' => '/var/log/nextcloud/nextcloud.log', +); Copied and modified: head/www/nextcloud/files/patch-config_config.documented.php (from r482044, head/www/nextcloud/files/patch-config_config.sample.php) ============================================================================== --- head/www/nextcloud/files/patch-config_config.sample.php Sun Oct 14 14:54:59 2018 (r482044, copy source) +++ head/www/nextcloud/files/patch-config_config.documented.php Sun Oct 14 15:27:57 2018 (r482045) @@ -1,5 +1,5 @@ ---- config/config.sample.php.orig 2018-03-13 18:47:31 UTC -+++ config/config.sample.php +--- config/config.documented.php.orig 2018-03-13 18:47:31 UTC ++++ config/config.documented.php @@ -818,6 +818,11 @@ $CONFIG = array( 'url' => '/apps', 'writable' => true, Modified: head/www/nextcloud/files/pkg-message.in ============================================================================== --- head/www/nextcloud/files/pkg-message.in Sun Oct 14 14:54:59 2018 (r482044) +++ head/www/nextcloud/files/pkg-message.in Sun Oct 14 15:27:57 2018 (r482045) @@ -4,8 +4,8 @@ Please note that everything has been installed in %%WWWDIR%%. -You will probably want to add an alias to your httpd.conf file, something -like this: +You will probably want to add an alias to your httpd.conf file, +something like this: Alias /nextcloud %%WWWDIR%% AcceptPathInfo On @@ -18,6 +18,9 @@ And restart Apache. The caching options require additional Nextcloud configuration, see https://docs.nextcloud.com/server/12/admin_manual/configuration_server/caching_configuration.html + +/!\ The FreeBSD package REQUIRES the apps_paths configuration as /!\ +/!\ seen in config/config.sample.php to function /!\ *********************************************************************** * NEXTCLOUD VERSION UPGRADE * Modified: head/www/nextcloud/pkg-plist ============================================================================== --- head/www/nextcloud/pkg-plist Sun Oct 14 14:54:59 2018 (r482044) +++ head/www/nextcloud/pkg-plist Sun Oct 14 15:27:57 2018 (r482045) @@ -1,4 +1,4 @@ -@(root,%%NEXTCLOUD_GROUPNAME%%,644) %%WWWDIR%%/.htaccess +@(,%%NEXTCLOUD_GROUPNAME%%,644) %%WWWDIR%%/.htaccess @(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,664) %%WWWDIR%%/.user.ini %%WWWDIR%%/3rdparty/.drone.yml %%WWWDIR%%/3rdparty/.gitignore @@ -10630,12 +10630,9 @@ %%WWWDIR%%/apps-pkg/workflowengine/lib/Manager.php %%WWWDIR%%/apps-pkg/workflowengine/lib/Settings/Section.php %%WWWDIR%%/apps-pkg/workflowengine/templates/admin.php -@group %%NEXTCLOUD_GROUPNAME%% -%%WWWDIR%%/config/.htaccess -@owner %%NEXTCLOUD_USERNAME%% -%%WWWDIR%%/config/config.sample.php -@owner -@group +@(,%%NEXTCLOUD_GROUPNAME%%,644) %%WWWDIR%%/config/.htaccess +@sample(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,640) %%WWWDIR%%/config/config.sample.php %%WWWDIR%%/config/config.php +%%WWWDIR%%/config/config.documented.php %%WWWDIR%%/console.php %%WWWDIR%%/core/Application.php %%WWWDIR%%/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php @@ -13299,6 +13296,9 @@ %%WWWDIR%%/version.php @dir %%WWWDIR%%/apps-pkg @dir %%WWWDIR%%/apps-pkg/gallery/documentation/wiki -@dir(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,) %%WWWDIR%%/apps -@dir(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,) %%WWWDIR%%/config -@dir(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,) %%WWWDIR%%/data +@owner %%NEXTCLOUD_USERNAME%% +@group %%NEXTCLOUD_GROUPNAME%% +@dir %%WWWDIR%%/apps +@dir %%WWWDIR%%/config +@dir %%WWWDIR%%/data +@dir /var/log/nextcloud