mysql.spec.sh 24.9 KB
Newer Older
unknown's avatar
unknown committed
1
%define mysql_version		@VERSION@
2
%define release			0
unknown's avatar
unknown committed
3
%define mysqld_user		mysql
4
%define server_suffix -standard
unknown's avatar
unknown committed
5

6 7
# We don't package all files installed into the build root by intention -
# See BUG#998 for details.
8
%define _unpackaged_files_terminate_build 0
9

unknown's avatar
unknown committed
10 11 12
%define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com

Name: MySQL
13
Summary:	MySQL: a very fast and reliable SQL database server
unknown's avatar
unknown committed
14 15 16 17 18
Group:		Applications/Databases
Summary(pt_BR): MySQL: Um servidor SQL rpido e confivel.
Group(pt_BR):	Aplicaes/Banco_de_Dados
Version:	@MYSQL_NO_DASH_VERSION@
Release:	%{release}
19
License:	GPL
unknown's avatar
unknown committed
20 21
Source:		http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz
URL:		http://www.mysql.com/
22
Packager:	Lenz Grimmer <build@mysql.com>
unknown's avatar
unknown committed
23
Vendor:		MySQL AB
24
Requires: fileutils sh-utils
25
Provides:	msqlormysql MySQL-server mysql
26
BuildPrereq: ncurses-devel
unknown's avatar
unknown committed
27 28 29 30
Obsoletes:	mysql

# Think about what you use here since the first step is to
# run a rm -rf
31
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
unknown's avatar
unknown committed
32 33 34

# From the manual
%description
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
and robust SQL (Structured Query Language) database server. MySQL Server
is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of
MySQL AB.

The MySQL software has Dual Licensing, which means you can use the MySQL
software free of charge under the GNU General Public License
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
licenses from MySQL AB if you do not wish to be bound by the terms of
the GPL. See the chapter "Licensing and Support" in the manual for
further info.

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.
unknown's avatar
unknown committed
51

52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
%package server
Release: %{release}
Summary:	MySQL: a very fast and reliable SQL database server
Group:		Applications/Databases
Summary(pt_BR): MySQL: Um servidor SQL rpido e confivel.
Group(pt_BR):	Aplicaes/Banco_de_Dados
Requires: fileutils sh-utils
Provides:	msqlormysql mysql-server mysql MySQL
Obsoletes:	MySQL mysql mysql-server

%description server
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
and robust SQL (Structured Query Language) database server. MySQL Server
is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of
MySQL AB.

The MySQL software has Dual Licensing, which means you can use the MySQL
software free of charge under the GNU General Public License
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
licenses from MySQL AB if you do not wish to be bound by the terms of
the GPL. See the chapter "Licensing and Support" in the manual for
further info.

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.

80 81 82 83 84 85 86
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!

unknown's avatar
unknown committed
87 88 89 90 91 92 93
%package client
Release: %{release}
Summary: MySQL - Client
Group: Applications/Databases
Summary(pt_BR): MySQL - Cliente
Group(pt_BR): Aplicaes/Banco_de_Dados
Obsoletes: mysql-client
unknown's avatar
unknown committed
94
Provides: mysql-client
unknown's avatar
unknown committed
95 96

%description client
97
This package contains the standard MySQL clients and administration tools. 
unknown's avatar
unknown committed
98 99 100 101 102 103 104 105

%{see_base}

%description client -l pt_BR
Este pacote contm os clientes padro para o MySQL.

%package bench
Release: %{release}
106
Requires: %{name}-client perl-DBI perl
107
Summary: MySQL - Benchmarks and test system
unknown's avatar
unknown committed
108 109 110
Group: Applications/Databases
Summary(pt_BR): MySQL - Medies de desempenho
Group(pt_BR): Aplicaes/Banco_de_Dados
unknown's avatar
unknown committed
111
Provides: mysql-bench
unknown's avatar
unknown committed
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
Obsoletes: mysql-bench

%description bench
This package contains MySQL benchmark scripts and data.

%{see_base}

%description bench -l pt_BR
Este pacote contm medies de desempenho de scripts e dados do MySQL.

%package devel
Release: %{release}
Summary: MySQL - Development header files and libraries
Group: Applications/Databases
Summary(pt_BR): MySQL - Medies de desempenho
Group(pt_BR): Aplicaes/Banco_de_Dados
unknown's avatar
unknown committed
128
Provides: mysql-devel
unknown's avatar
unknown committed
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
Obsoletes: mysql-devel

%description devel
This package contains the development header files and libraries
necessary to develop MySQL client applications.

%{see_base}

%description devel -l pt_BR
Este pacote contm os arquivos de cabealho (header files) e bibliotecas 
necessrias para desenvolver aplicaes clientes do MySQL. 

%package shared
Release: %{release}
Summary: MySQL - Shared libraries
Group: Applications/Databases

%description shared
This package contains the shared libraries (*.so*) which certain
languages and applications need to dynamically load and use MySQL.

150 151
%package Max
Release: %{release}
152
Summary: MySQL - server with Berkeley BD, RAID and UDF support
153
Group: Applications/Databases
unknown's avatar
unknown committed
154
Provides: mysql-Max
155
Obsoletes: mysql-Max
156
Requires: MySQL >= 4.0
157

unknown's avatar
unknown committed
158
%description Max 
159
Optional MySQL server binary that supports additional features like
160
Berkeley DB, RAID and User Defined Functions (UDFs).
161 162 163 164
To activate this binary, just install this package in addition to
the standard MySQL package.

Please note that this is a dynamically linked binary!
165

unknown's avatar
unknown committed
166 167
%package embedded
Release: %{release}
168
Requires: %{name}-devel
unknown's avatar
unknown committed
169 170 171 172
Summary: MySQL - embedded library
Group: Applications/Databases
Summary(pt_BR): MySQL - Medies de desempenho
Group(pt_BR): Aplicaes/Banco_de_Dados
173
Obsoletes: mysql-embedded
unknown's avatar
unknown committed
174

175
%description embedded
176 177 178 179 180 181 182 183 184
This package contains the MySQL server as an embedded library.

The embedded MySQL server library makes it possible to run a
full-featured MySQL server inside the client application.
The main benefits are increased speed and more simple management
for embedded applications.

The API is identical for the embedded MySQL version and the
client/server version.
unknown's avatar
unknown committed
185 186 187

%{see_base}

unknown's avatar
unknown committed
188 189 190 191 192
%prep
%setup -n mysql-%{mysql_version}

%build
# The all-static flag is to make the RPM work on different
unknown's avatar
unknown committed
193
# distributions. This version tries to put shared mysqlclient libraries
unknown's avatar
unknown committed
194 195 196 197 198
# in a separate package.

BuildMySQL() {
# The --enable-assembler simply does nothing on systems that does not
# support assembler speedups.
199
sh -c  "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
200 201
	CC=\"${CC:-$MYSQL_BUILD_CC}\" \
	CXX=\"${CXX:-$MYSQL_BUILD_CXX}\" \
202 203
	CFLAGS=\"${MYSQL_BUILD_CFLAGS:-$RPM_OPT_FLAGS}\" \
	CXXFLAGS=\"${MYSQL_BUILD_CXXFLAGS:-$RPM_OPT_FLAGS \
unknown's avatar
unknown committed
204
	          -felide-constructors -fno-exceptions -fno-rtti \
unknown's avatar
unknown committed
205
		  }\" \
unknown's avatar
unknown committed
206 207 208
	./configure \
 	    $* \
	    --enable-assembler \
unknown's avatar
unknown committed
209
	    --enable-local-infile \
unknown's avatar
unknown committed
210 211 212 213
            --with-mysqld-user=%{mysqld_user} \
            --with-unix-socket-path=/var/lib/mysql/mysql.sock \
            --prefix=/ \
	    --with-extra-charsets=complex \
214 215 216 217 218
            --exec-prefix=%{_exec_prefix} \
            --libexecdir=%{_sbindir} \
            --libdir=%{_libdir} \
            --sysconfdir=%{_sysconfdir} \
            --datadir=%{_datadir} \
unknown's avatar
unknown committed
219
            --localstatedir=/var/lib/mysql \
220
            --infodir=%{_infodir} \
221
            --includedir=%{_includedir} \
222
            --mandir=%{_mandir} \
223
	    --enable-thread-safe-client \
unknown's avatar
unknown committed
224 225 226
	    --with-comment=\"Official MySQL RPM\";
	    # Add this for more debugging support
	    # --with-debug
227 228
	    # Add this for MyISAM RAID support:
	    # --with-raid
unknown's avatar
unknown committed
229 230 231
	    "

 # benchdir does not fit in above model. Maybe a separate bench distribution
232
 make benchdir_root=$RPM_BUILD_ROOT/usr/share/
unknown's avatar
unknown committed
233 234
}

235
# Use our own copy of glibc
unknown's avatar
unknown committed
236

237
OTHER_LIBC_DIR=/usr/local/mysql-glibc
238
USE_OTHER_LIBC_DIR=""
unknown's avatar
unknown committed
239
if test -d "$OTHER_LIBC_DIR"
240 241 242 243 244 245
then
  USE_OTHER_LIBC_DIR="--with-other-libc=$OTHER_LIBC_DIR"
fi

# Use the build root for temporary storage of the shared libraries.

unknown's avatar
unknown committed
246 247
RBR=$RPM_BUILD_ROOT
MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
248 249 250

# Clean up the BuildRoot first
[ "$RBR" != "/" ] && [ -d $RBR ] && rm -rf $RBR;
unknown's avatar
unknown committed
251
mkdir -p $RBR%{_libdir}/mysql
unknown's avatar
unknown committed
252

253 254 255 256 257 258
#
# Use MYSQL_BUILD_PATH so that we can use a dedicated version of gcc
#
PATH=${MYSQL_BUILD_PATH:-/bin:/usr/bin}
export PATH

259
# Build the 4.0 Max binary (includes BDB and UDFs and therefore
260
# cannot be linked statically against the patched glibc)
261

262 263
# Use gcc for C and C++ code (to avoid a dependency on libstdc++ and
# including exceptions into the code
unknown's avatar
unknown committed
264
if [ -z "$CXX" -a -z "$CC" ]
265
then
266
	export CC="gcc"
267 268 269
	export CXX="gcc"
fi

270 271 272
BuildMySQL "--enable-shared \
		--with-berkeley-db \
		--with-innodb \
273
		--with-raid \
unknown's avatar
unknown committed
274
		--with-embedded-server \
275
		--with-server-suffix='-Max'"
unknown's avatar
unknown committed
276

277 278
# Save everything for debug
# tar cf $RBR/all.tar .
unknown's avatar
unknown committed
279

280
# Save mysqld-max
281
mv sql/mysqld sql/mysqld-max
282
nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym
283

unknown's avatar
unknown committed
284 285 286
# Install embedded server library in the build root
install -m 644 libmysqld/libmysqld.a $RBR%{_libdir}/mysql

287
# Save libraries
unknown's avatar
unknown committed
288
(cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*)
289
(cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*)
unknown's avatar
unknown committed
290 291 292 293 294 295

# Save manual to avoid rebuilding
mv Docs/manual.ps Docs/manual.ps.save
make distclean
mv Docs/manual.ps.save Docs/manual.ps

296
# RPM:s destroys Makefile.in files, so we generate them here
297 298
# aclocal; autoheader; aclocal; automake; autoconf
# (cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
299

300
# Now build the statically linked 4.0 binary (which includes InnoDB)
301
BuildMySQL "--disable-shared \
302 303 304
		--with-mysqld-ldflags='-all-static' \
		--with-client-ldflags='-all-static' \
		$USE_OTHER_LIBC_DIR \
305
		--with-server-suffix='%{server_suffix}' \
unknown's avatar
unknown committed
306
		--without-embedded-server \
307 308 309 310
		--without-berkeley-db \
		--with-innodb \
		--without-vio \
		--without-openssl"
311
nm --numeric-sort sql/mysqld > sql/mysqld.sym
unknown's avatar
unknown committed
312

unknown's avatar
unknown committed
313
%install
unknown's avatar
unknown committed
314 315
RBR=$RPM_BUILD_ROOT
MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
316

unknown's avatar
unknown committed
317
# Ensure that needed directories exists
318
install -d $RBR%{_sysconfdir}/{logrotate.d,init.d}
unknown's avatar
unknown committed
319
install -d $RBR/var/lib/mysql/mysql
320 321 322
install -d $RBR%{_datadir}/{sql-bench,mysql-test}
install -d $RBR%{_includedir}
install -d $RBR%{_libdir}
323
install -d $RBR%{_mandir}
324 325
install -d $RBR%{_sbindir}

326 327

# Install all binaries stripped 
328
make install-strip DESTDIR=$RBR benchdir_root=%{_datadir}
unknown's avatar
unknown committed
329 330

# Install shared libraries (Disable for architectures that don't support it)
unknown's avatar
unknown committed
331
(cd $RBR%{_libdir}; tar xf $RBR/shared-libs.tar; rm -f $RBR/shared-libs.tar)
unknown's avatar
unknown committed
332

333
# install saved mysqld-max
334
install -s -m755 $MBD/sql/mysqld-max $RBR%{_sbindir}/mysqld-max
335

336
# install symbol files ( for stack trace resolution)
337 338
install -m644 $MBD/sql/mysqld-max.sym $RBR%{_libdir}/mysql/mysqld-max.sym
install -m644 $MBD/sql/mysqld.sym $RBR%{_libdir}/mysql/mysqld.sym
339

unknown's avatar
unknown committed
340
# Install logrotate and autostart
341 342
install -m644 $MBD/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.d/mysql
install -m755 $MBD/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql
unknown's avatar
unknown committed
343

344 345
# Create a symlink "rcmysql", pointing to the init.script. SuSE users
# will appreciate that, as all services usually offer this.
346
ln -s %{_sysconfdir}/init.d/mysql $RPM_BUILD_ROOT%{_sbindir}/rcmysql
347

348 349
# Create symbolic compatibility link safe_mysqld -> mysqld_safe
# (safe_mysqld will be gone in MySQL 4.1)
350
ln -sf ./mysqld_safe $RBR%{_bindir}/safe_mysqld
351

352 353
# Touch the place where the my.cnf config file might be located
# Just to make sure it's in the file list and marked as a config file
354
touch $RBR%{_sysconfdir}/my.cnf
355 356

%pre server
357
# Shut down a previously installed server first
358
if test -x %{_sysconfdir}/init.d/mysql
359
then
360
  %{_sysconfdir}/init.d/mysql stop > /dev/null 2>&1
361 362
  echo "Giving mysqld a couple of seconds to exit nicely"
  sleep 5
363
elif test -x %{_sysconfdir}/rc.d/init.d/mysql
unknown's avatar
unknown committed
364
then
365
  %{_sysconfdir}/rc.d/init.d/mysql stop > /dev/null 2>&1
unknown's avatar
unknown committed
366 367 368 369
  echo "Giving mysqld a couple of seconds to exit nicely"
  sleep 5
fi

370
%post server
unknown's avatar
unknown committed
371 372 373
mysql_datadir=/var/lib/mysql

# Create data directory if needed
374 375 376
if test ! -d $mysql_datadir; then mkdir -m755 $mysql_datadir; fi
if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi
if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi
unknown's avatar
unknown committed
377 378

# Make MySQL start/shutdown automatically when the machine does it.
379 380 381
# use insserv for older SuSE Linux versions
if test -x /sbin/insserv
then
382
	/sbin/insserv %{_sysconfdir}/init.d/mysql
383 384 385 386 387
# use chkconfig on Red Hat and newer SuSE releases
elif test -x /sbin/chkconfig
then
	/sbin/chkconfig --add mysql
fi
unknown's avatar
unknown committed
388 389 390 391 392 393 394 395 396 397

# Create a MySQL user. Do not report any problems if it already
# exists. This is redhat specific and should be handled more portable
useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" mysql 2> /dev/null || true 

# Change permissions so that the user that will run the MySQL daemon
# owns all database files.
chown -R mysql $mysql_datadir

# Initiate databases
398
mysql_install_db -IN-RPM --user=mysql
unknown's avatar
unknown committed
399 400 401 402 403 404 405 406 407

# Change permissions again to fix any new files.
chown -R mysql $mysql_datadir

# Fix permissions for the permission database so that only the user
# can read them.
chmod -R og-rw $mysql_datadir/mysql

# Restart in the same way that mysqld will be started normally.
408
%{_sysconfdir}/init.d/mysql start
unknown's avatar
unknown committed
409 410 411 412

# Allow safe_mysqld to start mysqld and print a message before we exit
sleep 2

413 414
%post Max
# Restart mysqld, to use the new binary.
415
echo "Restarting mysqld."
416
%{_sysconfdir}/init.d/mysql restart > /dev/null 2>&1
417

418
%preun server
unknown's avatar
unknown committed
419 420
if test $1 = 0
then
421
	# Stop MySQL before uninstalling it
422
  if test -x %{_sysconfdir}/init.d/mysql
423
  then
424
    %{_sysconfdir}/init.d/mysql stop > /dev/null
425 426 427
  fi

  # Remove autostart of mysql
428 429 430
	# for older SuSE Linux versions
	if test -x /sbin/insserv
	then
431
		/sbin/insserv -r %{_sysconfdir}/init.d/mysql
432 433 434 435 436
	# use chkconfig on Red Hat and newer SuSE releases
	elif test -x /sbin/chkconfig
	then
		/sbin/chkconfig --del mysql
	fi
unknown's avatar
unknown committed
437
fi
438

unknown's avatar
unknown committed
439 440 441
# We do not remove the mysql user since it may still own a lot of
# database files.

442 443 444 445
# Clean up the BuildRoot
%clean
[ "$RBR" != "/" ] && [ -d $RBR ] && rm -rf $RBR;

446
%files server
447
%defattr(-,root,root,0755)
448

449
%doc COPYING EXCEPTIONS README 
450 451 452
%doc Docs/manual.{html,ps,texi,txt}
%doc Docs/manual_toc.html
%doc support-files/my-*.cnf
453 454 455 456 457 458 459

%doc %attr(644, root, root) %{_infodir}/mysql.info*

%doc %attr(644, root, man) %{_mandir}/man1/isamchk.1*
%doc %attr(644, root, man) %{_mandir}/man1/isamlog.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqld.1*
unknown's avatar
unknown committed
460
%doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_privilege_tables.1*
461 462 463 464
%doc %attr(644, root, man) %{_mandir}/man1/mysqld_multi.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqld_safe.1*
%doc %attr(644, root, man) %{_mandir}/man1/perror.1*
%doc %attr(644, root, man) %{_mandir}/man1/replace.1*
unknown's avatar
unknown committed
465

466 467 468 469 470 471
%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf

%attr(755, root, root) %{_bindir}/isamchk
%attr(755, root, root) %{_bindir}/isamlog
%attr(755, root, root) %{_bindir}/my_print_defaults
%attr(755, root, root) %{_bindir}/myisamchk
472
%attr(755, root, root) %{_bindir}/myisam_ftdump
473 474 475 476
%attr(755, root, root) %{_bindir}/myisamlog
%attr(755, root, root) %{_bindir}/myisampack
%attr(755, root, root) %{_bindir}/mysql_convert_table_format
%attr(755, root, root) %{_bindir}/mysql_explain_log
unknown's avatar
unknown committed
477
%attr(755, root, root) %{_bindir}/mysql_fix_extensions
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498
%attr(755, root, root) %{_bindir}/mysql_fix_privilege_tables
%attr(755, root, root) %{_bindir}/mysql_install_db
%attr(755, root, root) %{_bindir}/mysql_secure_installation
%attr(755, root, root) %{_bindir}/mysql_setpermission
%attr(755, root, root) %{_bindir}/mysql_zap
%attr(755, root, root) %{_bindir}/mysqlbug
%attr(755, root, root) %{_bindir}/mysqld_multi
%attr(755, root, root) %{_bindir}/mysqld_safe
%attr(755, root, root) %{_bindir}/mysqlhotcopy
%attr(755, root, root) %{_bindir}/mysqltest
%attr(755, root, root) %{_bindir}/pack_isam
%attr(755, root, root) %{_bindir}/perror
%attr(755, root, root) %{_bindir}/replace
%attr(755, root, root) %{_bindir}/resolve_stack_dump
%attr(755, root, root) %{_bindir}/resolveip
%attr(755, root, root) %{_bindir}/safe_mysqld

%attr(755, root, root) %{_sbindir}/mysqld
%attr(755, root, root) %{_sbindir}/rcmysql
%attr(644, root, root) %{_libdir}/mysql/mysqld.sym

499
%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql
500 501 502
%attr(755, root, root) %{_sysconfdir}/init.d/mysql

%attr(755, root, root) %{_datadir}/mysql/
unknown's avatar
unknown committed
503 504

%files client
505
%defattr(-, root, root, 0755)
506 507 508
%attr(755, root, root) %{_bindir}/msql2mysql
%attr(755, root, root) %{_bindir}/mysql
%attr(755, root, root) %{_bindir}/mysql_find_rows
unknown's avatar
unknown committed
509
%attr(755, root, root) %{_bindir}/mysql_tableinfo
510 511 512 513 514 515
%attr(755, root, root) %{_bindir}/mysql_waitpid
%attr(755, root, root) %{_bindir}/mysqlaccess
%attr(755, root, root) %{_bindir}/mysqladmin
%attr(755, root, root) %{_bindir}/mysqlbinlog
%attr(755, root, root) %{_bindir}/mysqlcheck
%attr(755, root, root) %{_bindir}/mysqldump
unknown's avatar
unknown committed
516
%attr(755, root, root) %{_bindir}/mysqldumpslow
517 518
%attr(755, root, root) %{_bindir}/mysqlimport
%attr(755, root, root) %{_bindir}/mysqlshow
unknown's avatar
unknown committed
519

520 521 522 523 524
%doc %attr(644, root, man) %{_mandir}/man1/mysql.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlaccess.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqladmin.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqldump.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlshow.1*
unknown's avatar
unknown committed
525 526 527 528 529 530 531 532

%post shared
/sbin/ldconfig

%postun shared
/sbin/ldconfig

%files devel
533
%defattr(-, root, root, 0755)
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551
%attr(755, root, root) %{_bindir}/comp_err
%attr(755, root, root) %{_bindir}/mysql_config
%dir %attr(755, root, root) %{_includedir}/mysql
%dir %attr(755, root, root) %{_libdir}/mysql
%{_includedir}/mysql/*
%{_libdir}/mysql/libdbug.a
%{_libdir}/mysql/libheap.a
%{_libdir}/mysql/libmerge.a
%{_libdir}/mysql/libmyisam.a
%{_libdir}/mysql/libmyisammrg.a
%{_libdir}/mysql/libmysqlclient.a
%{_libdir}/mysql/libmysqlclient.la
%{_libdir}/mysql/libmysqlclient_r.a
%{_libdir}/mysql/libmysqlclient_r.la
%{_libdir}/mysql/libmystrings.a
%{_libdir}/mysql/libmysys.a
%{_libdir}/mysql/libnisam.a
%{_libdir}/mysql/libvio.a
unknown's avatar
unknown committed
552 553

%files shared
554
%defattr(-, root, root, 0755)
unknown's avatar
unknown committed
555
# Shared libraries (omit for architectures that don't support them)
556
%{_libdir}/*.so*
unknown's avatar
unknown committed
557 558

%files bench
559
%defattr(-, root, root, 0755)
560 561 562 563 564
%attr(-, root, root) %{_datadir}/sql-bench
%attr(-, root, root) %{_datadir}/mysql-test
%attr(755, root, root) %{_bindir}/mysqlmanager
%attr(755, root, root) %{_bindir}/mysqlmanager-pwgen
%attr(755, root, root) %{_bindir}/mysqlmanagerc
unknown's avatar
unknown committed
565

566
%files Max
567
%defattr(-, root, root, 0755)
568 569
%attr(755, root, root) %{_sbindir}/mysqld-max
%attr(644, root, root) %{_libdir}/mysql/mysqld-max.sym
570

unknown's avatar
unknown committed
571
%files embedded
572
%defattr(-, root, root, 0755)
573
%attr(644, root, root) %{_libdir}/mysql/libmysqld.a
unknown's avatar
unknown committed
574

575 576
# The spec file changelog only includes changes made to the spec file
# itself
577
%changelog 
578 579 580 581
* Mon Apr 05 2004 Lenz Grimmer <lenz@mysql.com>

- added ncurses-devel to the build prerequisites (BUG 3377)

582 583 584
* Thu Feb 12 2004 Lenz Grimmer <lenz@mysql.com>

- when using gcc, _always_ use CXX=gcc 
585
- replaced Copyright with License field (Copyright is obsolete)
586

587 588 589 590
* Tue Feb 03 2004 Lenz Grimmer <lenz@mysql.com>

- added myisam_ftdump to the Server package

591 592 593 594
* Mon Dec 22 2003 Lenz Grimmer <lenz@mysql.com>

- marked /etc/logrotate.d/mysql as a config file (BUG 2156)

595 596 597 598
* Fri Dec 13 2003 Lenz Grimmer <lenz@mysql.com>

- fixed file permissions (BUG 1672)

599 600 601 602
* Thu Dec 11 2003 Lenz Grimmer <lenz@mysql.com>

- made testing for gcc3 a bit more robust

603 604 605 606 607
* Fri Nov 21 2003 Lenz Grimmer <lenz@mysql.com>

- removed dependency on MySQL-client from the MySQL-devel subpackage
  as it is not really required. (BUG 1610)

608 609 610 611 612 613
* Fri Aug 29 2003 Lenz Grimmer <lenz@mysql.com>

- Fixed BUG 1162 (removed macro names from the changelog)
- Really fixed BUG 998 (disable the checking for installed but
  unpackaged files)

unknown's avatar
unknown committed
614 615
* Tue Aug 05 2003 Lenz Grimmer <lenz@mysql.com>

616 617
- Fixed BUG 959 (libmysqld not being compiled properly)
- Fixed BUG 998 (RPM build errors): added missing files to the
unknown's avatar
unknown committed
618
  distribution (mysql_fix_extensions, mysql_tableinfo, mysqldumpslow,
619
  mysql_fix_privilege_tables.1), removed "-n" from install section.
unknown's avatar
unknown committed
620

621 622 623
* Wed Jul 09 2003 Lenz Grimmer <lenz@mysql.com>

- removed the GIF Icon (file was not included in the sources anyway)
624
- removed unused variable shared_lib_version
625 626 627 628 629 630 631 632
- do not run automake before building the standard binary
  (should not be necessary)
- add server suffix '-standard' to standard binary (to be in line
  with the binary tarball distributions)
- Use more RPM macros (_exec_prefix, _sbindir, _libdir, _sysconfdir,
  _datadir, _includedir) throughout the spec file.
- allow overriding CC and CXX (required when building with other compilers)

633 634 635
* Fri May 16 2003 Lenz Grimmer <lenz@mysql.com>

- re-enabled RAID again
unknown's avatar
unknown committed
636

637 638 639 640 641
* Wed Apr 30 2003 Lenz Grimmer <lenz@mysql.com>

- disabled MyISAM RAID (--with-raid) - it throws an assertion which
  needs to be investigated first.

642 643 644
* Mon Mar 10 2003 Lenz Grimmer <lenz@mysql.com>

- added missing file mysql_secure_installation to server subpackage
645
  (BUG 141)
646

647 648 649 650 651 652
* Tue Feb 11 2003 Lenz Grimmer <lenz@mysql.com>

- re-added missing pre- and post(un)install scripts to server subpackage
- added config file /etc/my.cnf to the file list (just for completeness)
- make sure to create the datadir with 755 permissions

653 654 655 656 657
* Mon Jan 27 2003 Lenz Grimmer <lenz@mysql.com>

- removed unused CC and CXX variables
- CFLAGS and CXXFLAGS should honor RPM_OPT_FLAGS

658 659 660 661 662 663
* Fri Jan 24 2003 Lenz Grimmer <lenz@mysql.com>

- renamed package "MySQL" to "MySQL-server"
- fixed Copyright tag
- added mysql_waitpid to client subpackage (required for mysql-test-run)

664 665 666 667 668 669 670 671 672 673 674
* Wed Nov 27 2002 Lenz Grimmer <lenz@mysql.com>

- moved init script from /etc/rc.d/init.d to /etc/init.d (the majority of 
  Linux distributions now support this scheme as proposed by the LSB either
  directly or via a compatibility symlink)
- Use new "restart" init script action instead of starting and stopping
  separately
- Be more flexible in activating the automatic bootup - use insserv (on
  older SuSE versions) or chkconfig (Red Hat, newer SuSE versions and
  others) to create the respective symlinks

675 676 677 678 679
* Wed Sep 25 2002 Lenz Grimmer <lenz@mysql.com>

- MySQL-Max now requires MySQL >= 4.0 to avoid version mismatches
  (mixing 3.23 and 4.0 packages)

680 681 682 683 684 685 686
* 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

687 688 689 690 691 692 693 694 695 696
* 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

697 698 699 700 701 702 703
* 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

704 705 706 707 708 709 710 711
* Fri May 03 2002 Lenz Grimmer <lenz@mysql.com>

- Use more RPM macros (e.g. infodir, mandir) to make the spec
  file more portable
- reorganized the installation of documentation files: let RPM
  take care of this
- reorganized the file list: actually install man pages along
  with the binaries of the respective subpackage
712
- do not include libmysqld.a in the devel subpackage as well, if we
713 714 715
  have a special "embedded" subpackage
- reworked the package descriptions

unknown's avatar
unknown committed
716 717 718 719
* Mon Oct  8 2001 Monty

- Added embedded server as a separate RPM

720 721 722 723
* Fri Apr 13 2001 Monty

- Added mysqld-max to the distribution

724 725 726 727
* Tue Jan 2  2001  Monty

- Added mysql-test to the bench package

728
* Fri Aug 18 2000 Tim Smith <tim@mysql.com>
729 730 731 732

- Added separate libmysql_r directory; now both a threaded
  and non-threaded library is shipped.

unknown's avatar
unknown committed
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775
* Wed Sep 28 1999 David Axmark <davida@mysql.com>

- Added the support-files/my-example.cnf to the docs directory.

- Removed devel dependency on base since it is about client
  development.

* Wed Sep 8 1999 David Axmark <davida@mysql.com>

- Cleaned up some for 3.23.

* Thu Jul 1 1999 David Axmark <davida@mysql.com>

- Added support for shared libraries in a separate sub
  package. Original fix by David Fox (dsfox@cogsci.ucsd.edu)

- The --enable-assembler switch is now automatically disables on
  platforms there assembler code is unavailable. This should allow
  building this RPM on non i386 systems.

* Mon Feb 22 1999 David Axmark <david@detron.se>

- Removed unportable cc switches from the spec file. The defaults can
  now be overridden with environment variables. This feature is used
  to compile the official RPM with optimal (but compiler version
  specific) switches.

- Removed the repetitive description parts for the sub rpms. Maybe add
  again if RPM gets a multiline macro capability.

- Added support for a pt_BR translation. Translation contributed by
  Jorge Godoy <jorge@bestway.com.br>.

* Wed Nov 4 1998 David Axmark <david@detron.se>

- A lot of changes in all the rpm and install scripts. This may even
  be a working RPM :-)

* Sun Aug 16 1998 David Axmark <david@detron.se>

- A developers changelog for MySQL is available in the source RPM. And
  there is a history of major user visible changed in the Reference
  Manual.  Only RPM specific changes will be documented here.