FreeBSD Bugzilla – Attachment 192405 Details for
Bug 227215
databases/mongodb34: Adapt mongod_limits to the new resource limiting mechanics for services
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch adding support for the new ${name}_limits mechanics (databases/mongodb34, revision: 4)
mongodb34--r4.diff (text/plain), 2.52 KB, created by
Mateusz Piotrowski
on 2018-04-11 00:08:57 UTC
(
hide
)
Description:
Patch adding support for the new ${name}_limits mechanics (databases/mongodb34, revision: 4)
Filename:
MIME Type:
Creator:
Mateusz Piotrowski
Created:
2018-04-11 00:08:57 UTC
Size:
2.52 KB
patch
obsolete
>diff --git databases/mongodb34/Makefile databases/mongodb34/Makefile >index 901d15227ec0..b052aba14207 100644 >--- databases/mongodb34/Makefile >+++ databases/mongodb34/Makefile >@@ -3,7 +3,7 @@ > PORTNAME= mongodb > DISTVERSIONPREFIX= r > DISTVERSION= 3.4.9 >-PORTREVISION= 2 >+PORTREVISION= 3 > CATEGORIES= databases net > MASTER_SITES= https://fastdl.mongodb.org/src/ \ > http://fastdl.mongodb.org/src/ \ >@@ -58,6 +58,14 @@ SASL_MAKE_ARGS= --use-sasl-client > SSL_USES= ssl > SSL_MAKE_ARGS= --ssl > >+.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 >+ > ALL_TARGET= core > TEST_TARGET= unittests > >diff --git databases/mongodb34/files/mongod.in databases/mongodb34/files/mongod.in >index 47d6b90904c8..0bcf12786012 100644 >--- databases/mongodb34/files/mongod.in >+++ databases/mongodb34/files/mongod.in >@@ -9,9 +9,9 @@ > # > # mongod_enable (bool): Set to "NO" by default. > # Set it to "YES" to enable mongod. >-# mongod_limits (bool): Set to "NO" by default. >-# Set it to yes to run `limits -e -U mongodb` >-# just before mongod starts. >+%%LEGACY_LIMITS%%# mongod_limits (bool): Set to "NO" by default. >+%%LEGACY_LIMITS%%# Set it to yes to run `limits -e -U mongodb` >+%%LEGACY_LIMITS%%# just before mongod starts. > # mongod_dbpath (str): Default to "/var/db/mongodb" > # Base database directory. > # mongod_flags (str): Custom additional arguments to be passed to mongod. >@@ -28,7 +28,7 @@ rcvar=mongod_enable > load_rc_config $name > > : ${mongod_enable="NO"} >-: ${mongod_limits="NO"} >+%%LEGACY_LIMITS%%: ${mongod_limits="NO"} > : ${mongod_dbpath="/var/db/mongodb"} > : ${mongod_flags="--logpath ${mongod_dbpath}/mongod.log --logappend"} > : ${mongod_user="mongodb"} >@@ -51,11 +51,12 @@ mongod_prestart() > if [ ! -d ${mongod_dbpath} ]; then > mongod_create_dbpath || return 1 > fi >- if checkyesno mongod_limits; then >- eval `/usr/bin/limits -e -U ${mongod_user}` 2>/dev/null >- else >- return 0 >- fi >+%%LEGACY_LIMITS%% if checkyesno mongod_limits; then >+%%LEGACY_LIMITS%% eval `/usr/bin/limits -e -U ${mongod_user}` 2>/dev/null >+%%LEGACY_LIMITS%% else >+%%LEGACY_LIMITS%% return 0 >+%%LEGACY_LIMITS%% fi >+%%MODERN_LIMITS%% return 0 > } > > run_rc_command "$1"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
0mp
:
maintainer-approval?
Actions:
View
|
Diff
Attachments on
bug 227215
:
192128
|
192219
| 192405