mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
added community/couchdb
This commit is contained in:
parent
5088a18364
commit
17f07f88e5
6 changed files with 146 additions and 0 deletions
69
community/couchdb/PKGBUILD
Normal file
69
community/couchdb/PKGBUILD
Normal file
|
@ -0,0 +1,69 @@
|
|||
# Maintainer: Bruno Pagani <archange@archlinux.org>
|
||||
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
|
||||
# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua
|
||||
# Contributor: Michael Fellinger <m.fellinger@gmail.com>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - patch to fix aarch64 js check, disable LTO
|
||||
|
||||
pkgname=couchdb
|
||||
pkgver=3.2.2
|
||||
pkgrel=2
|
||||
pkgdesc="Document-oriented database that can be queried and indexed in a MapReduce fashion using JSON"
|
||||
arch=(x86_64)
|
||||
url="https://couchdb.apache.org"
|
||||
license=(Apache)
|
||||
depends=(icu js91 zlib)
|
||||
optdepends=('erlang-nox: for weatherreport')
|
||||
makedepends=(erlang-nox)
|
||||
backup=(etc/couchdb/local.ini
|
||||
etc/couchdb/vm.args
|
||||
etc/default/couchdb)
|
||||
source=("https://archive.apache.org/dist/${pkgname}/source/${pkgver}/apache-${pkgname}-${pkgver}.tar.gz"{,.asc}
|
||||
couchdb.default
|
||||
couchdb.service
|
||||
couchdb.sysusers
|
||||
couchdb.tmpfiles
|
||||
arm.patch)
|
||||
sha256sums=('69c9fd6f80133557f68a02e92dda72a4fd646d646f429f45bb8329a30f82f20e'
|
||||
'SKIP'
|
||||
'0d21fdd7851b3a6fa099b030cab0e96705b1d5a3a83a4ff1c871814d8742cae9'
|
||||
'6ab3d362f3fcd9079036c883dc09dc597584cb627831460f2e0c68a31aa052ae'
|
||||
'3ed1ad2a37a068ce194b03fb72eb35285d60fa7faf2d2c2bb710703d229108a8'
|
||||
'7331b9675e3668c5f0d632bee5d154c061cc3e60d451bef3dc0d0ab2dadfa006'
|
||||
'5d97fe00ad7a05169988817ed0727452ab8a0c0582c5399aa06c90e76bf75754')
|
||||
validpgpkeys=(2EC788AE3F239FA13E82D215CDE711289384AE37 # Joan Touzet (CODE SIGNING KEY) <wohali@apache.org>
|
||||
D2B17F9DA23C0A10991AF2E3D9EE01E47852AEE4 # Jan Lehnardt <jan@apache.org>
|
||||
0BD7A98499C4AB41C910EE65FC04DFBC9657A78E) # Nick Vatamaniuc <vatamane@gmail.com>
|
||||
|
||||
prepare() {
|
||||
cd apache-couchdb-${pkgver}
|
||||
sed -i 's|./data|/var/lib/couchdb|' configure
|
||||
patch -p1 -i ../arm.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd apache-couchdb-${pkgver}
|
||||
./configure --spidermonkey-version 91
|
||||
make release
|
||||
}
|
||||
|
||||
package() {
|
||||
cd apache-couchdb-${pkgver}
|
||||
install -dm755 "${pkgdir}"/usr/lib
|
||||
install -dm755 "${pkgdir}"/etc/couchdb
|
||||
|
||||
cp -r rel/couchdb "${pkgdir}"/usr/lib/couchdb
|
||||
mv "${pkgdir}"/usr/lib/couchdb/etc/{default.ini,local.ini,vm.args} "${pkgdir}"/etc/couchdb/
|
||||
|
||||
cd "${srcdir}"
|
||||
install -Dm644 ${pkgname}.default "${pkgdir}"/etc/default/${pkgname}
|
||||
install -Dm644 ${pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/
|
||||
install -Dm644 ${pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf
|
||||
install -Dm644 ${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf
|
||||
|
||||
# Remove some cruft
|
||||
rm -r "${pkgdir}"/usr/lib/couchdb/erts-12.3/{doc,include,lib,man,src}
|
||||
rm -rv "${pkgdir}"/usr/lib/couchdb/etc/
|
||||
rm -rv "${pkgdir}"/usr/lib/couchdb/lib/couch-${pkgver}/priv/couch_{ejson_compare,js}
|
||||
}
|
28
community/couchdb/arm.patch
Normal file
28
community/couchdb/arm.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
diff -urN a/configure b/configure
|
||||
--- a/configure 2022-05-28 11:52:23.733073347 -0600
|
||||
+++ b/configure 2022-05-28 11:58:09.110597387 -0600
|
||||
@@ -197,12 +197,6 @@
|
||||
|
||||
parse_opts $@
|
||||
|
||||
-if [ "${ARCH}" = "aarch64" ] && [ "${SM_VSN}" != "1.8.5" ]
|
||||
-then
|
||||
- echo "ERROR: SpiderMonkey 60 is known broken on ARM 64 (aarch64). Use 1.8.5 instead."
|
||||
- exit 1
|
||||
-fi
|
||||
-
|
||||
echo "==> configuring couchdb in rel/couchdb.config"
|
||||
cat > rel/couchdb.config << EOF
|
||||
% Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
diff -urN a/src/jiffy/rebar.config.script b/src/jiffy/rebar.config.script
|
||||
--- a/src/jiffy/rebar.config.script 2021-10-05 09:07:14.000000000 -0600
|
||||
+++ b/src/jiffy/rebar.config.script 2022-05-28 11:59:13.368276228 -0600
|
||||
@@ -28,7 +28,7 @@
|
||||
case os:cmd(FLTO_CHECK) of
|
||||
[] ->
|
||||
{port_env, PortEnv} = lists:keyfind(port_env, 1, Config1),
|
||||
- NewFlag = {".*", "FLTO_FLAG", "-flto"},
|
||||
+ NewFlag = {".*", "FLTO_FLAG", ""},
|
||||
NewPortEnv = lists:keyreplace("FLTO_FLAG", 2, PortEnv, NewFlag),
|
||||
lists:keyreplace(port_env, 1, Config1, {port_env, NewPortEnv});
|
||||
_ ->
|
3
community/couchdb/couchdb.default
Normal file
3
community/couchdb/couchdb.default
Normal file
|
@ -0,0 +1,3 @@
|
|||
ERL_EPMD_ADDRESS=127.0.0.1
|
||||
COUCHDB_ARGS_FILE=/etc/couchdb/vm.args
|
||||
COUCHDB_INI_FILES=/etc/couchdb/default.ini /etc/couchdb/local.ini
|
42
community/couchdb/couchdb.service
Normal file
42
community/couchdb/couchdb.service
Normal file
|
@ -0,0 +1,42 @@
|
|||
[Unit]
|
||||
Description=CouchDB Server
|
||||
|
||||
[Service]
|
||||
User=couchdb
|
||||
Group=couchdb
|
||||
Type=simple
|
||||
WorkingDirectory=~
|
||||
StateDirectory=couchdb
|
||||
EnvironmentFile=/etc/default/couchdb
|
||||
ExecStart=/usr/lib/couchdb/bin/couchdb
|
||||
ReadWritePaths=/etc/couchdb/local.ini
|
||||
Restart=always
|
||||
RestartSec=2s
|
||||
AmbientCapabilities=
|
||||
CapabilityBoundingSet=
|
||||
LockPersonality=true
|
||||
# Not compatible with the use of JS
|
||||
#MemoryDenyWriteExecute=true
|
||||
NoNewPrivileges=True
|
||||
PrivateDevices=true
|
||||
PrivateTmp=true
|
||||
PrivateUsers=true
|
||||
ProtectClock=true
|
||||
ProtectControlGroups=yes
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectKernelModules=yes
|
||||
ProtectKernelTunables=true
|
||||
ProtectProc=invisible
|
||||
ProtectSystem=strict
|
||||
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
|
||||
RestrictNamespaces=true
|
||||
RestrictRealtime=true
|
||||
RestrictSUIDSGID=true
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=@system-service
|
||||
SystemCallErrorNumber=EPERM
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
1
community/couchdb/couchdb.sysusers
Normal file
1
community/couchdb/couchdb.sysusers
Normal file
|
@ -0,0 +1 @@
|
|||
u couchdb - "CouchDB daemon" /var/lib/couchdb
|
3
community/couchdb/couchdb.tmpfiles
Normal file
3
community/couchdb/couchdb.tmpfiles
Normal file
|
@ -0,0 +1,3 @@
|
|||
z /etc/couchdb/local.ini - couchdb couchdb
|
||||
d /var/lib/couchdb 0755 couchdb couchdb
|
||||
x /var/lib/couchdb
|
Loading…
Reference in a new issue