Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
mysql5
>
mysql-5.1.48
> mysql.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File mysql.spec of Package mysql-5.1.48
# # spec file for package mysql (Version 5.1.48) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild # usedforbuild aaa_base acl attr audit-libs autoconf automake bash bind-libs bind-utils binutils bison bzip2 coreutils cpio cpp cracklib cvs cyrus-sasl db diffutils e2fsprogs file filesystem fillup findutils flex gawk gcc gcc-c++ gdbm gdbm-devel gettext gettext-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv klogd less libacl libattr libcom_err libgcc libgssapi libmudflap libnscd libstdc++ libstdc++-devel libtool libxcrypt libzio m4 make man mktemp module-init-tools ncurses ncurses-devel net-tools netcfg openldap2-client openssl pam pam-modules patch perl permissions popt procinfo procps psmisc pwdutils rcs readline readline-devel rpm sed strace sysvinit tar tcpd tcpd-devel texinfo timezone unzip util-linux vim zlib zlib-devel #!BuildIgnore: post-build-checks Name: mysql BuildRequires: gcc-c++ readline-devel tcpd-devel procps pwdutils %if 0%{?suse_version} > 1020 BuildRequires: fdupes %endif License: GPL v2 or later Group: Productivity/Databases/Servers Requires: mysql-client perl-DBD-mysql pwdutils AutoReqProv: on Version: 5.1.48 Release: 1 Url: http://www.mysql.com Summary: A True Multiuser, Multithreaded SQL Database Server PreReq: /usr/sbin/useradd /usr/sbin/groupadd fileutils %install_info_prereq %fillup_prereq %insserv_prereq Source: %{name}-%{version}.tar.bz2 Source1: rc.mysql Source2: README.SUSE # manual can be found in http://mysql.linux.cz/Downloads/Manual/ Source3: manual.pdf-5.1-en.pdf.bz2 Source4: suse-test-run Source5: mysql-rpmlintrc Patch2: %{name}-%{version}-cnf.patch Patch8: %{name}-%{version}-logrotate.patch Patch17: %{name}-%{version}-disable-versioned-symbols.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description SQL is the most popular database language in the world. MySQL is a client/server implementation that consists of a server daemon (mysqld) and many different client programs and libraries. The main goals of MySQL are speed, robustness, and ease of use. MySQL was originally developed because the developers at TcX needed an SQL server that could handle very large databases an order of magnitude faster than what any database vendor could offer them. They have now been using MySQL since 1996 in an environment with more than 40 databases containing 10,000 tables, of which more than 500 have more than 7 million rows. This is about 100 gigabytes of mission-critical data. The base upon which MySQL is built is a set of routines that have been used in a highly demanding production environment for many years. While MySQL is still in development, it already offers a rich and highly useful function set. The official way to pronounce MySQL is "My Ess Que Ell" (Not MY-SEQUEL). This package only contains the server-side programs. Authors: -------- Michael Widenius <monty@mysql.com> David Axmark <davida@mysql.com> %package devel Obsoletes: mysqldev Provides: mysqldev Requires: mysql-client mysql-shared = %{version} glibc-devel zlib-devel License: GPL v2 or later Summary: MySQL Development Header Files and Libraries Url: http://www.mysql.com Group: Development/Libraries/C and C++ AutoReqProv: on %description devel This package contains the development header files and libraries necessary to develop MySQL client applications. Authors: -------- Michael Widenius <monty@mysql.com> David Axmark <davida@mysql.com> %package client Obsoletes: mysqclnt Provides: mysqclnt License: GPL v2 or later Summary: MySQL Client Url: http://www.mysql.com Group: Productivity/Databases/Clients AutoReqProv: on %description client This package contains the standard MySQL clients. Authors: -------- Michael Widenius <monty@mysql.com> David Axmark <davida@mysql.com> %package bench Obsoletes: mysqbnch Provides: mysqbnch Requires: mysql-client perl-DBD-mysql License: GPL v2 or later Summary: MySQL - Benchmarks Url: http://www.mysql.com Group: Productivity/Databases/Tools AutoReqProv: on %description bench This package contains MySQL benchmark scripts and data. To run these database benchmarks, start the script "run-all-tests" in the directory /usr/share/sql-bench after starting MySQL. Authors: -------- Michael Widenius <monty@mysql.com> David Axmark <davida@mysql.com> %package shared Obsoletes: mysqllib Provides: mysqllib Summary: MySQL Shared Libraries License: GPL v2 or later Url: http://www.mysql.com Group: Development/Libraries/Other AutoReqProv: on %description shared This package contains the shared libraries (.so) which certain languages and applications need to dynamically load and use MySQL. Authors: -------- Michael Widenius <monty@mysql.com> David Axmark <davida@mysql.com> %package Max Summary: MySQL - Server with Berkeley DB License: GPL v2 or later Url: http://www.mysql.com Group: Productivity/Databases/Servers Requires: mysql AutoReqProv: on %description Max An optional MySQL server binary that supports features such as transactional tables. To make use of these features, just install this package in addition to the MySQL package. Authors: -------- Michael Widenius <monty@mysql.com> David Axmark <davida@mysql.com> %package test Summary: MySQL testsuite License: GPL v2 or later Url: http://www.mysql.com Group: Productivity/Databases/Servers Requires: mysql = %{version} mysql-client = %{version} perl-DBD-mysql AutoReqProv: on %description test This package contains the MySQL test scripts and data. To run the testsuite, run /usr/share/mysql-test/suse-test-run (or suse-test-run-Max for the mysql-Max package). Authors: -------- Michael Widenius <monty@mysql.com> David Axmark <davida@mysql.com> %debug_package %prep %setup -q -n %{name}-%{version} cp %{S:3} Docs/manual.pdf.bz2 bunzip2 Docs/manual.pdf.bz2 cp %{S:4} . %patch2 %patch8 %patch17 # remove unneeded man manpages rm -f man/mysqlman.1 man/safe_mysqld.1 %build autoreconf -f -i # Generate file reservedwords.texi from sql/lex.h echo "@multitable @columnfractions .25 .25 .25 .25" >Docs/reservedwords.texi x="@item"; n=4; a="" for i in `sed -n '/symbols\[] *=/,/};/s=.*"\([[:alpha:]_]*\)".*=\1=p' sql/lex.h`; do a="$a$x @code{$i}" x=" @tab" let --n || { echo $a >>Docs/reservedwords.texi; a=""; x="@item"; n=4; } done echo $a >>Docs/reservedwords.texi echo "@end multitable" >>Docs/reservedwords.texi # For some platforms the berkeley DB backend does not work. export BERKELEY="with" %ifarch ppc ppc64 s390 s390x mips alpha x86_64 sparc hppa export BERKELEY="without" %endif # Make the compile a function, since we have to do it twice BuildMySQL() { # The --enable-assembler simply does nothing on systems that do not # support assembler speedups. export CFLAGS="$RPM_OPT_FLAGS -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing" export CXXFLAGS="$RPM_OPT_FLAGS \ -fno-strict-aliasing \ -felide-constructors \ -fno-exceptions \ -fno-rtti \ -fPIC -DPIC -DUNDEF_HAVE_INITGROUPS" ./configure \ "$@" \ --enable-assembler \ --without-readline \ --enable-large-files \ --infodir=%{_infodir} \ --libdir=%{_libdir} \ --libexecdir=/usr/sbin \ --localstatedir=/var/lib/mysql \ --mandir=%{_mandir} \ --prefix=%{_prefix} \ --sysconfdir=/etc \ --with-mysqld-user=mysql \ --with-isam \ --without-debug \ --datadir=/usr/share \ --includedir=/usr/include \ --with-extra-charsets=complex \ --with-unix-socket-path=/var/lib/mysql/mysql.sock \ --enable-thread-safe-client \ --with-comment="SUSE MySQL RPM" \ --with-libwrap \ HOSTNAME="/bin/hostname -f" # Add this for more debugging support # --with-debug # Add this for MyISAM RAID support: # --with-raid # benchdir does not fit in above model. Fix when we make a separate package %ifarch s390 s390x # The atomic stuff doesn't work the way mySQL wants to use it # on s390, and s390x, so we have to make sure, that pthreads # mutexes are being used. ex config.h +/HAVE_ATOMIC_ADD/d +/HAVE_ATOMIC_SUB/d +w +q %endif make %{?jobs:-j%jobs} benchdir=$RPM_BUILD_ROOT/usr/share/sql-bench %if %{?_with_testsuite:1}0 make test %endif } # Build the shared libraries and mysqld-max BuildMySQL --enable-shared \ --${BERKELEY}-berkeley-db \ --with-innodb \ --with-archive-storage-engine \ --with-csv-storage-engine \ --with-mysqld-ldflags=-static \ --without-extra-tools \ --with-server-suffix=-Max # do not test for now, it tends to fail in autobuild #make test # Save shared libraries and mysqld-max mv sql/mysqld sql/mysqld-max nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym (cd libmysql/.libs; tar --wildcards -cf $RPM_BUILD_ROOT/shared-libs.tar *.so* *.lai) (cd libmysql_r/.libs; tar --wildcards -rf $RPM_BUILD_ROOT/shared-libs.tar *.so* *.lai) # Save manual to avoid rebuilding mv Docs/manual.pdf Docs/manual.pdf.save make clean mv Docs/manual.pdf.save Docs/manual.pdf # Now build the "normal" mysqld BuildMySQL --disable-shared \ --with-mysqld-ldflags=-static \ --with-client-ldflags=-static \ --without-embedded-server \ --without-vio \ --without-berkeley-db \ --without-ssl \ --with-extra-tools \ --with-archive-storage-engine \ --with-csv-storage-engine \ --with-innodb nm --numeric-sort sql/mysqld > sql/mysqld.sym #make test %install /usr/sbin/groupadd -g 60 -o -r mysql >/dev/null 2>/dev/null || : /usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \ -s /bin/bash -d /var/lib/mysql mysql 2> /dev/null || : # Create directory structure DOC="Docs/INSTALL-BINARY INSTALL-SOURCE README EXCEPTIONS-CLIENT" DOCDIR=$RPM_BUILD_ROOT/%{_defaultdocdir}/%{name} install -d -m 755 ${DOCDIR}/cnf install -d -m 755 ${DOCDIR}/data install -d -m 755 ${DOCDIR}/data/mysql install -d -m 755 ${DOCDIR}/html install -d -m 755 $RPM_BUILD_ROOT/usr/share/sql-bench install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d install -d -m 755 $RPM_BUILD_ROOT%{_libdir} install -d -m 755 $RPM_BUILD_ROOT/etc/init.d install -d -m 755 $RPM_BUILD_ROOT/usr/sbin install -d -m 755 $RPM_BUILD_ROOT/var/lib/mysql make install DESTDIR=$RPM_BUILD_ROOT benchdir_root=/usr/share/ # Install shared libraries (cd $RPM_BUILD_ROOT/usr/%_lib; tar --wildcards -xf $RPM_BUILD_ROOT/shared-libs.tar "*.so*") # install saved mysqld-max install -m 755 sql/mysqld-max $RPM_BUILD_ROOT/usr/sbin/mysqld-max # install symbol files ( for stack trace resolution) install -m 644 sql/mysqld-max.sym $RPM_BUILD_ROOT%{_libdir}/mysql/mysqld-max.sym install -m 644 sql/mysqld.sym $RPM_BUILD_ROOT%{_libdir}/mysql/mysqld.sym # Preserve *.la from shared build (cd $RPM_BUILD_ROOT%{_libdir}/mysql tar --wildcards -xf $RPM_BUILD_ROOT/shared-libs.tar "*.lai" rm $RPM_BUILD_ROOT/shared-libs.tar for f in *.lai; do mv $f ${f%i}; done cd ..; LIBCLIENT=../`ls libmysqlclient.so.*.*.*` for f in libmysqlclient.so*; do ln -fs $LIBCLIENT mysql/$f; done LIBCLIENT=../`ls libmysqlclient_r.so.*.*.*` for f in libmysqlclient_r.so*; do ln -fs $LIBCLIENT mysql/$f; done) install -m 644 support-files/mysql-log-rotate $RPM_BUILD_ROOT/etc/logrotate.d/mysql install -m 660 support-files/my-medium.cnf $RPM_BUILD_ROOT/etc/my.cnf install -m 640 scripts/mysqlaccess.conf $RPM_BUILD_ROOT/etc/mysqlaccess.conf install -m 644 ${DOC} ${DOCDIR} install -m 644 %{SOURCE2} ${DOCDIR} install -m 644 Docs/manual.pdf ${DOCDIR} #install -m 644 Docs/manual.txt ${DOCDIR} #install -m 644 Docs/manual.html ${DOCDIR}/html #install -m 644 Docs/manual_toc.html ${DOCDIR}/html #rm -f ${DOCDIR}/html/index.html #ln -s ./manual_toc.html ${DOCDIR}/html/index.html install -m 644 support-files/my-*.cnf ${DOCDIR}/cnf install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/mysql rm -f $RPM_BUILD_ROOT/sbin/rcmysql ln -s ../../etc/init.d/mysql $RPM_BUILD_ROOT/usr/sbin/rcmysql #install -m 755 scripts/mysql_install_db ${DOCDIR} rm -f $RPM_BUILD_ROOT/usr/bin/make_win_src_distribution rm -f $RPM_BUILD_ROOT/usr/bin/make_win_binary_distribution install -m 755 -d $RPM_BUILD_ROOT/var/lib/mysql/.tmp # testsuite mkdir -p $RPM_BUILD_ROOT/usr/share mv $RPM_BUILD_ROOT/usr/mysql-test $RPM_BUILD_ROOT/usr/share/mysql-test sed 's/%%{mysql_binary}/mysqld/g' <suse-test-run >$RPM_BUILD_ROOT/usr/share/mysql-test/suse-test-run sed 's/%%{mysql_binary}/mysqld-max/g' <suse-test-run >$RPM_BUILD_ROOT/usr/share/mysql-test/suse-test-run-Max chmod +x $RPM_BUILD_ROOT/usr/share/mysql-test/suse-test-run* # XXX this should go under /var/..., but some tests get confused by a symlink # var -> ../../../var/... #ln -s ../../../var/lib/mysql/mysql-test $RPM_BUILD_ROOT/usr/share/mysql-test/var mkdir $RPM_BUILD_ROOT/usr/share/mysql-test/var %if 0%{?suse_version} > 1020 # create symlinks %fdupes -s $RPM_BUILD_ROOT/usr/share/mysql-test %endif %pre /usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || : /usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \ -s /bin/bash -d /var/lib/mysql mysql 2> /dev/null || : /usr/sbin/usermod -g mysql -s /bin/bash mysql dbfile=var/mysql/mysql/db.ISM olddir=var/mysql newdir=var/lib/mysql # Do the database files still belong to root (very old installation)? # Change ownerships if [ -O $dbfile ] then chown -Rv mysql:mysql var/mysql/ fi # Copy existing database files to the new location # only if they do not exist yet! if [ -d $olddir ] && ! [ -d $newdir ] then cp -a $olddir $newdir || echo "Error while copying the database files to the new location!" fi %post %{fillup_and_insserv mysql} %install_info --info-dir=%{_infodir} %{_infodir}/mysql.info.gz chown -R mysql:mysql /var/lib/mysql # users usually look into /var/log for logfiles # doing this in %%build wouldn't pass brp-symlink # also we don't want to overwrite existing files (actaully sth like %%ghost) ln -s ../lib/mysql/mysqld.log /var/log/mysqld.log 2>/dev/null || : %preun %stop_on_removal mysql %postun %install_info_delete --info-dir=%{_infodir} %{_infodir}/mysql.info.gz %restart_on_update mysql %{insserv_cleanup} %post shared -p /sbin/ldconfig %postun shared -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT; %files %defattr(-, root, root) %config %attr(-, mysql, mysql) /etc/my.cnf %config /etc/init.d/mysql %config /etc/logrotate.d/mysql %doc %{_defaultdocdir}/%{name} %doc %{_infodir}/mysql.info.gz %doc %{_mandir}/man1/myisamchk.1.gz %doc %{_mandir}/man1/myisamlog.1.gz %doc %{_mandir}/man1/myisampack.1.gz %doc %{_mandir}/man1/myisam_ftdump.1.gz %doc %{_mandir}/man1/mysql.server.1.gz %doc %{_mandir}/man1/mysql_zap.1.gz %doc %{_mandir}/man1/mysql_fix_privilege_tables.1.gz %doc %{_mandir}/man1/mysqlhotcopy.1.gz ##%doc %{_mandir}/man1/mysqld.1.gz %doc %{_mandir}/man1/mysqld_multi.1.gz %doc %{_mandir}/man1/mysqld_safe.1.gz %doc %{_mandir}/man1/mysql_upgrade.1.gz ##%doc %{_mandir}/man1/mysqlmanager.1.gz ##%doc %{_mandir}/man1/mysql_explain_log.1.gz %doc %{_mandir}/man1/comp_err.1.gz %doc %{_mandir}/man1/innochecksum.1.gz ##%doc %{_mandir}/man1/make_win_bin_dist.1.gz %doc %{_mandir}/man1/my_print_defaults.1.gz %doc %{_mandir}/man1/mysql-stress-test.pl.1.gz %doc %{_mandir}/man1/mysql-test-run.pl.1.gz %doc %{_mandir}/man1/mysql_client_test.1.gz %doc %{_mandir}/man1/mysql_convert_table_format.1.gz %doc %{_mandir}/man1/mysql_find_rows.1.gz %doc %{_mandir}/man1/mysql_fix_extensions.1.gz %doc %{_mandir}/man1/mysql_install_db.1.gz %doc %{_mandir}/man1/mysql_secure_installation.1.gz %doc %{_mandir}/man1/mysql_setpermission.1.gz %doc %{_mandir}/man1/mysql_tzinfo_to_sql.1.gz %doc %{_mandir}/man1/mysql_waitpid.1.gz %doc %{_mandir}/man1/mysqlslap.1.gz %doc %{_mandir}/man1/mysqltest.1.gz %doc %{_mandir}/man1/resolve_stack_dump.1.gz %doc %{_mandir}/man1/resolveip.1.gz %doc %{_mandir}/man1/mysqlbug.1.gz %doc %{_mandir}/man1/mysqldumpslow.1.gz %doc %{_mandir}/man8/mysqld.8.gz %doc %{_mandir}/man8/mysqlmanager.8.gz /usr/bin/my_print_defaults /usr/bin/myisamchk /usr/bin/myisamlog /usr/bin/myisam_ftdump /usr/bin/mysql_convert_table_format /usr/bin/mysql_fix_privilege_tables /usr/bin/mysql_install_db /usr/bin/mysql_upgrade /usr/bin/mysql_setpermission /usr/bin/mysql_zap /usr/bin/mysqlbug /usr/bin/mysqld_multi /usr/bin/mysqlhotcopy /usr/bin/mysqltest /usr/bin/myisampack /usr/bin/resolve_stack_dump /usr/bin/resolveip /usr/bin/mysqld_safe /usr/sbin/rcmysql /usr/share/mysql/ %dir %{_libdir}/mysql %dir %{_libdir}/mysql/plugin %attr(755,mysql,mysql)/var/lib/mysql /usr/bin/mysql_secure_installation /usr/bin/mysqldumpslow ##/usr/bin/mysql_explain_log /usr/bin/mysql_fix_extensions ##/usr/bin/mysql_create_system_tables /usr/bin/mysql_tzinfo_to_sql /usr/bin/innochecksum /usr/sbin/mysqld /usr/sbin/mysqlmanager %{_libdir}/mysql/mysqld.sym %files client %defattr(-, root, root) %config /etc/mysqlaccess.conf %doc %{_mandir}/man1/msql2mysql.1.gz %doc %{_mandir}/man1/mysql.1.gz %doc %{_mandir}/man1/mysqlaccess.1.gz %doc %{_mandir}/man1/mysqladmin.1.gz %doc %{_mandir}/man1/mysqlbinlog.1.gz %doc %{_mandir}/man1/mysqlcheck.1.gz %doc %{_mandir}/man1/mysqldump.1.gz %doc %{_mandir}/man1/mysqlimport.1.gz %doc %{_mandir}/man1/mysqlshow.1.gz %doc %{_mandir}/man1/perror.1.gz %doc %{_mandir}/man1/replace.1.gz /usr/bin/msql2mysql /usr/bin/mysql /usr/bin/mysql_waitpid /usr/bin/mysql_find_rows /usr/bin/mysqlaccess /usr/bin/mysqladmin /usr/bin/mysqlbinlog /usr/bin/mysqlcheck /usr/bin/mysqldump /usr/bin/mysqlimport /usr/bin/mysqlshow /usr/bin/perror /usr/bin/replace ##/usr/bin/mysql_tableinfo /usr/bin/mysql_client_test %files devel %defattr(-, root, root) %doc %{_mandir}/man1/mysql_config.1.gz ##/usr/bin/comp_err /usr/bin/mysql_config /usr/include/mysql %{_libdir}/mysql/*.*a %{_libdir}/libmysqlclient.so %{_libdir}/libmysqlclient_r.so %{_libdir}/mysql/libmysqlclient.so %{_libdir}/mysql/libmysqlclient_r.so %{_libdir}/mysql/plugin/*.*a %{_datadir}/aclocal/mysql.m4 %files bench %defattr(-, root, root) /usr/share/sql-bench /usr/bin/mysqlslap ##/usr/bin/mysqltestmanager ##/usr/bin/mysqltestmanager-pwgen ##/usr/bin/mysqltestmanagerc %files shared %defattr(-, root, root) %{_libdir}/*.so.* %{_libdir}/mysql/*.so.* %files Max %defattr(-, root, root) /usr/sbin/mysqld-max %{_libdir}/mysql/mysqld-max.sym %files test %defattr(-, root, root) /usr/share/mysql-test %dir %attr(755, mysql, mysql) /usr/share/mysql-test/var %changelog