mysql.spec.sh 26.1 KB
Newer Older
unknown's avatar
unknown committed
1
%define mysql_version		@VERSION@
2
%define release			0
unknown's avatar
unknown committed
3
%define license GPL
unknown's avatar
unknown committed
4
%define mysqld_user		mysql
5
%define mysqld_group	mysql
6
%define server_suffix -standard
unknown's avatar
unknown committed
7
%define mysqldatadir /var/lib/mysql
unknown's avatar
unknown committed
8

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

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

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

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

# From the manual
%description
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
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
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
%package server
Summary:	MySQL: a very fast and reliable SQL database server
Group:		Applications/Databases
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.

78 79 80 81 82 83 84
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
85 86 87 88
%package client
Summary: MySQL - Client
Group: Applications/Databases
Obsoletes: mysql-client
unknown's avatar
unknown committed
89
Provides: mysql-client
unknown's avatar
unknown committed
90 91

%description client
92
This package contains the standard MySQL clients and administration tools. 
unknown's avatar
unknown committed
93 94 95 96 97

%{see_base}


%package bench
98
Requires: %{name}-client perl-DBI perl
99
Summary: MySQL - Benchmarks and test system
unknown's avatar
unknown committed
100
Group: Applications/Databases
unknown's avatar
unknown committed
101
Provides: mysql-bench
unknown's avatar
unknown committed
102 103 104 105 106 107 108 109 110 111
Obsoletes: mysql-bench

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

%{see_base}

%package devel
Summary: MySQL - Development header files and libraries
Group: Applications/Databases
unknown's avatar
unknown committed
112
Provides: mysql-devel
unknown's avatar
unknown committed
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
Obsoletes: mysql-devel

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

%{see_base}

%package shared
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.

129
%package Max
130
Summary: MySQL - server with Berkeley BD, RAID and UDF support
131
Group: Applications/Databases
unknown's avatar
unknown committed
132
Provides: mysql-Max
133
Obsoletes: mysql-Max
unknown's avatar
unknown committed
134
Requires: MySQL-server >= @MYSQL_BASE_VERSION@
135

unknown's avatar
unknown committed
136
%description Max 
137
Optional MySQL server binary that supports additional features like
138
Berkeley DB, RAID and User Defined Functions (UDFs).
139 140 141 142
To activate this binary, just install this package in addition to
the standard MySQL package.

Please note that this is a dynamically linked binary!
143

unknown's avatar
unknown committed
144
%package embedded
145
Requires: %{name}-devel
unknown's avatar
unknown committed
146 147
Summary: MySQL - embedded library
Group: Applications/Databases
148
Obsoletes: mysql-embedded
unknown's avatar
unknown committed
149

150
%description embedded
151 152 153 154 155 156 157 158 159
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
160 161 162

%{see_base}

unknown's avatar
unknown committed
163 164 165 166 167
%prep
%setup -n mysql-%{mysql_version}

%build
# The all-static flag is to make the RPM work on different
unknown's avatar
unknown committed
168
# distributions. This version tries to put shared mysqlclient libraries
unknown's avatar
unknown committed
169 170 171 172 173
# in a separate package.

BuildMySQL() {
# The --enable-assembler simply does nothing on systems that does not
# support assembler speedups.
174
sh -c  "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
175 176
	CC=\"${CC:-$MYSQL_BUILD_CC}\" \
	CXX=\"${CXX:-$MYSQL_BUILD_CXX}\" \
177 178
	CFLAGS=\"${MYSQL_BUILD_CFLAGS:-$RPM_OPT_FLAGS}\" \
	CXXFLAGS=\"${MYSQL_BUILD_CXXFLAGS:-$RPM_OPT_FLAGS \
unknown's avatar
unknown committed
179
	          -felide-constructors -fno-exceptions -fno-rtti \
unknown's avatar
unknown committed
180
		  }\" \
unknown's avatar
unknown committed
181 182 183
	./configure \
 	    $* \
	    --enable-assembler \
unknown's avatar
unknown committed
184
	    --enable-local-infile \
unknown's avatar
unknown committed
185 186 187 188
            --with-mysqld-user=%{mysqld_user} \
            --with-unix-socket-path=/var/lib/mysql/mysql.sock \
            --prefix=/ \
	    --with-extra-charsets=complex \
189 190 191 192 193
            --exec-prefix=%{_exec_prefix} \
            --libexecdir=%{_sbindir} \
            --libdir=%{_libdir} \
            --sysconfdir=%{_sysconfdir} \
            --datadir=%{_datadir} \
unknown's avatar
unknown committed
194
            --localstatedir=%{mysqldatadir} \
195
            --infodir=%{_infodir} \
196
            --includedir=%{_includedir} \
197
            --mandir=%{_mandir} \
198
	    --enable-thread-safe-client \
unknown's avatar
unknown committed
199 200 201
	    --with-comment=\"Official MySQL RPM\";
	    # Add this for more debugging support
	    # --with-debug
202 203
	    # Add this for MyISAM RAID support:
	    # --with-raid
unknown's avatar
unknown committed
204 205 206
	    "

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

210
# Use our own copy of glibc
unknown's avatar
unknown committed
211

212
OTHER_LIBC_DIR=/usr/local/mysql-glibc
213
USE_OTHER_LIBC_DIR=""
unknown's avatar
unknown committed
214
if test -d "$OTHER_LIBC_DIR"
215 216 217 218 219 220
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
221 222
RBR=$RPM_BUILD_ROOT
MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
223 224 225

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

228 229 230 231 232 233
#
# Use MYSQL_BUILD_PATH so that we can use a dedicated version of gcc
#
PATH=${MYSQL_BUILD_PATH:-/bin:/usr/bin}
export PATH

234
# Build the 4.0 Max binary (includes BDB and UDFs and therefore
235
# cannot be linked statically against the patched glibc)
236

237 238
# Use gcc for C and C++ code (to avoid a dependency on libstdc++ and
# including exceptions into the code
unknown's avatar
unknown committed
239
if [ -z "$CXX" -a -z "$CC" ]
240
then
241
	export CC="gcc"
242 243 244
	export CXX="gcc"
fi

245 246 247
BuildMySQL "--enable-shared \
		--with-berkeley-db \
		--with-innodb \
248
		--with-raid \
unknown's avatar
unknown committed
249
		--with-embedded-server \
250
		--with-server-suffix='-Max'"
unknown's avatar
unknown committed
251

252 253
# Save everything for debug
# tar cf $RBR/all.tar .
unknown's avatar
unknown committed
254

255
# Save mysqld-max
256
mv sql/mysqld sql/mysqld-max
257
nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym
258

unknown's avatar
unknown committed
259
# Install embedded server library in the build root
260 261 262 263 264 265 266 267 268 269 270 271
install -m 644 libmysqld/libmysqld.a $RBR%{_libdir}/mysql/

# Include libgcc.a in the devel subpackage (BUG 4921)
if [ "$CC" = gcc ]
then
  libgcc=`$CC --print-libgcc-file`
  if [ -f $libgcc ]
  then
    %define have_libgcc 1
    install -m 644 $libgcc $RBR%{_libdir}/mysql/libmygcc.a
  fi
fi
unknown's avatar
unknown committed
272

273
# Save libraries
unknown's avatar
unknown committed
274
(cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*)
275
(cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*)
unknown's avatar
unknown committed
276

277 278 279
# Now clean up
make clean

280
# RPM:s destroys Makefile.in files, so we generate them here
281 282
# aclocal; autoheader; aclocal; automake; autoconf
# (cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
283

284
# Now build the statically linked 4.0 binary (which includes InnoDB)
285
BuildMySQL "--disable-shared \
286 287 288
		--with-mysqld-ldflags='-all-static' \
		--with-client-ldflags='-all-static' \
		$USE_OTHER_LIBC_DIR \
289
		--with-server-suffix='%{server_suffix}' \
unknown's avatar
unknown committed
290
		--without-embedded-server \
291 292 293 294
		--without-berkeley-db \
		--with-innodb \
		--without-vio \
		--without-openssl"
295
nm --numeric-sort sql/mysqld > sql/mysqld.sym
unknown's avatar
unknown committed
296

unknown's avatar
unknown committed
297
%install
unknown's avatar
unknown committed
298 299
RBR=$RPM_BUILD_ROOT
MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
300

unknown's avatar
unknown committed
301
# Ensure that needed directories exists
302
install -d $RBR%{_sysconfdir}/{logrotate.d,init.d}
unknown's avatar
unknown committed
303
install -d $RBR%{mysqldatadir}/mysql
304 305 306
install -d $RBR%{_datadir}/{sql-bench,mysql-test}
install -d $RBR%{_includedir}
install -d $RBR%{_libdir}
307
install -d $RBR%{_mandir}
308 309
install -d $RBR%{_sbindir}

310 311

# Install all binaries stripped 
312
make install-strip DESTDIR=$RBR benchdir_root=%{_datadir}
unknown's avatar
unknown committed
313 314

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

317
# install saved mysqld-max
318
install -s -m755 $MBD/sql/mysqld-max $RBR%{_sbindir}/mysqld-max
319

320
# install symbol files ( for stack trace resolution)
321 322
install -m644 $MBD/sql/mysqld-max.sym $RBR%{_libdir}/mysql/mysqld-max.sym
install -m644 $MBD/sql/mysqld.sym $RBR%{_libdir}/mysql/mysqld.sym
323

unknown's avatar
unknown committed
324
# Install logrotate and autostart
325 326
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
327

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

332 333
# Create symbolic compatibility link safe_mysqld -> mysqld_safe
# (safe_mysqld will be gone in MySQL 4.1)
334
ln -sf ./mysqld_safe $RBR%{_bindir}/safe_mysqld
335

336 337
# 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
338
touch $RBR%{_sysconfdir}/my.cnf
339 340

%pre server
341
# Shut down a previously installed server first
342
if test -x %{_sysconfdir}/init.d/mysql
343
then
344
  %{_sysconfdir}/init.d/mysql stop > /dev/null 2>&1
345 346
  echo "Giving mysqld a couple of seconds to exit nicely"
  sleep 5
347
elif test -x %{_sysconfdir}/rc.d/init.d/mysql
unknown's avatar
unknown committed
348
then
349
  %{_sysconfdir}/rc.d/init.d/mysql stop > /dev/null 2>&1
unknown's avatar
unknown committed
350 351 352 353
  echo "Giving mysqld a couple of seconds to exit nicely"
  sleep 5
fi

354
%post server
unknown's avatar
unknown committed
355
mysql_datadir=%{mysqldatadir}
unknown's avatar
unknown committed
356 357

# Create data directory if needed
358 359 360
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
361 362

# Make MySQL start/shutdown automatically when the machine does it.
363 364 365
# use insserv for older SuSE Linux versions
if test -x /sbin/insserv
then
366
	/sbin/insserv %{_sysconfdir}/init.d/mysql
367 368 369 370 371
# 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
372

unknown's avatar
unknown committed
373 374
# Create a MySQL user and group. Do not report any problems if it already
# exists.
375 376 377 378
groupadd -r %{mysqld_group} 2> /dev/null || true
useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true 
# The user may already exist, make sure it has the proper group nevertheless (BUG#12823)
usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true
unknown's avatar
unknown committed
379 380 381

# Change permissions so that the user that will run the MySQL daemon
# owns all database files.
382
chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
unknown's avatar
unknown committed
383 384

# Initiate databases
unknown's avatar
unknown committed
385
%{_bindir}/mysql_install_db -IN-RPM --user=%{mysqld_user}
unknown's avatar
unknown committed
386 387

# Change permissions again to fix any new files.
388
chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
unknown's avatar
unknown committed
389 390 391 392 393 394

# 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.
395
%{_sysconfdir}/init.d/mysql start
unknown's avatar
unknown committed
396 397 398 399

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

400 401
%post Max
# Restart mysqld, to use the new binary.
402
echo "Restarting mysqld."
403
%{_sysconfdir}/init.d/mysql restart > /dev/null 2>&1
404

405
%preun server
unknown's avatar
unknown committed
406 407
if test $1 = 0
then
408
	# Stop MySQL before uninstalling it
409
  if test -x %{_sysconfdir}/init.d/mysql
410
  then
411
    %{_sysconfdir}/init.d/mysql stop > /dev/null
412 413 414
  fi

  # Remove autostart of mysql
415 416 417
	# for older SuSE Linux versions
	if test -x /sbin/insserv
	then
418
		/sbin/insserv -r %{_sysconfdir}/init.d/mysql
419 420 421 422 423
	# 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
424
fi
425

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

429 430
# Clean up the BuildRoot
%clean
431
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
432

433
%files server
434
%defattr(-,root,root,0755)
435

436
%doc COPYING README 
437
%doc support-files/my-*.cnf
438 439 440 441 442 443 444

%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
445
%doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_privilege_tables.1*
446 447 448 449
%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
450

451 452 453 454 455 456
%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
457
%attr(755, root, root) %{_bindir}/myisam_ftdump
458 459 460 461
%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
462
%attr(755, root, root) %{_bindir}/mysql_fix_extensions
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483
%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

484
%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql
485 486 487
%attr(755, root, root) %{_sysconfdir}/init.d/mysql

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

%files client
490
%defattr(-, root, root, 0755)
491 492 493
%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
494
%attr(755, root, root) %{_bindir}/mysql_tableinfo
495 496 497 498 499 500
%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
501
%attr(755, root, root) %{_bindir}/mysqldumpslow
502 503
%attr(755, root, root) %{_bindir}/mysqlimport
%attr(755, root, root) %{_bindir}/mysqlshow
unknown's avatar
unknown committed
504

505 506 507 508 509
%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
510 511 512 513 514 515 516 517

%post shared
/sbin/ldconfig

%postun shared
/sbin/ldconfig

%files devel
518
%defattr(-, root, root, 0755)
519
%doc EXCEPTIONS-CLIENT
520 521 522 523 524 525 526 527
%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
528 529 530
%if %{have_libgcc}
%{_libdir}/mysql/libmygcc.a
%endif
531 532 533 534 535 536 537 538 539 540
%{_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
541 542

%files shared
543
%defattr(-, root, root, 0755)
unknown's avatar
unknown committed
544
# Shared libraries (omit for architectures that don't support them)
545
%{_libdir}/*.so*
unknown's avatar
unknown committed
546 547

%files bench
548
%defattr(-, root, root, 0755)
549 550 551 552 553
%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
554

555
%files Max
556
%defattr(-, root, root, 0755)
557 558
%attr(755, root, root) %{_sbindir}/mysqld-max
%attr(644, root, root) %{_libdir}/mysql/mysqld-max.sym
559

unknown's avatar
unknown committed
560
%files embedded
561
%defattr(-, root, root, 0755)
562
%attr(644, root, root) %{_libdir}/mysql/libmysqld.a
unknown's avatar
unknown committed
563

564
# The spec file changelog only includes changes made to the spec file
565 566
# itself - note that they must be ordered by date (important when
# merging BK trees)
567
%changelog 
568 569 570 571
* Thu Oct 13 2005 Lenz Grimmer <lenz@mysql.com>

- added a usermod call to assign a potential existing mysql user to the
  correct user group (BUG#12823)
572 573 574 575 576
* Thu Sep 29 2005 Lenz Grimmer <lenz@mysql.com>

- fixed the removing of the RPM_BUILD_ROOT in the %clean section (the
  $RBR variable did not get expanded, thus leaving old build roots behind)

577 578 579 580 581
* Thu Aug 04 2005 Lenz Grimmer <lenz@mysql.com>

- Fixed the creation of the mysql user group account in the postinstall
  section (BUG 12348)

unknown's avatar
unknown committed
582 583 584 585 586 587 588 589 590 591 592 593
* Fri Jul 15 2005 Lenz Grimmer <lenz@mysql.com>

- create a "mysql" user group and assign the mysql user account to that group
  in the server postinstall section. (BUG 10984)

* Wed Jun 01 2005 Lenz Grimmer <lenz@mysql.com>

- use "mysqldatadir" variable instead of hard-coding the path multiple times
- use the "mysqld_user" variable on all occasions a user name is referenced
- removed (incomplete) Brazilian translations
- removed redundant release tags from the subpackage descriptions

594 595 596 597
* Wed May 25 2005 Joerg Bruehe <joerg@mysql.com>

- Added a "make clean" between separate calls to "BuildMySQL".

598
* Wed Apr 13 2005 Lenz Grimmer <lenz@mysql.com>
599 600 601 602

- removed the MySQL manual files (html/ps/texi) - they have been removed
  from the MySQL sources and are now available seperately.

603 604 605 606
* Thu Aug 26 2004 Lenz Grimmer <lenz@mysql.com>

- MySQL-Max now requires MySQL-server instead of MySQL (BUG 3860)

607 608 609 610 611
* Tue Aug 10 2004 Lenz Grimmer <lenz@mysql.com>

- Added libmygcc.a to the devel subpackage (required to link applications
  against the the embedded server libmysqld.a) (BUG 4921)

612 613 614 615
* Mon Aug 09 2004 Lenz Grimmer <lenz@mysql.com>

- Added EXCEPTIONS-CLIENT to the "devel" package

616 617 618 619
* Mon Apr 05 2004 Lenz Grimmer <lenz@mysql.com>

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

620 621 622
* Thu Feb 12 2004 Lenz Grimmer <lenz@mysql.com>

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

625 626 627 628
* Tue Feb 03 2004 Lenz Grimmer <lenz@mysql.com>

- added myisam_ftdump to the Server package

629 630 631 632
* Mon Dec 22 2003 Lenz Grimmer <lenz@mysql.com>

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

633 634 635 636
* Fri Dec 13 2003 Lenz Grimmer <lenz@mysql.com>

- fixed file permissions (BUG 1672)

637 638 639 640
* Thu Dec 11 2003 Lenz Grimmer <lenz@mysql.com>

- made testing for gcc3 a bit more robust

641 642 643 644 645
* 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)

646 647 648 649 650 651
* 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
652 653
* Tue Aug 05 2003 Lenz Grimmer <lenz@mysql.com>

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

659 660 661
* Wed Jul 09 2003 Lenz Grimmer <lenz@mysql.com>

- removed the GIF Icon (file was not included in the sources anyway)
662
- removed unused variable shared_lib_version
663 664 665 666 667 668 669 670
- 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)

671 672 673
* Fri May 16 2003 Lenz Grimmer <lenz@mysql.com>

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

675 676 677 678 679
* Wed Apr 30 2003 Lenz Grimmer <lenz@mysql.com>

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

680 681 682
* Mon Mar 10 2003 Lenz Grimmer <lenz@mysql.com>

- added missing file mysql_secure_installation to server subpackage
683
  (BUG 141)
684

685 686 687 688 689 690
* 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

691 692 693 694 695
* Mon Jan 27 2003 Lenz Grimmer <lenz@mysql.com>

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

696 697 698 699 700 701
* 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)

702 703 704 705 706 707 708 709 710 711 712
* 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

713 714 715 716 717
* 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)

718 719 720 721 722 723 724
* 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

725 726 727 728 729 730 731 732 733 734
* 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

735 736 737 738 739 740 741
* 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

742 743 744 745 746 747 748 749
* 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
750
- do not include libmysqld.a in the devel subpackage as well, if we
751 752 753
  have a special "embedded" subpackage
- reworked the package descriptions

unknown's avatar
unknown committed
754 755 756 757
* Mon Oct  8 2001 Monty

- Added embedded server as a separate RPM

758 759 760 761
* Fri Apr 13 2001 Monty

- Added mysqld-max to the distribution

762 763 764 765
* Tue Jan 2  2001  Monty

- Added mysql-test to the bench package

766
* Fri Aug 18 2000 Tim Smith <tim@mysql.com>
767 768 769 770

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

unknown's avatar
unknown committed
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813
* 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.