diff options
Diffstat (limited to 'support-files/mysql.spec.sh')
-rw-r--r-- | support-files/mysql.spec.sh | 100 |
1 files changed, 73 insertions, 27 deletions
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 372c70327b9..e49bc3f37f0 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1,6 +1,6 @@ %define mysql_version @VERSION@ %define shared_lib_version @SHARED_LIB_VERSION@ -%define release 2 +%define release 0 %define mysqld_user mysql %define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com @@ -16,7 +16,7 @@ Copyright: GPL / LGPL Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz Icon: mysql.gif URL: http://www.mysql.com/ -Packager: David Axmark <david@mysql.com> +Packager: Lenz Grimmer <lenz@mysql.com> Vendor: MySQL AB Requires: fileutils sh-utils Provides: msqlormysql MySQL-server mysql @@ -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 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 Release: %{release} Summary: MySQL - Client @@ -111,15 +118,18 @@ languages and applications need to dynamically load and use MySQL. %package Max Release: %{release} -Summary: MySQL - server with Berkeley DB and Innodb support +Summary: MySQL - server with Berkeley DB, RAID and UDF support Group: Applications/Databases Provides: mysql-Max Obsoletes: mysql-Max %description Max Optional MySQL server binary that supports additional features like -transactional tables. To activate this binary, just install this -package in addition to the MySQL package. +Berkeley DB, RAID and User Defined Functions (UDF). +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 Release: %{release} @@ -214,10 +224,14 @@ mkdir -p $RBR PATH=${MYSQL_BUILD_PATH:-/bin:/usr/bin} export PATH -# We need to build shared libraries separate from mysqld-max because we -# are using --with-other-libc +# Build the 4.0 Max binary (includes BDB and UDFs and therefore +# cannot be linked statically against the patched glibc) -BuildMySQL "--disable-shared $USE_OTHER_LIBC_DIR --with-berkeley-db --with-innodb --with-mysqld-ldflags='-all-static' --with-server-suffix='-Max'" +BuildMySQL "--enable-shared \ + --with-berkeley-db \ + --with-innodb \ + --with-raid \ + --with-server-suffix='-Max'" # Save everything for debug # tar cf $RBR/all.tar . @@ -226,13 +240,7 @@ BuildMySQL "--disable-shared $USE_OTHER_LIBC_DIR --with-berkeley-db --with-innod mv sql/mysqld sql/mysqld-max nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym -# Save manual to avoid rebuilding -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 " +# Save libraries (cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*) (cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*) @@ -244,11 +252,15 @@ mv Docs/manual.ps.save Docs/manual.ps # RPM:s destroys Makefile.in files, so we generate them here automake -BuildMySQL "--disable-shared" \ - "--with-mysqld-ldflags='-all-static'" \ - "--with-client-ldflags='-all-static'" \ - "$USE_OTHER_LIBC_DIR" \ - "--without-berkeley-db --without-innodb" +# Now build the statically linked 4.0 binary (which includes InnoDB) +BuildMySQL "--disable-shared \ + --with-mysqld-ldflags='-all-static' \ + --with-client-ldflags='-all-static' \ + $USE_OTHER_LIBC_DIR \ + --without-berkeley-db \ + --with-innodb \ + --without-vio \ + --without-openssl" nm --numeric-sort sql/mysqld > sql/mysqld.sym %install -n mysql-%{mysql_version} @@ -258,19 +270,18 @@ MBD=$RPM_BUILD_DIR/mysql-%{mysql_version} # Ensure that needed directories exists install -d $RBR/etc/{logrotate.d,rc.d/init.d} install -d $RBR/var/lib/mysql/mysql -install -d $RBR/usr/share/sql-bench -install -d $RBR/usr/share/mysql-test +install -d $RBR/usr/share/{sql-bench,mysql-test} install -d $RBR%{_mandir} -install -d $RBR/usr/{sbin,share,include} -install -d $RBR/usr/lib -# Make install -make install DESTDIR=$RBR benchdir_root=/usr/share/ +install -d $RBR/usr/{sbin,lib,include} + +# Install all binaries stripped +make install-strip DESTDIR=$RBR benchdir_root=/usr/share/ # Install shared libraries (Disable for architectures that don't support it) (cd $RBR/usr/lib; tar xf $RBR/shared-libs.tar) # 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 -m644 $MBD/sql/mysqld-max.sym $RBR/usr/lib/mysql/mysqld-max.sym @@ -280,6 +291,10 @@ install -m644 $MBD/sql/mysqld.sym $RBR/usr/lib/mysql/mysqld.sym install -m644 $MBD/support-files/mysql-log-rotate $RBR/etc/logrotate.d/mysql install -m755 $MBD/support-files/mysql.server $RBR/etc/rc.d/init.d/mysql +# Create symbolic compatibility link safe_mysqld -> mysqld_safe +# (safe_mysqld will be gone in MySQL 4.1) +ln -sf ./mysqld_safe $RBR/usr/bin/safe_mysqld + %pre if test -x /etc/rc.d/init.d/mysql then @@ -346,7 +361,13 @@ fi # We do not remove the mysql user since it may still own a lot of # database files. +# Clean up the BuildRoot +%clean +[ "$RBR" != "/" ] && [ -d $RBR ] && rm -rf $RBR; + %files +%defattr(755 root, root) + %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) support-files/my-*.cnf @@ -384,6 +405,7 @@ fi %attr(755, root, root) /usr/bin/replace %attr(755, root, root) /usr/bin/resolve_stack_dump %attr(755, root, root) /usr/bin/resolveip +%attr(755, root, root) /usr/bin/safe_mysqld %attr(755, root, root) /usr/sbin/mysqld %attr(644, root, root) /usr/lib/mysql/mysqld.sym @@ -459,6 +481,30 @@ fi %changelog +* Fri Aug 09 2002 Lenz Grimmer <lenz@mysql.com> + +- Turn off OpenSSL in MySQL-Max for now until it works properly again +- enable RAID for the Max binary instead +- added compatibility link: safe_mysqld -> mysqld_safe to ease the + transition from 3.23 + +* 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> + +- Updated Packager information +- Fixed the build options: the regular package is supposed to + include InnoDB and linked statically, while the Max package + should include BDB and SSL support + * Fri May 03 2002 Lenz Grimmer <lenz@mysql.com> - Use more RPM macros (e.g. infodir, mandir) to make the spec |