forked from pool/mariadb
Accepting request 298318 from server:database
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/298318 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mariadb?expand=0&rev=47
This commit is contained in:
commit
f07f17df18
20
README.debug
20
README.debug
@ -1,7 +1,7 @@
|
|||||||
Debugging mysqld crashes
|
Debugging mysqld crashes
|
||||||
========================
|
========================
|
||||||
Author: Michal Marek <mmarek@suse.cz>
|
Author: Michal Marek <mmarek@suse.cz>
|
||||||
Last modified: 2006-07-31
|
Last modified: 2014-11-21
|
||||||
|
|
||||||
Contents
|
Contents
|
||||||
--------
|
--------
|
||||||
@ -67,22 +67,16 @@ packages and run
|
|||||||
gdb /usr/sbin/mysqld /var/lib/mysql/core
|
gdb /usr/sbin/mysqld /var/lib/mysql/core
|
||||||
(gdb) bt
|
(gdb) bt
|
||||||
|
|
||||||
Replace mysqld with the mysqld version you used (mysqld, mysqld-max or
|
Replace mysqld with the mysqld version you used (mysqld, mysqld-max)
|
||||||
mysqld-debug) and core with the actual name of the coredump.
|
and core with the actual name of the coredump.
|
||||||
|
|
||||||
3) Trace files
|
3) Trace files
|
||||||
--------------
|
--------------
|
||||||
You'll need the mysqld-debug binary from the mysql-debug package to get
|
Start mysqld using following command:
|
||||||
a trace file. Install the mysqld-debug package and the start mysqld
|
|
||||||
using following command:
|
|
||||||
|
|
||||||
$ MYSQLD_DEBUG=yes rcmysql start
|
$ MYSQLD_DEBUG=yes rcmysql start
|
||||||
|
|
||||||
Note: The init script doesn't automatically pick up the mysqld-debug
|
The init script will then start mysqld and add the --core-file,
|
||||||
binary (as it does with mysqld-max), because it is expected to be used
|
|
||||||
just temporarily to help solving a particular problem.
|
|
||||||
|
|
||||||
The init script will then start mysqld-debug and add the --core-file,
|
|
||||||
--log and --debug options for you. The query log will be stored in
|
--log and --debug options for you. The query log will be stored in
|
||||||
|
|
||||||
/var/lib/mysql/myqld-query.log
|
/var/lib/mysql/myqld-query.log
|
||||||
@ -92,9 +86,7 @@ and the trace file in
|
|||||||
/var/lib/mysql/mysqld.trace
|
/var/lib/mysql/mysqld.trace
|
||||||
|
|
||||||
If you don't like the options set by the init script, just put your own
|
If you don't like the options set by the init script, just put your own
|
||||||
into /etc/my.cnf and the init script will honor it. For information
|
into /etc/my.cnf and the init script will honor them.
|
||||||
about the --debug option, see "The DBUG Package":
|
|
||||||
http://dev.mysql.com/doc/refman/5.0/en/the-dbug-package.html .
|
|
||||||
|
|
||||||
The trace file will contain various debug information and function
|
The trace file will contain various debug information and function
|
||||||
calls/returns and will become _extremly_ huge after a while, so don't
|
calls/returns and will become _extremly_ huge after a while, so don't
|
||||||
|
@ -15,6 +15,6 @@ Alternatively you can run:
|
|||||||
'/usr/bin/mysql_secure_installation'
|
'/usr/bin/mysql_secure_installation'
|
||||||
|
|
||||||
which will also give you the option of removing the test
|
which will also give you the option of removing the test
|
||||||
databases and anonymous user created by default. This is
|
databases and anonymous user created by default. This is
|
||||||
strongly recommended for production servers.
|
strongly recommended for production servers.
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<constraints>
|
<constraints>
|
||||||
<hardware>
|
<hardware>
|
||||||
<disk>
|
<disk>
|
||||||
<size unit="G">9</size>
|
<size unit="G">13</size>
|
||||||
</disk>
|
</disk>
|
||||||
</hardware>
|
</hardware>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
171
build.inc
171
build.inc
@ -1,130 +1,49 @@
|
|||||||
%if 0%{?suse_version} < 1120 && 0%{?suse_version} > 0
|
EXTRA_FLAGS="-Wno-unused-but-set-variable -fno-strict-aliasing -Wno-unused-parameter"
|
||||||
%define socketpath /var/lib/mysql
|
# Mariadb devs seems to fall in love with -Werror option
|
||||||
%else
|
EXTRA_FLAGS="${EXTRA_FLAGS} -Wno-error"
|
||||||
%define socketpath /var/run/mysql
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} > 1140
|
|
||||||
export EXTRA_FLAGS=" -Wno-unused-but-set-variable -fno-strict-aliasing -Wno-unused-parameter "
|
|
||||||
%endif
|
|
||||||
%ifarch ppc64
|
%ifarch ppc64
|
||||||
export EXTRA_FLAGS=" -mminimal-toc "
|
EXTRA_FLAGS="${EXTRA_FLAGS} -mminimal-toc"
|
||||||
%endif
|
%endif
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -DOPENSSL_LOAD_CONF -DPIC -fPIC -DFORCE_INIT_OF_VARS $EXTRA_FLAGS "
|
export CFLAGS="%{optflags} -DOPENSSL_LOAD_CONF -DPIC -fPIC -DFORCE_INIT_OF_VARS $EXTRA_FLAGS"
|
||||||
export CXXFLAGS="$CFLAGS"
|
export CXXFLAGS="$CFLAGS -felide-constructors"
|
||||||
|
%cmake -DWITH_SSL=system \
|
||||||
%if 0%{use_cmake} < 1
|
-DWITH_ZLIB=system \
|
||||||
autoreconf -f -i
|
-DWITH_LIBEVENT=system \
|
||||||
# Make the compile a function, since we do multiple builds
|
-DWITH_JEMALLOC=auto \
|
||||||
BuildMySQL() {
|
-DWITH_READLINE=0 \
|
||||||
# The --enable-assembler simply does nothing on systems that do not
|
-DWITH_LIBEDIT=0 \
|
||||||
# support assembler speedups.
|
-DINSTALL_LAYOUT=RPM \
|
||||||
suffix="$1"; shift
|
-DMYSQL_UNIX_ADDR="%{_localstatedir}/run/mysql/mysql.sock" \
|
||||||
mkdir _build$suffix
|
-DINSTALL_UNIX_ADDRDIR="%{_localstatedir}/run/mysql/mysql.sock" \
|
||||||
pushd _build$suffix
|
-DINSTALL_MYSQLSHAREDIR=share/%{name} \
|
||||||
../configure \
|
-DWITH_COMMENT="openSUSE MySQL rpm" \
|
||||||
--enable-assembler \
|
-DWITH_EXTRA_CHARSET=all \
|
||||||
--with-readline \
|
-DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci \
|
||||||
--infodir=%{_infodir} \
|
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
|
||||||
--libdir=%{_libdir} \
|
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
|
||||||
--libexecdir=/usr/sbin \
|
%if 0%{with_oqgraph} > 0
|
||||||
--localstatedir=/var/lib/mysql \
|
-DWITH_OQGRAPH_STORAGE_ENGINE=1 \
|
||||||
--mandir=%{_mandir} \
|
|
||||||
--prefix=%{_prefix} \
|
|
||||||
--sysconfdir=/etc \
|
|
||||||
--with-mysqld-user=mysql \
|
|
||||||
--with-mysqld-group=mysql \
|
|
||||||
--without-debug \
|
|
||||||
--datadir=/usr/share \
|
|
||||||
--includedir=/usr/include \
|
|
||||||
--with-charset=utf8 \
|
|
||||||
--with-collation=utf8_unicode_ci \
|
|
||||||
--with-extra-charsets=all \
|
|
||||||
--with-unix-socket-path=%{socketpath}/mysql.sock \
|
|
||||||
--enable-thread-safe-client \
|
|
||||||
--with-comment="SUSE MySQL RPM" \
|
|
||||||
--with-libwrap \
|
|
||||||
--with-server-suffix=$suffix \
|
|
||||||
%ifarch s390 s390x
|
|
||||||
--with-atomic-ops=rwlocks \
|
|
||||||
%else
|
|
||||||
--with-atomic-ops=smp \
|
|
||||||
%endif
|
%endif
|
||||||
--with-ssl=/usr \
|
%if 0%{with_cassandra} > 0
|
||||||
--with-plugins=%{builtin_plugins} \
|
-DWITH_CASSANDRA_STORAGE_ENGINE=1 \
|
||||||
--without-plugin-handlersocket \
|
|
||||||
HOSTNAME="/bin/hostname -f" \
|
|
||||||
"$@"
|
|
||||||
# Add this for MyISAM RAID support:
|
|
||||||
# --with-raid
|
|
||||||
# benchdir does not fit in above model. Fix when we make a separate package
|
|
||||||
make %{?jobs:-j%jobs}
|
|
||||||
nm --numeric-sort sql/mysqld > sql/mysqld.sym
|
|
||||||
# needed for make check, which is not VPATH aware
|
|
||||||
# copy the files unconditionally so that manual 'make check' after
|
|
||||||
# the build works, too
|
|
||||||
cp -a ../mysql-test/* mysql-test/
|
|
||||||
for i in ../sql/share/{english,charsets}; do
|
|
||||||
[ -d $i ] && cp -a $i sql/share/
|
|
||||||
done
|
|
||||||
cp -a ../scripts/*.sql scripts/
|
|
||||||
%if %{?_with_testsuite:1}0
|
|
||||||
pushd mysql-test; perl ./mysql-test-run.pl --force; popd
|
|
||||||
%endif
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
# Build the client, extra tools, libraries
|
|
||||||
%if 0%{?preferred} > 0
|
|
||||||
BuildMySQL "" --with-embedded-server
|
|
||||||
%else
|
|
||||||
BuildMySQL "" --without-embedded-server
|
|
||||||
%endif
|
|
||||||
# build mysqld-debug
|
|
||||||
BuildMySQL "-debug" --with-debug --without-embedded-server
|
|
||||||
|
|
||||||
%if 0%{?preferred} > 0
|
|
||||||
mkdir -p _buildlibmysqld/tmp
|
|
||||||
cd _buildlibmysqld/tmp
|
|
||||||
ar -x ../../_build/libmysqld/libmysqld.a
|
|
||||||
gcc $CFLAGS $LDFLAGS -shared -Wl,-soname,libmysqld.so.0 -o ../libmysqld.so.0.0.1 \
|
|
||||||
*.o \
|
|
||||||
-lpthread -lcrypt -lnsl -lssl -lcrypto -lz -lrt -lstdc++ -lm -lc
|
|
||||||
cd ..
|
|
||||||
rm -rf tmp
|
|
||||||
cd ..
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%else # cmake build
|
|
||||||
|
|
||||||
BuildMySQL() {
|
|
||||||
mkdir _build$1
|
|
||||||
pushd _build$1
|
|
||||||
shift
|
|
||||||
cmake -DWITH_SSL=system \
|
|
||||||
-DWITH_ZLIB=system \
|
|
||||||
-DWITH_LIBEVENT=system \
|
|
||||||
-DWITH_JEMALLOC=no \
|
|
||||||
-DWITH_READLINE=0 \
|
|
||||||
-DWITH_LIBEDIT=0 \
|
|
||||||
-DINSTALL_LAYOUT=RPM \
|
|
||||||
-DMYSQL_UNIX_ADDR=%{socketpath}/mysql.sock \
|
|
||||||
-DINSTALL_MYSQLSHAREDIR=share/%{name} \
|
|
||||||
-DWITH_COMMENT="openSUSE MySQL rpm" \
|
|
||||||
-DWITH_EXTRA_CHARSET=all \
|
|
||||||
-DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci \
|
|
||||||
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
|
|
||||||
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
|
|
||||||
-DWITH_EMBEDDED_SERVER=true \
|
|
||||||
-DCOMPILATION_COMMENT="openSUSE package" \
|
|
||||||
-DDENABLE_DOWNLOADS=false \
|
|
||||||
-DINSTALL_PLUGINDIR_RPM="%{_lib}/mysql/plugin" \
|
|
||||||
-DINSTALL_LIBDIR_RPM="%{_lib}" \
|
|
||||||
-Wno-dev "$@" ..
|
|
||||||
make %{?jobs:-j%jobs}
|
|
||||||
nm --numeric-sort sql/mysqld > sql/mysqld.sym
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
BuildMySQL "" -DCMAKE_BUILD_TYPE=Release -DINSTALL_SQLBENCHDIR=share
|
|
||||||
# TokuDB can't be compiled without optimisations turned on
|
|
||||||
BuildMySQL "-debug" -DCMAKE_BUILD_TYPE=Debug -DWITHOUT_TOKUDB=1
|
|
||||||
%endif
|
%endif
|
||||||
|
-DWITH_XTRADB_STORAGE_ENGINE=1 \
|
||||||
|
-DWITH_CSV_STORAGE_ENGINE=1 \
|
||||||
|
-DWITH_HANDLERSOCKET_STORAGE_ENGINE=1 \
|
||||||
|
-DWITH_EMBEDDED_SERVER=true \
|
||||||
|
-DCOMPILATION_COMMENT="openSUSE package" \
|
||||||
|
-DDENABLE_DOWNLOADS=false \
|
||||||
|
-DINSTALL_PLUGINDIR_RPM="%{_lib}/mysql/plugin" \
|
||||||
|
-DINSTALL_LIBDIR_RPM="%{_lib}" \
|
||||||
|
-DINSTALL_SYSCONF2DIR="%{_sysconfdir}/my.cnf.d" \
|
||||||
|
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$CFLAGS" \
|
||||||
|
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$CXXFLAGS" \
|
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DINSTALL_SQLBENCHDIR=share \
|
||||||
|
-DCMAKE_C_FLAGS="$CFLAGS" \
|
||||||
|
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
|
||||||
|
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \
|
||||||
|
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \
|
||||||
|
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \
|
||||||
|
-Wno-dev "$@" ..
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
nm --numeric-sort sql/mysqld > sql/mysqld.sym
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:861f2e1c5a96eb4a1b63268c9a5b33791178554385401955c15d99dcae8cd0c2
|
oid sha256:2c96c09b6dff46a9d93d48ae6e5fdbf83469abbafd1191f2eef92f452b17ac4f
|
||||||
size 218
|
size 218
|
||||||
|
56
install.inc
56
install.inc
@ -1,11 +1,5 @@
|
|||||||
# install the debug server first, so that we don't overwrite the standard
|
%cmake_install benchdir_root=/usr/share/
|
||||||
mkdir -p %buildroot%_libdir/mysql
|
install -m 644 build/sql/mysqld.sym %buildroot%_libdir/mysql/mysqld.sym
|
||||||
make -C _build-debug/sql install DESTDIR=%buildroot
|
|
||||||
mv %buildroot/usr/sbin/mysqld %buildroot/usr/sbin/mysqld-debug
|
|
||||||
install -m 644 _build-debug/sql/mysqld.sym %buildroot%_libdir/mysql/mysqld-debug.sym
|
|
||||||
# install the client, extra tools, libraries and the standard server
|
|
||||||
make -C _build install DESTDIR=%buildroot benchdir_root=/usr/share/
|
|
||||||
install -m 644 _build/sql/mysqld.sym %buildroot%_libdir/mysql/mysqld.sym
|
|
||||||
# remove handler socket client
|
# remove handler socket client
|
||||||
rm -f %buildroot%_libdir/libhsclient*
|
rm -f %buildroot%_libdir/libhsclient*
|
||||||
rm -f %buildroot%_bindir/hsclient*
|
rm -f %buildroot%_bindir/hsclient*
|
||||||
@ -17,6 +11,7 @@ rm -f %buildroot%_libdir/*.a
|
|||||||
[ \! -f "%buildroot%_libdir/"libmysqld.static ] || mv "%buildroot%_libdir/"libmysqld.static "%buildroot%_libdir/"libmysqld.a
|
[ \! -f "%buildroot%_libdir/"libmysqld.static ] || mv "%buildroot%_libdir/"libmysqld.static "%buildroot%_libdir/"libmysqld.a
|
||||||
rm -f %buildroot%_libdir/mysql/{,plugin}/*.{a,la}
|
rm -f %buildroot%_libdir/mysql/{,plugin}/*.{a,la}
|
||||||
rm -f %buildroot%_libdir/mysql/libndbclient.*
|
rm -f %buildroot%_libdir/mysql/libndbclient.*
|
||||||
|
rm -f %buildroot%_libdir/mysql/plugin/debug_key_management.so
|
||||||
rm -f %{buildroot}/usr/share/mysql-test/{mysql-test-run,mtr}
|
rm -f %{buildroot}/usr/share/mysql-test/{mysql-test-run,mtr}
|
||||||
rm -f %{buildroot}/usr/share/mysql/{binary-configure,errmsg-utf8.txt,magic,mysql-log-rotate,mysql*.server}
|
rm -f %{buildroot}/usr/share/mysql/{binary-configure,errmsg-utf8.txt,magic,mysql-log-rotate,mysql*.server}
|
||||||
rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini
|
rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini
|
||||||
@ -35,20 +30,26 @@ filelist()
|
|||||||
if test -e usr/bin/"$i"; then
|
if test -e usr/bin/"$i"; then
|
||||||
echo /usr/bin/"$i"
|
echo /usr/bin/"$i"
|
||||||
fi
|
fi
|
||||||
|
if test -d usr/share/*/"$i"; then
|
||||||
|
echo "/`echo usr/share/*/"$i"`"
|
||||||
|
fi
|
||||||
|
if test -n "`ls -1 %buildroot$i 2> /dev/null`"; then
|
||||||
|
echo "$i"
|
||||||
|
fi
|
||||||
if ls usr/share/man/*/"$i".[1-9]* >/dev/null 2>&1; then
|
if ls usr/share/man/*/"$i".[1-9]* >/dev/null 2>&1; then
|
||||||
echo "%%doc %_mandir/*/$i.[1-9]*"
|
echo "%%doc %_mandir/*/$i.[1-9]*"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
}
|
}
|
||||||
filelist innochecksum my_print_defaults myisam_ftdump myisamchk myisamlog myisampack mysql_fix_extensions mysql_fix_privilege_tables mysql_install_db mysql_secure_installation mysql_upgrade mysqlbug mysqld mysqld_multi mysqld_safe mysqlbinlog mysqldumpslow mysqlmanager resolve_stack_dump resolveip {m,}aria_chk {m,}aria_dump_log {m,}aria_ftdump {m,}aria_pack {m,}aria_read_log xtstat tokuftdump >mysql.files
|
filelist innochecksum my_print_defaults myisam_ftdump myisamchk myisamlog myisampack mysql_fix_extensions mysql_fix_privilege_tables mysql_install_db mysql_secure_installation mysql_upgrade mysqlbug mysqld mysqld_multi mysqld_safe mysqlbinlog mysqldumpslow mysqlmanager mroonga resolve_stack_dump resolveip {m,}aria_chk {m,}aria_dump_log {m,}aria_ftdump {m,}aria_pack {m,}aria_read_log xtstat tokuftdump >mysql.files
|
||||||
filelist mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysql_config_editor >mysql-client.files
|
filelist mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysql_config_editor >mysql-client.files
|
||||||
filelist mysql_config >libmysqlclient-devel.files
|
filelist mysql_config /usr/share/pkgconfig/mariadb.pc >libmysqlclient-devel.files
|
||||||
filelist mysqlslap >mysql-bench.files
|
filelist mysqlslap >mysql-bench.files
|
||||||
filelist mysql_client_test mysql_client_test_embedded mysql_waitpid mysqltest mysqltest_embedded >mysql-test.files
|
filelist mysql_client_test mysql_client_test_embedded mysql_waitpid mysqltest mysqltest_embedded >mysql-test.files
|
||||||
# all binaries that don't need to be in a "default" install (mysql.rpm +
|
# all binaries that don't need to be in a "default" install (mysql.rpm +
|
||||||
# mysql-client.rpm)
|
# mysql-client.rpm)
|
||||||
filelist msql2mysql mysql_plugin mysql_convert_table_format mysql_find_rows mysql_setpermission mysql_tzinfo_to_sql mysql_zap mysqlaccess mysqlhotcopy perror replace mysql_embedded %{name}_mytop hsclient >mysql-tools.files
|
filelist msql2mysql mysql_plugin mysql_convert_table_format mysql_find_rows mysql_setpermission mysql_tzinfo_to_sql mysql_zap mysqlaccess mysqlhotcopy perror replace mysql_embedded %{name}_mytop hsclient %{_bindir}/wsrep* /usr/share/mysql/wsrep_notify >mysql-tools.files
|
||||||
filelist ndbd ndbmtd ndbd_redo_log_reader >mysql-ndb-storage.files
|
filelist ndbd ndbmtd ndbd_redo_log_reader >mysql-ndb-storage.files
|
||||||
filelist ndb_mgmd >mysql-ndb-management.files
|
filelist ndb_mgmd >mysql-ndb-management.files
|
||||||
filelist ndb_{config,desc,error_reporter,mgm,print_backup_file,print_schema_file,print_sys_file,restore,select_all,select_count,show_tables,size.pl,test_platform,waiter} >mysql-ndb-tools.files
|
filelist ndb_{config,desc,error_reporter,mgm,print_backup_file,print_schema_file,print_sys_file,restore,select_all,select_count,show_tables,size.pl,test_platform,waiter} >mysql-ndb-tools.files
|
||||||
@ -71,35 +72,22 @@ errmsg_list()
|
|||||||
errmsg_list > errormessages.files
|
errmsg_list > errormessages.files
|
||||||
### files not installed by make install
|
### files not installed by make install
|
||||||
# Create directory structure
|
# Create directory structure
|
||||||
DOCS=(COPYING README EXCEPTIONS-CLIENT %_sourcedir/README.debug %_sourcedir/README.SuSE plugin/daemon_example/daemon_example.ini)
|
DOCS=(COPYING README EXCEPTIONS-CLIENT %_sourcedir/README.debug %_sourcedir/README.SUSE plugin/daemon_example/daemon_example.ini)
|
||||||
DOCDIR=%buildroot%_defaultdocdir/%name
|
DOCDIR=%buildroot%_defaultdocdir/%name
|
||||||
install -d -m 755 ${DOCDIR}
|
install -d -m 755 ${DOCDIR}
|
||||||
install -d -m 755 %buildroot/etc/logrotate.d
|
install -d -m 755 %buildroot/etc/logrotate.d
|
||||||
install -m 644 _build/support-files/mysql-log-rotate %buildroot/etc/logrotate.d/mysql
|
install -m 644 build/support-files/mysql-log-rotate %buildroot/etc/logrotate.d/mysql
|
||||||
%if 0%{?preferred} > 0%{?use_cmake}
|
|
||||||
install -m 644 _buildlibmysqld/*.so* %buildroot%_libdir
|
|
||||||
ln -s libmysqld.so.0.0.1 %buildroot%_libdir/libmysqld.so.0
|
|
||||||
ln -s libmysqld.so.0.0.1 %buildroot%_libdir/libmysqld.so
|
|
||||||
%endif
|
|
||||||
install -m 660 %{S:14} %buildroot/etc/my.cnf
|
install -m 660 %{S:14} %buildroot/etc/my.cnf
|
||||||
[ \! -f scripts/mysqlaccess.conf ] || install -m 640 scripts/mysqlaccess.conf %buildroot/etc/mysqlaccess.conf
|
[ \! -f scripts/mysqlaccess.conf ] || install -m 640 scripts/mysqlaccess.conf %buildroot/etc/mysqlaccess.conf
|
||||||
for i in "${DOCS[@]}"; do
|
for i in "${DOCS[@]}"; do
|
||||||
install -m 644 "${i}" "${DOCDIR}" || true
|
install -m 644 "${i}" "${DOCDIR}" || true
|
||||||
done
|
done
|
||||||
%if 0%{?use_systemd} > 0
|
|
||||||
install -D -m 755 %_sourcedir/rc.mysql.systemd '%buildroot'/usr/lib/mysql/rcmysql
|
install -D -m 755 %_sourcedir/rc.mysql.systemd '%buildroot'/usr/lib/mysql/rcmysql
|
||||||
sed -i 's|@MYSQLVER@|%{version}|' '%buildroot'/usr/lib/mysql/rcmysql
|
sed -i 's|@MYSQLVER@|%{version}|' '%buildroot'/usr/lib/mysql/rcmysql
|
||||||
ln -sf service '%buildroot'/usr/sbin/rcmysql
|
ln -sf service '%buildroot'/usr/sbin/rcmysql
|
||||||
install -D -m 644 %_sourcedir/mysql.service '%buildroot'/usr/lib/systemd/system/mysql.service
|
install -D -m 644 %_sourcedir/mysql.service '%buildroot'/usr/lib/systemd/system/mysql.service
|
||||||
sed -i 's|doc/packages/mysql|doc/packages/%{name}|g' '%buildroot'/usr/lib/mysql/rcmysql
|
sed -i 's|doc/packages/mysql|doc/packages/%{name}|g' '%buildroot'/usr/lib/mysql/rcmysql
|
||||||
rm -rf '%buildroot'/etc/init.d
|
rm -rf '%buildroot'/etc/init.d
|
||||||
%else
|
|
||||||
install -d -m 755 '%buildroot'/etc/init.d
|
|
||||||
install -m 755 '%_sourcedir'/rc.mysql.sysvinit '%buildroot'/etc/init.d/mysql
|
|
||||||
sed -i 's|@MYSQLVER@|%{version}|' '%buildroot'/etc/init.d/mysql
|
|
||||||
ln -sf ../../etc/init.d/mysql '%buildroot'/usr/sbin/rcmysql
|
|
||||||
sed -i 's|doc/packages/mysql|doc/packages/%{name}|g' '%buildroot'/etc/init.d/mysql
|
|
||||||
%endif
|
|
||||||
# SuSEfirewall service description
|
# SuSEfirewall service description
|
||||||
install -D -m 644 %_sourcedir/mysql.SuSEfirewall2 \
|
install -D -m 644 %_sourcedir/mysql.SuSEfirewall2 \
|
||||||
%buildroot/etc/sysconfig/SuSEfirewall2.d/services/mysql
|
%buildroot/etc/sysconfig/SuSEfirewall2.d/services/mysql
|
||||||
@ -109,26 +97,14 @@ install -m 755 suse-test-run '%buildroot'/usr/share/mysql-test/
|
|||||||
mkdir '%buildroot'/usr/share/mysql-test/var
|
mkdir '%buildroot'/usr/share/mysql-test/var
|
||||||
# Final fixes
|
# Final fixes
|
||||||
find '%buildroot'/usr/share/mysql-test -name '*.orig' -delete
|
find '%buildroot'/usr/share/mysql-test -name '*.orig' -delete
|
||||||
%if 0%{?suse_version} > 1030
|
|
||||||
%fdupes -s '%buildroot'/usr/share/mysql-test
|
%fdupes -s '%buildroot'/usr/share/mysql-test
|
||||||
%endif
|
|
||||||
%if 0%{?fedora_version} > 8
|
|
||||||
fdupes -q -n -r '%buildroot'/usr/share/mysql-test
|
fdupes -q -n -r '%buildroot'/usr/share/mysql-test
|
||||||
%endif
|
|
||||||
dos2unixConversion() {
|
dos2unixConversion() {
|
||||||
%{__sed} -i 's/\r//g' "$1"
|
%{__sed} -i 's/\r//g' "$1"
|
||||||
}
|
}
|
||||||
for i in `grep -Rl '\r' '%buildroot'/usr/share/sql-bench`; do
|
for i in `grep -Rl '\r' '%buildroot'/usr/share/sql-bench`; do
|
||||||
dos2unixConversion "$i"
|
dos2unixConversion "$i"
|
||||||
done
|
done
|
||||||
%if ! 0%{cluster} > 0
|
|
||||||
cat mysql-ndb-storage.files mysql-ndb-management.files \
|
|
||||||
mysql-ndb-tools.files mysql-ndb-extra.files | \
|
|
||||||
sed 's|^%%doc\ ||' | while read tmp; do
|
|
||||||
cd '%buildroot'
|
|
||||||
rm -f .$tmp
|
|
||||||
done
|
|
||||||
%endif
|
|
||||||
%if ! 0%{preferred} > 0
|
%if ! 0%{preferred} > 0
|
||||||
cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do
|
cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do
|
||||||
cd '%buildroot'
|
cd '%buildroot'
|
||||||
@ -143,10 +119,6 @@ rm -rf '%buildroot'/%_datadir/aclocal
|
|||||||
ln -s mysqlcheck '%buildroot'%_bindir/mysqlrepair
|
ln -s mysqlcheck '%buildroot'%_bindir/mysqlrepair
|
||||||
ln -s mysqlcheck '%buildroot'%_bindir/mysqlanalyze
|
ln -s mysqlcheck '%buildroot'%_bindir/mysqlanalyze
|
||||||
ln -s mysqlcheck '%buildroot'%_bindir/mysqloptimize
|
ln -s mysqlcheck '%buildroot'%_bindir/mysqloptimize
|
||||||
%if 0%{?cluster} > 1
|
|
||||||
ln -s libndbclient.so.6.0.0 '%buildroot'%_libdir/libndbclient.so.6.0
|
|
||||||
ln -s libndbclient.so.6.0.0 '%buildroot'%_libdir/libndbclient.so.6
|
|
||||||
%endif
|
|
||||||
if [ -f '%buildroot'/usr/bin/mysqlaccess.conf ]; then
|
if [ -f '%buildroot'/usr/bin/mysqlaccess.conf ]; then
|
||||||
mv '%buildroot'/usr/bin/mysqlaccess.conf '%buildroot'/etc/mysqlaccess.conf
|
mv '%buildroot'/usr/bin/mysqlaccess.conf '%buildroot'/etc/mysqlaccess.conf
|
||||||
fi
|
fi
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:be067e9a9fadbf1f32d00485ad75ca4963ab3692d575e6a737b8975457d9f117
|
|
||||||
size 41139863
|
|
3
mariadb-10.0.17.tar.gz
Normal file
3
mariadb-10.0.17.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9cd394e99942c3700b13f2bf126895fe587e668bfcaffcfd81f0cd878fc19311
|
||||||
|
size 55989700
|
@ -1,3 +1,58 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 14 13:42:54 UTC 2015 - michal.hrusecky@opensuse.org
|
||||||
|
|
||||||
|
- fix parent directory has insecure permissions error
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 14 08:20:47 UTC 2015 - michal.hrusecky@opensuse.org
|
||||||
|
|
||||||
|
- disable optional features for mariadb
|
||||||
|
* still possible to use them from mariadb_100 package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 23 23:24:11 UTC 2015 - dvaleev@suse.com
|
||||||
|
|
||||||
|
- Adjust _constraints. 11GB is not enough for ppc64 builds,
|
||||||
|
increase to 13GB
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 3 05:48:08 UTC 2015 - michal.hrusecky@opensuse.org
|
||||||
|
|
||||||
|
- Updated to the version 10.0.17
|
||||||
|
* Release notes:
|
||||||
|
http://kb.askmonty.org/v/mariadb-10017-release-notes
|
||||||
|
* Changelog:
|
||||||
|
http://kb.askmonty.org/v/mariadb-10017-changelog
|
||||||
|
- merged patches to packaging git and regenerated
|
||||||
|
* few fixes mainly to upgrades
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 2 17:25:47 UTC 2015 - mgorse@suse.com
|
||||||
|
|
||||||
|
- README.SuSE is now README.SUSE; fix name in some places.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 23 19:17:09 UTC 2015 - xrigou@otenet.gr
|
||||||
|
|
||||||
|
- Fix undefined initial status in systemd script (boo #914370)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 12 20:29:24 UTC 2015 - xrigou@otenet.gr
|
||||||
|
|
||||||
|
- Fix include dir in alternative cnf files (bnc #859345)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Dec 6 11:44:25 UTC 2014 - michal.hrusecky@opensuse.org
|
||||||
|
|
||||||
|
- run spec cleaner on spec
|
||||||
|
- update to 10.0.15
|
||||||
|
* Release notes:
|
||||||
|
http://kb.askmonty.org/v/mariadb-10015-release-notes
|
||||||
|
* Changelog:
|
||||||
|
http://kb.askmonty.org/v/mariadb-10015-changelog
|
||||||
|
- conditionally enable more storage engines
|
||||||
|
- updated packaging to the latest templates
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Nov 09 18:53:00 UTC 2014 - Led <ledest@gmail.com>
|
Sun Nov 09 18:53:00 UTC 2014 - Led <ledest@gmail.com>
|
||||||
|
|
||||||
|
494
mariadb.spec
494
mariadb.spec
@ -15,36 +15,35 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
# Few definitions which will alter build
|
|
||||||
%define preferred 01
|
%define preferred 01
|
||||||
%define use_systemd 01
|
|
||||||
%define use_cmake 01
|
|
||||||
%define cluster 00
|
|
||||||
%define have_info 0
|
%define have_info 0
|
||||||
%define builtin_plugins partition,csv,heap,aria,pbxt,myisam,myisammrg,xtradb
|
%define builtin_plugins partition,csv,heap,aria,pbxt,myisam,myisammrg,xtradb
|
||||||
%define use_extra_provides 1
|
%define use_extra_provides 1
|
||||||
%define extra_provides mariadb_100
|
%define extra_provides mariadb_100
|
||||||
|
%define srv_vers 5.6.26
|
||||||
%if ! %{defined _rundir}
|
%if ! %{defined _rundir}
|
||||||
%define _rundir %{_localstatedir}/run
|
%define _rundir %{_localstatedir}/run
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{?rel:0}%{!?rel:1}
|
%if 0 > 0
|
||||||
%define rel 1
|
%define with_jemalloc 1
|
||||||
|
%define with_oqgraph 1
|
||||||
|
%define with_cassandra 1
|
||||||
|
%else
|
||||||
|
%define with_jemalloc 0
|
||||||
|
%define with_oqgraph 0
|
||||||
|
%define with_cassandra 0
|
||||||
%endif
|
%endif
|
||||||
#Distribution: %dist
|
|
||||||
#Packager: %packager
|
|
||||||
#Vendor: %vendor
|
|
||||||
|
|
||||||
Name: mariadb
|
Name: mariadb
|
||||||
|
Version: 10.0.17
|
||||||
|
Release: 0
|
||||||
Summary: Server part of MariaDB
|
Summary: Server part of MariaDB
|
||||||
License: SUSE-GPL-2.0-with-FLOSS-exception
|
License: SUSE-GPL-2.0-with-FLOSS-exception
|
||||||
Group: Productivity/Databases/Servers
|
Group: Productivity/Databases/Servers
|
||||||
Version: 10.0.14
|
|
||||||
Release: 0
|
|
||||||
%define srv_vers 5.6.20
|
|
||||||
Url: https://www.mariadb.org
|
Url: https://www.mariadb.org
|
||||||
Source: mariadb-%{version}.tar.bz2
|
Source: https://downloads.mariadb.org/f/mariadb-%{version}/source/mariadb-%{version}.tar.gz
|
||||||
Source2: baselibs.conf
|
Source2: baselibs.conf
|
||||||
Source3: README.debug
|
Source3: README.debug
|
||||||
Source4: suse-test-run
|
Source4: suse-test-run
|
||||||
@ -60,76 +59,81 @@ Source14: my.ini
|
|||||||
Source15: rc.mysql.sysvinit
|
Source15: rc.mysql.sysvinit
|
||||||
Source16: rc.mysql.systemd
|
Source16: rc.mysql.systemd
|
||||||
Source17: mysql.service
|
Source17: mysql.service
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
PreReq: pwdutils
|
|
||||||
%if %have_info
|
|
||||||
PreReq: %install_info_prereq %insserv_prereq
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
BuildRequires: autoconf
|
|
||||||
BuildRequires: automake
|
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
|
%if 0%{with_oqgraph} > 0 || 0%{with_cassandra} > 0
|
||||||
|
BuildRequires: boost-devel
|
||||||
|
%endif
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
%if 0%{with_jemalloc} > 0
|
||||||
|
BuildRequires: jemalloc-devel
|
||||||
|
%endif
|
||||||
|
%if 0%{with_oqgraph} > 0
|
||||||
|
BuildRequires: judy-devel
|
||||||
|
%endif
|
||||||
BuildRequires: libaio-devel
|
BuildRequires: libaio-devel
|
||||||
|
BuildRequires: libbz2-devel
|
||||||
BuildRequires: libedit-devel
|
BuildRequires: libedit-devel
|
||||||
BuildRequires: libevent-devel
|
BuildRequires: libevent-devel
|
||||||
|
%if 0%{with_cassandra} > 0
|
||||||
|
BuildRequires: libthrift-devel
|
||||||
|
%endif
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
|
BuildRequires: libxml2-devel
|
||||||
|
BuildRequires: lzo-devel
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: procps
|
BuildRequires: procps
|
||||||
BuildRequires: readline-devel
|
|
||||||
BuildRequires: zlib-devel
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
BuildRequires: pwdutils
|
BuildRequires: pwdutils
|
||||||
BuildRequires: tcpd-devel
|
BuildRequires: readline-devel
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} > 1030 || 0%{?fedora_version} > 8
|
|
||||||
BuildRequires: fdupes
|
|
||||||
%endif
|
|
||||||
%if 0%{?fedora_version} > 11
|
|
||||||
BuildRequires: sqlite
|
BuildRequires: sqlite
|
||||||
%endif
|
BuildRequires: tcpd-devel
|
||||||
%if 0%{?suse_version} > 1030
|
BuildRequires: zlib-devel
|
||||||
Recommends: logrotate
|
BuildRequires: pkgconfig(systemd)
|
||||||
%else
|
|
||||||
Requires: logrotate
|
|
||||||
%endif
|
|
||||||
# required by rcmysql
|
# required by rcmysql
|
||||||
Requires: %{name}-client
|
Requires: %{name}-client
|
||||||
Requires: %{name}-errormessages = %version
|
Requires: %{name}-errormessages = %{version}
|
||||||
%if 0%{?suse_version}
|
|
||||||
Requires: perl-base
|
Requires: perl-base
|
||||||
%else
|
Requires(pre): pwdutils
|
||||||
Requires: perl
|
Recommends: logrotate
|
||||||
%endif
|
|
||||||
# systemd requirements for openSUSE >= 12.1
|
|
||||||
%if 0%{?suse_version} >= 1210
|
|
||||||
BuildRequires: pkgconfig(systemd)
|
|
||||||
%{?systemd_requires}
|
|
||||||
%endif
|
|
||||||
%if "%{name}" != mysql
|
|
||||||
Provides: mysql = %{srv_vers}
|
|
||||||
%endif
|
|
||||||
Provides: mysql-Max = %{srv_vers}
|
Provides: mysql-Max = %{srv_vers}
|
||||||
%if 0%{?use_extra_provides} > 0
|
|
||||||
Provides: %{extra_provides} = %{version}
|
|
||||||
Obsoletes: %{extra_provides} < %{version}
|
|
||||||
%endif
|
|
||||||
%if 0%{?preferred} > 0
|
|
||||||
%if "%{name}" != mysql
|
|
||||||
Obsoletes: mysql < %{srv_vers}
|
|
||||||
%endif
|
|
||||||
Obsoletes: mysql-Max < %{srv_vers}
|
|
||||||
%endif
|
|
||||||
Conflicts: otherproviders(mysql)
|
|
||||||
# Compatibility with Fedora/CentOS
|
# Compatibility with Fedora/CentOS
|
||||||
Provides: mysql-server = %{srv_vers}
|
Provides: mysql-server = %{srv_vers}
|
||||||
Provides: mariadb-server = %{srv_vers}
|
Provides: mariadb-server = %{srv_vers}
|
||||||
|
# Compatibility with old version
|
||||||
|
Provides: %{name}-debug-version = %{srv_vers}
|
||||||
|
Obsoletes: %{name}-debug-version < %{srv_vers}
|
||||||
|
Provides: %{name}-debug = %{srv_vers}
|
||||||
|
Obsoletes: %{name}-debug < %{srv_vers}
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
Conflicts: otherproviders(mysql)
|
||||||
Conflicts: otherproviders(mysql-server)
|
Conflicts: otherproviders(mysql-server)
|
||||||
Conflicts: otherproviders(mariadb-server)
|
Conflicts: otherproviders(mariadb-server)
|
||||||
|
Conflicts: otherproviders(mysql-debug)
|
||||||
|
%{?systemd_requires}
|
||||||
|
%if 0%{have_info} > 0
|
||||||
|
Requires(post): %{install_info_prereq} %insserv_prereq
|
||||||
|
%endif
|
||||||
|
%if "%{name}" != mysql
|
||||||
|
Provides: mysql = %{srv_vers}
|
||||||
|
Provides: mysql-debug = %{srv_vers}
|
||||||
|
%endif
|
||||||
|
%if 0%{?use_extra_provides} > 0
|
||||||
|
Provides: %{extra_provides} = %{version}
|
||||||
|
Obsoletes: %{extra_provides} < %{version}
|
||||||
|
Provides: %{extra_provides}-debug-version = %{version}
|
||||||
|
Obsoletes: %{extra_provides}-debug-version < %{version}
|
||||||
|
%endif
|
||||||
|
%if 0%{?preferred} > 0
|
||||||
|
Obsoletes: mysql-Max < %{srv_vers}
|
||||||
|
%if "%{name}" != mysql
|
||||||
|
Obsoletes: mysql < %{srv_vers}
|
||||||
|
Obsoletes: mysql-debug < %{srv_vers}
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
MariaDB is a backward compatible, drop-in replacement branch of the MySQL
|
MariaDB is a backward compatible, drop-in replacement branch of the MySQL
|
||||||
@ -140,16 +144,16 @@ This package only contains the server-side programs.
|
|||||||
|
|
||||||
%if 0%{?preferred} > 0
|
%if 0%{?preferred} > 0
|
||||||
%package -n libmysqlclient-devel
|
%package -n libmysqlclient-devel
|
||||||
# mysql-devel was last used in openSUSE 10.2
|
|
||||||
Provides: mysql-devel = %srv_vers-%release
|
|
||||||
Obsoletes: mysql-devel < %srv_vers
|
|
||||||
Requires: glibc-devel
|
|
||||||
Requires: libmysqlclient18 = %version
|
|
||||||
Requires: libmysqlclient_r18 = %version
|
|
||||||
Requires: openssl-devel
|
|
||||||
Requires: zlib-devel
|
|
||||||
Summary: MariaDB development header files and libraries
|
Summary: MariaDB development header files and libraries
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: glibc-devel
|
||||||
|
Requires: libmysqlclient_r18 = %{version}
|
||||||
|
Requires: libmysqlclient18 = %{version}
|
||||||
|
Requires: openssl-devel
|
||||||
|
Requires: zlib-devel
|
||||||
|
# mysql-devel was last used in openSUSE 10.2
|
||||||
|
Provides: mysql-devel = %{srv_vers}-%{release}
|
||||||
|
Obsoletes: mysql-devel < %{srv_vers}
|
||||||
|
|
||||||
%description -n libmysqlclient-devel
|
%description -n libmysqlclient-devel
|
||||||
This package contains the development header files and libraries
|
This package contains the development header files and libraries
|
||||||
@ -158,7 +162,7 @@ necessary to develop client applications for MariaDB.
|
|||||||
%package -n libmysqld18
|
%package -n libmysqld18
|
||||||
Summary: MariaDB embedded server development files
|
Summary: MariaDB embedded server development files
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{name}-errormessages = %version
|
Requires: %{name}-errormessages = %{version}
|
||||||
|
|
||||||
%description -n libmysqld18
|
%description -n libmysqld18
|
||||||
This package contains the development header files and libraries
|
This package contains the development header files and libraries
|
||||||
@ -168,8 +172,8 @@ for developing applications that embed the MariaDB.
|
|||||||
Summary: MariaDB embedded server development files
|
Summary: MariaDB embedded server development files
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
# the headers files are the shared
|
# the headers files are the shared
|
||||||
Requires: libmysqlclient-devel = %version
|
Requires: libmysqlclient-devel = %{version}
|
||||||
Requires: libmysqld18 = %version
|
Requires: libmysqld18 = %{version}
|
||||||
Requires: tcpd-devel
|
Requires: tcpd-devel
|
||||||
|
|
||||||
%description -n libmysqld-devel
|
%description -n libmysqld-devel
|
||||||
@ -197,23 +201,21 @@ languages and applications need to dynamically load and use MariaDB.
|
|||||||
%package client
|
%package client
|
||||||
Summary: Client for MariaDB
|
Summary: Client for MariaDB
|
||||||
Group: Productivity/Databases/Clients
|
Group: Productivity/Databases/Clients
|
||||||
|
Requires: %{name}-errormessages = %{version}
|
||||||
|
Conflicts: otherproviders(mysql-client)
|
||||||
%if "%{name}" != mysql
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-client = %{srv_vers}
|
Provides: mysql-client = %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version}
|
Requires(pre): pwdutils
|
||||||
PreReq: pwdutils
|
|
||||||
%endif
|
|
||||||
%if 0%{?use_extra_provides} > 0
|
%if 0%{?use_extra_provides} > 0
|
||||||
Provides: %{extra_provides}-client = %{version}
|
Provides: %{extra_provides}-client = %{version}
|
||||||
Obsoletes: %{extra_provides}-client < %{version}
|
Obsoletes: %{extra_provides}-client < %{version}
|
||||||
%endif
|
%endif
|
||||||
Requires: %{name}-errormessages = %version
|
|
||||||
%if 0%{?preferred} > 0
|
%if 0%{?preferred} > 0
|
||||||
%if "%{name}" != mysql
|
%if "%{name}" != mysql
|
||||||
Obsoletes: mysql-client < %{srv_vers}
|
Obsoletes: mysql-client < %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
Conflicts: otherproviders(mysql-client)
|
|
||||||
|
|
||||||
%description client
|
%description client
|
||||||
This package contains the standard clients for MariaDB.
|
This package contains the standard clients for MariaDB.
|
||||||
@ -227,10 +229,11 @@ This package provides the translated error messages for the standalone
|
|||||||
server daemon as well as the embedded server
|
server daemon as well as the embedded server
|
||||||
|
|
||||||
%package bench
|
%package bench
|
||||||
Requires: %{name}-client
|
|
||||||
Requires: perl-DBD-mysql
|
|
||||||
Summary: Benchmarks for MariaDB
|
Summary: Benchmarks for MariaDB
|
||||||
Group: Productivity/Databases/Tools
|
Group: Productivity/Databases/Tools
|
||||||
|
Requires: %{name}-client
|
||||||
|
Requires: perl-DBD-mysql
|
||||||
|
Conflicts: otherproviders(mysql-bench)
|
||||||
%if "%{name}" != mysql
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-bench = %{srv_vers}
|
Provides: mysql-bench = %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
@ -243,36 +246,12 @@ Obsoletes: %{extra_provides}-bench < %{version}
|
|||||||
Obsoletes: mysql-bench < %{srv_vers}
|
Obsoletes: mysql-bench < %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
Conflicts: otherproviders(mysql-bench)
|
|
||||||
|
|
||||||
%description bench
|
%description bench
|
||||||
This package contains benchmark scripts and data for MariaDB.
|
This package contains benchmark scripts and data for MariaDB.
|
||||||
|
|
||||||
To run these database benchmarks, start the script "run-all-tests" in
|
To run these database benchmarks, start the script "run-all-tests" in
|
||||||
the directory /usr/share/sql-bench after starting MariaDB.
|
the directory %{_datadir}/sql-bench after starting MariaDB.
|
||||||
|
|
||||||
|
|
||||||
%package debug-version
|
|
||||||
Summary: MariaDB with debug options turned on
|
|
||||||
Group: Productivity/Databases/Servers
|
|
||||||
Requires: %{name} = %{version}
|
|
||||||
Provides: %{name}-debug = %{srv_vers}
|
|
||||||
Provides: mysql-debug = %{srv_vers}
|
|
||||||
%if 0%{?use_extra_provides} > 0
|
|
||||||
Provides: %{extra_provides}-debug-verion = %{version}
|
|
||||||
Obsoletes: %{extra_provides}-debug-version < %{version}
|
|
||||||
%endif
|
|
||||||
%if 0%{?preferred} > 0
|
|
||||||
Obsoletes: mysql-debug < %{srv_vers}
|
|
||||||
%endif
|
|
||||||
Conflicts: otherproviders(mysql-debug)
|
|
||||||
|
|
||||||
%description debug-version
|
|
||||||
A version of the MariaDB that has some debug code turned on.
|
|
||||||
It should be only used to track down problems with the standard
|
|
||||||
servers. Note that merely installing this package will bot replace the
|
|
||||||
standard server. Read /usr/share/doc/packages/mysql/README.debug for
|
|
||||||
information on how to use the debug server.
|
|
||||||
|
|
||||||
%package test
|
%package test
|
||||||
Summary: Testsuite for MariaDB
|
Summary: Testsuite for MariaDB
|
||||||
@ -282,6 +261,7 @@ Requires: %{name}-bench = %{version}
|
|||||||
Requires: %{name}-client = %{version}
|
Requires: %{name}-client = %{version}
|
||||||
Requires: %{name}-tools = %{version}
|
Requires: %{name}-tools = %{version}
|
||||||
Requires: perl-DBD-mysql
|
Requires: perl-DBD-mysql
|
||||||
|
Conflicts: otherproviders(mysql-test)
|
||||||
%if "%{name}" != mysql
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-test = %{srv_vers}
|
Provides: mysql-test = %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
@ -294,23 +274,23 @@ Obsoletes: %{extra_provides}-test < %{version}
|
|||||||
Obsoletes: mysql-test < %{srv_vers}
|
Obsoletes: mysql-test < %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
Conflicts: otherproviders(mysql-test)
|
|
||||||
|
|
||||||
%description test
|
%description test
|
||||||
This package contains the test scripts and data for MariaDB.
|
This package contains the test scripts and data for MariaDB.
|
||||||
|
|
||||||
To run the testsuite, run /usr/share/mysql-test/suse-test-run.
|
To run the testsuite, run %{_datadir}/mysql-test/suse-test-run.
|
||||||
|
|
||||||
%package tools
|
%package tools
|
||||||
Summary: MariaDB tools
|
Summary: MariaDB tools
|
||||||
Group: Productivity/Databases/Servers
|
Group: Productivity/Databases/Servers
|
||||||
Requires: perl-DBD-mysql
|
Requires: perl-DBD-mysql
|
||||||
# make sure this package is installed when updating from 10.2 and older
|
# make sure this package is installed when updating from 10.2 and older
|
||||||
Provides: mysql-client:/usr/bin/perror
|
Provides: mysql-client:%{_bindir}/perror
|
||||||
|
Provides: mysql:%{_bindir}/mysqlhotcopy
|
||||||
|
Conflicts: otherproviders(mysql-tools)
|
||||||
%if "%{name}" != mysql
|
%if "%{name}" != mysql
|
||||||
Provides: mysql-tools = %{srv_vers}
|
Provides: mysql-tools = %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
Provides: mysql:/usr/bin/mysqlhotcopy
|
|
||||||
%if 0%{?use_extra_provides} > 0
|
%if 0%{?use_extra_provides} > 0
|
||||||
Provides: %{extra_provides}-tools = %{version}
|
Provides: %{extra_provides}-tools = %{version}
|
||||||
Obsoletes: %{extra_provides}-tools < %{version}
|
Obsoletes: %{extra_provides}-tools < %{version}
|
||||||
@ -320,88 +300,18 @@ Obsoletes: %{extra_provides}-tools < %{version}
|
|||||||
Obsoletes: mysql-tools < %{srv_vers}
|
Obsoletes: mysql-tools < %{srv_vers}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
Conflicts: otherproviders(mysql-tools)
|
|
||||||
|
|
||||||
%description tools
|
%description tools
|
||||||
A set of scripts for administering a MariaDB or developing
|
A set of scripts for administering a MariaDB or developing
|
||||||
applications with MariaDB.
|
applications with MariaDB.
|
||||||
|
|
||||||
%if 0%{?cluster} > 0
|
|
||||||
|
|
||||||
%if 0%{?cluster} > 1
|
|
||||||
%package -n libndbclient6
|
|
||||||
Summary: Shared Libraries for cluster client
|
|
||||||
Group: Development/Libraries/Other
|
|
||||||
|
|
||||||
%description -n libndbclient6
|
|
||||||
This package contains the shared libraries (.so) which certain
|
|
||||||
languages and applications need to dynamically load and use MariaDB
|
|
||||||
cluster.
|
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%package ndb-storage
|
|
||||||
Summary: MariaDB - ndbcluster storage engine
|
|
||||||
Group: Productivity/Databases/Servers
|
|
||||||
%if "%{name}" != mysql
|
|
||||||
Provides: mysql-ndb-storage = %{srv_vers}
|
|
||||||
Obsoletes: mysql-ndb-storage < %{srv_vers}
|
|
||||||
%endif
|
|
||||||
Conflicts: otherproviders(mysql-ndb-storage)
|
|
||||||
|
|
||||||
%description ndb-storage
|
|
||||||
This package contains the ndbcluster storage engine.
|
|
||||||
It is necessary to have this package installed on all
|
|
||||||
computers that should store ndbcluster table data.
|
|
||||||
|
|
||||||
|
|
||||||
%package ndb-management
|
|
||||||
Summary: MariaDB - ndbcluster storage engine management
|
|
||||||
Group: Productivity/Databases/Servers
|
|
||||||
%if "%{name}" != mysql
|
|
||||||
Provides: mysql-ndb-management = %{srv_vers}
|
|
||||||
Obsoletes: mysql-ndb-management < %{srv_vers}
|
|
||||||
%endif
|
|
||||||
Conflicts: otherproviders(mysql-ndb-management)
|
|
||||||
|
|
||||||
%description ndb-management
|
|
||||||
This package contains ndbcluster storage engine management.
|
|
||||||
It is necessary to have this package installed on at least
|
|
||||||
one computer in the cluster.
|
|
||||||
|
|
||||||
%package ndb-tools
|
|
||||||
Summary: MariaDB - ndbcluster storage engine basic tools
|
|
||||||
Group: Productivity/Databases/Servers
|
|
||||||
%if "%{name}" != mysql
|
|
||||||
Provides: mysql-ndb-tools = %{srv_vers}
|
|
||||||
Obsoletes: mysql-ndb-tools < %{srv_vers}
|
|
||||||
%endif
|
|
||||||
Conflicts: otherproviders(mysql-ndb-tools)
|
|
||||||
|
|
||||||
%description ndb-tools
|
|
||||||
This package contains ndbcluster storage engine basic tools.
|
|
||||||
|
|
||||||
%package ndb-extra
|
|
||||||
Summary: MariaDB - ndbcluster storage engine extra tools
|
|
||||||
Group: Productivity/Databases/Servers
|
|
||||||
%if "%{name}" != mysql
|
|
||||||
Provides: mysql-ndb-extra = %{srv_vers}
|
|
||||||
Obsoletes: mysql-ndb-extra < %{srv_vers}
|
|
||||||
%endif
|
|
||||||
Conflicts: otherproviders(mysql-ndb-extra)
|
|
||||||
|
|
||||||
%description ndb-extra
|
|
||||||
This package contains some extra ndbcluster storage engine tools for the
|
|
||||||
advanced user. They should be used with caution.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n mariadb-%{version} -D -a 9
|
%setup -q -n mariadb-%{version} -D -a 9
|
||||||
cp %_sourcedir/README.SUSE .
|
cp %{_sourcedir}/README.SUSE .
|
||||||
cp %_sourcedir/suse-test-run .
|
cp %{_sourcedir}/suse-test-run .
|
||||||
# apply patches from series
|
# apply patches from series
|
||||||
mysql-patches/tools/quilt-setup.sh "%{S:12}"
|
mysql-patches/tools/quilt-setup.sh "%{SOURCE12}"
|
||||||
mysql-patches/tools/apply-series.sh "%{S:12}"
|
mysql-patches/tools/apply-series.sh "%{SOURCE12}"
|
||||||
# remove unneeded manpages ('make install' basically installs everything under
|
# remove unneeded manpages ('make install' basically installs everything under
|
||||||
# man/*)
|
# man/*)
|
||||||
rm -f man/mysqlman.1 # dummy fallback manpage
|
rm -f man/mysqlman.1 # dummy fallback manpage
|
||||||
@ -414,7 +324,7 @@ rm -f man/comp_err.1 # built-time utility
|
|||||||
rm -f man/ndbd_redo_log_reader.1
|
rm -f man/ndbd_redo_log_reader.1
|
||||||
# breaks VPATH builds when in sourcedir, is generated in the builddirs
|
# breaks VPATH builds when in sourcedir, is generated in the builddirs
|
||||||
rm -f sql/sql_builtin.cc
|
rm -f sql/sql_builtin.cc
|
||||||
sed -i 's|@localstatedir@|/var/log|' support-files/mysql-log-rotate.sh
|
sed -i 's|@localstatedir@|%{_localstatedir}/log|' support-files/mysql-log-rotate.sh
|
||||||
%if 0%{preferred} < 1
|
%if 0%{preferred} < 1
|
||||||
for i in `grep -Rl mysqlclient .`; do
|
for i in `grep -Rl mysqlclient .`; do
|
||||||
sed -i 's|mysqlclient|mysqlclient|g' $i
|
sed -i 's|mysqlclient|mysqlclient|g' $i
|
||||||
@ -425,79 +335,99 @@ done
|
|||||||
rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result
|
rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result
|
||||||
# Specify perl path on shebangs
|
# Specify perl path on shebangs
|
||||||
for i in `grep -Rl '^#!@PERL@$' .`; do
|
for i in `grep -Rl '^#!@PERL@$' .`; do
|
||||||
sed -i 's|@PERL@|/usr/bin/perl|' $i
|
sed -i 's|@PERL@|%{_bindir}/perl|' $i
|
||||||
done
|
done
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{expand:%(cat %_sourcedir/build.inc)}
|
%{expand:%(cat %{_sourcedir}/build.inc)}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{expand:%(cat %_sourcedir/install.inc)}
|
%{expand:%(cat %{_sourcedir}/install.inc)}
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
/usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || :
|
%{_sbindir}/groupadd -r mysql >/dev/null 2>/dev/null || :
|
||||||
/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
|
%{_sbindir}/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
|
||||||
-s /bin/false -d /var/lib/mysql mysql 2> /dev/null || :
|
-s /bin/false -d %{_localstatedir}/lib/mysql mysql 2> /dev/null || :
|
||||||
/usr/sbin/usermod -g mysql -s /bin/false mysql 2> /dev/null || :
|
%{_sbindir}/usermod -g mysql -s /bin/false mysql 2> /dev/null || :
|
||||||
# systemd requirment
|
|
||||||
%if 0%{?suse_version} >= 1210
|
|
||||||
%service_add_pre mysql.service
|
%service_add_pre mysql.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%pre client
|
%pre client
|
||||||
/usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || :
|
%{_sbindir}/groupadd -r mysql >/dev/null 2>/dev/null || :
|
||||||
/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
|
%{_sbindir}/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
|
||||||
-s /bin/false -d /var/lib/mysql mysql 2> /dev/null || :
|
-s /bin/false -d %{_localstatedir}/lib/mysql mysql 2> /dev/null || :
|
||||||
/usr/sbin/usermod -g mysql -s /bin/false mysql 2> /dev/null || :
|
%{_sbindir}/usermod -g mysql -s /bin/false mysql 2> /dev/null || :
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# systemd requirment
|
|
||||||
%if 0%{?suse_version} >= 1210
|
|
||||||
%service_add_post mysql.service
|
%service_add_post mysql.service
|
||||||
%endif
|
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# preun and posttran takes care of restart #
|
# preun and posttran takes care of restart #
|
||||||
#######################################################################
|
#######################################################################
|
||||||
%preun
|
|
||||||
[ $1 = 1 ] || /usr/sbin/rcmysql stop || true
|
|
||||||
|
|
||||||
%pretrans -p <lua>
|
%preun
|
||||||
if posix.access("/usr/sbin/rcmysql", "x") then
|
[ $1 = 1 ] || %{_sbindir}/rcmysql stop || true
|
||||||
restart = os.execute("/usr/sbin/rcmysql status > /dev/null")
|
|
||||||
if restart == 0 then
|
|
||||||
os.execute("/usr/sbin/rcmysql stop")
|
|
||||||
os.execute("/bin/mkdir -p %{_rundir}/mysql/restart")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
%posttrans
|
%posttrans
|
||||||
%if %have_info
|
%if 0%{have_info} > 0
|
||||||
[ -z "`ls %{_infodir}/mysql.info.* 2> /dev/null`" ] || \
|
[ -z "`ls %{_infodir}/mysql.info.* 2> /dev/null`" ] || \
|
||||||
%install_info --info-dir=%{_infodir} %{_infodir}/mysql.info.*
|
%install_info --info-dir=%{_infodir} %{_infodir}/mysql.info.*
|
||||||
%endif
|
%endif
|
||||||
if [ -d /var/lib/mysql ]; then
|
rm -f %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release}
|
||||||
touch /var/lib/mysql/.run-mysql_upgrade
|
|
||||||
fi
|
|
||||||
for in in protected tmp; do
|
for in in protected tmp; do
|
||||||
rmdir /var/lib/mysql/.$i 2>/dev/null || :
|
rmdir %{_localstatedir}/lib/mysql/.$i 2>/dev/null || :
|
||||||
done
|
done
|
||||||
# start mysql again if it should run
|
# During package rename, there might be config file move
|
||||||
if [ "`ls /etc/rc.d/rc*.d/S*mysql 2> /dev/null`" ] || [ -d %{_rundir}/mysql/restart ]; then
|
if [ -f /etc/my.cnf.rpmsave ]; then
|
||||||
[ -x /usr/sbin/rcmysql ] && /usr/sbin/rcmysql start
|
mv /etc/my.cnf{,.rpmnew}
|
||||||
# Might not be there, so ignoring errors
|
mv /etc/my.cnf{.rpmsave,}
|
||||||
rmdir %{_rundir}/mysql/restart 2> /dev/null || :
|
cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF
|
||||||
|
|
||||||
|
WARNING: /etc/my.cnf.rpmsave file detected!
|
||||||
|
|
||||||
|
This probably means that you are upgrading from different variant of MySQL.
|
||||||
|
Your original configuration file was restored. If it is not a case, you can
|
||||||
|
find your original /etc/my.cnf as /etc/my.cnf.rpmnew
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
# warn on first run
|
# warn on first run
|
||||||
datadir="/var/lib/mysql"
|
if [ -x %{_bindir}/my_print_defaults ]; then
|
||||||
if [ -x /usr/bin/my_print_defaults ]; then
|
datadir="`%{_bindir}/my_print_defaults mysqld mysql_server | sed -n 's|--datadir=||p'`"
|
||||||
datadir="`/usr/bin/my_print_defaults mysqld mysql_server | sed -n 's|--datadir=||p'`"
|
|
||||||
[ "$datadir" ] || datadir="/var/lib/mysql"
|
|
||||||
fi
|
fi
|
||||||
if [ \! -d "$datadir/mysql" ]; then
|
[ -n "$datadir" ] || datadir="%{_localstatedir}/lib/mysql"
|
||||||
cat > /var/adm/update-messages/%{name}-%{version}-%{release} << EOF
|
if [ -d "$datadir/mysql" ]; then
|
||||||
%(cat %_sourcedir/README.install)
|
touch "$datadir/.run-mysql_upgrade"
|
||||||
|
fi
|
||||||
|
for in in protected tmp; do
|
||||||
|
rmdir "$datadir"/.$i 2>/dev/null || :
|
||||||
|
done
|
||||||
|
if [ \! -f "$datadir/mysql_upgrade_info" ]; then
|
||||||
|
cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF
|
||||||
|
|
||||||
|
%(cat %{_sourcedir}/README.install)
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
else
|
||||||
|
MYSQLVER="`echo %{version} | sed 's|\.[0-9]\+$||'`"
|
||||||
|
if [ -f "$datadir/mysql_upgrade_info" ] && \
|
||||||
|
[ -z "`grep "^$MYSQLVER" "$datadir/mysql_upgrade_info" 2> /dev/null`" ]; then
|
||||||
|
cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF
|
||||||
|
|
||||||
|
WARNING: You are upgrading from different stable version of MySQL!
|
||||||
|
|
||||||
|
Your database will be migrated automatically during next restart of MySQL.
|
||||||
|
Before you do that make sure you have up to date backup of your data. It
|
||||||
|
should be mainly in $datadir directory.
|
||||||
|
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# start mysql again if it should run - migration from old setup
|
||||||
|
if [ -d %{_rundir}/mysql/restart ]; then
|
||||||
|
[ -x %{_sbindir}/rcmysql ] && %{_sbindir}/rcmysql start
|
||||||
|
# Might not be there, so ignoring errors
|
||||||
|
rmdir %{_rundir}/mysql/restart 2> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
@ -512,12 +442,6 @@ fi
|
|||||||
|
|
||||||
%postun -n libmysqlclient_r18 -p /sbin/ldconfig
|
%postun -n libmysqlclient_r18 -p /sbin/ldconfig
|
||||||
|
|
||||||
%if 0%{cluster} > 1
|
|
||||||
%post -n libndbclient6 -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%postun -n libndbclient6 -p /sbin/ldconfig
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{preferred} > 0
|
%if 0%{preferred} > 0
|
||||||
%post -n libmysqld18 -p /sbin/ldconfig
|
%post -n libmysqld18 -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -526,13 +450,13 @@ fi
|
|||||||
|
|
||||||
%postun
|
%postun
|
||||||
if [ $1 = 0 ]; then
|
if [ $1 = 0 ]; then
|
||||||
%if %have_info
|
%if 0%{have_info} > 0
|
||||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/mysql.info.*
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/mysql.info.*
|
||||||
%endif
|
%endif
|
||||||
%{insserv_cleanup}
|
%insserv_cleanup
|
||||||
rm -f "/var/lib/systemd/migrated/mysql.service"
|
rm -f "%{_localstatedir}/lib/systemd/migrated/mysql.service"
|
||||||
if [ -x /usr/bin/systemctl ]; then
|
if [ -x %{_bindir}/systemctl ]; then
|
||||||
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -542,35 +466,31 @@ fi
|
|||||||
|
|
||||||
%files -f mysql.files
|
%files -f mysql.files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%config(noreplace) %attr(0640, root, mysql) /etc/my.cnf
|
%config(noreplace) %attr(0640, root, mysql) %{_sysconfdir}/my.cnf
|
||||||
%dir %attr(0750, root, mysql) /etc/my.cnf.d
|
%dir %attr(0750, root, mysql) %{_sysconfdir}/my.cnf.d
|
||||||
%config(noreplace) %attr(0640, root, mysql) /etc/my.cnf.d/*
|
%config(noreplace) %attr(0640, root, mysql) %{_sysconfdir}/my.cnf.d/*
|
||||||
%config /etc/logrotate.d/mysql
|
%config %{_sysconfdir}/logrotate.d/mysql
|
||||||
%doc %{_defaultdocdir}/%{name}
|
%doc %{_defaultdocdir}/%{name}
|
||||||
%if %have_info
|
%if 0%{have_info} > 0
|
||||||
%doc %{_infodir}/mysql.info.*
|
%doc %{_infodir}/mysql.info.*
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?use_systemd} > 0
|
%dir %{_libexecdir}/mysql
|
||||||
%dir /usr/lib/mysql
|
%{_libexecdir}/mysql/rcmysql
|
||||||
/usr/lib/mysql/rcmysql
|
%{_libexecdir}/systemd/system/mysql.service
|
||||||
/usr/lib/systemd/system/mysql.service
|
%{_sbindir}/rcmysql
|
||||||
%else
|
%dir %{_datadir}/%{name}
|
||||||
/etc/init.d/mysql
|
%dir %{_datadir}/mysql
|
||||||
%endif
|
%{_datadir}/%{name}/charsets/
|
||||||
/usr/sbin/rcmysql
|
%{_datadir}/%{name}/*.sql
|
||||||
%dir /usr/share/%{name}
|
|
||||||
%dir /usr/share/mysql
|
|
||||||
/usr/share/%{name}/charsets/
|
|
||||||
/usr/share/%{name}/*.sql
|
|
||||||
%dir %{_libdir}/mysql
|
%dir %{_libdir}/mysql
|
||||||
%{_libdir}/mysql/mysqld.sym
|
%{_libdir}/mysql/mysqld.sym
|
||||||
%config /etc/sysconfig/SuSEfirewall2.d/services/mysql
|
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/mysql
|
||||||
%dir %_libdir/mysql/plugin
|
%dir %{_libdir}/mysql/plugin
|
||||||
%_libdir/mysql/plugin/[!d]*.so
|
%{_libdir}/mysql/plugin/[!d]*.so
|
||||||
|
|
||||||
%files errormessages -f errormessages.files
|
%files errormessages -f errormessages.files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
/usr/share/%{name}/*/errmsg.sys
|
%{_datadir}/%{name}/*/errmsg.sys
|
||||||
|
|
||||||
%files client -f mysql-client.files
|
%files client -f mysql-client.files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
@ -578,70 +498,48 @@ fi
|
|||||||
%if 0%{preferred} > 0
|
%if 0%{preferred} > 0
|
||||||
%files -n libmysqlclient-devel -f libmysqlclient-devel.files
|
%files -n libmysqlclient-devel -f libmysqlclient-devel.files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
/usr/include/mysql
|
%{_includedir}/mysql
|
||||||
%{_libdir}/libmysqlclient.so
|
%{_libdir}/libmysqlclient.so
|
||||||
%{_libdir}/libmysqlclient_r.so
|
%{_libdir}/libmysqlclient_r.so
|
||||||
%dir /usr/share/aclocal
|
%dir %{_datadir}/aclocal
|
||||||
/usr/share/aclocal/mysql.m4
|
%{_datadir}/aclocal/mysql.m4
|
||||||
|
|
||||||
%files -n libmysqld-devel
|
%files -n libmysqld-devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%_libdir/libmysqld.a
|
%{_libdir}/libmysqld.a
|
||||||
%_libdir/libmysqld.so
|
%{_libdir}/libmysqld.so
|
||||||
|
|
||||||
%files -n libmysqld18
|
%files -n libmysqld18
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%_libdir/libmysqld.so.*
|
%{_libdir}/libmysqld.so.*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n libmysqlclient18
|
%files -n libmysqlclient18
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%{_libdir}/libmysqlclient.so.*
|
%{_libdir}/libmysqlclient.so.*
|
||||||
|
|
||||||
%if 0%{cluster} > 1
|
|
||||||
%files -n libndbclient6
|
|
||||||
%defattr(-, root, root)
|
|
||||||
%{_libdir}/libndbclient.so.*
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n libmysqlclient_r18
|
%files -n libmysqlclient_r18
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%{_libdir}/libmysqlclient_r.so.*
|
%{_libdir}/libmysqlclient_r.so.*
|
||||||
|
|
||||||
%files bench -f mysql-bench.files
|
%files bench -f mysql-bench.files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
/usr/share/sql-bench
|
%{_datadir}/sql-bench
|
||||||
|
|
||||||
%files debug-version
|
|
||||||
%defattr(-, root, root)
|
|
||||||
/usr/sbin/mysqld-debug
|
|
||||||
%{_libdir}/mysql/mysqld-debug.sym
|
|
||||||
|
|
||||||
%files test -f mysql-test.files
|
%files test -f mysql-test.files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%{_bindir}/my_safe_process
|
%{_bindir}/my_safe_process
|
||||||
%_mandir/man1/mysql-test-run.pl.1*
|
%{_mandir}/man1/mysql-test-run.pl.1*
|
||||||
%_mandir/man1/mysql-stress-test.pl.1*
|
%{_mandir}/man1/mysql-stress-test.pl.1*
|
||||||
/usr/share/mysql-test/valgrind.supp
|
%{_datadir}/mysql-test/valgrind.supp
|
||||||
%dir %attr(755, root, root)/usr/share/mysql-test
|
%dir %attr(755, root, root)%{_datadir}/mysql-test
|
||||||
/usr/share/mysql-test/[^v]*
|
%{_datadir}/mysql-test/[^v]*
|
||||||
%dir %attr(755, mysql, mysql) /usr/share/mysql-test/var
|
%dir %attr(755, mysql, mysql) %{_datadir}/mysql-test/var
|
||||||
|
|
||||||
%files tools -f mysql-tools.files
|
%files tools -f mysql-tools.files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%_bindir/mysqlrepair
|
%{_bindir}/mysqlrepair
|
||||||
%_bindir/mysqlanalyze
|
%{_bindir}/mysqlanalyze
|
||||||
%_bindir/mysqloptimize
|
%{_bindir}/mysqloptimize
|
||||||
|
|
||||||
%if 0%{cluster} > 0
|
|
||||||
%files ndb-storage -f mysql-ndb-storage.files
|
|
||||||
|
|
||||||
%files ndb-management -f mysql-ndb-management.files
|
|
||||||
|
|
||||||
%files ndb-tools -f mysql-ndb-tools.files
|
|
||||||
|
|
||||||
%files ndb-extra -f mysql-ndb-extra.files
|
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:d4bdfe7f2ac1d759c8ef4e0f05d7b4688685b572f833b66e6b05f14b152a3e6d
|
oid sha256:d0850543056d459a235ccb6e4d36f503e7dfe58a2ce2ef6015072d495000c533
|
||||||
size 24164
|
size 14898
|
||||||
|
@ -32,6 +32,10 @@
|
|||||||
# rc_reset clear local rc status (overall remains)
|
# rc_reset clear local rc status (overall remains)
|
||||||
# rc_exit exit appropriate to overall rc status
|
# rc_exit exit appropriate to overall rc status
|
||||||
|
|
||||||
|
_rc_status_ret=0
|
||||||
|
_rc_status=$_rc_status_ret
|
||||||
|
_rc_status_all=$_rc_status
|
||||||
|
|
||||||
rc_check ()
|
rc_check ()
|
||||||
{
|
{
|
||||||
_rc_status_ret=$?
|
_rc_status_ret=$?
|
||||||
@ -301,9 +305,9 @@ else
|
|||||||
unset MYSQLD
|
unset MYSQLD
|
||||||
|
|
||||||
# use mysqld-debug only if explicitly requested (TODO: sysconfig variable?)
|
# use mysqld-debug only if explicitly requested (TODO: sysconfig variable?)
|
||||||
if test "$MYSQLD_DEBUG" = yes -a -x /usr/sbin/mysqld-debug
|
if test "$MYSQLD_DEBUG" = yes -a -x /usr/sbin/mysqld
|
||||||
then
|
then
|
||||||
MYSQLD=/usr/sbin/mysqld-debug
|
MYSQLD=/usr/sbin/mysqld
|
||||||
elif test -x /usr/sbin/mysqld-max
|
elif test -x /usr/sbin/mysqld-max
|
||||||
then
|
then
|
||||||
MYSQLD=/usr/sbin/mysqld-max
|
MYSQLD=/usr/sbin/mysqld-max
|
||||||
@ -422,27 +426,12 @@ else
|
|||||||
# Run mysql_upgrade on every package install/upgrade. Not always
|
# Run mysql_upgrade on every package install/upgrade. Not always
|
||||||
# necessary, but doesn't do any harm. On big upgrade, require
|
# necessary, but doesn't do any harm. On big upgrade, require
|
||||||
# user confirmation.
|
# user confirmation.
|
||||||
if [ -f "/var/lib/mysql/.run-mysql_upgrade" ]; then
|
if [ -f "$datadir/.run-mysql_upgrade" ]; then
|
||||||
if [ \! -f "/var/lib/mysql/.force_upgrade" ] && \
|
|
||||||
[ -f "$datadir/mysql_upgrade_info" ] && \
|
|
||||||
[ -z "`grep "^$MYSQLVER" "$datadir/mysql_upgrade_info" 2> /dev/null`" ]; then
|
|
||||||
echo
|
|
||||||
echo "You are upgrading from different stable version of MySQL!"
|
|
||||||
echo "Make sure you to make backup of your data (mostly $datadir)!"
|
|
||||||
echo
|
|
||||||
echo "If you want to continue upgrading your database, run following commands:"
|
|
||||||
echo
|
|
||||||
echo " touch /var/lib/mysql/.force_upgrade"
|
|
||||||
echo " rcmysql restart"
|
|
||||||
echo
|
|
||||||
rc_failed; rc_status -v; rc_exit
|
|
||||||
|
|
||||||
fi
|
|
||||||
echo > "$log_upgrade"
|
echo > "$log_upgrade"
|
||||||
echo "`LANG="" date` - upgrading MySQL..." >> "$log_upgrade"
|
echo "`LANG="" date` - upgrading MySQL..." >> "$log_upgrade"
|
||||||
echo >> "$log_upgrade"
|
echo >> "$log_upgrade"
|
||||||
echo "Will update MySQL now, if you encounter any problems, please read following file:" | tee -a "$log_upgrade"
|
echo "Will update MySQL now, if you encounter any problems, please read following file:" | tee -a "$log_upgrade"
|
||||||
echo " /usr/share/doc/packages/mysql/README.SuSE" | tee -a "$log_upgrade"
|
echo " /usr/share/doc/packages/mysql/README.SUSE" | tee -a "$log_upgrade"
|
||||||
sed -i -e 's|^\([[:blank:]]*\)skip-locking|\1skip-external-locking|' \
|
sed -i -e 's|^\([[:blank:]]*\)skip-locking|\1skip-external-locking|' \
|
||||||
-e 's|^\([[:blank:]]*skip-federated\)|#\1|' /etc/my.cnf
|
-e 's|^\([[:blank:]]*skip-federated\)|#\1|' /etc/my.cnf
|
||||||
[ -d /etc/mysql ] || \
|
[ -d /etc/mysql ] || \
|
||||||
@ -502,8 +491,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "Running protected MySQL... " | tee -a "$log_upgrade"
|
echo "Running protected MySQL... " | tee -a "$log_upgrade"
|
||||||
$SAFE_MYSQLD \
|
$MYSQLD \
|
||||||
--mysqld=${MYSQLD#/usr/sbin/} \
|
|
||||||
$debug_flags \
|
$debug_flags \
|
||||||
--skip-networking \
|
--skip-networking \
|
||||||
--skip-grant-tables \
|
--skip-grant-tables \
|
||||||
@ -564,6 +552,8 @@ else
|
|||||||
rm -f /var/lib/mysql/.run-mysql_upgrade
|
rm -f /var/lib/mysql/.run-mysql_upgrade
|
||||||
rm -f /var/lib/mysql/.force_upgrade
|
rm -f /var/lib/mysql/.force_upgrade
|
||||||
rm -f "$datadir"/{update-stamp-*,mysql/stamp-4.1} # used in the past
|
rm -f "$datadir"/{update-stamp-*,mysql/stamp-4.1} # used in the past
|
||||||
|
MYSQLVERSION="`mysqld --version 2> /dev/null | sed -n 's|mysqld[[:blank:]]\+Ver[[:blank:]]\+\([^[:blank:]]\+\)[[:blank:]].*|\1|p'`"
|
||||||
|
[ -z "$MYSQLVERSION" ] || echo "$MYSQLVERSION" > "$datadir"/mysql_upgrade_info
|
||||||
chown --no-dereference "$mysql_daemon_user:$mysql_daemon_group" "$log_upgrade"
|
chown --no-dereference "$mysql_daemon_user:$mysql_daemon_group" "$log_upgrade"
|
||||||
chmod 640 "$log_upgrade"
|
chmod 640 "$log_upgrade"
|
||||||
fi
|
fi
|
||||||
|
@ -251,9 +251,9 @@ else
|
|||||||
unset MYSQLD
|
unset MYSQLD
|
||||||
|
|
||||||
# use mysqld-debug only if explicitly requested (TODO: sysconfig variable?)
|
# use mysqld-debug only if explicitly requested (TODO: sysconfig variable?)
|
||||||
if test "$MYSQLD_DEBUG" = yes -a -x /usr/sbin/mysqld-debug
|
if test "$MYSQLD_DEBUG" = yes -a -x /usr/sbin/mysqld
|
||||||
then
|
then
|
||||||
MYSQLD=/usr/sbin/mysqld-debug
|
MYSQLD=/usr/sbin/mysqld
|
||||||
elif test -x /usr/sbin/mysqld-max
|
elif test -x /usr/sbin/mysqld-max
|
||||||
then
|
then
|
||||||
MYSQLD=/usr/sbin/mysqld-max
|
MYSQLD=/usr/sbin/mysqld-max
|
||||||
@ -372,27 +372,12 @@ else
|
|||||||
# Run mysql_upgrade on every package install/upgrade. Not always
|
# Run mysql_upgrade on every package install/upgrade. Not always
|
||||||
# necessary, but doesn't do any harm. On big upgrade, require
|
# necessary, but doesn't do any harm. On big upgrade, require
|
||||||
# user confirmation.
|
# user confirmation.
|
||||||
if [ -f "/var/lib/mysql/.run-mysql_upgrade" ]; then
|
if [ -f "$datadir/.run-mysql_upgrade" ]; then
|
||||||
if [ \! -f "/var/lib/mysql/.force_upgrade" ] && \
|
|
||||||
[ -f "$datadir/mysql_upgrade_info" ] && \
|
|
||||||
[ -z "`grep "^$MYSQLVER" "$datadir/mysql_upgrade_info" 2> /dev/null`" ]; then
|
|
||||||
echo
|
|
||||||
echo "You are upgrading from different stable version of MySQL!"
|
|
||||||
echo "Make sure you to make backup of your data (mostly $datadir)!"
|
|
||||||
echo
|
|
||||||
echo "If you want to continue upgrading your database, run following commands:"
|
|
||||||
echo
|
|
||||||
echo " touch /var/lib/mysql/.force_upgrade"
|
|
||||||
echo " rcmysql restart"
|
|
||||||
echo
|
|
||||||
rc_failed; rc_status -v; rc_exit
|
|
||||||
|
|
||||||
fi
|
|
||||||
echo > "$log_upgrade"
|
echo > "$log_upgrade"
|
||||||
echo "`LANG="" date` - upgrading MySQL..." >> "$log_upgrade"
|
echo "`LANG="" date` - upgrading MySQL..." >> "$log_upgrade"
|
||||||
echo >> "$log_upgrade"
|
echo >> "$log_upgrade"
|
||||||
echo "Will update MySQL now, if you encounter any problems, please read following file:" | tee -a "$log_upgrade"
|
echo "Will update MySQL now, if you encounter any problems, please read following file:" | tee -a "$log_upgrade"
|
||||||
echo " /usr/share/doc/packages/mysql/README.SuSE" | tee -a "$log_upgrade"
|
echo " /usr/share/doc/packages/mysql/README.SUSE" | tee -a "$log_upgrade"
|
||||||
sed -i -e 's|^\([[:blank:]]*\)skip-locking|\1skip-external-locking|' \
|
sed -i -e 's|^\([[:blank:]]*\)skip-locking|\1skip-external-locking|' \
|
||||||
-e 's|^\([[:blank:]]*skip-federated\)|#\1|' /etc/my.cnf
|
-e 's|^\([[:blank:]]*skip-federated\)|#\1|' /etc/my.cnf
|
||||||
[ -d /etc/mysql ] || \
|
[ -d /etc/mysql ] || \
|
||||||
@ -452,8 +437,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "Running protected MySQL... " | tee -a "$log_upgrade"
|
echo "Running protected MySQL... " | tee -a "$log_upgrade"
|
||||||
$SAFE_MYSQLD \
|
$MYSQLD \
|
||||||
--mysqld=${MYSQLD#/usr/sbin/} \
|
|
||||||
$debug_flags \
|
$debug_flags \
|
||||||
--skip-networking \
|
--skip-networking \
|
||||||
--skip-grant-tables \
|
--skip-grant-tables \
|
||||||
@ -514,6 +498,8 @@ else
|
|||||||
rm -f /var/lib/mysql/.run-mysql_upgrade
|
rm -f /var/lib/mysql/.run-mysql_upgrade
|
||||||
rm -f /var/lib/mysql/.force_upgrade
|
rm -f /var/lib/mysql/.force_upgrade
|
||||||
rm -f "$datadir"/{update-stamp-*,mysql/stamp-4.1} # used in the past
|
rm -f "$datadir"/{update-stamp-*,mysql/stamp-4.1} # used in the past
|
||||||
|
MYSQLVERSION="`mysqld --version 2> /dev/null | sed -n 's|mysqld[[:blank:]]\+Ver[[:blank:]]\+\([^[:blank:]]\+\)[[:blank:]].*|\1|p'`"
|
||||||
|
[ -z "$MYSQLVERSION" ] || echo "$MYSQLVERSION" > "$datadir"/mysql_upgrade_info
|
||||||
chown --no-dereference "$mysql_daemon_user:$mysql_daemon_group" "$log_upgrade"
|
chown --no-dereference "$mysql_daemon_user:$mysql_daemon_group" "$log_upgrade"
|
||||||
chmod 640 "$log_upgrade"
|
chmod 640 "$log_upgrade"
|
||||||
fi
|
fi
|
||||||
|
12
series
12
series
@ -4,14 +4,14 @@ mysql-community-server-5.1.46-logrotate.patch
|
|||||||
mariadb-5.1.50-strncat-overflow.patch
|
mariadb-5.1.50-strncat-overflow.patch
|
||||||
mariadb-5.5.28-install_db-quiet.patch
|
mariadb-5.5.28-install_db-quiet.patch
|
||||||
mysql-community-server-5.1.51-mysql_config.patch
|
mysql-community-server-5.1.51-mysql_config.patch
|
||||||
mariadb-5.5.25-mysqld_multi-features.patch
|
mariadb-10.0.15-mysqld_multi-features.patch
|
||||||
mariadb-5.5.32-upgrade-exit-status.patch
|
mariadb-5.5.32-upgrade-exit-status.patch
|
||||||
mariadb-5.2.3-cnf.patch
|
mariadb-5.2.3-cnf.patch
|
||||||
mysql-community-server-5.5.6-safe-process-in-bin.patch
|
mysql-community-server-5.5.6-safe-process-in-bin.patch
|
||||||
mariadb-10.0.11-group.patch
|
mariadb-10.0.17-group.patch
|
||||||
mariadb-10.0.5-deharcode-libdir.patch
|
mariadb-10.0.5-deharcode-libdir.patch
|
||||||
mariadb-10.0.14-upgrade-datadir.patch
|
mariadb-10.0.15-upgrade-datadir.patch
|
||||||
mysql-community-server-5.6.12-srv_buf_size.patch
|
mysql-community-server-5.6.12-srv_buf_size.patch
|
||||||
mariadb-10.0.9-perl-in-bench.patch
|
mariadb-10.0.16-header_files_const_warnings.patch
|
||||||
mariadb-10.0.11-header_files_const_warnings.patch
|
mariadb-10.0.15-fortify-and-O.patch
|
||||||
mariadb-10.0.13-default-source.patch
|
mariadb-10.0.15-logrotate-su.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user