wok-next rev 21039

mariadb 10.3.10
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 09 03:18:57 2018 +0200 (2018-11-09)
parents 21ab7a6eb192
children 0c5cf0a8abaa
files mariadb/receipt mariadb/stuff/mariadb-server.cnf mariadb/stuff/my.cnf
line diff
     1.1 --- a/mariadb/receipt	Thu Nov 08 15:34:32 2018 +0200
     1.2 +++ b/mariadb/receipt	Fri Nov 09 03:18:57 2018 +0200
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt v2.
     1.5  
     1.6  PACKAGE="mariadb"
     1.7 -VERSION="10.2.18"
     1.8 +VERSION="10.3.10"
     1.9  CATEGORY="office"
    1.10  SHORT_DESC="SQL database system"
    1.11  MAINTAINER="devel@slitaz.org"
    1.12 @@ -11,10 +11,17 @@
    1.13  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.14  WGET_URL="https://downloads.mariadb.org/interstitial/mariadb-$VERSION/source/$TARBALL"
    1.15  
    1.16 -BUILD_DEPENDS="cmake ncurses-dev bison openssl-dev"
    1.17  BUILD_DEPENDS="cmake libaio-dev valgrind-dev zlib-dev openssl-dev ncurses-dev \
    1.18 -pcre-dev curl-dev libxml2-dev xz-dev "
    1.19 -SPLIT="libmariadbclient $PACKAGE-client $PACKAGE-dev $PACKAGE-test"
    1.20 +pcre-dev curl-dev libxml2-dev xz-dev boost-dev git"
    1.21 +
    1.22 +SPLIT="\
    1.23 +$PACKAGE-test   $PACKAGE-common $PACKAGE-client       $PACKAGE-bench \
    1.24 +$PACKAGE-backup $PACKAGE-mytop  $PACKAGE-server-utils \
    1.25 +$PACKAGE-dev    $PACKAGE"
    1.26 +
    1.27 +case $ARCH in
    1.28 +	x86_64) SPLIT="$PACKAGE-plugin-rocksdb $SPLIT";;
    1.29 +esac
    1.30  
    1.31  compile_rules() {
    1.32  	case $ARCH in
    1.33 @@ -92,99 +99,76 @@
    1.34  	# print config options to log
    1.35  	cmake -L &&
    1.36  	make &&
    1.37 -	make install
    1.38 +	make install || return 1
    1.39 +
    1.40 +	install -Dm600 $stuff/my.cnf $install/etc/my.cnf
    1.41 +	install -Dm600 $stuff/mariadb-server.cnf $install/etc/my.cnf.d/mariadb-server.cnf
    1.42 +
    1.43 +	mv $install/usr/sql-bench $install/usr/share
    1.44 +
    1.45 +	install -Dm755 $stuff/etc/init.d/mysql $install/etc/init.d/mysql
    1.46  }
    1.47  
    1.48  genpkg_rules() {
    1.49  	case $PACKAGE in
    1.50 +		*-plugin-rocksdb)
    1.51 +			copy ha_rocksdb.so
    1.52 +			CAT="RocksDB (MyRocks) plugin"
    1.53 +			;;
    1.54 +		*-test)
    1.55 +			# missing bin/my_safe_process
    1.56 +			copy bin/mysql_client_test bin/my_safe_process \
    1.57 +			bin/mysqltest bin/mysqltest_embedded mysql-test/
    1.58 +			CAT="development|test suite"
    1.59 +			DEPENDS=""
    1.60 +			;;
    1.61 +		*-common)
    1.62 +			copy charsets/ errmsg.sys
    1.63 +			CAT="office|common files for both server and client"
    1.64 +			DEPENDS=" "
    1.65 +			;;
    1.66 +		*-client)
    1.67 +			copy bin/myisam_ftdump bin/mysql bin/mysql_find_rows \
    1.68 +			bin/mysql_fix_extensions bin/mysql_waitpid bin/mysqlaccess \
    1.69 +			bin/mysqladmin bin/mysqlcheck bin/mysqldump bin/mysqldumpslow \
    1.70 +			bin/mysqlimport bin/mysqlshow
    1.71 +			DEPENDS="mariadb-common"
    1.72 +			CAT="office|client"
    1.73 +			;;
    1.74 +		*-bench)
    1.75 +			copy sql-bench/
    1.76 +			DEPENDS=""
    1.77 +			CAT="office|benchmark scripts and data"
    1.78 +			;;
    1.79 +		*-backup)
    1.80 +			copy bin/mariabackup bin/mbstream
    1.81 +			CAT="office|mariabackup tool for physical online backups"
    1.82 +			DEPENDS=" "
    1.83 +			;;
    1.84 +		*-mytop)
    1.85 +			copy bin/mytop
    1.86 +			DEPENDS="perl perl-dbi perl-dbd-mysql perl-getopt-long perl-socket \
    1.87 +			perl-term-readkey"
    1.88 +			;;
    1.89 +		*-server-utils)
    1.90 +			copy bin/mysql_convert_table_format bin/mysql_setpermission \
    1.91 +			bin/mysqld_multi bin/mysqlhotcopy bin/mysql_upgrade bin/perror \
    1.92 +			bin/mysqld_safe_helper
    1.93 +			CAT="office|non-essential server utilities"
    1.94 +			DEPENDS=""
    1.95 +			;;
    1.96 +		*-dev)
    1.97 +			copy @dev @rm
    1.98 +			CAT="office|CLI tool for monitoring MariaDB performance"
    1.99 +			DEPENDS=""
   1.100 +			;;
   1.101  		mariadb)
   1.102 -			CONFIG_FILES="/etc/mysql"
   1.103 +			copy @std @rm
   1.104  			TAZPANEL_DAEMON="man|edit::/etc/mysql/my.cnf|options|web::$WEB_SITE"
   1.105  			PROVIDE="mysql"
   1.106 -			CONFIG_FILES="/etc/mysql/my.cnf"
   1.107 +			CONFIG_FILES="/etc/my.cnf"
   1.108  			DATABASE_FILES="/var/lib/mysql"
   1.109 -			DEPENDS="busybox libmariadbclient mariadb-client zlib \
   1.110 -			slitaz-base-files gcc-lib-base"
   1.111 -			mkdir -p \
   1.112 -				$fs/usr/share \
   1.113 -				$fs/usr/lib/mysql/plugin \
   1.114 -				$fs/etc/mysql \
   1.115 -				$fs/etc/mysql.d \
   1.116 -				$fs/var/lib/mysql
   1.117 -
   1.118 -			cp -a $install/usr/bin $fs/usr
   1.119 -			cp -a $install/usr/scripts/* $fs/usr/bin
   1.120 -			cp -a $install/usr/lib/mysql/plugin/*.so* $fs/usr/lib/mysql/plugin
   1.121 -			cp -a $install/usr/share/mysql $fs/usr/share
   1.122 -
   1.123 -			# Configuration file
   1.124 -			cp -a $stuff/etc/init.d $fs/etc
   1.125 -			cp -a $src/support-files/my-medium.cnf $fs/etc/mysql/my.cnf
   1.126 -			cp -a $src/support-files/my-small.cnf $fs/etc/mysql
   1.127 -			grep -q "bind-address" $fs/etc/mysql/my.cnf || sed -i \
   1.128 -				's/^\[mysqld\]/[mysqld]\nbind-address\t= 127.0.0.1/' \
   1.129 -				$fs/etc/mysql/my.cnf
   1.130 -
   1.131 -			# Permissions
   1.132 -			chmod 600 $fs/etc/mysql/my.cnf
   1.133 -
   1.134 -			cat $stuff/*.files-list | while read file; do
   1.135 -				[ -f $fs$file ] && rm -f $fs$file
   1.136 -			done
   1.137 -			;;
   1.138 -		libmariadbclient)
   1.139 -			CAT="misc|client libraries"
   1.140 -			PROVIDE="libmysqlclient"
   1.141 -			DEPENDS="zlib openssl"
   1.142 -			mkdir -p $fs/usr/lib/mysql
   1.143 -			cp -a $install/usr/lib/mysql/libmysqlclient*so* $fs/usr/lib/mysql
   1.144 -			cd $fs/usr/lib
   1.145 -			ln -s mysql/libmysqlclient.so .
   1.146 -			ln -s mysql/libmysqlclient.so.18 .
   1.147 -			ln -s mysql/libmysqlclient.so.18.0.0 .
   1.148 -			ln -s mysql/libmysqlclient_r.so .
   1.149 -			ln -s mysql/libmysqlclient_r.so.18 .
   1.150 -			ln -s mysql/libmysqlclient_r.so.18.0.0 .
   1.151 -			;;
   1.152 -		mariadb-client)
   1.153 -			CAT="office|client files"
   1.154 -			PROVIDE="mysql_or_postgresql mysql-client"
   1.155 -			DEPENDS="libmariadbclient zlib ncurses gcc-lib-base ncurses"
   1.156 -			while read file; do
   1.157 -				dir=$(dirname $file)
   1.158 -				[ -d $fs$dir ] || mkdir -p $fs$dir
   1.159 -				cp -a $install$file $fs$file
   1.160 -			done < $wanted_stuff/$PACKAGE.files-list
   1.161 -			;;
   1.162 -		mariadb-dev)
   1.163 -			PROVIDE="mysql-dev"
   1.164 -			DEPENDS="zlib"
   1.165 -			mkdir -p $fs/usr/lib/mysql/plugin $fs/usr/share
   1.166 -			cp -a $install/usr/include $fs/usr
   1.167 -			cp -a $install/usr/share/aclocal $fs/usr/share
   1.168 -			cp -a $install/usr/lib/mysql/*.*a $fs/usr/lib/mysql
   1.169 -			#~ cp -a $install/usr/lib/mysql/plugin/*.*a $fs/usr/lib/mysql/plugin
   1.170 -			while read file; do
   1.171 -				dir=$(dirname $file)
   1.172 -				[ -d $fs$dir ] || mkdir -p $fs$dir
   1.173 -				cp -a $install$file $fs$file
   1.174 -			done < $wanted_stuff/$PACKAGE.files-list
   1.175 -			;;
   1.176 -		mariadb-test)
   1.177 -			CAT="misc|tests and benchs"
   1.178 -			DEPENDS="mariadb perl openssl"
   1.179 -			mkdir -p $fs/usr/share
   1.180 -			cp -a $install/usr/mysql-test $fs/usr
   1.181 -			cp -a $install/usr/sql-bench $fs/usr
   1.182 -			find $fs/usr/mysql-test $fs/usr/sql-bench -type d -exec chmod 2777 {} \;
   1.183 -			while read file; do
   1.184 -				dir=$(dirname $file)
   1.185 -				[ -d $fs$dir ] || mkdir -p $fs$dir
   1.186 -				cp -a $install$file $fs$file
   1.187 -			done < $wanted_stuff/$PACKAGE.files-list
   1.188 -			mv $fs/usr/mysql-test $fs/usr/share/mysql-test
   1.189 -			mv $fs/usr/sql-bench $fs/usr/share/sql-bench
   1.190 -			;;
   1.191 +			DEPENDS="mariadb-common zlib slitaz-base-files"
   1.192  	esac
   1.193  }
   1.194  
   1.195 @@ -212,13 +196,6 @@
   1.196  EOF
   1.197  }
   1.198  
   1.199 -pre_install_mariadb() {
   1.200 -	# Cleanup old files
   1.201 -	rm -f "$1/usr/libexec/mysql"*
   1.202 -	# Mv config
   1.203 -	[ -f "$1/etc/my.cnf" ] && mv -f "$1/etc/my.cnf" "$1/etc/mysql/my.cnf"
   1.204 +post_remove_mariadb() {
   1.205 +	chroot "$1/" deluser mysql
   1.206  }
   1.207 -
   1.208 -post_remove_mariadb() {
   1.209 -	deluser mysql
   1.210 -}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/mariadb/stuff/mariadb-server.cnf	Fri Nov 09 03:18:57 2018 +0200
     2.3 @@ -0,0 +1,42 @@
     2.4 +#
     2.5 +# These groups are read by MariaDB server.
     2.6 +# Use it for options that only the server (but not clients) should see
     2.7 +
     2.8 +# this is read by the standalone daemon and embedded servers
     2.9 +[server]
    2.10 +
    2.11 +# this is only for the mysqld standalone daemon
    2.12 +[mysqld]
    2.13 +skip-networking
    2.14 +
    2.15 +# Galera-related settings
    2.16 +[galera]
    2.17 +# Mandatory settings
    2.18 +#wsrep_on=ON
    2.19 +#wsrep_provider=
    2.20 +#wsrep_cluster_address=
    2.21 +#binlog_format=row
    2.22 +#default_storage_engine=InnoDB
    2.23 +#innodb_autoinc_lock_mode=2
    2.24 +#
    2.25 +# Allow server to accept connections on all interfaces.
    2.26 +#
    2.27 +#bind-address=0.0.0.0
    2.28 +#
    2.29 +# Optional setting
    2.30 +#wsrep_slave_threads=1
    2.31 +#innodb_flush_log_at_trx_commit=0
    2.32 +
    2.33 +# this is only for embedded server
    2.34 +[embedded]
    2.35 +
    2.36 +# This group is only read by MariaDB servers, not by MySQL.
    2.37 +# If you use the same .cnf file for MySQL and MariaDB,
    2.38 +# you can put MariaDB-only options here
    2.39 +[mariadb]
    2.40 +
    2.41 +# This group is only read by MariaDB-10.3 servers.
    2.42 +# If you use the same .cnf file for MariaDB of different versions,
    2.43 +# use this group for options that older servers don't understand
    2.44 +[mariadb-10.3]
    2.45 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/mariadb/stuff/my.cnf	Fri Nov 09 03:18:57 2018 +0200
     3.3 @@ -0,0 +1,12 @@
     3.4 +# This group is read both both by the client and the server
     3.5 +# use it for options that affect everything
     3.6 +[client-server]
     3.7 +
     3.8 +# This group is read by the server
     3.9 +[mysqld]
    3.10 +
    3.11 +# Disabling symbolic-links is recommended to prevent assorted security risks
    3.12 +symbolic-links=0
    3.13 +
    3.14 +# include all files from the config directory
    3.15 +!includedir /etc/my.cnf.d