blob: 1fe3c25289b0d364d6c99f9c694d1f6c67efcf07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
# Maintainer: Vladimir Krivopalov <vladimir.krivopalov@gmail.com>
# Main package information
pkgname=scylla
pkgver=2.2.0
pkgrel=1
pkgdesc="Scylla is an open source NoSQL drop-in replacement for Apache Cassandra with fast throughput and low latency"
arch=('x86_64')
url="http://www.scylladb.com/"
license=('AGPL')
# Dependencies
depends=('hwloc' 'systemd' 'collectd' 'python-yaml' 'python2-yaml' 'python-urwid'
'pciutils' 'python-pyparsing' 'python2-requests' 'util-linux'
'python-pyudev' 'python-setuptools' 'boost' 'boost-libs')
optdepends=('scylla-jmx: JMX interface for compatibility with tooling such as nodetool'
'scylla-tools: Tools to be used with ScyllaDB, such as cqlsh, nodetool and others')
makedepends=('git' 'gcc7' 'gcc7-libs' 'antlr3-cpp-headers-git' 'libyaml' 'yaml-cpp'
'lz4' 'zlib' 'snappy' 'jsoncpp' 'gnutls' 'ninja'
'ragel' 'libaio' 'crypto++' 'xfsprogs' 'jre8-openjdk-headless'
'numactl' 'libpciaccess' 'libxml2' 'thrift-0.10.0' 'lksctp-tools'
'protobuf' 'libunwind' 'systemtap' 'make' 'libtool' 'cmake')
# Relations
provides=('scylla')
conflicts=('cassandra' 'scylla-git')
# Others
backup=('etc/scylla/scylla.yaml'
'etc/scylla/cassandra-rackdc.properties'
'etc/scylla.d/housekeeping.cfg'
'etc/sysconfig/scylla-server'
'etc/collectd.d/scylla.conf'
'etc/scylla.d/cpuset.conf'
'etc/scylla.d/dev-mode.conf'
'etc/scylla.d/io.conf')
install=.install
changelog=
source=("git+https://github.com/scylladb/scylla.git#tag=scylla-${pkgver}"
'git+https://github.com/scylladb/scylla-ami.git'
'git+https://github.com/scylladb/scylla-swagger-ui.git'
'git+https://github.com/scylladb/scylla-seastar.git'
'git+https://github.com/scylladb/fmt.git'
'git+https://github.com/scylladb/dpdk.git'
'git+https://github.com/scylladb/c-ares.git'
'git+https://github.com/scylladb/xxHash.git'
)
md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
prepare() {
cd "$srcdir/${pkgname}"
git submodule update --init --recursive
}
build() {
cd "$srcdir/${pkgname}"
sed -i -e 's@sizeof(byte)@sizeof(CryptoPP::byte)@g' md5_hasher.hh repair/repair.cc
sed -i -e 's@reinterpret_cast<const byte@reinterpret_cast<const CryptoPP::byte@g' md5_hasher.hh repair/repair.cc
./configure.py --mode=release --c-compiler=gcc-7 --compiler=g++-7
JOBS=`nproc --all`
# It turns out that on maximum jobs compiler often runs out of memory and crashes
# Let's be conservative and assign only half of the available CPU threads
# It will make compilation slower but increase the chance of success
if [ "$JOBS" -gt 1 ]; then JOBS=$((JOBS / 2)); fi
ninja -j${JOBS} build/release/scylla build/release/iotune
cp dist/common/systemd/scylla-server.service.in build/scylla-server.service
sed -i -e "s#@@SYSCONFDIR@@#${_sysconfdir}/sysconfig#g" build/scylla-server.service
}
# Directory prefixes
_bindir=/usr/bin
_sysconfdir=/etc
_sysctldir=/etc/sysctl.d
_docdir=/usr/share/doc
_unitdir=/usr/lib/systemd/system
_libdir=/usr/lib/scylla
_sharedstatedir=/var/lib
package() {
mkdir -p "${pkgdir}${_bindir}"
mkdir -p "${pkgdir}${_sysconfdir}/sysconfig/"
mkdir -p "${pkgdir}${_sysconfdir}/security/limits.d/"
mkdir -p "${pkgdir}${_sysconfdir}/collectd.d/"
mkdir -p "${pkgdir}${_sysconfdir}/scylla/"
mkdir -p "${pkgdir}${_sysconfdir}/scylla.d/"
mkdir -p "${pkgdir}${_sysctldir}"
mkdir -p "${pkgdir}${_docdir}/scylla/"
mkdir -p "${pkgdir}${_unitdir}"
mkdir -p "${pkgdir}${_libdir}"
cd "$srcdir/${pkgname}"
install -m644 dist/common/sysconfig/scylla-server "${pkgdir}${_sysconfdir}/sysconfig/"
install -m644 dist/common/limits.d/scylla.conf "${pkgdir}${_sysconfdir}/security/limits.d/"
install -m644 dist/common/collectd.d/scylla.conf "${pkgdir}${_sysconfdir}/collectd.d/"
install -m644 dist/common/scylla.d/*.conf "${pkgdir}${_sysconfdir}/scylla.d/"
install -m644 dist/common/sysctl.d/*.conf "${pkgdir}${_sysctldir}"
install -d -m755 "${pkgdir}${_sysconfdir}/scylla"
install -m644 conf/scylla.yaml "${pkgdir}${_sysconfdir}/scylla/"
install -m644 conf/cassandra-rackdc.properties "${pkgdir}${_sysconfdir}/scylla/"
install -m644 build/*.service "${pkgdir}${_unitdir}"
install -m644 dist/common/systemd/*.service "${pkgdir}${_unitdir}"
install -m644 dist/common/systemd/*.timer "${pkgdir}${_unitdir}"
install -m755 dist/common/scripts/* "${pkgdir}${_libdir}"
install -m755 seastar/scripts/posix_net_conf.sh "${pkgdir}${_libdir}"
install -m755 seastar/scripts/perftune.py "${pkgdir}${_libdir}"
install -m755 seastar/dpdk/usertools/dpdk-devbind.py "${pkgdir}${_libdir}"
install -m755 build/release/scylla "${pkgdir}${_bindir}"
install -m755 build/release/iotune "${pkgdir}${_bindir}"
install -m755 dist/common/bin/scyllatop "${pkgdir}${_bindir}"
install -m755 scylla-blocktune "${pkgdir}${_libdir}"
install -m755 scylla-housekeeping "${pkgdir}${_libdir}"
install -m644 conf/housekeeping.cfg "${pkgdir}${_sysconfdir}/scylla.d/"
install -d -m755 "${pkgdir}${_docdir}/scylla"
install -m644 README.md "${pkgdir}${_docdir}/scylla/"
install -m644 README-DPDK.md "${pkgdir}${_docdir}/scylla/"
install -m644 NOTICE.txt "${pkgdir}${_docdir}/scylla/"
install -m644 ORIGIN "${pkgdir}${_docdir}/scylla/"
install -d -m755 "${pkgdir}${_docdir}/scylla/licenses/"
install -m644 licenses/* "${pkgdir}${_docdir}/scylla/licenses/"
install -d -m755 "${pkgdir}${_sharedstatedir}/scylla/"
install -d -m755 "${pkgdir}${_sharedstatedir}/scylla/data"
install -d -m755 "${pkgdir}${_sharedstatedir}/scylla/commitlog"
install -d -m755 "${pkgdir}${_sharedstatedir}/scylla/coredump"
install -d -m755 "${pkgdir}${_sharedstatedir}/scylla-housekeeping"
install -d -m755 "${pkgdir}${_libdir}/swagger-ui"
cp -r swagger-ui/dist "${pkgdir}${_libdir}/swagger-ui"
install -d -m755 "${pkgdir}${_libdir}/api"
cp -r api/api-doc "${pkgdir}${_libdir}/api"
cp -r tools/scyllatop "${pkgdir}${_libdir}/scyllatop"
cp -r scylla-housekeeping "${pkgdir}${_libdir}/scylla-housekeeping"
cp -P dist/common/sbin/* "${pkgdir}${_bindir}"
}
|