mariadb: stop calling pthread_detach for detached thread
Also fix cross-compile, xlint, and set license to GPL-2.0-only Close: #21561 Close: #22231 Helped-by: newbluemoon <blaumolch@mailbox.org> Helped-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
This commit is contained in:
parent
39efef811d
commit
08bdc92923
2 changed files with 49 additions and 9 deletions
34
srcpkgs/mariadb/patches/fix-pthread-detach.patch
Normal file
34
srcpkgs/mariadb/patches/fix-pthread-detach.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
From c45b4a774b6d1404a080a1c1759f780fa78f223b Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Vojtovich <svoj@mariadb.org>
|
||||
Date: Fri, 21 Sep 2018 16:04:16 +0400
|
||||
Subject: [PATCH] MDEV-17200 - pthread_detach called for already detached
|
||||
threads
|
||||
|
||||
pthread_detach_this_thread() was intended to be defined to something
|
||||
meaningful only on some ancient unixes, which don't have
|
||||
pthread_attr_setdetachstate() defined. Otherwise, on normal unixes,
|
||||
threads are created detached in the first place.
|
||||
|
||||
This was broken in 0f01bf267680244ec488adaf65a42838756ed48e so that
|
||||
we started calling pthread_detach() for already detached threads.
|
||||
Intention was to detach aria checkpoint thread.
|
||||
|
||||
However in 87007dc2f71634cc460271eb277ad851ec69c04b aria service threads
|
||||
were made joinable with appropriate handling, which makes breaking
|
||||
revision unneccessary.
|
||||
|
||||
Revert remnants of 0f01bf267680244ec488adaf65a42838756ed48e, so that
|
||||
pthread_detach_this_thread() is meaningful only on some ancient unixes
|
||||
again.
|
||||
|
||||
--- include/my_pthread.h
|
||||
+++ include/my_pthread.h
|
||||
@@ -184,7 +184,7 @@ int pthread_cancel(pthread_t thread);
|
||||
#define pthread_key(T,V) pthread_key_t V
|
||||
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
|
||||
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
|
||||
-#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
|
||||
+#define pthread_detach_this_thread()
|
||||
#define pthread_handler_t EXTERNC void *
|
||||
typedef void *(* pthread_handler)(void *);
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'mariadb'
|
||||
pkgname=mariadb
|
||||
version=10.1.30
|
||||
revision=7
|
||||
revision=8
|
||||
build_style=cmake
|
||||
configure_args="-DMYSQL_DATADIR=/var/lib/mysql
|
||||
-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock -DDEFAULT_CHARSET=utf8
|
||||
|
@ -17,22 +17,23 @@ configure_args="-DMYSQL_DATADIR=/var/lib/mysql
|
|||
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
|
||||
-DWITH_EXTRA_CHARSETS=complex -DWITH_LIBWRAP=OFF -DSTACK_DIRECTION=1
|
||||
-DWITHOUT_PBXT_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1"
|
||||
lib32disabled=yes
|
||||
hostmakedepends="perl bison ncurses-devel libressl-devel libatomic-devel"
|
||||
hostmakedepends="perl bison ncurses-devel libressl-devel libatomic-devel
|
||||
pkg-config"
|
||||
makedepends="zlib-devel ncurses-devel libressl-devel readline-devel pcre-devel
|
||||
libatomic-devel"
|
||||
depends="mariadb-client"
|
||||
short_desc="Fast SQL database server, drop-in replacement for MySQL"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
license="GPL-2.0-only"
|
||||
homepage="https://mariadb.org/"
|
||||
distfiles="http://archive.mariadb.org/$pkgname-$version/source/$pkgname-$version.tar.gz"
|
||||
checksum=173a5e5a24819e0a469c3bd09b5c98491676c37c6095882a2ea34c5af0996c88
|
||||
lib32disabled=yes
|
||||
provides="mysql-${version}_${revision}"
|
||||
replaces="mysql>=0"
|
||||
conf_files="/etc/mysql/my.cnf"
|
||||
system_accounts="mysql"
|
||||
mysql_homedir="/var/lib/mysql"
|
||||
short_desc="Fast SQL database server, drop-in replacement for MySQL"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
homepage="https://mariadb.org/"
|
||||
license="GPL-2"
|
||||
distfiles="http://archive.mariadb.org/$pkgname-$version/source/$pkgname-$version.tar.gz"
|
||||
checksum=173a5e5a24819e0a469c3bd09b5c98491676c37c6095882a2ea34c5af0996c88
|
||||
CFLAGS="-w"
|
||||
|
||||
pre_configure() {
|
||||
|
@ -53,10 +54,15 @@ pre_configure() {
|
|||
|
||||
pre_build() {
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
# CMake complains if those binaries ain't in build
|
||||
cp bin.host/comp_err ${wrksrc}/extra
|
||||
cp bin.host/comp_err ${wrksrc}/build/extra
|
||||
cp bin.host/comp_sql ${wrksrc}/scripts
|
||||
cp bin.host/comp_sql ${wrksrc}/build/scripts
|
||||
cp bin.host/gen_lex_hash ${wrksrc}/sql
|
||||
cp bin.host/gen_lex_hash ${wrksrc}/build/sql
|
||||
cp bin.host/gen_lex_token ${wrksrc}/sql
|
||||
cp bin.host/gen_lex_token ${wrksrc}/build/sql
|
||||
export PATH=${PATH}:${wrksrc}/extra:${wrksrc}/scripts:${wrksrc}/sql
|
||||
fi
|
||||
export LD_LIBRARY_PATH=${wrksrc}/build/storage/tokudb/ft-index/portability
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue