Skip to content

Commit

Permalink
5.7.22-29.26
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowman committed Jul 26, 2018
1 parent 7da2753 commit df3a0de
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 186 deletions.
73 changes: 40 additions & 33 deletions APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Maintainer: Peter Szalatnay <theotherland@gmail.com>
pkgname=percona-xtradb-cluster
_pkgname=Percona-XtraDB-Cluster
pkgver=5.7.17
_pkgver="$pkgver-29.20"
pkgver=5.7.22
_pkgver="$pkgver-29.26"
pkgrel=0
pkgdesc="Percona XtraDB Cluster is an active/active high availability and high scalability open source solution for MySQL clustering"
url="https://www.percona.com/software/mysql-database/percona-xtradb-cluster"
Expand All @@ -18,6 +18,7 @@ install="$pkgname.pre-install"
source="https://github.com/percona/percona-xtradb-cluster/archive/$_pkgname-$_pkgver.tar.gz
fix-posix_timers.patch
my.cnf
my.cnf.old
percona-xtradb-cluster.cnf
mysqld.cnf
mysqld_safe.cnf
Expand All @@ -30,6 +31,8 @@ subpackages="$pkgname-doc $pkgname-dev $pkgname-common $pkgname-client-libs:_cli

builddir="$srcdir/$pkgname-$_pkgname-$_pkgver"

# Notes:
# PXC require boost 1.59 or it will now compile, alpine edge uses boost 1.66 hence using the download flag
build() {
cd "$builddir"

Expand Down Expand Up @@ -72,39 +75,47 @@ build() {
-DDOWNLOAD_BOOST=1 \
-DWITH_BOOST="$builddir"/libboost \
-DWITH_WSREP=ON \
-DWITH_UNIT_TESTS=0 \
-DWITH_READLINE=system \
-DWITHOUT_TOKUDB=ON \
-DWITHOUT_ROCKSDB=ON \
-DWITH_KEYRING_VAULT=0 \
-DCOMPILATION_COMMENT="$COMMENT" \
-DWITH_PAM=OFF \
-DWITH_INNODB_MEMCACHED=ON \
-DWITH_SCALABILITY_METRICS=ON \
|| return 1

make || return 1
make
}

check() {
cd "$builddir"
make test
}

package() {
cd "$builddir"
make DESTDIR="$pkgdir/" install || return 1
make DESTDIR="$pkgdir/" install

install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING || return 1
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING

# PXC ubuntu package include the mysql-common conf, but we do not want to use it as our default conf
install -Dm640 -o mysql "$srcdir"/my.cnf \
"$pkgdir"/etc/mysql/my.cnf || return 1
"$pkgdir"/etc/mysql/my.cnf
install -Dm640 -o mysql "$srcdir"/my.cnf.old \
"$pkgdir"/etc/mysql/my.cnf.old
install -Dm640 -o mysql "$srcdir"/percona-xtradb-cluster.cnf \
"$pkgdir"/etc/mysql/percona-xtradb-cluster.cnf

mkdir -p "$pkgdir"/etc/mysql/conf.d/ || return 1
mkdir -p "$pkgdir"/etc/mysql/conf.d/

install -Dm640 -o mysql "$srcdir"/client.cnf \
"$pkgdir"/etc/mysql/percona-xtradb-cluster.conf.d/client.cnf || return 1
"$pkgdir"/etc/mysql/percona-xtradb-cluster.conf.d/client.cnf
install -Dm640 -o mysql "$srcdir"/mysqld.cnf \
"$pkgdir"/etc/mysql/percona-xtradb-cluster.conf.d/mysqld.cnf || return 1
"$pkgdir"/etc/mysql/percona-xtradb-cluster.conf.d/mysqld.cnf
install -Dm640 -o mysql "$srcdir"/mysqld_safe.cnf \
"$pkgdir"/etc/mysql/percona-xtradb-cluster.conf.d/mysqld_safe.cnf || return 1
"$pkgdir"/etc/mysql/percona-xtradb-cluster.conf.d/mysqld_safe.cnf
install -Dm640 -o mysql "$srcdir"/wsrep.cnf \
"$pkgdir"/etc/mysql/percona-xtradb-cluster.conf.d/wsrep.cnf || return 1
"$pkgdir"/etc/mysql/percona-xtradb-cluster.conf.d/wsrep.cnf

# remove xinetd.d as its not used in alpine
rm -rf "$pkgdir"/usr/xinetd.d
Expand All @@ -127,21 +138,20 @@ common() {
pkgdesc="Percona XtraDB Cluster common files for both server and client"
replaces="mysql-common mariadb-common"
depends=
install -Dm750 -o mysql -d "$subpkgdir"/var/log/mysql || return 1
install -Dm750 -o mysql -d "$subpkgdir"/usr/lib/mysql || return 1
install -Dm750 -o mysql -d "$subpkgdir"/run/mysqld || return 1
install -Dm750 -o mysql -d "$subpkgdir"/var/log/mysql
install -Dm750 -o mysql -d "$subpkgdir"/usr/lib/mysql
install -Dm750 -o mysql -d "$subpkgdir"/run/mysqld
mkdir -p "$subpkgdir"/usr/share/mysql \
"$subpkgdir"/etc \
"$subpkgdir"/usr/lib/mysql/plugin \
|| return 1
mv "$pkgdir"/etc/mysql "$subpkgdir"/etc/ || return 1
"$subpkgdir"/usr/lib/mysql/plugin
mv "$pkgdir"/etc/mysql "$subpkgdir"/etc/
local lang="charsets danish english french greek italian korean norwegian-ny
portuguese russian slovak swedish czech dutch estonian german
hungarian japanese norwegian polish romanian serbian spanish
ukrainian bulgarian"
for l in $lang; do
mv "$pkgdir"/usr/share/mysql/$l \
"$subpkgdir"/usr/share/mysql/ || return 1
"$subpkgdir"/usr/share/mysql/
done
}

Expand All @@ -150,33 +160,30 @@ _client_libs() {
replaces="percona-xtradb-cluster libmysqlclient"
depends="$pkgname-common"
mkdir -p "$subpkgdir"/usr/lib \
"$subpkgdir"/usr/share/mysql \
|| return 1
"$subpkgdir"/usr/share/mysql
mv "$pkgdir"/usr/lib/libperconaserverclient.so* \
"$subpkgdir"/usr/lib/ \
|| return 1
"$subpkgdir"/usr/lib/
}

mytest() {
pkgdesc="The test suite distributed with Percona XtraDB Cluster"
mkdir -p "$subpkgdir"/usr/bin || return 1
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/mysql_client_test \
"$pkgdir"/usr/mysql-test \
"$pkgdir"/usr/bin/my_safe_process \
"$subpkgdir"/usr/bin/ \
|| return 1
"$subpkgdir"/usr/bin/
}

client() {
pkgdesc="client for the Percona XtraDB Cluster database"
depends="$pkgname-common perl-dbi"
replaces="mysql-client mariadb-client"
mkdir -p "$subpkgdir"/usr/bin/ || return 1
mkdir -p "$subpkgdir"/usr/bin/
local bins="myisam_ftdump mysql mysqladmin
mysqlcheck mysqldump mysqldumpslow
mysqlimport mysqlshow mysqlslap mysql_config_editor"
for i in $bins; do
mv "$pkgdir"/usr/bin/${i} "$subpkgdir"/usr/bin/ || return 1
mv "$pkgdir"/usr/bin/${i} "$subpkgdir"/usr/bin/
done
}

Expand All @@ -185,18 +192,18 @@ server() {
depends="$pkgname-common $pkgname-galera percona-xtrabackup socat iproute2
procps findutils coreutils tzdata bash perl-dbd-mysql"
replaces="mariadb"
mkdir -p "$subpkgdir"/usr/lib/mysql/plugin || return 1
mkdir -p "$subpkgdir"/usr/lib/mysql/plugin
mv "$pkgdir"/usr/lib/mysql/plugin/*.so \
"$subpkgdir"/usr/lib/mysql/plugin/ || return 1
"$subpkgdir"/usr/lib/mysql/plugin/
local bins="mysqld clustercheck pyclustercheck innochecksum my_print_defaults
myisamchk myisamlog myisampack mysql_install_db mysql_secure_installation
mysql_tzinfo_to_sql mysql_upgrade mysql_plugin mysqlbinlog mysqld_multi
mysqld_safe mysqltest perror replace resolve_stack_dump resolveip
wsrep_sst_common wsrep_sst_mysqldump wsrep_sst_xtrabackup-v2 wsrep_sst_rsync
mysql_ssl_rsa_setup"
mkdir -p "$subpkgdir"/usr/bin/ || return 1
mkdir -p "$subpkgdir"/usr/bin/
for i in $bins; do
mv "$pkgdir"/usr/bin/${i} "$subpkgdir"/usr/bin/ || return 1
mv "$pkgdir"/usr/bin/${i} "$subpkgdir"/usr/bin/
done
}

18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Percona XtraDB Cluster for Alpine (Experimental)

This is a temporary repo for testing PXC on Alpine. It will be submitted to the Alpine repo when its done.
This is a temporary repo for testing PXC on Alpine.

If you have any issues just report it.

## Install instructions

```
curl -fSL "https://github.com/Flowman/pxc-alpine/releases/download/5.7.17-29.20/percona-xtradb-cluster-common-5.7.17-r0.apk" -o "percona-xtradb-cluster-common-5.7.17-r0.apk"
curl -fSL "https://github.com/Flowman/pxc-alpine/releases/download/5.7.17-29.20/percona-xtradb-cluster-server-5.7.17-r0.apk" -o "percona-xtradb-cluster-server-5.7.17-r0.apk"
curl -fSL "https://github.com/Flowman/pxc-alpine/releases/download/5.7.17-29.20/percona-xtradb-cluster-client-5.7.17-r0.apk" -o "percona-xtradb-cluster-client-5.7.17-r0.apk"
curl -fSL "https://github.com/Flowman/pxc-alpine/releases/download/5.7.17-29.20/percona-xtradb-cluster-galera-5.7.17-r0.apk" -o "percona-xtradb-cluster-galera-5.7.17-r0.apk"
curl -fSL "https://github.com/Flowman/pxc-alpine/releases/download/5.7.22-29.26/percona-xtradb-cluster-common-5.7.22-r0.apk" -o "percona-xtradb-cluster-common-5.7.22-r0.apk"
curl -fSL "https://github.com/Flowman/pxc-alpine/releases/download/5.7.22-29.26/percona-xtradb-cluster-server-5.7.22-r0.apk" -o "percona-xtradb-cluster-server-5.7.22-r0.apk"
curl -fSL "https://github.com/Flowman/pxc-alpine/releases/download/5.7.22-29.26/percona-xtradb-cluster-client-5.7.22-r0.apk" -o "percona-xtradb-cluster-client-5.7.22-r0.apk"
curl -fSL "https://github.com/Flowman/pxc-alpine/releases/download/5.7.22-29.26/percona-xtradb-cluster-galera-5.7.22-r0.apk" -o "percona-xtradb-cluster-galera-5.7.22-r0.apk"
curl -fSL "https://github.com/Flowman/pxc-alpine/releases/download/5.7.16-27.19/percona-xtrabackup-2.4.6-r0.apk" -o "percona-xtrabackup-2.4.6-r0.apk"
apk add --allow-untrusted \
percona-xtradb-cluster-common-5.7.17-r0.apk \
percona-xtradb-cluster-client-5.7.17-r0.apk \
percona-xtradb-cluster-galera-5.7.17-r0.apk \
percona-xtradb-cluster-common-5.7.22-r0.apk \
percona-xtradb-cluster-client-5.7.22-r0.apk \
percona-xtradb-cluster-galera-5.7.22-r0.apk \
percona-xtrabackup-2.4.6-r0.apk \
percona-xtradb-cluster-server-5.7.17-r0.apk
percona-xtradb-cluster-server-5.7.22-r0.apk
```
23 changes: 3 additions & 20 deletions fix-posix_timers.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
On error, -1 is returned, and errno is set to indicate the error.
*/

+struct linux_sigevent {
+struct siginfo_sigevent {
+ union sigval sigev_value;
+ int sigev_signo;
+ int sigev_notify;
Expand All @@ -18,33 +18,16 @@
my_timer_create(my_timer_t *timer)
{
- struct sigevent sigev;
+ struct linux_sigevent sigev;
+ struct siginfo_sigevent sigev;

memset(&sigev, 0, sizeof(sigev));

@@ -200,7 +210,7 @@
sigev.sigev_notify= SIGEV_SIGNAL | SIGEV_THREAD_ID;
sigev.sigev_notify_thread_id= timer_notify_thread_id;

- return timer_create(CLOCK_MONOTONIC, &sigev, &timer->id);
+ return timer_create(CLOCK_MONOTONIC, (struct sigevent *)&sigev, &timer->id);
}
#elif defined(HAVE_SIGEV_PORT)
/**
@@ -311,7 +321,7 @@
int
my_timer_create(my_timer_t *timer)
{
- struct sigevent sigev;
+ struct linux_sigevent sigev;
+ struct siginfo_sigevent sigev;
port_notify_t port_notify;

port_notify.portnfy_port= port_id;
@@ -321,7 +331,7 @@
sigev.sigev_value.sival_ptr= &port_notify;
sigev.sigev_notify= SIGEV_PORT;

- return timer_create(CLOCK_REALTIME, &sigev, &timer->id);
+ return timer_create(CLOCK_MONOTONIC, (struct sigevent *)&sigev, &timer->id);
}
#endif
126 changes: 5 additions & 121 deletions my.cnf
Original file line number Diff line number Diff line change
@@ -1,127 +1,11 @@
#
# The MySQL database server configuration file.
# The Percona XtraDB Cluster 5.7 configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /run/mysqld/mysqld.sock
nice = 0

[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /run/mysqld/mysqld.pid
socket = /run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer = 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
# Please make any edits and changes to the appropriate sectional files
# included below.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/percona-xtradb-cluster.conf.d/
Loading

0 comments on commit df3a0de

Please sign in to comment.