FreeBSD Bugzilla – Attachment 192130 Details for
Bug 227217
databases/mongodb: Adapt ${name}_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/mongodb)
mongodb.diff (text/plain), 3.16 KB, created by
Mateusz Piotrowski
on 2018-04-02 23:28:49 UTC
(
hide
)
Description:
Patch adding support for the new ${name}_limits mechanics (databases/mongodb)
Filename:
MIME Type:
Creator:
Mateusz Piotrowski
Created:
2018-04-02 23:28:49 UTC
Size:
3.16 KB
patch
obsolete
>diff --git databases/mongodb/Makefile databases/mongodb/Makefile >index de900050007d..ce247a06f038 100644 >--- databases/mongodb/Makefile >+++ databases/mongodb/Makefile >@@ -3,7 +3,7 @@ > > PORTNAME= mongodb > PORTVERSION= 2.6.12 >-PORTREVISION= 3 >+PORTREVISION= 4 > CATEGORIES= databases net > MASTER_SITES= http://downloads.mongodb.org/src/ > DISTNAME= ${PORTNAME}-src-r${PORTVERSION} >@@ -31,7 +31,7 @@ LIB_DEPENDS= libpcre.so:devel/pcre \ > # MAKE_ARGS+= --use-system-yaml > # LIB_DEPENDS+= libyaml-cpp.so:devel/yaml-cpp > >-ONLY_FOR_ARCHS= i386 amd64 >+ONLY_FOR_ARCHS= amd64 i386 > ONLY_FOR_ARCHS_REASON= "not yet ported to anything other than i386 and amd64" > > OPTIONS_DEFINE= SSL SASL TEST >@@ -72,6 +72,13 @@ TEST_TARGET+= smokeSsl > ALL_TARGET= core tools > .endif > >+.if ${OPSYS} != FreeBSD || ${OSVERSION} < 1101515 || \ >+ ${OSVERSION} >= 1200000 && ${OSVERSION} < 1200057 >+SUB_LIST+= LEGACY_LIMITS="" MODERN_LIMITS="@comment " >+.else >+SUB_LIST+= LEGACY_LIMITS="@comment " MODERN_LIMITS="" >+.endif >+ > post-patch: > @${REINPLACE_CMD} 's/\["-O3"\]/"${CXXFLAGS}"/' \ > ${WRKSRC}/SConstruct >diff --git databases/mongodb/files/mongod.in databases/mongodb/files/mongod.in >index ace3936e0b51..94a538b46668 100644 >--- databases/mongodb/files/mongod.in >+++ databases/mongodb/files/mongod.in >@@ -7,11 +7,11 @@ > # Add the following lines to /etc/rc.conf.local or /etc/rc.conf > # to enable this service: > # >-# mongod_enable (bool): Set to "NO" by default. >+# 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"} >@@ -52,11 +52,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
Actions:
View
|
Diff
Attachments on
bug 227217
:
192130
|
192221
|
192407