diff options
author | unknown <monty@mysql.com> | 2003-12-17 17:35:34 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2003-12-17 17:35:34 +0200 |
commit | 0fb88806e44f48aba363bfda5ebedaaa3b05b975 (patch) | |
tree | 93924b5aab311e02a0f0931cf91e67cdfad04bdf /Build-tools | |
parent | 029e30b4aa357708bdbf924cfd78069fb19382bb (diff) | |
parent | 4bdfe0fb0107f2fb3e9cfb1c8a417e1028c67dcc (diff) | |
download | mariadb-git-0fb88806e44f48aba363bfda5ebedaaa3b05b975.tar.gz |
Merge with 4.0.17
BitKeeper/etc/logging_ok:
auto-union
Build-tools/Do-compile:
Auto merged
acinclude.m4:
Auto merged
configure.in:
Auto merged
dbug/dbug.c:
Auto merged
include/config-win.h:
Auto merged
include/my_base.h:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
include/my_sys.h:
Auto merged
include/mysql.h:
Auto merged
include/mysql_com.h:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/row/row0ins.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/row/row0umod.c:
Auto merged
innobase/row/row0upd.c:
Auto merged
myisam/ft_boolean_search.c:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_dbug.c:
Auto merged
myisam/mi_open.c:
Auto merged
mysql-test/r/auto_increment.result:
Auto merged
mysql-test/r/bdb.result:
Auto merged
mysql-test/r/func_op.result:
Auto merged
Build-tools/Bootstrap:
Merge with 4.0
client/mysql.cc:
Merge with 4.0
client/mysqldump.c:
Merge with 4.0
client/mysqltest.c:
Use local version
innobase/btr/btr0cur.c:
Merge with 4.0 (Heikki should check if we should remove btr_cur_update_sec_rec_in_place()
libmysql/libmysql.c:
Merge with 4.0
libmysqld/lib_sql.cc:
Merge with 4.0
myisam/mi_key.c:
Merge with 4.0
myisam/mi_search.c:
Merge with 4.0
mysql-test/r/binary.result:
Merge with 4.0
mysql-test/r/func_group.result:
Merge with 4.0
mysql-test/r/func_str.result:
Merge with 4.0
mysql-test/r/func_time.result:
Merge with 4.0
mysql-test/r/group_by.result:
Merge with 4.0
mysql-test/r/handler.result:
Merge with 4.0
mysql-test/r/innodb.result:
Merge with 4.0
mysql-test/r/insert.result:
Merge with 4.0
mysql-test/r/join_outer.result:
Merge with 4.0
mysql-test/r/loaddata.result:
Merge with 4.0
mysql-test/r/lowercase_table.result:
Merge with 4.0
mysql-test/r/multi_update.result:
Merge with 4.0
mysql-test/r/mysqldump.result:
Merge with 4.0
mysql-test/r/query_cache.result:
Merge with 4.0
mysql-test/r/rpl_max_relay_size.result:
Merge with 4.0
mysql-test/r/rpl_rotate_logs.result:
Merge with 4.0
mysql-test/r/rpl_trunc_binlog.result:
Merge with 4.0
mysql-test/r/select_found.result:
Merge with 4.0
mysql-test/r/symlink.result:
Merge with 4.0
mysql-test/r/truncate.result:
Merge with 4.0
mysql-test/r/type_blob.result:
Merge with 4.0
mysql-test/r/type_datetime.result:
Merge with 4.0
mysql-test/r/type_decimal.result:
Merge with 4.0
mysql-test/r/type_enum.result:
Merge with 4.0
mysql-test/r/type_timestamp.result:
Merge with 4.0
mysql-test/r/union.result:
Merge with 4.0
mysql-test/t/auto_increment.test:
Merge with 4.0
mysql-test/t/bdb.test:
Merge with 4.0
mysql-test/t/func_group.test:
Merge with 4.0
mysql-test/t/func_op.test:
Merge with 4.0
mysql-test/t/func_str.test:
Merge with 4.0
mysql-test/t/func_time.test:
Merge with 4.0
mysql-test/t/group_by.test:
Merge with 4.0
mysql-test/t/handler.test:
Merge with 4.0
mysql-test/t/innodb.test:
Merge with 4.0
mysql-test/t/insert.test:
Merge with 4.0
mysql-test/t/join_outer.test:
Merge with 4.0
mysql-test/t/limit.test:
Merge with 4.0
mysql-test/t/loaddata.test:
Merge with 4.0
mysql-test/t/lowercase_table.test:
Merge with 4.0
mysql-test/t/multi_update.test:
Merge with 4.0
mysql-test/t/mysqldump.test:
Merge with 4.0
mysql-test/t/query_cache.test:
Merge with 4.0
mysql-test/t/rpl_log_pos.test:
Merge with 4.0
mysql-test/t/rpl_max_relay_size.test:
Merge with 4.0
mysql-test/t/rpl_rotate_logs.test:
Merge with 4.0
mysql-test/t/rpl_trunc_binlog.test:
Merge with 4.0
mysql-test/t/select_found.test:
Merge with 4.0
mysql-test/t/symlink.test:
Merge with 4.0
mysql-test/t/truncate.test:
Merge with 4.0
mysql-test/t/type_blob.test:
Merge with 4.0
mysql-test/t/type_datetime.test:
Merge with 4.0
mysql-test/t/type_decimal.test:
Merge with 4.0
mysql-test/t/type_enum.test:
Merge with 4.0
mysql-test/t/type_timestamp.test:
Merge with 4.0
mysql-test/t/union.test:
Merge with 4.0
mysys/charset.c:
Merge with 4.0
mysys/my_init.c:
Merge with 4.0
mysys/my_symlink.c:
Merge with 4.0
mysys/my_thr_init.c:
Merge with 4.0
regex/reginit.c:
Merge with 4.0
sql/field.cc:
Change fix_datetime() to print errors
sql/field.h:
Merge with 4.0
sql/ha_innodb.cc:
Merge with 4.0
sql/item.cc:
Merge with 4.0
sql/item.h:
Merge with 4.0
sql/item_cmpfunc.cc:
Merge with 4.0
sql/item_func.cc:
Merge with 4.0
sql/item_func.h:
Merge with 4.0
sql/item_strfunc.cc:
Merge with 4.0
sql/item_strfunc.h:
Merge with 4.0
sql/item_sum.cc:
Merge with 4.0
sql/item_sum.h:
Merge with 4.0
sql/item_timefunc.cc:
Merge with 4.0
sql/lex.h:
Merge with 4.0
sql/log.cc:
Merge with 4.0
sql/log_event.cc:
Merge with 4.0
sql/log_event.h:
Merge with 4.0
sql/mysql_priv.h:
Merge with 4.0
sql/mysqld.cc:
Merge with 4.0
sql/nt_servc.cc:
Merge with 4.0
sql/opt_range.cc:
Merge with 4.0
sql/records.cc:
Merge with 4.0
sql/repl_failsafe.cc:
Merge with 4.0
sql/slave.cc:
Merge with 4.0
sql/sql_acl.cc:
Merge with 4.0
sql/sql_analyse.cc:
Merge with 4.0
sql/sql_base.cc:
Merge with 4.0
sql/sql_cache.cc:
Merge with 4.0
sql/sql_class.h:
Merge with 4.0
sql/sql_db.cc:
Merge with 4.0
sql/sql_delete.cc:
Merge with 4.0
sql/sql_insert.cc:
Merge with 4.0
sql/sql_load.cc:
Merge with 4.0
sql/sql_parse.cc:
Merge with 4.0
sql/sql_rename.cc:
Merge with 4.0
sql/sql_select.cc:
Merge with 4.0
sql/sql_show.cc:
Merge with 4.0
sql/sql_table.cc:
Merge with 4.0
sql/sql_update.cc:
Merge with 4.0
sql/sql_yacc.yy:
Merge with 4.0
sql/table.cc:
Merge with 4.0
sql/table.h:
Merge with 4.0
sql/time.cc:
Merge with 4.0
sql/uniques.cc:
Merge with 4.0
strings/ctype-tis620.c:
Merge with 4.0
strings/strto.c:
Merge with 4.0
support-files/mysql.server.sh:
Merge with 4.0
support-files/mysql.spec.sh:
Merge with 4.0
Diffstat (limited to 'Build-tools')
-rwxr-xr-x | Build-tools/Bootstrap | 20 | ||||
-rwxr-xr-x | Build-tools/Do-compile | 8 | ||||
-rwxr-xr-x | Build-tools/Do-rpm | 85 |
3 files changed, 75 insertions, 38 deletions
diff --git a/Build-tools/Bootstrap b/Build-tools/Bootstrap index 17b15d190b0..7d3ac1322f4 100755 --- a/Build-tools/Bootstrap +++ b/Build-tools/Bootstrap @@ -274,11 +274,13 @@ if (defined $opt_changelog) # unless ($opt_skip_manual) { - $msg= "Adding manual.texi"; + $msg= "Updating manual files"; &logger($msg); - $command= "install -m 644 $opt_docdir/Docs/{internals,manual,reservedwords}.texi"; - $command.= " $target_dir/Docs/"; - &run_command($command, "Could not update the manual in $target_dir/Docs/!"); + foreach $file qw/internals manual reservedwords/ + { + system ("bk cat $opt_docdir/Docs/$file.texi > $target_dir/Docs/$file.texi") == 0 + or &abort("Could not update $file.texi in $target_dir/Docs/!"); + } } # @@ -364,11 +366,13 @@ sub print_help Usage: Bootstrap [options] <bk repository> -Checks out (exports) a clear-text version of the given local BitKeeper +Creates a MySQL source distribution to be used for the release builds. + +It checks out (exports) a clear-text version of the given local BitKeeper repository, creates and adds a Changelog file (if requested), adds the -latest manual.texi from the mysqldoc tree and builds a source distribution -(*.tar.gz) file. Optionally, the test suite can be run before the source -archive is being created. +latest manual files from the mysqldoc BK tree and builds a source +distribution (*.tar.gz) file. Optionally, the test suite and the +distribution check can be run before the source archive is being created. Options: diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index 0541ebe96ce..2039c2f1c5a 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -1,6 +1,8 @@ #!/usr/bin/perl -w +use File::Basename; use Getopt::Long; +use Sys::Hostname; @config_options= (); @make_options= (); @@ -76,7 +78,7 @@ if (@config_env > 0) $opt_config_env= join(" ", @config_env); } -chomp($host=`hostname`); +$host= hostname(); chomp($uname=`uname`); $full_host_name=$host; $connect_option= ($opt_tcpip ? "--host=$host" : ""); @@ -84,7 +86,7 @@ $host =~ /^([^.-]*)/; $host=$1 . $opt_suffix; $email="$opt_user\@mysql.com"; chomp($pwd = `pwd`); -$VER= `basename $opt_distribution`; chop $VER; +$VER= basename($opt_distribution); $VER=~ /mysql.*-([1-9]\.[0-9]{1,2}\.[0-9]{1,2}.*)\.tar*/; $version=$1; ($major, $minor, $release) = split(/\./,$version); $log="$pwd/Logs/$host-$major.$minor$opt_version_suffix.log"; @@ -111,7 +113,7 @@ if (defined($gcc_version) && ! $opt_config_env) $new_opt_tmp=0; if ($opt_tmp) { - if (! -d $opt_tmp) + unless (-d $opt_tmp) { safe_system("mkdir $opt_tmp"); $new_opt_tmp=1; diff --git a/Build-tools/Do-rpm b/Build-tools/Do-rpm index 0f423feb921..cedd55d1405 100755 --- a/Build-tools/Do-rpm +++ b/Build-tools/Do-rpm @@ -3,14 +3,12 @@ # Do-rpm - compile RPM packages out of a source tarball and move the # resulting RPM packages into the current directory. # -# The script currently assumes the following environment (which should exist -# like that, if the Do-compile script was used to build the binary -# distribution) +# The script currently assumes the following environment: # # - there must be a source distribution (mysql-<version>.tar.gz) # in the current directory -# - there must be a spec file (mysql-<version>.spec) in the directory -# $HOME/<hostname>/mysql-<version>/support-files/ +# - You must provide the name of an RPM spec file (mysql-<version>.spec) +# as the argument # # Use the "--help" option for more info! # @@ -35,7 +33,10 @@ $opt_log= undef; $opt_mail= ""; $opt_verbose= undef; +# Set a dummy version until we know the correct one +$VERSION= "x.y.z"; $MAJOR= $MINOR= $RELEASE= 0; +$SUFFIX= ""; GetOptions( "cc=s", @@ -50,7 +51,9 @@ GetOptions( "verbose|v", ) || &print_help; -defined($VERSION=$ARGV[0]) || print_help("Please provide the MySQL version!"); +&print_help("") if ($opt_help); + +defined($SPECFILE=$ARGV[0]) || print_help("Please provide the spec file name!"); # Include helper functions $PWD= cwd(); @@ -64,6 +67,28 @@ else die "ERROR: $LOGGER cannot be found!\n"; } +# Open the spec file and extract the version number +open(SPEC, $SPECFILE) or &abort("Unable to open \"$ARGV[0]\": $!"); +@spec= <SPEC>; +close SPEC; + +foreach (@spec) +{ + if (m/^%define\s*mysql_version\s*(.*)/) + { + $VERSION= $1; + ($MAJOR, $MINOR, $RELEASE)= split(/\./,$VERSION); + ($RELEASE, $SUFFIX)= split(/\-/,$RELEASE); + $SUFFIX= "-" . $SUFFIX if ($SUFFIX); + } +} + +$HOST= hostname(); +$HOST=~ /^([^.-]*)/; +$HOST= $1; +$LOGFILE= "$PWD/Logs/Do-rpm-$HOST-$MAJOR.$MINOR.log"; +&logger("Using spec file for version: $VERSION"); + # # Override predefined Log file name # @@ -82,14 +107,6 @@ if (defined $opt_log) } } -($MAJOR, $MINOR, $RELEASE)= split(/\./, $VERSION); -$HOST= hostname(); -$HOST=~ /^([^.-]*)/; -$HOST= $1; -$LOGFILE= "$PWD/Logs/Do-rpm-$HOST-$MAJOR.$MINOR.log"; - -&print_help("") if ($opt_help); - # # Newer RPM versions ship with a separate tool "rpmbuild" to build RPMs # @@ -120,8 +137,7 @@ chomp($SOURCEDIR= `$RPM --eval "%{_sourcedir}" 2> /dev/null`); chomp($SPECDIR= `$RPM --eval "%{_specdir}" 2> /dev/null`); chomp($SRCRPMDIR= `$RPM --eval "%{_srcrpmdir}" 2> /dev/null`); -$SOURCEFILE= "mysql-$VERSION.tar.gz"; -$SPECFILE= "$PWD/$HOST/mysql-$VERSION/support-files/mysql-$VERSION.spec"; +$SOURCEFILE= glob "mysql*-$VERSION.tar.gz"; &logger("Starting RPM build of MySQL-$VERSION on $HOST"); @@ -134,10 +150,13 @@ foreach $file ($SOURCEFILE, $SPECFILE) # Install source and spec file # &logger("Copying SOURCE and SPEC file to build directories."); -copy($SOURCEFILE, $SOURCEDIR) -or &abort("Unable to copy $SOURCEFILE to $SOURCEDIR!"); -copy($SPECFILE, $SPECDIR) -or &abort("Unable to copy $SPECFILE to $SPECDIR!"); +unless ($opt_dry_run) +{ + copy($SOURCEFILE, $SOURCEDIR) + or &abort("Unable to copy $SOURCEFILE to $SOURCEDIR!"); + copy($SPECFILE, $SPECDIR) + or &abort("Unable to copy $SPECFILE to $SPECDIR!"); +} # # Set environment variables - these are being used in the @@ -168,11 +187,13 @@ $command.= basename($SPECFILE); $command= "mv"; $command.= " -v " if ($opt_verbose); $command.= "$SRCRPMDIR/MySQL*$VERSION*.src.rpm $PWD"; +&logger("Moving source RPM to current dir."); &run_command($command, "Error moving source RPM!"); $command= "mv"; $command.= " -v " if ($opt_verbose); $command.= "$RPMDIR/$RPMARCH/MySQL*$VERSION*.$RPMARCH.rpm $PWD"; +&logger("Moving binary RPMs to current dir."); &run_command($command, "Error moving binary RPMs!"); # @@ -181,11 +202,14 @@ $command.= "$RPMDIR/$RPMARCH/MySQL*$VERSION*.$RPMARCH.rpm $PWD"; if ($opt_clean) { &logger("Removing spec file and source package"); - unlink("$SPECDIR/" . basename($SPECFILE)); - unlink("$SOURCEDIR/$SOURCEFILE"); + unless ($opt_dry_run) + { + unlink("$SPECDIR/" . basename($SPECFILE)); + unlink("$SOURCEDIR/$SOURCEFILE"); + } } -&logger("SUCCESS: RPM files successfully created.") if (!$opt_dry_run); +&logger("SUCCESS: RPM files successfully created.") unless ($opt_dry_run); exit 0; sub print_help @@ -198,11 +222,14 @@ sub print_help } print <<EOF; -Usage: Do-rpm <options> <version> +Usage: Do-rpm [options] <specfile> -Creates a binary RPM package out of a MySQL source distribution and moves the -resulting RPMs into the current directory. <version> is the MySQL version -number (e.g. 4.0.11-gamma) +Creates a binary RPM package out of a MySQL source distribution and moves +the resulting RPMs into the current directory. <specfile> is the MySQL RPM +spec file to use (e.g. mysql-4.0.17.spec). + +This script expects to find the required MySQL source distribution +(mysql-<version>.tar.gz) in the current directory. Options: @@ -222,6 +249,10 @@ Options: Example: --mail=user\\\@domain.com -v, --verbose Verbose execution +Example: + + Do-rpm -cv mysql-4.0.17.spec + EOF exit 1; } |