From: arete <arete@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] couchdb: update to 3.0.1
Date: Mon, 18 May 2020 21:18:19 +0200 [thread overview]
Message-ID: <20200518191819.ELF_innIoJ6BqMPhDswv-pVI3k3Vcaa-SjyIAdaulmM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21696@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
There is an updated pull request by arete against master on the void-packages repository
https://github.com/arete/void-packages couchdb301
https://github.com/void-linux/void-packages/pull/21696
couchdb: update to 3.0.1
A patch file from https://github.com/void-linux/void-packages/pull/21696.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-couchdb301-21696.patch --]
[-- Type: text/x-diff, Size: 5875 bytes --]
From f799b34a30938a59301bf450ebff4fe64e1ac824 Mon Sep 17 00:00:00 2001
From: Gerardo Di Iorio <arete74@gmail.com>
Date: Wed, 6 May 2020 18:57:42 +0200
Subject: [PATCH] couchdb: update to 3.0.1
---
srcpkgs/couchdb/INSTALL | 7 +-
srcpkgs/couchdb/files/couchdb/run | 5 +-
srcpkgs/couchdb/template | 107 +++++++++++++++++++++++++-----
3 files changed, 94 insertions(+), 25 deletions(-)
diff --git a/srcpkgs/couchdb/INSTALL b/srcpkgs/couchdb/INSTALL
index 753e71b95d6..d7b62ae706c 100644
--- a/srcpkgs/couchdb/INSTALL
+++ b/srcpkgs/couchdb/INSTALL
@@ -1,6 +1,5 @@
case "$ACTION" in
- post)
- chown -R couchdb /var/lib/couchdb/ /var/log/couchdb/
- ;;
+ post)
+ chown -R couchdb:couchdb var/lib/couchdb/ var/log/couchdb/ usr/lib/couchdb/
+ ;;
esac
-
diff --git a/srcpkgs/couchdb/files/couchdb/run b/srcpkgs/couchdb/files/couchdb/run
index 25d1abb8272..72d76191f51 100755
--- a/srcpkgs/couchdb/files/couchdb/run
+++ b/srcpkgs/couchdb/files/couchdb/run
@@ -1,6 +1,5 @@
#!/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
+exec chpst -u couchdb:couchdb couchdb
diff --git a/srcpkgs/couchdb/template b/srcpkgs/couchdb/template
index 5ca5eacbaab..4d4e4b008b2 100644
--- a/srcpkgs/couchdb/template
+++ b/srcpkgs/couchdb/template
@@ -1,40 +1,111 @@
# Template file for 'couchdb'
pkgname=couchdb
-version=1.7.1
-revision=2
+version=3.0.1
+revision=1
wrksrc="apache-couchdb-${version}"
-build_style=gnu-configure
-conf_files="/etc/couchdb/default.ini /etc/couchdb/local.ini"
-hostmakedepends="erlang pkg-config"
-makedepends="libressl-devel icu-devel js-devel libcurl-devel"
+build_style=configure
+make_build_args="V=1"
+make_build_target="release"
+configure_args="--user couchdb --with-curl --spidermonkey-version 60"
+conf_files="/etc/couchdb/*.ini"
+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=08d61d5c779957d074d5097f28a2dfc9eb518af3c479d5318135ff31212cc522
system_accounts="couchdb"
couchdb_homedir="/var/lib/couchdb"
+couchdb_shell="/bin/sh"
+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
+ 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_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 "{}" \;
+ find rel/couchdb/etc -type f -exec chmod 0640 "{}" \;
+
+
+ # 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
+
+ # Write database folder config to default.d/20-datafolder.init <<- EOF
+ cat >> rel/couchdb/etc/default.d/20-data_folder.ini <<- EOF
+ [couchdb]
+ view_index_dir = /var/lib/couchdb/data
+ database_dir = /var/lib/couchdb/data
+ EOF
+
+ # Copy the release to usr/lib/couchdb
+ vmkdir usr/lib
+ vcopy rel/couchdb usr/lib
+
+ # 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-05-18 19:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 16:59 [PR PATCH] " arete
2020-05-18 8:31 ` [PR PATCH] [Updated] " arete
2020-05-18 19:18 ` arete [this message]
2020-05-19 18:14 ` arete
2021-01-29 0:45 ` ericonr
2021-01-29 0:45 ` [PR PATCH] [Closed]: " ericonr
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=20200518191819.ELF_innIoJ6BqMPhDswv-pVI3k3Vcaa-SjyIAdaulmM@z \
--to=arete@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).