diff options
-rw-r--r-- | testing/galera/APKBUILD | 59 | ||||
-rw-r--r-- | testing/galera/musl-page-size.patch | 16 | ||||
-rw-r--r-- | testing/galera/musl-sched_param.patch | 12 | ||||
-rw-r--r-- | testing/galera/musl-sys-poll-h.patch | 11 | ||||
-rw-r--r-- | testing/galera/musl-wordsize.patch | 14 |
5 files changed, 112 insertions, 0 deletions
diff --git a/testing/galera/APKBUILD b/testing/galera/APKBUILD new file mode 100644 index 0000000000..11216a8cf0 --- /dev/null +++ b/testing/galera/APKBUILD @@ -0,0 +1,59 @@ +# Contributor: Jake Buchholz <tomalok@gmail.com> +# Maintainer: Jake Buchholz <tomalok@gmail.com> +pkgname="galera" +pkgver="26.4.3" +pkgrel=0 +_wsrepver=26 +pkgdesc="Galera replication - Codership's implementation of the write set replication (wsrep) interface" +url="https://galeracluster.com" +arch="x86 x86_64" # doesn't work for the others +license="GPL-2.0-or-later" +depends="mariadb" +makedepends="bash boost-dev check-dev cmake python scons openssl-dev" +subpackages="$pkgname-arbitrator $pkgname-arbitrator-doc:arbitrator_doc" +source=" + https://github.com/codership/galera/archive/release_$pkgver.tar.gz + https://github.com/codership/wsrep-API/archive/release_v$_wsrepver.tar.gz + musl-page-size.patch + musl-sched_param.patch + musl-sys-poll-h.patch + musl-wordsize.patch +" +builddir="$srcdir/$pkgname-release_$pkgver" + +build() { + rmdir wsrep/src + cp -a ../wsrep-API-release_v$_wsrepver wsrep/src + RUN_TESTS=0 ./scripts/build.sh +} + +check() { + RUN_TESTS=1 ./scripts/build.sh +} + +package() { + mkdir -p "$pkgdir/usr/lib" + mv libgalera_smm.so "$pkgdir/usr/lib" +} + +arbitrator() { + url="https://galeracluster.com/library/documentation/arbitrator.html" + depends="" + mkdir -p "$subpkgdir/usr/sbin" + mv "$builddir/garb/garbd" "$subpkgdir/usr/sbin" +} + +arbitrator_doc() { + url="https://galeracluster.com/library/documentation/arbitrator.html" + depends="" + mkdir -p "$subpkgdir/usr/share/man/man8" + mv "$builddir/man/garbd.8" "$subpkgdir/usr/share/man/man8" + gzip "$subpkgdir/usr/share/man/man8/garbd.8" +} + +sha512sums="ede600d6b75d2557b220556d0af4fee64a87b3bc4391dc02209c2d461160fdc1ebe692311c94a69d421515253e219a70d3594a060c9b26561c2bfd5b18b61f17 release_26.4.3.tar.gz +37ddc2c071ec22688ad6bce0cd44285aa00e2c07abce783d5ca6ba655e702feca8397e57c47e961f6ad4d2c14932fc38bac87b8995940b7b38fed655f6cd6671 release_v26.tar.gz +196bae14790d6dad46617d107b5ddac6f01694468fb7a049736c6a21c9857b490863eec66be774eeb01300c0dbf4d9871a1b89da6847d92d67473b3aa80dbd3e musl-page-size.patch +de08e34bf52cb39353a72a3608053d9204edcddd24f2f7babe2e5eb753d91bd0ca5909ee07a4d6c7ad54e37fba37ad2866403f1805401dcb68b9958514e17ac2 musl-sched_param.patch +6248970137727c56a4c696bfd88eabaa9dc1dd55c287c4f04051f012470714ca53cb88918cd57027793e2705133237a2e7a608dd01ac36a2ae720448922dd4b4 musl-sys-poll-h.patch +2baf88a6c16360ba1ac2ddf7a87a33f84b3039ca9819d84cfdd96b702da1a6050be1b4ac1f3fe6eff7f539158cdb6369906c4821545b1292d98899ec6e13b249 musl-wordsize.patch" diff --git a/testing/galera/musl-page-size.patch b/testing/galera/musl-page-size.patch new file mode 100644 index 0000000000..a0903e4278 --- /dev/null +++ b/testing/galera/musl-page-size.patch @@ -0,0 +1,16 @@ +--- a/galerautils/src/gu_alloc.cpp ++++ b/galerautils/src/gu_alloc.cpp +@@ -29,10 +29,11 @@ + if (gu_likely(size <= left_)) + { + /* to avoid too frequent allocation, make it (at least) 64K */ +- static page_size_type const PAGE_SIZE(gu_page_size_multiple(1 << 16)); ++ /* was PAGE_SIZE but collided with a define */ ++ static page_size_type const PG_SZ(gu_page_size_multiple(1 << 16)); + + page_size_type const page_size +- (std::min(std::max(size, PAGE_SIZE), left_)); ++ (std::min(std::max(size, PG_SZ), left_)); + + Page* ret = new HeapPage (page_size); + diff --git a/testing/galera/musl-sched_param.patch b/testing/galera/musl-sched_param.patch new file mode 100644 index 0000000000..ef8640aa4b --- /dev/null +++ b/testing/galera/musl-sched_param.patch @@ -0,0 +1,12 @@ +--- a/galerautils/src/gu_thread.cpp ++++ b/galerautils/src/gu_thread.cpp +@@ -87,7 +87,8 @@ + #if defined(__sun__) + struct sched_param spstr = { sp.prio(), { 0, } /* sched_pad array */}; + #else +- struct sched_param spstr = { sp.prio() }; ++ /* musl has some reserved fields in sched_param... */ ++ struct sched_param spstr = { sp.prio(), 0, 0, 0, 0, 0, 0 }; + #endif + int err; + if ((err = pthread_setschedparam(thd, sp.policy(), &spstr)) != 0) diff --git a/testing/galera/musl-sys-poll-h.patch b/testing/galera/musl-sys-poll-h.patch new file mode 100644 index 0000000000..e3189c7ca2 --- /dev/null +++ b/testing/galera/musl-sys-poll-h.patch @@ -0,0 +1,11 @@ +--- a/asio/asio/detail/socket_types.hpp ++++ b/asio/asio/detail/socket_types.hpp +@@ -58,7 +58,7 @@ + #else + # include <sys/ioctl.h> + # if !defined(__SYMBIAN32__) +-# include <sys/poll.h> ++# include <poll.h> /* avoid "redirecting incorrect #include <sys/poll.h> to <poll.h>" warning */ + # endif + # include <sys/types.h> + # include <sys/stat.h> diff --git a/testing/galera/musl-wordsize.patch b/testing/galera/musl-wordsize.patch new file mode 100644 index 0000000000..525f5329b5 --- /dev/null +++ b/testing/galera/musl-wordsize.patch @@ -0,0 +1,14 @@ +--- a/galerautils/src/gu_arch.h ++++ b/galerautils/src/gu_arch.h +@@ -50,8 +50,9 @@ + #elif defined(__APPLE__) || defined(__FreeBSD__) + # include <stdint.h> + # define GU_WORDSIZE __WORDSIZE +-#else +-# include <bits/wordsize.h> ++#else /* use this instead of bits/wordsize.h */ ++# include <stdint.h> ++# include <bits/user.h> + # define GU_WORDSIZE __WORDSIZE + #endif + |