Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export SNAPCRAFT_BUILD_ENVIRONMENT=multipass

PATH_add ./rocket_craft

if ! test -f .venv_initialized; then pip3 install -r rocket_craft/requirements.txt && touch .venv_initialized; fi

_ROCKETCRAFT_COMPLETE=bash_source rocketcraft > ._rocketcraft_completion.bash

_ROCKETCRAFT_COMPLETE=zsh_source rocketcraft > ._rocketcraft_completion.zsh
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ tests/

._rocketcraft_completion.bash
._rocketcraft_completion.zsh
.venv_initialized
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

>/dev/null cat <<CommentEnd

storage:
journal:
enabled: <true|false>

is no longer a supported config flag; having it breaks mongod startup.

CommentEnd

start() {
python3 -c '
import sys

from ruamel.yaml import YAML
yaml = YAML()
# important since mongod.conf is user editable, we want to preserve their comments;
yaml.preserve_quotes = True
yaml.indent(mapping=2, sequence=2, offset=0)

mongod_conf = {}
with open(sys.argv[1], "r") as f:
mongod_conf = yaml.load(f)


if "storage" in mongod_conf and "journal" in mongod_conf["storage"]:
del mongod_conf["storage"]["journal"]
if not mongod_conf["storage"]:
del mongod_conf["storage"]

with open(sys.argv[1], "w") as f:
yaml.dump(mongod_conf, f)
' $SNAP_DATA/mongod.conf
}
3 changes: 3 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ parts:
'*': migrations/
plugin: dump
source: ./migrations
stage-packages:
- python3-ruamel.yaml
- python3
mongodb-libssl-backwards-compat:
plugin: dump
source:
Expand Down
Loading