2016-02-24 14:29:44 +00:00
|
|
|
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
2016-03-22 00:17:14 +00:00
|
|
|
# - disable epoll on aarch64
|
2018-12-31 17:27:54 +00:00
|
|
|
# - patch to fix padding calculation
|
2016-02-24 14:29:44 +00:00
|
|
|
|
|
|
|
pkgbase=percona-server
|
|
|
|
pkgname=('libperconaserverclient' 'percona-server-clients' 'percona-server')
|
2022-08-09 20:01:23 +00:00
|
|
|
pkgver=8.0.29_21
|
|
|
|
_boost_ver=1.77.0
|
2016-02-24 14:29:44 +00:00
|
|
|
_pkgver=${pkgver/_/-}
|
|
|
|
_myver=${pkgver/_rel*}
|
2022-09-21 12:52:58 +00:00
|
|
|
pkgrel=2
|
2017-12-27 13:47:55 +00:00
|
|
|
arch=('x86_64')
|
2021-05-19 02:10:14 +00:00
|
|
|
makedepends=('cmake' 'zlib' 'lz4' 'zstd' 'libaio' 'systemd-tools' 'pam' 'numactl' 'jemalloc' 'openssl'
|
2022-09-21 12:52:58 +00:00
|
|
|
'rpcsvc-proto' 'doxygen' 'graphviz' 'libevent' 'protobuf' 'libfido2') # 'boost'
|
2022-03-04 19:10:53 +00:00
|
|
|
options=('debug')
|
2017-08-02 12:48:56 +00:00
|
|
|
license=('GPL')
|
2016-11-09 13:29:31 +00:00
|
|
|
url="https://www.percona.com/software/mysql-database/percona-server"
|
|
|
|
source=("https://www.percona.com/downloads/Percona-Server-${pkgver%.*_*}/Percona-Server-$_pkgver/source/tarball/percona-server-$_pkgver.tar.gz"
|
2021-05-14 14:01:05 +00:00
|
|
|
"https://boostorg.jfrog.io/artifactory/main/release/$_boost_ver/source/boost_${_boost_ver//./_}.tar.gz"
|
2016-02-24 14:29:44 +00:00
|
|
|
'my.cnf'
|
2017-05-30 17:58:58 +00:00
|
|
|
'mysql-user.conf'
|
2020-12-16 14:05:02 +00:00
|
|
|
'mysqlrouter-user.conf'
|
2021-11-19 02:56:01 +00:00
|
|
|
'openldap-2.5.patch'
|
2018-12-31 17:27:54 +00:00
|
|
|
'0001-fix-LF_PINS-padding-calculation.patch')
|
2022-08-09 20:01:23 +00:00
|
|
|
sha256sums=('a54c45b23719d4f6ba1e409bb2916c59dc0c9aaae98e24299ff26f150ad4f735'
|
|
|
|
'5347464af5b14ac54bb945dc68f1dd7c56f0dad7262816b956138fc53bcc0131'
|
2020-12-16 14:05:02 +00:00
|
|
|
'b467b04d6d06152b2abc33f2a6de63fef0fc922dd5119d2ee1d07d3c1a489731'
|
|
|
|
'5d7710fe88ec6d298175a309c0b776142397b119c468830b2865980292ed5da6'
|
|
|
|
'4ca7ffdcb2d1716d4f31e4c7dd314e5d76e64f13fdc67c5d81c53650b793f5e0'
|
2021-11-19 02:56:01 +00:00
|
|
|
'92d70b75a32517f598bbffbaf5db18b0d14be504c31f531e35c8572b330785f3'
|
2018-12-31 17:27:54 +00:00
|
|
|
'aa5e960625843b061f47c32b4a267fab1115667b8b7d1ce7ec952efe42eb77af')
|
2017-03-27 12:34:54 +00:00
|
|
|
|
2016-02-24 14:29:44 +00:00
|
|
|
prepare() {
|
|
|
|
cd $pkgbase-$_pkgver
|
|
|
|
rm -v sql/sql_yacc.{cc,h}
|
|
|
|
|
2021-11-19 02:56:01 +00:00
|
|
|
patch --verbose -p1 -i "$srcdir"/openldap-2.5.patch
|
2020-03-16 23:39:06 +00:00
|
|
|
|
2020-12-16 14:05:02 +00:00
|
|
|
sed -r -e s@/var/run/mysqlrouter@/run/mysqlrouter@ \
|
|
|
|
-e s@lib64/mysql@lib/mysql@ \
|
|
|
|
-i cmake/install_layout.cmake
|
|
|
|
|
2020-03-17 18:12:12 +00:00
|
|
|
for svcfile in mysqld{,@}.service.in; do
|
2020-12-16 14:05:02 +00:00
|
|
|
sed '/^PrivateTmp=/ a StateDirectory=mysql mysql-files\nRuntimeDirectory=mysqld' \
|
|
|
|
-i scripts/systemd/$svcfile
|
2020-03-17 18:12:12 +00:00
|
|
|
done
|
2020-03-16 23:39:06 +00:00
|
|
|
|
2020-12-16 14:05:02 +00:00
|
|
|
sed '/^PrivateTmp=/ a StateDirectory=mysqlrouter\nRuntimeDirectory=mysqlrouter' \
|
|
|
|
-i scripts/systemd/mysqlrouter.service.in
|
|
|
|
|
2018-12-31 17:27:54 +00:00
|
|
|
patch -p1 -i "$srcdir"/0001-fix-LF_PINS-padding-calculation.patch
|
2016-02-24 14:29:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2018-05-04 18:55:41 +00:00
|
|
|
# rm -rf build
|
|
|
|
mkdir -p build
|
2016-02-24 14:29:44 +00:00
|
|
|
cd build
|
|
|
|
|
2016-07-09 16:43:41 +00:00
|
|
|
[[ $CARCH == "aarch64" ]] && CONFIG="-DHAVE_SYS_EPOLL_H=0"
|
2016-03-22 00:17:14 +00:00
|
|
|
|
2020-12-16 14:05:02 +00:00
|
|
|
cmake ../$pkgbase-$_pkgver $CONFIG \
|
2021-05-19 02:10:14 +00:00
|
|
|
-DCMAKE_C_FLAGS_RELWITHDEBINFO="${CFLAGS} -DNDEBUG" \
|
|
|
|
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="${CXXFLAGS} -DNDEBUG" \
|
2019-01-15 01:33:02 +00:00
|
|
|
-Wno-dev \
|
2021-05-19 02:10:14 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DBUILD_CONFIG=mysql_release \
|
2018-12-31 16:22:21 +00:00
|
|
|
-DREPRODUCIBLE_BUILD=ON \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DSYSCONFDIR=/etc/mysql \
|
|
|
|
-DMYSQL_DATADIR=/var/lib/mysql \
|
|
|
|
-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
|
2018-05-04 18:55:41 +00:00
|
|
|
-DDEFAULT_CHARSET=utf8mb4 \
|
2021-05-19 02:10:14 +00:00
|
|
|
-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci \
|
|
|
|
-DWITH_EXTRA_CHARSETS=all \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DENABLED_LOCAL_INFILE=ON \
|
2020-12-16 14:05:02 +00:00
|
|
|
-DINSTALL_LAYOUT=RPM \
|
|
|
|
-DINSTALL_SBINDIR=bin \
|
|
|
|
-DINSTALL_LIBDIR=lib \
|
|
|
|
-DINSTALL_PLUGINDIR=lib/perconaserver/plugin \
|
|
|
|
-DINSTALL_INCLUDEDIR=include/perconaserver \
|
2018-05-04 18:55:41 +00:00
|
|
|
-DINSTALL_INFODIR=share/doc/percona-server \
|
|
|
|
-DINSTALL_DOCREADMEDIR=share/doc/percona-server \
|
|
|
|
-DINSTALL_DOCDIR=share/doc/percona-server \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DINSTALL_MANDIR=share/man \
|
|
|
|
-DINSTALL_SUPPORTFILESDIR=share/mysql \
|
|
|
|
-DINSTALL_MYSQLSHAREDIR=share/mysql \
|
2019-01-19 00:02:30 +00:00
|
|
|
-DINSTALL_STATIC_LIBRARIES=OFF \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DWITH_ZLIB=system \
|
2018-05-04 18:55:41 +00:00
|
|
|
-DWITH_LZ4=system \
|
2020-07-25 16:37:34 +00:00
|
|
|
-DWITH_ZSTD=system \
|
2017-08-02 12:48:56 +00:00
|
|
|
-DWITH_SSL=system \
|
2020-07-25 16:37:34 +00:00
|
|
|
-DWITH_ICU=system \
|
2021-05-19 02:10:14 +00:00
|
|
|
-DWITH_LIBEVENT=system \
|
|
|
|
-DWITH_PROTOBUF=system \
|
2022-09-21 12:52:58 +00:00
|
|
|
-DWITH_FIDO=system \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DWITH_LIBWRAP=OFF \
|
2018-05-04 18:55:41 +00:00
|
|
|
-DWITH_MECAB=OFF \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DWITH_PAM=ON \
|
|
|
|
-DWITH_INNODB_MEMCACHED=ON \
|
|
|
|
-DWITH_ARCHIVE_STORAGE_ENGINE=ON \
|
|
|
|
-DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
|
2018-05-04 18:55:41 +00:00
|
|
|
-DWITH_FEDERATED_STORAGE_ENGINE=ON \
|
|
|
|
-DWITH_ROCKSDB=ON \
|
|
|
|
-DTOKU_DEBUG_PARANOID=OFF \
|
|
|
|
-DWITH_VALGRIND=OFF \
|
|
|
|
-DUSE_VALGRIND=OFF \
|
|
|
|
-DDEBUG_EXTNAME=OFF \
|
|
|
|
-DBUILD_TESTING=OFF \
|
|
|
|
-DWITH_UNIT_TESTS=OFF \
|
|
|
|
-DUSE_GTAGS=OFF \
|
|
|
|
-DUSE_CTAGS=OFF \
|
|
|
|
-DUSE_ETAGS=OFF \
|
|
|
|
-DUSE_CSCOPE=OFF \
|
|
|
|
-DTOKUDB_BACKUP_PLUGIN_VERSION=$_pkgver \
|
2016-08-25 18:01:02 +00:00
|
|
|
-DWITH_SYSTEMD=1 \
|
2018-05-04 18:55:41 +00:00
|
|
|
-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc' \
|
2020-12-16 14:05:02 +00:00
|
|
|
-DWITH_NUMA=ON \
|
|
|
|
-DWITH_BOOST="../boost_${_boost_ver//./_}"
|
|
|
|
# -DWITH_BOOST=system
|
2017-08-02 12:48:56 +00:00
|
|
|
|
2016-02-24 14:29:44 +00:00
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package_libperconaserverclient() {
|
|
|
|
pkgdesc='Percona Server client libraries'
|
2022-09-21 12:52:58 +00:00
|
|
|
depends=('zlib' 'zstd' 'openssl' 'libfido2')
|
2020-12-16 14:05:02 +00:00
|
|
|
optdepends=('libsasl: authentication_ldap_sasl_client plugin')
|
2016-02-24 14:29:44 +00:00
|
|
|
|
|
|
|
cd build
|
2018-12-31 16:22:21 +00:00
|
|
|
for dir in include libmysql libservices; do
|
2016-02-24 14:29:44 +00:00
|
|
|
make -C $dir DESTDIR="$pkgdir" install
|
|
|
|
done
|
|
|
|
|
2020-12-16 14:05:02 +00:00
|
|
|
rm -vrf "$pkgdir"/usr/lib/perconaserver/plugin/debug
|
2016-02-24 14:29:44 +00:00
|
|
|
|
|
|
|
install -Dm755 scripts/mysql_config "$pkgdir"/usr/bin/perconaserver_config
|
2018-05-05 13:50:46 +00:00
|
|
|
install -Dm644 "$srcdir"/$pkgbase-$_pkgver/man/mysql_config.1 "$pkgdir"/usr/share/man/man1/perconaserver_config.1
|
2020-12-16 14:05:02 +00:00
|
|
|
sed s@/lib64@/lib@ -i "$pkgdir"/usr/bin/perconaserver_config
|
2018-05-05 13:50:46 +00:00
|
|
|
|
|
|
|
install -D -m0644 scripts/perconaserverclient.pc "$pkgdir"/usr/lib/pkgconfig/perconaserverclient.pc
|
|
|
|
install -D -m0644 "$srcdir"/$pkgbase-$_pkgver/support-files/mysql.m4 "$pkgdir"/usr/share/aclocal/perconaserverclient.m4
|
2016-02-24 14:29:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_percona-server-clients() {
|
|
|
|
pkgdesc='Percona Server client tools'
|
2020-12-16 14:05:02 +00:00
|
|
|
depends=('libperconaserverclient' 'zlib' 'zstd' 'lz4' 'openssl' 'jemalloc' 'readline')
|
2016-02-24 14:29:44 +00:00
|
|
|
conflicts=('mysql-clients')
|
|
|
|
provides=("mysql-clients=$_myver" "mariadb-clients=$_myver")
|
|
|
|
|
|
|
|
cd build
|
|
|
|
make -C client DESTDIR="$pkgdir" install
|
|
|
|
|
|
|
|
# install man pages
|
|
|
|
install -d "$pkgdir"/usr/share/man/man1
|
2018-12-31 16:22:21 +00:00
|
|
|
for man in mysql{,admin,check,dump,import,show,slap,pump,binlog,_upgrade}; do
|
2016-02-24 14:29:44 +00:00
|
|
|
install -m644 "$srcdir"/$pkgbase-$_pkgver/man/$man.1 "$pkgdir"/usr/share/man/man1/$man.1
|
|
|
|
done
|
|
|
|
|
|
|
|
# provided by percona-server
|
2018-12-31 16:22:21 +00:00
|
|
|
rm "$pkgdir"/usr/bin/mysql{_config_editor,_secure_installation,_ssl_rsa_setup}
|
2016-02-24 14:29:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_percona-server() {
|
2018-12-31 16:22:21 +00:00
|
|
|
pkgdesc='Drop-in replacement for MySQL that provides improved performance, diagnostics, instrumentation and MyRocks storage engine'
|
2020-12-16 14:05:02 +00:00
|
|
|
backup=('etc/mysql/my.cnf' 'etc/mysqlrouter/mysqlrouter.conf')
|
2021-05-19 02:10:14 +00:00
|
|
|
depends=('libaio' 'systemd-tools' 'pam' 'jemalloc' 'numactl' 'lz4' 'zstd' 'openssl' 'libtirpc' 'curl'
|
|
|
|
'libevent' 'protobuf' 'icu') # 'boost-libs'
|
2016-02-24 14:29:44 +00:00
|
|
|
optdepends=('perl-dbd-mysql')
|
|
|
|
conflicts=('mysql')
|
|
|
|
provides=("mysql=$_myver" "mariadb=$_myver")
|
|
|
|
options=('emptydirs')
|
|
|
|
|
|
|
|
cd build
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
|
2017-08-02 12:48:56 +00:00
|
|
|
cd "$pkgdir"
|
2020-12-16 14:05:02 +00:00
|
|
|
install -Dm644 "$srcdir"/my.cnf etc/mysql/my.cnf
|
|
|
|
install -Dm644 "$srcdir"/mysql-user.conf usr/lib/sysusers.d/mysql.conf
|
|
|
|
|
|
|
|
install -dm755 etc/mysqlrouter
|
|
|
|
sed -e 's:@ROUTER_RUNTIMEDIR@:/run/mysqlrouter:' \
|
|
|
|
-e 's:^logging_folder.*:logging_folder =:' \
|
|
|
|
"$srcdir"/$pkgbase-$_pkgver/packaging/rpm-common/mysqlrouter.conf.in \
|
|
|
|
> etc/mysqlrouter/mysqlrouter.conf
|
|
|
|
install -Dm644 "$srcdir"/mysqlrouter-user.conf usr/lib/sysusers.d/mysqlrouter.conf
|
|
|
|
|
2019-01-15 01:33:02 +00:00
|
|
|
chmod 755 usr
|
2020-12-16 14:05:02 +00:00
|
|
|
rm -vrf usr/{cmake,lib/perconaserver/plugin/debug,lib/tmpfiles.d/mysql{,router}.conf}
|
2016-02-24 14:29:44 +00:00
|
|
|
|
|
|
|
# Move documentation
|
|
|
|
if [ -f usr/PATENTS ]; then
|
|
|
|
mv usr/{PATENTS,README.md} usr/share/doc/$pkgname/
|
2020-12-16 14:05:02 +00:00
|
|
|
rm usr/COPYING.*
|
2016-02-24 14:29:44 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# provided by libperconaserverclient
|
|
|
|
rm usr/bin/mysql_config
|
2020-07-25 16:37:34 +00:00
|
|
|
rm usr/lib/libperconaserverclient*
|
2016-02-24 14:29:44 +00:00
|
|
|
rm -r usr/include/
|
2018-06-01 17:50:30 +00:00
|
|
|
rm usr/share/man/man1/mysql_config.1
|
2018-05-05 13:50:46 +00:00
|
|
|
rm -r usr/share/aclocal usr/lib/pkgconfig
|
2016-02-24 14:29:44 +00:00
|
|
|
|
|
|
|
# provided by percona-server-clients
|
2021-07-14 23:46:17 +00:00
|
|
|
rm usr/bin/mysql{,admin,check,dump,import,show,slap,pump,binlog,test,_upgrade,_migrate_keyring}
|
2020-12-16 14:05:02 +00:00
|
|
|
rm usr/lib/perconaserver/plugin/authentication_*_client.so
|
2018-12-31 16:22:21 +00:00
|
|
|
rm usr/share/man/man1/mysql{,admin,check,dump,import,show,slap,pump,binlog,_upgrade}.1
|
2016-02-24 14:29:44 +00:00
|
|
|
|
|
|
|
# not needed
|
2020-12-16 14:05:02 +00:00
|
|
|
rm -r usr/share/mysql-test
|
|
|
|
rm usr/share/doc/percona-server/mysql.info
|
2016-02-24 14:29:44 +00:00
|
|
|
}
|