This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch monstermunch
in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git

commit bf969393fb1758f35ac5c2d96faa3913a8b9767c
Author: diannasoreil <[email protected]>
AuthorDate: Wed Apr 13 17:24:59 2022 +0200

    feat: patch rpmspec to prompt for cookie value
---
 rpm/SPECS/couchdb.spec.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/rpm/SPECS/couchdb.spec.in b/rpm/SPECS/couchdb.spec.in
index 990d8b8..bdaa4f7 100644
--- a/rpm/SPECS/couchdb.spec.in
+++ b/rpm/SPECS/couchdb.spec.in
@@ -144,6 +144,12 @@ if ! /usr/bin/getent passwd couchdb > /dev/null; then 
/usr/sbin/adduser \
 %{__ln_s} -f -T /var/log/%{name} %{buildroot}/opt/%{name}/var/log/%{name}
 
 %post
+echo "Please enter a cookie value for this installation: " >/dev/tty
+if exec </dev/tty; then
+  read cookie;
+fi
+echo "Writing $cookie to vm.args..."
+%{__sed} -i "s/^[# ]*-setcookie.*$/-setcookie ${cookie}/" 
/opt/%{name}/etc/vm.args
 %{__chown} -R couchdb:couchdb /opt/%{name}
 %{__chmod} a+x /opt/%{name}/bin/*
 %if 0%{?fedora} || 0%{?rhel} >= 7

Reply via email to