From owner-svn-ports-head@freebsd.org Wed Aug 21 05:54:37 2019 Return-Path: Delivered-To: svn-ports-head@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 C0F53BBB0F; Wed, 21 Aug 2019 05:54:37 +0000 (UTC) (envelope-from ultima@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46Cxgx42zJz4XSk; Wed, 21 Aug 2019 05:54:37 +0000 (UTC) (envelope-from ultima@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 684C1F3A5; Wed, 21 Aug 2019 05:54:37 +0000 (UTC) (envelope-from ultima@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7L5sbsP021015; Wed, 21 Aug 2019 05:54:37 GMT (envelope-from ultima@FreeBSD.org) Received: (from ultima@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7L5sb0M021013; Wed, 21 Aug 2019 05:54:37 GMT (envelope-from ultima@FreeBSD.org) Message-Id: <201908210554.x7L5sb0M021013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ultima set sender to ultima@FreeBSD.org using -f From: Richard Gallamore Date: Wed, 21 Aug 2019 05:54:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r509491 - in head/net-mgmt/seafile-server: . files X-SVN-Group: ports-head X-SVN-Commit-Author: ultima X-SVN-Commit-Paths: in head/net-mgmt/seafile-server: . files X-SVN-Commit-Revision: 509491 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.29 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: Wed, 21 Aug 2019 05:54:37 -0000 Author: ultima Date: Wed Aug 21 05:54:36 2019 New Revision: 509491 URL: https://svnweb.freebsd.org/changeset/ports/509491 Log: Fix permissions on seafile-setup script Modified: head/net-mgmt/seafile-server/Makefile head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh Modified: head/net-mgmt/seafile-server/Makefile ============================================================================== --- head/net-mgmt/seafile-server/Makefile Wed Aug 21 05:43:55 2019 (r509490) +++ head/net-mgmt/seafile-server/Makefile Wed Aug 21 05:54:36 2019 (r509491) @@ -4,6 +4,7 @@ PORTNAME= seafile-server DISTVERSIONPREFIX= v DISTVERSION= ${SEAFILE_VER} DISTVERSIONSUFFIX= -server +PORTREVISION= 1 CATEGORIES= net-mgmt MAINTAINER= ultima@FreeBSD.org Modified: head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh ============================================================================== --- head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh Wed Aug 21 05:43:55 2019 (r509490) +++ head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh Wed Aug 21 05:54:36 2019 (r509491) @@ -1,4 +1,4 @@ ---- scripts/setup-seafile.sh.orig 2018-08-19 23:40:51 UTC +--- scripts/setup-seafile.sh.orig 2019-08-20 19:25:53 UTC +++ scripts/setup-seafile.sh @@ -17,6 +17,8 @@ use_existing_seafile="false" @@ -9,7 +9,7 @@ function welcome () { echo "-----------------------------------------------------------------" echo "This script will guide you to config and setup your seafile server." -@@ -352,10 +354,17 @@ fi +@@ -343,10 +345,17 @@ fi } function copy_user_manuals() { @@ -28,21 +28,36 @@ } function parse_params() { -@@ -713,6 +722,13 @@ chmod 0600 "$dest_settings_py" +@@ -662,7 +671,12 @@ function get_seahub_admin_passwd () { + echo "Creating database now, it may take one minute, please wait... " + echo + +-cd ${TOPDIR}/ccnet && mkdir -m 0755 GroupMgr misc OrgMgr PeerMgr && cd - ++if [ $os_bsd == "1" ]; then ++ cd ${TOPDIR}/ccnet && install -d -m 0755 -o %%SEAFILE_USER%% -g %%SEAFILE_GROUP%% \ ++ GroupMgr misc OrgMgr PeerMgr && cd - ++else ++ cd ${TOPDIR}/ccnet && mkdir -m 0755 GroupMgr misc OrgMgr PeerMgr && cd - ++fi + + ccnet_group_db=${TOPDIR}/ccnet/GroupMgr/groupmgr.db + ccnet_group_sql=${INSTALLPATH}/sql/sqlite/groupmgr.sql +@@ -740,6 +754,14 @@ chmod 0600 "$dest_settings_py" chmod 0700 "$default_ccnet_conf_dir" chmod 0700 "$seafile_data_dir" chmod 0700 "$default_conf_dir" +if [ $os_bsd == "1" ]; then -+ chown %%SEAFILE_USER%%:%%SEAFILE_GROUP%% "$dest_settings_py" -+ chown %%SEAFILE_USER%%:%%SEAFILE_GROUP%% "$default_ccnet_conf_dir" ++ for file in "$dest_settings_py" "$default_ccnet_conf_dir" \ ++ "$default_conf_dir" "$seahub_db" "$ccnet_group_db" "$ccnet_config_db" \ ++ "$ccnet_org_db" "$ccnet_user_db"; do ++ chown %%SEAFILE_USER%%:%%SEAFILE_GROUP%% "$file" ++ done + chown -R %%SEAFILE_USER%%:%%SEAFILE_GROUP%% "$seafile_data_dir" -+ chown %%SEAFILE_USER%%:%%SEAFILE_GROUP%% "$default_conf_dir" -+ chown %%SEAFILE_USER%%:%%SEAFILE_GROUP%% "$seahub_db" +fi # ------------------------------------------- # copy user manuals to library template -@@ -729,9 +745,17 @@ echo +@@ -756,9 +778,17 @@ echo echo "-----------------------------------------------------------------" echo "Your seafile server configuration has been completed successfully." echo "-----------------------------------------------------------------"