Skip to content

Commit

Permalink
FIXME!!!! Update to new upstream version 2.2.0
Browse files Browse the repository at this point in the history
Customizing args file is now supported upstream

TODO: Adapt bouzin to use COUCHDB_ARGS_FILE
TODO: Not working well yet, see issue
apache/couchdb#1550 (comment)
Should work when a fix is released.
  • Loading branch information
adrienverge committed Sep 25, 2018
1 parent e9fbf34 commit a630623
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
16 changes: 8 additions & 8 deletions 0002-Read-config-from-env-COUCHDB_VM_ARGS-and-COUCHDB_INI.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ diff --git a/rel/overlay/bin/couchdb b/rel/overlay/bin/couchdb
index f64bd44..6a70ac1 100755
--- a/rel/overlay/bin/couchdb
+++ b/rel/overlay/bin/couchdb
@@ -26,6 +26,10 @@
export EMU=beam
@@ -27,9 +27,11 @@
export PROGNAME=`echo $0 | sed 's/.*\///'`

+[ -z ${COUCHDB_VM_ARGS+x} ] && COUCHDB_VM_ARGS="$ROOTDIR/etc/vm.args"
ARGS_FILE="${COUCHDB_ARGS_FILE:-$ROOTDIR/etc/vm.args}"
+[ -z ${COUCHDB_INI_FILES+x} ] && COUCHDB_INI_FILES=
+
SYSCONFIG_FILE="${COUCHDB_SYSCONFIG_FILE:-$ROOTDIR/releases/$APP_VSN/sys.config}"

exec "$BINDIR/erlexec" -boot "$ROOTDIR/releases/$APP_VSN/couchdb" \
- -args_file "$ROOTDIR/etc/vm.args" \
+ -args_file "$COUCHDB_VM_ARGS" \
+ -couch_ini $COUCHDB_INI_FILES \
-config "$ROOTDIR/releases/$APP_VSN/sys.config" "$@"
-args_file "${ARGS_FILE}" \
+ -couch_ini ${COUCHDB_INI_FILES} \
-config "${SYSCONFIG_FILE}" "$@"

--
2.7.4

2 changes: 1 addition & 1 deletion couchdb.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
ExecStart=/usr/bin/couchdb
Environment=COUCHDB_VM_ARGS=/etc/couchdb/vm.args
Environment=COUCHDB_ARGS_FILE=/etc/couchdb/vm.args
Environment="COUCHDB_INI_FILES=/etc/couchdb/default.ini /etc/couchdb/default.d /etc/couchdb/local.ini /etc/couchdb/local.d"
User=couchdb
Group=couchdb
Expand Down
8 changes: 6 additions & 2 deletions couchdb.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
%undefine _missing_build_ids_terminate_build

Name: couchdb
Version: 2.1.2
Release: 2%{?dist}
Version: 2.2.0
Release: 1%{?dist}
Summary: A document database server, accessible via a RESTful JSON API
Group: Applications/Databases
License: Apache
Expand Down Expand Up @@ -109,6 +109,10 @@ getent passwd %{name} >/dev/null || \


%changelog
* Thu Aug 9 2018 Adrien Vergé <adrienverge@gmail.com> 2.2.0-1
- Update to new upstream version
- Customizing args file is now supported upstream

* Mon Sep 24 2018 Adrien Vergé <adrienverge@gmail.com> 2.1.2-2
- Use Erlang 20 (previously: 16)

Expand Down

0 comments on commit a630623

Please sign in to comment.