Commit 7b838054 authored by lenz@mysql.com's avatar lenz@mysql.com

- Fixed build failure in mysql.spec.sh - linking against the special

  patched glibc would force static linking, which does not work with
  OpenSSL (which is now part of the Max binary)
- RPM spec file cleanups
- Init script cosmetical fix
parent cffcb38c
...@@ -140,7 +140,7 @@ case "$mode" in ...@@ -140,7 +140,7 @@ case "$mode" in
sleep 1 sleep 1
while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ] while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ]
do do
[ -z "$flags" ] && echo "Wait for mysqld to exit\c" || echo ".\c" [ -z "$flags" ] && echo -n "Wait for mysqld to exit" || echo -n "."
flags=a$flags flags=a$flags
sleep 1 sleep 1
done done
......
%define mysql_version @VERSION@ %define mysql_version @VERSION@
%define shared_lib_version @SHARED_LIB_VERSION@ %define shared_lib_version @SHARED_LIB_VERSION@
%define release 2 %define release 0
%define mysqld_user mysql %define mysqld_user mysql
%define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com %define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com
...@@ -45,6 +45,13 @@ The MySQL web site (http://www.mysql.com/) provides the latest ...@@ -45,6 +45,13 @@ The MySQL web site (http://www.mysql.com/) provides the latest
news and information about the MySQL software. Also please see the news and information about the MySQL software. Also please see the
documentation and the manual for more information. documentation and the manual for more information.
This package includes the MySQL server binary (statically linked,
compiled with InnoDB support) as well as related utilities to run
and administrate a MySQL server.
If you want to access and work with the database, you have to install
package "MySQL-client" as well!
%package client %package client
Release: %{release} Release: %{release}
Summary: MySQL - Client Summary: MySQL - Client
...@@ -111,15 +118,18 @@ languages and applications need to dynamically load and use MySQL. ...@@ -111,15 +118,18 @@ languages and applications need to dynamically load and use MySQL.
%package Max %package Max
Release: %{release} Release: %{release}
Summary: MySQL - server with Berkeley DB and Innodb support Summary: MySQL - server with Berkeley DB, OpenSSL and UDF support
Group: Applications/Databases Group: Applications/Databases
Provides: mysql-Max Provides: mysql-Max
Obsoletes: mysql-Max Obsoletes: mysql-Max
%description Max %description Max
Optional MySQL server binary that supports additional features like Optional MySQL server binary that supports additional features like
transactional tables. To activate this binary, just install this Berkeley DB, OpenSSL support and User Defined Functions (UDF).
package in addition to the MySQL package. To activate this binary, just install this package in addition to
the standard MySQL package.
Please note that this is a dynamically linked binary!
%package embedded %package embedded
Release: %{release} Release: %{release}
...@@ -214,16 +224,15 @@ mkdir -p $RBR ...@@ -214,16 +224,15 @@ mkdir -p $RBR
PATH=${MYSQL_BUILD_PATH:-/bin:/usr/bin} PATH=${MYSQL_BUILD_PATH:-/bin:/usr/bin}
export PATH export PATH
# We need to build shared libraries separate from mysqld-max because we # Build the 4.0 Max binary (includes BDB and OpenSSL and therefore
# are using --with-other-libc # cannot be linked statically against the patched glibc)
BuildMySQL "--disable-shared \ BuildMySQL "--enable-shared \
$USE_OTHER_LIBC_DIR \ --with-berkeley-db \
--with-berkeley-db \ --with-innodb \
--with-innodb \ --with-openssl \
--with-openssl \ --with-vio \
--with-vio \ --with-server-suffix='-Max'"
--with-server-suffix='-Max'"
# Save everything for debug # Save everything for debug
# tar cf $RBR/all.tar . # tar cf $RBR/all.tar .
...@@ -232,13 +241,7 @@ BuildMySQL "--disable-shared \ ...@@ -232,13 +241,7 @@ BuildMySQL "--disable-shared \
mv sql/mysqld sql/mysqld-max mv sql/mysqld sql/mysqld-max
nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym
# Save manual to avoid rebuilding # Save libraries
mv Docs/manual.ps Docs/manual.ps.save
make distclean
mv Docs/manual.ps.save Docs/manual.ps
# now build and save shared libraries
BuildMySQL "--enable-shared --enable-thread-safe-client --without-server "
(cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*) (cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*)
(cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*) (cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*)
...@@ -250,13 +253,15 @@ mv Docs/manual.ps.save Docs/manual.ps ...@@ -250,13 +253,15 @@ mv Docs/manual.ps.save Docs/manual.ps
# RPM:s destroys Makefile.in files, so we generate them here # RPM:s destroys Makefile.in files, so we generate them here
automake automake
# Now build the statically linked 4.0 binary (which includes InnoDB)
BuildMySQL "--disable-shared \ BuildMySQL "--disable-shared \
--with-mysqld-ldflags='-all-static' \ --with-mysqld-ldflags='-all-static' \
--with-client-ldflags='-all-static' \ --with-client-ldflags='-all-static' \
$USE_OTHER_LIBC_DIR \ $USE_OTHER_LIBC_DIR \
--without-berkeley-db \ --without-berkeley-db \
--without-vio \ --with-innodb \
--without-openssl" --without-vio \
--without-openssl"
nm --numeric-sort sql/mysqld > sql/mysqld.sym nm --numeric-sort sql/mysqld > sql/mysqld.sym
%install -n mysql-%{mysql_version} %install -n mysql-%{mysql_version}
...@@ -266,20 +271,18 @@ MBD=$RPM_BUILD_DIR/mysql-%{mysql_version} ...@@ -266,20 +271,18 @@ MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
# Ensure that needed directories exists # Ensure that needed directories exists
install -d $RBR/etc/{logrotate.d,rc.d/init.d} install -d $RBR/etc/{logrotate.d,rc.d/init.d}
install -d $RBR/var/lib/mysql/mysql install -d $RBR/var/lib/mysql/mysql
install -d $RBR/usr/share/sql-bench install -d $RBR/usr/share/{sql-bench,mysql-test}
install -d $RBR/usr/share/mysql-test
install -d $RBR%{_mandir} install -d $RBR%{_mandir}
install -d $RBR/usr/{sbin,share,include} install -d $RBR/usr/{sbin,lib,include}
install -d $RBR/usr/lib
# Install all binaries stripped except for mysqld (required for UDFs # Install all binaries stripped
# to work)
make install-strip DESTDIR=$RBR benchdir_root=/usr/share/ make install-strip DESTDIR=$RBR benchdir_root=/usr/share/
# Install shared libraries (Disable for architectures that don't support it) # Install shared libraries (Disable for architectures that don't support it)
(cd $RBR/usr/lib; tar xf $RBR/shared-libs.tar) (cd $RBR/usr/lib; tar xf $RBR/shared-libs.tar)
# install saved mysqld-max # install saved mysqld-max
install -m755 $MBD/sql/mysqld-max $RBR/usr/sbin/mysqld-max install -s -m755 $MBD/sql/mysqld-max $RBR/usr/sbin/mysqld-max
# install symbol files ( for stack trace resolution) # install symbol files ( for stack trace resolution)
install -m644 $MBD/sql/mysqld-max.sym $RBR/usr/lib/mysql/mysqld-max.sym install -m644 $MBD/sql/mysqld-max.sym $RBR/usr/lib/mysql/mysqld-max.sym
...@@ -355,7 +358,13 @@ fi ...@@ -355,7 +358,13 @@ fi
# We do not remove the mysql user since it may still own a lot of # We do not remove the mysql user since it may still own a lot of
# database files. # database files.
# Clean up the BuildRoot
%clean
[ "$RBR" != "/" ] && [ -d $RBR ] && rm -rf $RBR;
%files %files
%defattr(755 root, root)
%doc %attr(644, root, root) COPYING COPYING.LIB README %doc %attr(644, root, root) COPYING COPYING.LIB README
%doc %attr(644, root, root) Docs/manual.{html,ps,texi,txt} Docs/manual_toc.html %doc %attr(644, root, root) Docs/manual.{html,ps,texi,txt} Docs/manual_toc.html
%doc %attr(644, root, root) support-files/my-*.cnf %doc %attr(644, root, root) support-files/my-*.cnf
...@@ -468,6 +477,16 @@ fi ...@@ -468,6 +477,16 @@ fi
%changelog %changelog
* Thu Jul 18 2002 Lenz Grimmer <lenz@mysql.com>
- Reworked the build steps a little bit: the Max binary is supposed
to include OpenSSL, which cannot be linked statically, thus trying
to statically link against a special glibc is futile anyway
- because of this, it is not required to make yet another build run
just to compile the shared libs (saves a lot of time)
- updated package description of the Max subpackage
- clean up the BuildRoot directory afterwards
* Mon Jul 15 2002 Lenz Grimmer <lenz@mysql.com> * Mon Jul 15 2002 Lenz Grimmer <lenz@mysql.com>
- Updated Packager information - Updated Packager information
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment