From owner-svn-ports-all@freebsd.org Thu Oct 10 13:15:14 2019 Return-Path: Delivered-To: svn-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 A72DF136F1B; Thu, 10 Oct 2019 13:15:14 +0000 (UTC) (envelope-from eugen@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 46ps5G3v1gz3xB1; Thu, 10 Oct 2019 13:15:14 +0000 (UTC) (envelope-from eugen@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 68F0626F4; Thu, 10 Oct 2019 13:15:14 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9ADFEuK012103; Thu, 10 Oct 2019 13:15:14 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9ADFEbt012101; Thu, 10 Oct 2019 13:15:14 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201910101315.x9ADFEbt012101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 10 Oct 2019 13:15:14 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r514225 - in head/security/ipsec-tools: . files X-SVN-Group: ports-head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in head/security/ipsec-tools: . files X-SVN-Commit-Revision: 514225 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Oct 2019 13:15:14 -0000 Author: eugen Date: Thu Oct 10 13:15:13 2019 New Revision: 514225 URL: https://svnweb.freebsd.org/changeset/ports/514225 Log: security/ipsec-tools: unbreak racoon_create_dirs Specifying required_dirs and creating it at prestart stage does not work because required_dirs is checked before running prestart these days. So it fails to start for mfs-based /var even if racoon_create_dirs=YES Unbreak this by replacing "required_dirs" and "mkdir -p" in the racoon_prestart with "install -d" that returns error in case of failure and does nothing if the directory already exists. Reported by: Cybil Courraud Modified: head/security/ipsec-tools/Makefile head/security/ipsec-tools/files/racoon.in Modified: head/security/ipsec-tools/Makefile ============================================================================== --- head/security/ipsec-tools/Makefile Thu Oct 10 12:56:12 2019 (r514224) +++ head/security/ipsec-tools/Makefile Thu Oct 10 13:15:13 2019 (r514225) @@ -8,7 +8,7 @@ PORTNAME= ipsec-tools PORTVERSION= 0.8.2 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= security MASTER_SITES= SF Modified: head/security/ipsec-tools/files/racoon.in ============================================================================== --- head/security/ipsec-tools/files/racoon.in Thu Oct 10 12:56:12 2019 (r514224) +++ head/security/ipsec-tools/files/racoon.in Thu Oct 10 13:15:13 2019 (r514225) @@ -21,7 +21,8 @@ rcvar=racoon_enable load_rc_config $name racoon_enable=${racoon_enable:-"NO"} # Disable by default -racoon_create_dirs=${racoon_create_dirs:-"NO"} # Create $required_dirs +racoon_dirs=${racoon_dirs:-"%%STATEDIR%%"} # For controlling socket +racoon_create_dirs=${racoon_create_dirs:-"NO"} # Create $racoon_dirs #racoon_flags="" # Flags to racoon program command="%%PREFIX%%/sbin/${name}" @@ -32,7 +33,6 @@ stop_postcmd="${name}_cleanup" socketfile="%%STATEDIR%%/${name}.sock" required_files="%%PREFIX%%/etc/${name}/${name}.conf" -required_dirs="%%STATEDIR%%" required_modules="%%REQUIREMOD%%" racoon_cleanup() @@ -46,7 +46,7 @@ racoon_prestart() racoon_cleanup if checkyesno "${name}_create_dirs"; then - /bin/mkdir -p $required_dirs + install -m 0755 -d $racoon_dirs fi }