Hello community,

here is the log from the commit of package mysql-cluster.547 for 
openSUSE:12.1:Update checked in at 2012-07-11 10:13:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.1:Update/mysql-cluster.547 (Old)
 and      /work/SRC/openSUSE:12.1:Update/.mysql-cluster.547.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mysql-cluster.547", Maintainer is ""

Changes:
--------
New Changes file:

--- /dev/null   2012-07-06 19:40:38.919402255 +0200
+++ /work/SRC/openSUSE:12.1:Update/.mysql-cluster.547.new/mysql-cluster.changes 
2012-07-11 10:13:09.000000000 +0200
@@ -0,0 +1,1704 @@
+-------------------------------------------------------------------
+Tue Jun 12 10:03:16 CEST 2012 - [email protected]
+
+- updated to MySQL Cluster 7.1.22 (based on MySQL 5.1.61)
+  see 
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-5-1-61-ndb-7-1-22.html
+- fixed CVE-2012-2122 (bnc#765092)
+
+-------------------------------------------------------------------
+Wed May  2 09:54:41 CEST 2012 - [email protected]
+
+- fixed default configuration file (bnc#734436)
+- updated to MySQL Cluster 7.1.21 (based on MySQL 5.1.61)
+  - fixes several security issues
+    - bugs:
+      bnc#726602, bnc#758460, bnc#758460, bnc#742272
+    - CVEs:
+      CVE-2012-1703, CVE-2012-0583, CVE-2012-1697,
+      CVE-2012-1688, CVE-2012-1696, CVE-2012-1690,
+      CVE-2009-5026, 
+  http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-7-1.html
+
+-------------------------------------------------------------------
+Mon Aug 15 07:52:54 CEST 2011 - [email protected]
+
+- updated to MySQL Cluster 7.1.15 (based on MySQL 5.1.56), see
+  
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-5-1-56-ndb-7-1-15.html
+  
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-5-1-56-ndb-7-1-14.html
+  
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-5-1-56-ndb-7-1-13.html
+  
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-5-1-51-ndb-7-1-12.html
+  
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-5-1-51-ndb-7-1-11.html
+- dropped obsolete directory in /var/run (bnc#710274)
+
+-------------------------------------------------------------------
+Wed Feb 23 16:13:33 CET 2011 - [email protected]
+
+- updated to MySQL Cluster 7.1.10 (based on MySQL 5.1.51), see
+  
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-5-1-51-ndb-7-1-10.html
+- fixed init script to
+  - work with SELinux (bnc#635645)
+  - allow running as different user/group
+  - create TMPDIR correctly
+
+-------------------------------------------------------------------
+Wed Feb 23 10:59:13 UTC 2011 - [email protected]
+
+- remove runlevel 2 from default start in init script or it isn't
+  usable on openSUSE 11.4 and later
+
+-------------------------------------------------------------------
+Mon Feb 21 01:42:47 CET 2011 - [email protected]
+
+- add default_plugins.cnf as source to specfile 
+
+-------------------------------------------------------------------
+Tue Dec 14 15:22:16 CET 2010 - [email protected]
+
+- updated to MySQL Cluster 7.1.9a (based on MySQL 5.1.51), see
+  
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-5-1-51-ndb-7-1-9a.html
+
+-------------------------------------------------------------------
+Fri Oct 22 11:11:41 CEST 2010 - [email protected]
+
+- fixed all places where variable was used in printf for format
+
+-------------------------------------------------------------------
+Thu Oct 21 11:10:21 CEST 2010 - [email protected]
+
+- fixed Mandriva build
+
+-------------------------------------------------------------------
+Wed Oct 20 08:45:56 CEST 2010 - [email protected]
+
+- rewritten spec file
+  - build and install parts are in separate file now
+  - patches in the archive
+    - contains more documentation
+    - contains tags
+    - adding/removing patches just at in one configuration file 
+
+-------------------------------------------------------------------
+Wed Sep 29 13:38:34 CEST 2010 - [email protected]
+
+- fixed init script to work on SELinux machines (bnc#635645)
+
+-------------------------------------------------------------------
+Tue Aug 24 15:02:39 CEST 2010 - [email protected]
+
+- updated to MySQL Cluster 7.0.16 (based on MySQL 5.1.47), see
+    
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-5-1-47-ndb-7-0-16.html
+
+-------------------------------------------------------------------
+Fri Jun  4 18:17:00 CEST 2010 - [email protected]
+
+- fixed requires
+
+-------------------------------------------------------------------
+Wed May 26 13:34:06 CEST 2010 - [email protected]
+
+- not obsoleting mysql to make mysql-community-server prefered provider
+- fixed build for Fedora 12
+
+-------------------------------------------------------------------
+Mon Apr 26 10:39:06 CEST 2010 - [email protected]
+
+- packaging MySQL Cluster libraries to be used by client and tools
+
+-------------------------------------------------------------------
+Mon Mar 29 19:11:43 CEST 2010 - [email protected]
+
+- updated to the MySQL Cluster (7.0.13)
+
+-------------------------------------------------------------------
+Mon Mar  8 15:19:41 UTC 2010 - [email protected]
+
+- adapted to the MySQL Cluster (7.0.9), see
+  http://dev.mysql.com/doc/mysql-cluster-excerpt/5.1/en/index.html
+
+-------------------------------------------------------------------
+Mon Mar  8 15:13:11 UTC 2010 - [email protected]
+
+- updated to 5.1.44, see
+  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-43.html
+  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-44.html
+- splitting out shared libmysqld shared library (quick dirty way)
+- preparing spec file to be more general and easily adjustable to 
+  other MySQL flavours
+
+-------------------------------------------------------------------
+Sun Jan 10 00:57:25 CET 2010 - [email protected]
+
+- updated to 5.1.42, see
+  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-42.html
+  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-41.html
+  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-40.html
+  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-39.html
+  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-38.html
+  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-37.html
+
+-------------------------------------------------------------------
+Tue Dec 15 01:23:16 CET 2009 - [email protected]
+
+- add baselibs.conf as a source
+
+-------------------------------------------------------------------
+Tue Dec  1 17:52:18 CET 2009 - [email protected]
+
+- removing compatibility symlink
+  - intended for 11.2 but never get there
+- fixing various security issues (bnc#557669) 
+  - upstream #47320 - checking server certificates (CVE-2009-4028)
+  - upstream #48291 - error handling in subqueries (CVE-2009-4019)
+  - upstream #47780 - preserving null_value flag in GeomFromWKB()
+                      (CVE-2009-4019)
+  - upstream #39277 - symlink behaviour fixed (CVE-2008-7247)
+  - upstream #32167 - symlink behaviour refixed (CVE-2009-4030)
+
+-------------------------------------------------------------------
+Wed Nov 11 14:23:43 CET 2009 - [email protected]
+
+- making pid file readable by everybody
+- fixing 'rcmysql status' for non-root
+
+-------------------------------------------------------------------
+Thu Oct 29 14:11:09 CET 2009 - [email protected]
+
+- adding /var/lib/mysql/mysql.sock symlink for compatibility with
+  applications for older versions
+- using kill instead of killproc as killproc matches by default all
+  running MySQL instances (even KDE ones)
+- checking for log consistency in rc script instead of post of spec
+  as it makes more sense
+
+-------------------------------------------------------------------
+Fri Oct 16 09:32:35 UTC 2009 - [email protected]
+
+- fix PreRequires or mysql package can't be used in build enviroment
+- do not fail on usermod call in %pre as specified
+
+-------------------------------------------------------------------
+Mon Oct 12 18:36:04 UTC 2009 - [email protected]
+
+- fix prereq for usermod
+
+-------------------------------------------------------------------
+Mon Oct  5 11:11:35 CEST 2009 - [email protected]
+
+- fixed my.cnf rights (bnc#539249)
+- fixed restart on update (bnc#520876)
+
+-------------------------------------------------------------------
+Tue Sep 15 16:45:23 CEST 2009 - [email protected]
+
+- Few better formulations in README.SuSE (bnc#539243)
+
+-------------------------------------------------------------------
+Tue Aug 25 10:19:04 CEST 2009 - [email protected]
+
++++ 1507 more lines (skipped)
++++ between /dev/null
++++ and 
/work/SRC/openSUSE:12.1:Update/.mysql-cluster.547.new/mysql-cluster.changes

New:
----
  README.SuSE
  README.debug
  baselibs.conf
  build.inc
  default_plugins.cnf
  install.inc
  mysql-cluster-gpl-7.1.22.tar.bz2
  mysql-cluster.changes
  mysql-cluster.spec
  mysql-patches.tar.bz2
  mysql.SuSEfirewall2
  rc.mysql-multi
  series
  suse-test-run

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mysql-cluster.spec ++++++
++++ 752 lines (skipped)

++++++ README.SuSE ++++++
Notes about MySQL 5.1 package:
==============================

With MySQL 5.1 package we introduced some changes you may like to know. Most of
them will affect you only if you are upgrading from previous version and you
did some changes to your configuration.

1) Plugins:
===========

One of the new features in MySQL 5.1 is support for plugins. So some of the
storage engines are now shipped like that. You can use following plugins:

 - archive
 - blackhole
 - federated
 - example

InnoDB is still compiled as internal part of MySQL. If you are upgrading from
version 5.0 or if this is your first installation of MySQL 5.1, all plugins
will be enabled by default and you can disable them manually later (see
http://dev.mysql.com/doc/refman/5.1/en/uninstall-plugin.html).

With this change you need to remove skip-federated option from your my.cnf file
if you have changed it manually. This option was there by default in previous
versions of MySQL.

2) File locations:
==================

There were some changes in files locations. Most of them were made in the
default configuration file so if you are experiencing problems and you have
made some manual adjustments to your /etc/my.cnf, try to merge this file with
/etc/my.cnf.rpmnew.

File locations changes:
 - MySQL socket file and pid file were moved from /var/lib/mysql to more
   reasonable location ( /var/run/mysql ) by default.
 - MySQL log files are in /var/log/mysql.

3) BerkeleyDB:
==============

MySQL no longer contains BerkeleyDB as storage engine. There is no fix for that
and if you used it before, you have to migrate your data to different storage
engine BEFORE updating. This can be done for example using following command:

        ALTER TABLE foo ENGINE = INNODB;

4) MySQL Upgrade Log
====================

If you missed messages displayed during automatic MySQL database upgrade, you
can find them from now on in

        /var/log/mysql/mysqld-upgrade.log

++++++ README.debug ++++++
Debugging mysqld crashes
========================
Author: Michal Marek <[email protected]>
Last modified: 2006-07-31

Contents
--------
1) Query log
2) Coredumps and Backtraces
3) Trace files

In case your MySQL server crashes, here are some hints on what to
include in a bugreport at https://bugzilla.novell.com/ . Please report
there only bugs in the MySQL packages packaged by Novell/SUSE, bugs in
binaries / source provided by MySQL AB should be reported at
http://bugs.mysql.com/ .

1) Query log
------------
  Note: Skip this chapter if you already have an exact query that
  crashes the server

To find out which query possibly crashed the server, add the following
line to your /etc/my.cnf into section [mysqld]:

    log=/var/lib/mysql/mysqld-query.log

Mysqld then will, at some performance cost, log all queries into this
file. After a server crash, you can examine the queries from the time it
crashed and try to reproduce the crash with single queries (this might
not allways work, eg. if the crash is caused by some race condition).

Note that this log file may become extremly large, so if you decide to
attach it whole to the bugzilla, don't forget to

    bzip2 -k /var/lib/mysql/mysqld-query.log

and attach the bzipped file instead.

2) Coredumps and Backtraces
---------------------------
Another valuable information for the developers is the backtrace. The
easies way to get one is to let mysqld produce a coredump. Add the
following line to your /etc/my.cnf into section [mysqld]:

    core-file

  Note: this unfortunatelly doesn't work in SUSE Linux 10.1 and older.
  On these systems, you need to run safe_mysqld directly under user
  mysql:

    su - mysql
    mysqld_safe --socket=/var/lib/mysql/mysql.sock \
        --datadir=/var/lib/mysql --core-file &

The core file will be written to the /var/lib/mysql/ directory. I
suggest setting the kernel variable kernel.core_uses_pid to 1

    sysctl -w kernel.core_uses_pid=1

so that the coredumps don't overwrite each other if you experience
multiple crashes.

After you got the core file, install the gdb and mysql-debuginfo
packages and run

    gdb /usr/sbin/mysqld /var/lib/mysql/core
    (gdb) bt

Replace mysqld with the mysqld version you used (mysqld, mysqld-max or
mysqld-debug) and core with the actual name of the coredump.

3) Trace files
--------------
You'll need the mysqld-debug binary from the mysql-debug package to get
a trace file. Install the mysqld-debug package and the start mysqld
using following command:

    $ MYSQLD_DEBUG=yes rcmysql start

  Note: The init script doesn't automatically pick up the mysqld-debug
  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

    /var/lib/mysql/myqld-query.log

and the trace file in

    /var/lib/mysql/mysqld.trace

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
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
calls/returns and will become _extremly_ huge after a while, so don't
attach it to bugzilla unless requested.

++++++ baselibs.conf ++++++
libmysqlclient16
libmysqlclient_r16
++++++ build.inc ++++++
%if 0%{?suse_version} < 1120 && 0%{?suse_version} > 0
%define socketpath /var/lib/mysql
%else
%define socketpath /var/run/mysql
%endif
autoreconf -f -i
export CFLAGS="$RPM_OPT_FLAGS -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS 
-DFORCE_INIT_OF_VARS -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS -fno-exceptions -fno-rtti"
# Make the compile a function, since we do multiple builds
BuildMySQL() {
        # The --enable-assembler simply does nothing on systems that do not
        # support assembler speedups.
        suffix="$1"; shift
        mkdir _build$suffix
        pushd _build$suffix
        ../configure \
                --enable-assembler \
                --without-readline \
                --infodir=%{_infodir} \
                --libdir=%{_libdir} \
                --libexecdir=/usr/sbin \
                --localstatedir=/var/lib/mysql \
                --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
                --with-ssl=/usr \
                --with-plugins=%{builtin_plugins} \
                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
BuildMySQL "" --with-embedded-server
# build mysqld-debug
BuildMySQL "-debug" --with-debug --without-embedded-server

%if 0%{?prefered} > 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

++++++ default_plugins.cnf ++++++
[server]
plugin-load=blackhole=ha_blackhole.so
plugin-load=federated=ha_federated.so
plugin-load=archive=ha_archive.so
++++++ install.inc ++++++
# install the debug server first, so that we don't overwrite the standard
# /usr/sbin/mysqld
mkdir -p %buildroot%_libdir/mysql
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 most static libs (FIXME: don't build them at all...)
rm -f %buildroot%_libdir/libmysqlclient*a
rm -f %buildroot%_libdir/mysql/*.a %buildroot%_libdir/mysql/*.la
rm -f %buildroot%_libdir/mysql/plugin/*a
# XXX: package these? The ndb tools are linked statically atm
rm -f %buildroot%_libdir/mysql/libndbclient.*
rm -f %{buildroot}/usr/share/mysql-test/mysql-test-run  
rm -f %{buildroot}/usr/share/mysql-test/mtr  
ln -sf mysql-test-run.pl %{buildroot}/usr/share/mysql-test/mtr  
ln -sf mysql-test-run.pl %{buildroot}/usr/share/mysql-test/mysql-test-run 
mv %{buildroot}/usr/share/mysql-test/lib/My/SafeProcess/my_safe_process 
%{buildroot}%{_bindir}
# generate filelist for binaries and their manpages (easier than enumerating
# all the binaries and manapages manually, esp. when there are new manpages in
# each release)
filelist()
{
        echo '%%defattr(-, root, root)'
        pushd %buildroot >/dev/null
        for i; do
                if test -e usr/sbin/"$i"; then
                        echo /usr/sbin/"$i"
                fi
                if test -e usr/bin/"$i"; then
                        echo /usr/bin/"$i"
                fi
                if ls usr/share/man/*/"$i".[1-9]* >/dev/null 2>&1; then
                        echo "%%doc %_mandir/*/$i.[1-9]*"
                fi
        done
        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 >mysql.files
filelist mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow 
>mysql-client.files
filelist mysql_config >libmysqlclient-devel.files
filelist mysqlslap >mysql-bench.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 +
# mysql-client.rpm)
filelist msql2mysql mysql_convert_table_format mysql_find_rows 
mysql_setpermission mysql_tzinfo_to_sql mysql_zap mysqlaccess mysqlhotcopy 
perror replace >mysql-tools.files
filelist ndbd ndbmtd ndbd_redo_log_reader >mysql-ndb-storage.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_{cpcd,delete_all,index_stat,drop_index,drop_table,print_file} 
ndbinfo_select_all >mysql-ndb-extra.files
### files not installed by make install
# Create directory structure
DOCS=(COPYING README EXCEPTIONS-CLIENT %_sourcedir/README.debug 
%_sourcedir/README.SuSE)
DOCDIR=%buildroot%_defaultdocdir/%name
install -d -m 755 ${DOCDIR}
install -d -m 755 %buildroot/etc/logrotate.d
install -d -m 755 %buildroot/etc/init.d
install -m 644 _build/support-files/mysql-log-rotate 
%buildroot/etc/logrotate.d/mysql
%if 0%{?prefered} > 0
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 _build/support-files/my-medium.cnf %buildroot/etc/my.cnf
install -m 640 scripts/mysqlaccess.conf %buildroot/etc/mysqlaccess.conf
for i in "${DOCS[@]}"; do
        install -m 644 "${i}" ${DOCDIR} || true
done
install -m 755 %_sourcedir/rc.mysql-multi %buildroot/etc/init.d/mysql
ln -sf ../../etc/init.d/mysql %buildroot/usr/sbin/rcmysql
# this is used by the init script
install -m 755 -d %buildroot/var/run/mysql
# SuSEfirewall service description
install -D -m 644 %_sourcedir/mysql.SuSEfirewall2 \
        %buildroot/etc/sysconfig/SuSEfirewall2.d/services/mysql
# testsuite
mkdir -p '%buildroot'/usr/share/mysql-test/
install -m 755 suse-test-run '%buildroot'/usr/share/mysql-test/
# XXX this should go under /var/..., but some tests get confused by a symlink
# var -> ../../../var/...
#ln -sf ../../../var/lib/mysql/mysql-test %buildroot/usr/share/mysql-test/var
mkdir '%buildroot'/usr/share/mysql-test/var
# Final fixes
find '%buildroot'/usr/share/mysql-test -name '*.orig' -delete
%if 0%{?suse_version} > 1030
%fdupes -s '%buildroot'/usr/share/mysql-test
%endif
%if 0%{?fedora_version} > 8
fdupes -q -n -r '%buildroot'/usr/share/mysql-test
%endif
dos2unixConversion() {
        %{__sed} -i 's/\r//g' "$1"
}
for i in `grep -Rl '\r' '%buildroot'/usr/share/sql-bench`; do
        dos2unixConversion "$i"
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%{prefered} > 0
cat libmysqlclient-devel.files | while read tmp; do
        cd '%buildroot'
        rm -f .$tmp
done
rm -rf '%buildroot'/%_libdir/libmysqld.*
rm -rf '%buildroot'/%_libdir/*.la
rm -rf '%buildroot'/%_libdir/*.so
rm -rf '%buildroot'/%_libdir/*.a
rm -rf '%buildroot'/%_includedir  
rm -rf '%buildroot'/%_datadir/man/*/mysql_config*  
rm -rf '%buildroot'/%_datadir/aclocal
%endif
sed -i 's|doc/packages/mysql|doc/packages/%{name}|g' 
'%buildroot'/etc/init.d/mysql
ln -s mysqlcheck '%buildroot'%_bindir/mysqlrepair
ln -s mysqlcheck '%buildroot'%_bindir/mysqlanalyze
ln -s mysqlcheck '%buildroot'%_bindir/mysqloptimize
mkdir -p '%buildroot'/etc/mysql
[ -z "`ls -1 %_sourcedir/*.cnf`" ] || cp %_sourcedir/*.cnf 
'%buildroot'/etc/mysql
++++++ mysql.SuSEfirewall2 ++++++
## Name: MySQL server
## Description: opens ports for MySQL in order to allow other hosts connect to 
it

# space separated list of allowed TCP ports
TCP="3306"

++++++ rc.mysql-multi ++++++
#!/bin/bash
# Copyright (c) 1995-2011 SuSE Linux AG Nuernberg, Germany.
#
# Author:     Lenz Grimmer
# Maintainer: Michal Hrusecky <[email protected]>
#
# mysqld_multi extension added by Richard Bos, 2008
#
# /etc/init.d/mysql
#
#   and its symbolic link
#
# /usr/sbin/rcmysql
#
### BEGIN INIT INFO
# Provides:       mysql
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start:  3 5
# Default-Stop:
# Short-Description: Start the MySQL database server
# Description:    Start the MySQL database server
### END INIT INFO

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
. /etc/rc.status

# First reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.

# Check for the location of initscript
if [ "`echo "$0" | grep "^\."`" ] || [ "`echo "$0" | grep "^[^/].*/"`" ]; then
        MYSELF="`pwd`/$0"
else
        MYSELF="$0"
fi

parse_arguments() {
  for arg do
    case "$arg" in
      --basedir=*)   basedir="`echo "$arg"            | sed -e 's/^[^=]*=//'`" 
;;
      --datadir=*)   datadir="`echo "$arg"            | sed -e 's/^[^=]*=//'`" 
;;
      --pid-file=*)  pid_file="`echo "$arg"           | sed -e 's/^[^=]*=//'`" 
;;
      --socket=*)    socket="`echo "$arg"             | sed -e 's/^[^=]*=//'`" 
;;
      --log-error=*) log_error="`echo "$arg"          | sed -e 's/^[^=]*=//'`" 
;;
      --user=*)      mysql_daemon_user="`echo "$arg"  | sed -e 's/^[^=]*=//'`" 
;;
      --group=*)     mysql_daemon_group="`echo "$arg" | sed -e 's/^[^=]*=//'`" 
;;
    esac
  done
}

wait_for_socket()
{
        local i
        for((i=0; i<150; i++)); do
                sleep 0.2
                test -S $1 && i='' && break
        done
        test -z "$i" || return 1
        return 0
}

# Don't run killproc -TERM, as it could send a SIGKILL as well, possibly
# resulting in database corruption. Run kill -TERM manually instead,  wait
# approximately 300 seconds and fail if mysql doesn't respond. This will at
# least prevent the SIGKILL when doing 'rcmysql stop' manually. During system
# shutdown, we are out of luck...
# See https://bugzilla.novell.com/show_bug.cgi?id=223209
kill_mysql ()
{
        local pid exe
        test -e "$pid_file" || return 7  # not running
        pid=`cat "$pid_file"` || return 4  # insufficient privileges
        if ! test -e /proc/version; then
                mount -n -t proc proc /proc
                test -e /proc/version || return 100
        fi
        test -L "/proc/$pid/exe" || return 7
        exe=`readlink "/proc/$pid/exe"` || return 4
        test "`echo "$exe" | grep "^$MYSQLD"`" || return 7
        kill -STOP "$pid"
        kill -TERM "$pid" || return 4 # suboptimal
        kill -CONT "$pid"
        for i in `seq 3000`; do
                # mysqld removes its pid file
                test -e "$pid_file" || return 0
                LC_ALL=C sleep 0.1
        done
        test -e "$pid_file" || return 0
        return 1
}

# Helper function which can end with any status
set_return_value() {
        return $1
}

# Checks for obsolete database
check_obsolete() {
        # check for ISAM tables
        tables="`find "$datadir" -name '*.ISM' 2> /dev/null | sed 
"s@$datadir/*@@; [email protected]@@; s@/@.@;"`"
        if test "$tables" ; then
                echo
                echo "Some tables still use ISAM format, which is NO LONGER 
SUPPORTED"
                echo "since mysql 5.0. To use these tables, you would need to 
open them"
                echo "from an older mysql server and convert to something 
better (eg. MyISAM)."
                echo
                echo "Tables using ISAM are: "
                echo "  $tables "
                echo
        fi
        # check for bdb tables
        tables="`find "$datadir" -name '*.db' 2> /dev/null | sed 
"s@$datadir/*@@; [email protected]@@; s@/@.@;"`"
        if test -n "$tables" ; then
                echo
                echo "Some tables still use BerkeleyDB format, which is NO 
LONGER SUPPORTED"
                echo "since mysql 5.1. To use these tables, you would need to 
open them"
                echo "from an older mysql server and convert to something 
better (eg. MyISAM)."
                echo
                echo "Tables using BerkeleyDB are: "
                echo "  $tables "
                echo
        fi
}

# Check if we want to run multiple instances.
[[ "`cat /etc/my.cnf | sed -n 's|^[[:blank:]]*\[mysqld[0-9]\+\]|yes|p'`" ]] && 
MYSQLD_MULTI=yes

# This was old way how to specify this, left for backward compatibility.
[[ -f /etc/sysconfig/mysql ]] && . /etc/sysconfig/mysql

if [[ "$MYSQLD_MULTI" == "yes" ]]; then

  [[ -x /usr/bin/mysqld_multi ]] || {
    echo -n "MySQL: /usr/bin/mysqld_multi not found" 
    rc_failed 5; rc_status -v; rc_exit;
  }

  case "$1" in
      start)

        # FIXME:
        # We assume a fresh install if the directory $datadir/mysql
        # does not exist and create the privilege database
        # if ! test -d $datadir/mysql; then
        #   echo -n "Creating MySQL privilege database... "
        #   mysql_install_db --user=$mysql_daemon_user --datadir=$datadir || {
        #     rc_failed;  rc_status -v; rc_exit
        #   }
        # fi
        echo -n "Starting service multi MySQL "
        mysqld_multi start

        # Remember status and be verbose
        rc_status -v
        ;;

      stop)
        echo -n "Shutting down service multi MySQL "
        mysqld_multi stop

        # Remember status and be verbose
        rc_status -v
        ;;

      try-restart)
        ## Stop the service and if this succeeds (i.e. the 
        ## service was running before), start it again.
        ## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
        "$MYSELF" status >/dev/null &&  "$MYSELF" restart

        # Remember status and be quiet
        rc_status
        ;;

      restart|force-reload)
        echo "Restarting service multi MySQL "
        "$MYSELF" stop
        "$MYSELF" start

        rc_status
        ;;

      reload)
        echo -n "Reloading service multi MySQL "
        mysqld_multi reload
        rc_status -v
        ;;
        
      status)
        STATUS=$(mysqld_multi report)
        echo -n "$STATUS"
        # Set the status for rc_status
        echo "$STATUS" | grep -q "is running"
        rc_status -v
        ;;

      *)
        echo "Usage: $MYSELF 
{start|stop|status|reload|restart|try-restart|force-reload}"
        exit 1
        ;;
  esac

else
        # Test, if mysqld or mysql-max actually exist
        unset MYSQLD

        # use mysqld-debug only if explicitly requested (TODO: sysconfig 
variable?)
        if test "$MYSQLD_DEBUG" = yes -a -x /usr/sbin/mysqld-debug
        then
                MYSQLD=/usr/sbin/mysqld-debug
        elif test -x /usr/sbin/mysqld-max
        then
                MYSQLD=/usr/sbin/mysqld-max
        elif test -x /usr/sbin/mysqld
        then
                MYSQLD=/usr/sbin/mysqld
        fi
                test "$MYSQLD" || {
                echo -n "Nor /usr/sbin/mysqld nor /usr/sbin/mysqld-max exists";
                rc_failed 5; rc_status -v; rc_exit;
        }


        # The following section has been taken from
        # the original MySQL init script
        # Note: If you want to change these variables, you'll make your life 
easier
        # if you do so in /etc/my.cnf, which is preserved during upgrades
        basedir=/usr
        datadir=/var/lib/mysql
        mysql_daemon_user=mysql
        mysql_daemon_group=mysql
        pid_file=/var/run/mysql/mysqld.pid
        socket=/var/run/mysql/mysql.sock
        print_defaults=/usr/bin/my_print_defaults
        log_error=/var/log/mysql/mysqld.log

        mode=$1 # start or stop

        log_base="`echo "$log_error" | sed 's|\.log$||'`"
        [ "$log_base" \!= "$log_error" ] || log_base="/var/log/mysql/mysql"
        log_upgrade="${log_base}-upgrade.log"
        log_upgrade_run="${log_base}-upgrade-run.log"
        log_query="${log_base}-query.log"

        parse_arguments `$print_defaults $defaults mysqld mysql_server`
        mkdir -m 755 -p /var/run/mysql
        chown $mysql_daemon_user:$mysql_daemon_group /var/run/mysql
        export TEMPDIR="`cat /var/run/mysql/tmpdir 2> /dev/null`"

        # Safeguard (relative paths, core dumps..)
        cd "$basedir"

        case "$1" in
            start)
                # exit gracefully, if we are already running
                "$MYSELF" status >/dev/null && echo -n "Starting service MySQL 
" && \
                rc_status -v && rc_exit

                # prepare tmp dir
                unset TMPDIR
                if [ "$TEMPDIR" ] && [ -d "$TEMPDIR" ] && \
                        [ "`ls -ld "$TEMPDIR" | grep 
"^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`"
 ]; then
                        rm -rf "$TEMPDIR"
                fi
                TEMPDIR="`mktemp -d -p /var/tmp mysql.XXXXXX | tee 
/var/run/mysql/tmpdir`"
                [ -z "$TEMPDIR" ] || chown 
"$mysql_daemon_user:$mysql_daemon_group" "$TEMPDIR"
                [ "`ls -ld "$TEMPDIR" | grep 
"^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`"
 ] || {
                        echo "Can't create secure $TEMPDIR"
                        rc_failed; rc_status -v; rc_exit;
                }

                # Test, if safe_mysqld actually exists
                SAFE_MYSQLD=/usr/bin/mysqld_safe
                test -x $SAFE_MYSQLD || {
                        echo "$SAFE_MYSQLD does not exist ";
                        rc_failed 5; rc_status -v; rc_exit;
                }
                debug_flags=""
                if test "$MYSQLD_DEBUG" = yes; then
                        # add --log, --core-file and --debug
                        # but only if not already set in my.cnf
                        if ! $print_defaults mysqld | \
                                grep -q -e '--log$' -e '--log[[:blank:]=]'
                        then
                                debug_flags="--log=${log_query}"
                        fi
                        if ! $print_defaults mysqld | grep -q -e '^--debug\>' &&
                                test "$MYSQLD" = /usr/sbin/mysqld-debug
                        then
                                debug_flags="$debug_flags 
--debug=d:t:F:L:o,$datadir/mysqld.trace"
                        fi
                        if ! $print_defaults mysqld | grep -q -e 
'^--core-file\>'
                        then
                                debug_flags="$debug_flags --core-file"
                        fi
                fi

                # Creating parent directories for logs
                for i in "$log_upgrade" "$log_query" "$log_error"; do
                        log_dir="`dirname "$i"`"
                        if [ \! -d "$log_dir" ]; then
                                mkdir -p "$log_dir"
                                chmod 660 "$log_dir"
                        fi
                done

                # We assume a fresh install if the directory $datadir/mysql
                # does not exist and create the privilege database
                if ! test -d "$datadir/mysql"; then
                        echo "Creating MySQL privilege database... "
                        mysql_install_db --user="$mysql_daemon_user" 
--datadir="$datadir" ||{
                                rc_failed;  rc_status -v; rc_exit
                        }
                fi
                check_obsolete
                # Run mysql_upgrade on every package install/upgrade. Not 
allways
                # necessary, but doesn't do any harm.
                if test -f "$datadir/.run-mysql_upgrade" ; then
                        echo >> "$log_upgrade"
                        echo "`LANG="" date` - upgrading MySQL..." >> 
"$log_upgrade"
                        echo >> "$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"
                        # Check logs for inconsistencies
                        SRCLOGS=""
                        ALL_SRCLOGS=""
                        for i in "$log_error" /var/lib/mysql/mysqld.log \
                                 /var/log/mysqld.log ; do
                                        if test -f "$i"; then
                                                SRCLOGS="$i"
                                                ALL_SRCLOGS="${ALL_SRCLOGS} 
${i}"
                                        fi
                        done
                        if [ "${ALL_SRCLOGS}" \!= " ${SRCLOGS}"  ]; then
                                echo "Log files inconsistency, please merge 
following files manually:"
                                echo $ALL_SRCLOGS | sed 's|[[:blank:]]\+|\n|' | 
sed 's|^|\t|'
                        else
                                if [ "$SRCLOGS" ]; then
                                        [ "$SRCLOGS" = "$log_error" ] || mv 
"$SRCLOGS" "$log_error"
                                fi
                        fi
                        check_obsolete >> "$log_upgrade"
                        # instead of running mysqld --bootstrap, which wouldn't 
allow
                        # us to run mysql_upgrade, we start a full-featured 
server with
                        # --skip-grant-tables and restict access to it by unix
                        # permissions of the named socket
                        protected="`cat /var/run/mysql/protecteddir 2> 
/dev/null`"
                        if [ -d "$protected" ]; then
                                pid="`cat "$protected/mysqld.pid" 2> /dev/null`"
                                if [ "$pid" ] && [ -d "/proc/$pid" ] &&
                                        [ "`readlink "/proc/$pid/exe" | grep 
"mysql"`" ]; then
                                                echo "Can't update as another 
updating process is currently running" | tee -a "$log_upgrade"
                                                echo "Please check process $pid 
and terminate it before restarting MySQL" | tee -a "$log_upgrade"
                                                rc_failed; rc_status -v; 
rc_exit;
                                else
                                        rm -rf "$protected"
                                fi
                        fi
                        protected="`mktemp -d -p /var/tmp 
mysql-protected.XXXXXX | tee /var/run/mysql/protecteddir`"
                        export TMPDIR="$TEMPDIR"
                        [ -z "$protected" ] || chown 
"$mysql_daemon_user:$mysql_daemon_group" "$protected"
                        [ "`ls -ld "$protected" | grep 
"^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`"
 ] || {
                                echo "Can't create secure $protected" | tee -a 
"$log_upgrade"
                                rc_failed; rc_status -v; rc_exit;
                        }

                        echo "Running protected MySQL... " | tee -a 
"$log_upgrade"
                        $SAFE_MYSQLD \
                                --mysqld=${MYSQLD#/usr/sbin/} \
                                $debug_flags \
                                --skip-networking \
                                --skip-grant-tables \
                                --datadir="$datadir" \
                                --user="$mysql_daemon_user" \
                                --log-error="$log_upgrade_run" \
                                --socket="$protected/mysql.sock" \
                                --pid-file="$protected/mysqld.pid" \
                                --group="$mysql_daemon_group" &>/dev/null &
                        wait_for_socket "$protected/mysql.sock" || {
                                echo "error: $protected/mysql.sock file didn't 
appeared... " | tee -a "$log_upgrade"
                                echo "       Try checking 
\"$log_upgrade_run\"... " | tee -a "$log_upgrade"
                                rc_failed; rc_status -v; rc_exit;
                        }
                        echo "Upgrading MySQL... " | tee -a "$log_upgrade"
                        /usr/bin/mysql_upgrade \
                                --socket="$protected/mysql.sock" | tee -a 
"$log_upgrade"
                        [ "$PIPESTATUS" -ne 0 ] && {
                                rc_failed; rc_status -v;
                                kill -TERM "`cat $protected/mysqld.pid`"
                                rc_exit; }
                        kill -TERM "`cat $protected/mysqld.pid`"
                        rm -rf "$protected"
                        # Fix ownerships and permissions for $datadir
                        chmod 750 "$datadir"
                        chown -R "$mysql_daemon_user:$mysql_daemon_group" 
"$datadir"
                        rm -f "$datadir/.run-mysql_upgrade" \
                        "$datadir"/{update-stamp-*,mysql/stamp-4.1} # used in 
the past
                        chown "$mysql_daemon_user:$mysql_daemon_group" 
"$log_upgrade"
                        chmod 640 "$log_upgrade"
                fi 

                export TMPDIR="$TEMPDIR"

                echo -n "Starting service MySQL "
                
                $SAFE_MYSQLD \
                        --mysqld=${MYSQLD#/usr/sbin/} \
                        $debug_flags \
                        --user="$mysql_daemon_user" \
                        --pid-file="$pid_file" \
                        --socket="$socket" \
                        --datadir="$datadir" &>/dev/null &

                wait_for_socket "$socket" || {
                        # let's not treat this as a fatal error
                        echo "warning: $socket didn't appear within 30 seconds"
                }
                chmod a+r "$pid_file"

                # Rmember status and be verbose
                rc_status -v
                ;;

            stop)
                echo -n "Shutting down service MySQL "
                kill_mysql
                if [ "$TEMPDIR" ] && [ -d "$TEMPDIR" ] && \
                        [ "`ls -ld "$TEMPDIR" | grep 
"^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`"
 ]; then
                        rm -rf "$TEMPDIR"
                fi
                # Remember status and be verbose
                rc_status -v
                ;;

            try-restart)
                ## Stop the service and if this succeeds (i.e. the 
                ## service was running before), start it again.
                ## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
                "$MYSELF" status >/dev/null &&  "$MYSELF" restart

                # Remember status and be quiet
                rc_status
                ;;

            restart|force-reload)
                echo "Restarting service MySQL "
                "$MYSELF" stop
                "$MYSELF" start

                rc_status
                ;;

            reload)
                echo -n "Reloading service MySQL "
                kill -HUP "`cat "$pid_file"`"
                touch "$pid_file"
                rc_status -v
                ;;
                
            check|status)
                echo -n "Checking for service MySQL: "
                ## Check status with checkproc(8), if process is running
                ## checkproc will return with exit status 0.

                # Status has a slightly different for the status command:
                # 0 - service running
                # 1 - service dead, but /var/run/  pid  file exists
                # 2 - service dead, but /var/lock/ lock file exists
                # 3 - service not running

                # NOTE: checkproc returns LSB compliant status values,
                #       but it checks for running binary first and only
                #       if it doesn't find running process with proper
                #       name it checks pidfile. So we can't use it because
                #       akonadi runs it's own database.
                # checkproc -p $pid_file $MYSQLD
                if [ -f "$pid_file" ]; then
                        if ! [ -e /proc/version ]; then
                                mount -n -t proc proc /proc
                                test -e /proc/version || set_return_value 100
                        fi
                        pid="`cat "$pid_file"`"
                        if [ "$pid" ] && [ -d "/proc/$pid" ]; then
                                cmd=`cat "/proc/$pid/cmdline" 2> /dev/null`
                                exe=`readlink "/proc/$pid/exe" 2> /dev/null`
                                if [ "`echo "$exe" | grep "^$MYSQLD"`" ] || [ 
"`echo "$cmd" | grep "^$MYSQLD"`" ]; then
                                        set_return_value 0
                                else
                                        set_return_value 1
                                fi
                        else
                                set_return_value 1
                        fi
                else
                        set_return_value 3
                fi
                rc_status -v
                ;;

            *)
                echo "Usage: $MYSELF 
{start|stop|status|reload|restart|try-restart|force-reload}"
                exit 1
                ;;
        esac
fi

rc_exit

# vim: ft=sh
++++++ series ++++++
mysql-community-server-5.1.31-shebang.patch
mysql-community-server-5.1.33-ssl-lib64-macro.patch
mysql-community-server-5.1.35-utf8-test-results.patch
mysql-community-server-5.1.36-bmove512.patch
mysql-community-server-5.1.36-hotcopy.patch
mysql-community-server-5.1.45-cnf.patch
mysql-community-server-5.1.45-group.patch
mysql-community-server-5.1.45-multi-configuration.patch
mysql-community-server-5.1.45-safe-process-in-bin.patch
mysql-community-server-5.1.46-logrotate.patch
mysql-cluster-7.1.8-myslq-test.patch
mysql-community-server-5.1.51-install_db-quiet.patch
mysql-community-server-5.1.51-libmysql-no-pkglibdir.patch
mysql-community-server-5.1.51-mysql_config.patch
mysql-community-server-5.1.51-mysqld_multi-features.patch
mysql-cluster-7.1.21-plugins-avoid-version.patch
mysql-community-server-5.1.51-upgrade-exit-status.patch
mysql-cluster-7.1.8-no-mysqld-examples.patch
mysql-cluster-7.1.9a-strncat-overflow.patch
mysql-cluster-7.1.22-CVE-2012-2122.patch
++++++ suse-test-run ++++++
#!/usr/bin/perl
#
# Test the SUSE mysql(-Max) package using the MySQL testsuite

my $id = getpwnam("mysql") or die "can't find user \"mysql\": $!";
my $dir = "/usr/share/mysql-test/";

if ($< == 0) {
        ($<, $>) = ($id, $id);
        if ($< != $id || $> != $id) {
                die "can't switch to user mysql(id $id): $!";
        }
}

chdir($dir) or die "can't cd to $dir: $!";
exec("./mysql-test-run.pl", "--big-test", @ARGV);
die "can't execute mysql-test-run.pl: $!";
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to