Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jun 2018 18:41:46 +0000 (UTC)
From:      Thomas Zander <riggs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r472080 - in head/databases/arangodb32: . files
Message-ID:  <201806091841.w59Ifk8v045669@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: riggs
Date: Sat Jun  9 18:41:46 2018
New Revision: 472080
URL: https://svnweb.freebsd.org/changeset/ports/472080

Log:
  Adapt ${name}_limits to the new resource limiting mechanics for services
  
  PR:		227219
  Submitted by:	0mp
  Approved by:	maintainer timeout

Modified:
  head/databases/arangodb32/Makefile
  head/databases/arangodb32/files/arangod.in

Modified: head/databases/arangodb32/Makefile
==============================================================================
--- head/databases/arangodb32/Makefile	Sat Jun  9 18:38:00 2018	(r472079)
+++ head/databases/arangodb32/Makefile	Sat Jun  9 18:41:46 2018	(r472080)
@@ -4,6 +4,7 @@
 PORTNAME=	arangodb
 DISTVERSIONPREFIX=	v
 DISTVERSION=	3.2.13
+PORTREVISION=	1
 CATEGORIES=	databases net
 PKGNAMESUFFIX=	32
 
@@ -26,6 +27,14 @@ CMAKE_ARGS=	-DUSE_JEMALLOC:BOOL=off \
 USERS=		arangodb
 GROUPS=		arangodb
 USE_RC_SUBR=	arangod
+
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200057
+SUB_LIST+=	LEGACY_LIMITS="@comment " MODERN_LIMITS=""
+.else
+SUB_LIST+=	LEGACY_LIMITS="" MODERN_LIMITS="@comment "
+.endif
 
 post-install:
 .for section in 1 8

Modified: head/databases/arangodb32/files/arangod.in
==============================================================================
--- head/databases/arangodb32/files/arangod.in	Sat Jun  9 18:38:00 2018	(r472079)
+++ head/databases/arangodb32/files/arangod.in	Sat Jun  9 18:41:46 2018	(r472080)
@@ -9,13 +9,13 @@
 #
 # arangod_enable (bool): Set to "NO" by default.
 #                        Set it to "YES" to enable arangod.
-# arangod_limits (bool): Set to "NO" by default.
-#                        Set it to yes to run `limits -e -U arangodb`
-#                        just before arangod starts.
+%%LEGACY_LIMITS%%# arangod_limits (bool): Set to "NO" by default.
+%%LEGACY_LIMITS%%#                        Set it to yes to run `limits -e -U arangodb`
+%%LEGACY_LIMITS%%#                        just before arangod starts.
 # arangod_dbpath (str):  Default to "/var/db/arangodb"
 #                        Base database directory.
 # arangod_logpath (str): Default to "/var/log/arangodb"
-#                        Base logging directory 
+#                        Base logging directory
 # arangod_apppath (str): Default to "/var/db/arangodb-apps"
 #                        Base apps directory
 # arangod_flags (str):   Custom additional arguments to be passed to arangod.
@@ -32,7 +32,7 @@ rcvar=arangod_enable
 load_rc_config $name
 
 : ${arangod_enable="NO"}
-: ${arangod_limits="NO"}
+%%LEGACY_LIMITS%%: ${arangod_limits="NO"}
 : ${arangod_dbpath="/var/db/arangodb"}
 : ${arangod_logpath="/var/log/arangodb"}
 : ${arangod_apppath="/var/db/arangodb-apps"}
@@ -75,11 +75,12 @@ arangod_prestart()
         if [ ! -d ${arangod_apppath} ]; then
                 arangod_create_apppath || return 1
         fi
-        if checkyesno arangod_limits; then
-                eval `/usr/bin/limits -e -U ${arangod_user}` 2>/dev/null
-        else
-                return 0
-        fi
+%%LEGACY_LIMITS%%        if checkyesno arangod_limits; then
+%%LEGACY_LIMITS%%                eval `/usr/bin/limits -e -U ${arangod_user}` 2>/dev/null
+%%LEGACY_LIMITS%%        else
+%%LEGACY_LIMITS%%                return 0
+%%LEGACY_LIMITS%%        fi
+%%MODERN_LIMITS%%        return 0
 }
 
 run_rc_command "$1"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806091841.w59Ifk8v045669>