From: pullmoll <pullmoll@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] couchdb: update to 3.0.0
Date: Mon, 20 Apr 2020 11:23:13 +0200 [thread overview]
Message-ID: <20200420092313.ywkl4l37iWgxAxP8ynAaKcSWhDv7InyZTYpe2sRV4Bg@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20792@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 440 bytes --]
There is an updated pull request by pullmoll against master on the void-packages repository
https://github.com/pullmoll/void-packages couchdb
https://github.com/void-linux/void-packages/pull/20792
couchdb: update to 3.0.0
This does not yet seem to run so I need help.
I need this to review couchdb for taking part in a paid work environment.
A patch file from https://github.com/void-linux/void-packages/pull/20792.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-couchdb-20792.patch --]
[-- Type: text/x-diff, Size: 6475 bytes --]
From dee214f3ce1a43f06cf2b3435b25ba3f4bf2e3e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= <pullmoll@t-online.de>
Date: Thu, 9 Apr 2020 14:30:24 +0200
Subject: [PATCH] couchdb: update to 3.0.0
Switch to use mozjs60-devel instead of js-devel. We can remove js now.
Installation instructions are in couchdb(1). In short for testing:
1) Install package
2) Edit /etc/couchdb/local.ini and set admin password
3) Run 'sudo -i -u couchdb /usr/lib/couchdb/bin/couchdb'
4) Open http://localhost:5984/_utils/index.html
5) Verify installation http://localhost:5984/_utils/index.html#verifyinstall
6) Start service by symlinking /etc/sv/couchdb to /var/service
7) Relax.
---
srcpkgs/couchdb/INSTALL | 4 +-
srcpkgs/couchdb/files/couchdb/run | 6 +-
srcpkgs/couchdb/template | 104 ++++++++++++++++++++++++------
3 files changed, 92 insertions(+), 22 deletions(-)
diff --git a/srcpkgs/couchdb/INSTALL b/srcpkgs/couchdb/INSTALL
index 753e71b95d6..9033765d8ef 100644
--- a/srcpkgs/couchdb/INSTALL
+++ b/srcpkgs/couchdb/INSTALL
@@ -1,6 +1,8 @@
case "$ACTION" in
post)
- chown -R couchdb /var/lib/couchdb/ /var/log/couchdb/
+ chown -R couchdb:couchdb var/lib/couchdb/ var/log/couchdb/ usr/lib/couchdb/
+ find usr/lib/couchdb -type d -exec chmod 0770 {} \;
+ chmod 0644 usr/lib/couchdb/etc/*
;;
esac
diff --git a/srcpkgs/couchdb/files/couchdb/run b/srcpkgs/couchdb/files/couchdb/run
index 25d1abb8272..075211cf532 100755
--- a/srcpkgs/couchdb/files/couchdb/run
+++ b/srcpkgs/couchdb/files/couchdb/run
@@ -1,6 +1,6 @@
#!/bin/sh
export HOME=/var/lib/couchdb
mkdir -p /var/run/couchdb
-chown couchdb /var/run/couchdb
-exec chpst -u couchdb:couchdb couchdb -r 5 -o /dev/null -e /dev/null
-
+chown couchdb:couchdb /var/run/couchdb
+export ERL_FLAGS="-couch_ini /etc/couchdb/default.ini /etc/couchdb/local.ini"
+exec chpst -u couchdb:couchdb couchdb
diff --git a/srcpkgs/couchdb/template b/srcpkgs/couchdb/template
index 5ca5eacbaab..d1d1b942a4f 100644
--- a/srcpkgs/couchdb/template
+++ b/srcpkgs/couchdb/template
@@ -1,40 +1,108 @@
# Template file for 'couchdb'
pkgname=couchdb
-version=1.7.1
-revision=2
+version=3.0.0
+revision=1
wrksrc="apache-couchdb-${version}"
-build_style=gnu-configure
+build_style=gnu-makefile
+make_build_args="V=1"
+make_build_target="release"
+configure_args="--user couchdb --with-curl --spidermonkey-version 60"
conf_files="/etc/couchdb/default.ini /etc/couchdb/local.ini"
-hostmakedepends="erlang pkg-config"
-makedepends="libressl-devel icu-devel js-devel libcurl-devel"
+hostmakedepends="erlang help2man"
+makedepends="libressl-devel icu-devel mozjs60-devel libcurl-devel"
depends="erlang"
-short_desc="A document-oriented database"
+short_desc="Document-oriented database"
maintainer="Gerardo Di Iorio <arete74@gmail.com>"
license="Apache-2.0"
homepage="http://couchdb.apache.org/"
-distfiles="https://dist.apache.org/repos/dist/release/couchdb/source/${version}/apache-couchdb-${version}.tar.gz"
-checksum=91200aa6fbc6fa5e2f3d78ef40e39d8c1ec7c83ea1c2cd730d270658735b2cad
-broken="unsupported version upstream, broken distfiles"
+distfiles="https://downloads.apache.org/couchdb/source/${version}/apache-couchdb-${version}.tar.gz"
+checksum=d109bb1a70fe746c04a9bf79a2bb1096cb949c750c29dbd196e9c2efd4167fd9
system_accounts="couchdb"
couchdb_homedir="/var/lib/couchdb"
+couchdb_shell="/bin/bash"
+couchdb_descr="CouchDB Administrator"
make_dirs="
- /var/lib/couchdb 0700 couchdb couchdb
- /var/log/couchdb 0750 couchdb couchdb"
+ /var/lib/couchdb 0770 couchdb couchdb
+ /var/log/couchdb 0750 couchdb couchdb"
if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" mozjs60-devel"
makedepends+=" erlang"
- configure_args="--with-erlang=${XBPS_CROSS_BASE}/usr/lib/erlang/usr/include"
+ ERL_CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/js -I${XBPS_CROSS_BASE}/usr/lib/erlang/usr/include"
fi
-pre_configure() {
- sed -i 's|-Werror|-pie -fPIE|g' src/couchdb/priv/Makefile.*
-if [ "$CROSS_BUILD" ]; then
- sed -i '/FLAGS.*\(usr\|opt\)/s/.*/:/' configure
-fi
+do_configure() {
+ if [ "$CROSS_BUILD" ]; then
+ vsed -i src/rebar/src/rebar_port_compiler.erl \
+ -e "s;, erl_interface_dir(lib);, \"${XBPS_CROSS_BASE}/\"&;"
+ make -C src/rebar
+ fi
+ ./configure ${configure_args} ERL_CFLAGS="${ERL_CFLAGS}"
}
+do_install() {
+ local dir
+ if [ "$CROSS_BUILD" ]; then
+ # Copy target erlang libraries into release
+ for dir in $(ls rel/couchdb); do
+ if [ -d "${XBPS_CROSS_BASE}/usr/lib/erlang/${dir}" ]; then
+ echo "Copying target erlang ${dir} ..."
+ cp -pRv ${XBPS_CROSS_BASE}/usr/lib/erlang/${dir}/* \
+ rel/couchdb/${dir}/
+ fi
+ done
+ for dir in $(ls rel/couchdb/lib); do
+ if [ -d "${XBPS_CROSS_BASE}/usr/lib/erlang/lib/${dir}" ]; then
+ echo "Copying target erlang ${dir} ..."
+ cp -pR ${XBPS_CROSS_BASE}/usr/lib/erlang/lib/${dir}/* \
+ rel/couchdb/lib/${dir}/
+ fi
+ done
+ fi
+
+ # Change permissions according to the installation guide at
+ # https://docs.couchdb.org/en/stable/install/unix.html
+ find rel -type d -exec chmod 0770 "{}" \;
+
+# vsed -i rel/couchdb/etc/default.ini \
+# -e "s;\(database_dir =\).*;\1 /var/lib/couchdb/data;" \
+# -e "s;\(view_index_dir =\).*;\1 /var/lib/couchdb/data;" \
+
+ # Write a log-to-file configuration to default.d/10-logfile.ini
+ cat >> rel/couchdb/etc/default.d/10-logfile.ini <<- EOF
+ [log]
+ writer = file
+ file = /var/log/couchdb/couch.log
+ level = info
+ EOF
+
+ # Write a single_node = true configuration to local.d/10-single_node.ini
+ cat >> rel/couchdb/etc/local.d/10-single_node.ini <<- EOF
+ [couchdb]
+ single_node = true
+ EOF
+
+ # Copy the release to usr/lib/couchdb
+ vmkdir usr/lib
+ vcopy rel/couchdb usr/lib
+ # Copy the source to usr/lib/couchdb/src (?)
+# vcopy src usr/lib/couchdb
+
+ # Manual page
+ vman rel/couchdb/share/docs/couchdb.1
+
+ # Symbolic links for the configation (ini) files
+ vmkdir etc/couchdb
+ ln -srv ${DESTDIR}/usr/lib/couchdb/etc/default.ini ${DESTDIR}/etc/couchdb
+ ln -srv ${DESTDIR}/usr/lib/couchdb/etc/default.d ${DESTDIR}/etc/couchdb
+ ln -srv ${DESTDIR}/usr/lib/couchdb/etc/local.ini ${DESTDIR}/etc/couchdb
+ ln -srv ${DESTDIR}/usr/lib/couchdb/etc/local.d ${DESTDIR}/etc/couchdb
+ ln -srv ${DESTDIR}/usr/lib/couchdb/etc/vm.args ${DESTDIR}/etc/couchdb
+
+ # Symbolic link for the binary
+ vmkdir usr/bin
+ ln -srv ${DESTDIR}/usr/lib/couchdb/bin/couchdb ${DESTDIR}/usr/bin/couchdb
-post_install() {
vsv couchdb
}
next prev parent reply other threads:[~2020-04-20 9:23 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 12:30 [PR PATCH] " pullmoll
2020-04-09 12:58 ` [PR PATCH] [Updated] [WIP] " pullmoll
2020-04-10 16:26 ` jnbr
2020-04-11 1:44 ` [PR PATCH] [Updated] " pullmoll
2020-04-11 4:51 ` pullmoll
2020-04-11 4:52 ` [PR PATCH] [Updated] " pullmoll
2020-04-12 18:09 ` pullmoll
2020-04-13 5:18 ` pullmoll
2020-04-13 8:49 ` pullmoll
2020-04-13 13:39 ` pullmoll
2020-04-13 14:12 ` pullmoll
2020-04-13 18:10 ` pullmoll
2020-04-13 18:12 ` pullmoll
2020-04-16 8:03 ` pullmoll
2020-04-16 8:12 ` pullmoll
2020-04-16 8:12 ` pullmoll
2020-04-17 5:53 ` [PR PATCH] [Updated] " pullmoll
2020-04-17 7:07 ` pullmoll
2020-04-17 7:31 ` [PR PATCH] [Updated] " pullmoll
2020-04-17 7:32 ` pullmoll
2020-04-17 8:35 ` [PR PATCH] [Updated] " pullmoll
2020-04-17 8:39 ` pullmoll
2020-04-17 10:40 ` pullmoll
2020-04-17 11:08 ` pullmoll
2020-04-17 16:59 ` pullmoll
2020-04-20 7:11 ` pullmoll
2020-04-20 9:04 ` [PR PATCH] [Updated] " pullmoll
2020-04-20 9:11 ` pullmoll
2020-04-20 9:23 ` pullmoll [this message]
2020-04-20 21:18 ` pullmoll
2020-04-20 21:18 ` [PR PATCH] [Closed]: " pullmoll
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200420092313.ywkl4l37iWgxAxP8ynAaKcSWhDv7InyZTYpe2sRV4Bg@z \
--to=pullmoll@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).