[MacPorts] #45803: mongodb @2.6.5_1: Run mongod instance with config file
MacPorts
noreply at macports.org
Mon Nov 21 00:03:49 CET 2016
#45803: mongodb @2.6.5_1: Run mongod instance with config file
--------------------------+------------------------
Reporter: mark@… | Owner: ryandesign
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: mongodb |
--------------------------+------------------------
Comment (by todofixthis):
I'm trying to get this to work, but I'm running into an error that I'm not
sure how to resolve.
I made the following changes:
* Added `mongodb.conf.sample` to `${portpath}/files`.
* Added the following to `Portfile`:
{{{
post-activate {
if {![file exists ${prefix}/etc/mongodb/mongodb.conf]} {
file copy ${filespath}/mongodb.conf.sample \
${prefix}/etc/mongodb/mongodb.conf
}
}
}}}
* `cd ${portpath}`
* `sudo port install`
This is the error that I get (note: `/private/tmp/mongodb` is the
directory containing the Portfile):
{{{
:debug:activate Executing proc-post-org.macports.activate-activate-0
:error:activate org.macports.activate for port mongodb returned: error
copying "/private/tmp/mongodb/files/mongodb.conf.sample" to
"/opt/local/etc/mongodb/mongodb.conf": no such file or directory
:debug:activate Error code: NONE
:debug:activate Backtrace: error copying
"/private/tmp/mongodb/files/mongodb.conf.sample" to
"/opt/local/etc/mongodb/mongodb.conf": no such file or directory
while executing
"proc-post-org.macports.activate-activate-0 org.macports.activate"
("eval" body line 1)
invoked from within
"eval $post $targetname"
:info:activate Warning: targets not executed for mongodb:
org.macports.activate
}}}
I confirmed that `/private/tmp/mongodb/files/mongodb.conf.sample` does
exist.
I think the error is indicating that it can't copy the file to
`/opt/local/etc/mongodb` because that directory doesn't exist, but even if
I add `xinstall -d ${prefix}/etc/mongodb` to the Portfile, I still get the
same error.
I'm not sure how to continue; any ideas?
--
Ticket URL: <https://trac.macports.org/ticket/45803#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list