From: pullmoll <pullmoll@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] couchdb: update to 3.0.0
Date: Thu, 16 Apr 2020 10:03:25 +0200 [thread overview]
Message-ID: <20200416080325.MWpjxLrpla-szy2Kdjk_2ym3bjaWcYPWbH9TrI9oDLQ@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: 446 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
[WIP] 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: 5085 bytes --]
From 0d112823cd1965820c4bbe17fb9fdc5858d599b1 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.
---
srcpkgs/couchdb/files/couchdb/run | 5 +-
srcpkgs/couchdb/template | 91 +++++++++++++++++++++++++------
2 files changed, 76 insertions(+), 20 deletions(-)
diff --git a/srcpkgs/couchdb/files/couchdb/run b/srcpkgs/couchdb/files/couchdb/run
index 25d1abb8272..1308a9ad745 100755
--- a/srcpkgs/couchdb/files/couchdb/run
+++ b/srcpkgs/couchdb/files/couchdb/run
@@ -2,5 +2,6 @@
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
-
+export COUCHDB_ARGS_FILE="/etc/couchdb/vm.args"
+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..5a864aba871 100644
--- a/srcpkgs/couchdb/template
+++ b/srcpkgs/couchdb/template
@@ -1,40 +1,95 @@
# 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"
+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 0700 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 "{}" \;
+
+ # Append a log-to-file configuration to local.ini
+ cat >> rel/couchdb/etc/local.ini <<- EOF
+
+ [log]
+ writer = file
+ file = /var/log/couchdb/couch.log
+ EOF
+
+ # Default to single node mode
+ vsed -i rel/couchdb/etc/local.ini \
+ -e "/;os_process_timeout/a single_node = true"
+
+ # Copy the release to usr/lib/couchdb
+ vmkdir usr/lib
+ vcopy "rel/couchdb" usr/lib
+
+ # 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
-post_install() {
+ # Symbolic link for the binary
+ vmkdir usr/bin
+ ln -srv ${DESTDIR}/usr/lib/couchdb/bin/couchdb ${DESTDIR}/usr/bin/couchdb
vsv couchdb
}
next prev parent reply other threads:[~2020-04-16 8:03 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 [this message]
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
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=20200416080325.MWpjxLrpla-szy2Kdjk_2ym3bjaWcYPWbH9TrI9oDLQ@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).