List:Internals« Previous MessageNext Message »
From:sasha Date:September 3 2001 7:09pm
Subject:bk commit into 3.23 tree
View as plain text  
Below is the list of changes that have just been commited into a local
3.23. repository of sasha. When sasha does a push, they will be
propogaged to the main repository and within 24 hours after the push into
the public repository. For information on how to access
the public repository see
http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet@stripped, 2001-09-03 13:09:08-06:00, sasha@stripped
  added symbols files to RPM to resolve stack trace
  fixed Do-rpm to accept command-line options for easier testing/local
  RPM build

  BUILD/compile-pentium-max
    1.4 01/09/03 13:09:07 sasha@stripped +2 -1
    add enable-thread-safe-client

  Build-tools/Do-rpm
    1.14 01/09/03 13:09:07 sasha@stripped +138 -40
    make configurable from command line

  support-files/mysql.spec.sh
    1.34 01/09/03 13:09:07 sasha@stripped +10 -2
    add mysqld.sym and mysqld-max.sym to the RPM

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	sasha
# Host:	mysql.sashanet.com
# Root:	/home/sasha/src/bk/mysql

--- 1.13/Build-tools/Do-rpm	Sat Apr  7 18:30:07 2001
+++ 1.14/Build-tools/Do-rpm	Mon Sep  3 13:09:07 2001
@@ -1,5 +1,36 @@
 #!/bin/bash
 
+#helper functions
+
+function copy_to_bmachine
+{
+ if [ x$local_build = x1 ]; then
+  cp $1 $2
+ else
+  scp $1 $owner@$bmachine:$2
+ fi 
+}
+
+function copy_from_bmachine
+{
+ if [ x$local_build = x1 ]; then
+  cp $1 $2
+ else
+  scp $owner@$bmachine:$1 $2
+ fi 
+}
+
+function run_command
+{
+ if [ x$local_build = x1 ]; then
+  bash $1 
+ else
+  cat $1 | ssh $owner@$bmachine bash
+ fi 
+}
+
+#Supply defaults
+
 # We built on one of two machines
 bmachine=work
 smachine=work
@@ -8,6 +39,7 @@
 # Hard path!!
 bpath=`/bin/pwd`
 rpmdir="/usr/src/redhat"
+logdir="$bpath/Logs"
 
 ###### Perl STUFF #####
 
@@ -24,6 +56,38 @@
 VER=`grep "AM_INIT_AUTOMAKE(mysql, " $bpath/configure.in | \
  sed -e 's;AM_INIT_AUTOMAKE(mysql, ;;' -e 's;);;'`
 VER_NO_DASH=`echo $VER | sed -e "s|-.*$||"`
+tarball=$bpath/mysql-$VER.tar.gz
+
+while test $# -gt 0; do
+  case "$1" in
+   --rpmdir=*)
+   rpmdir=`echo $1 | sed -e "s;--rpmdir=;;"`
+   ;;
+   --smachine=*)
+   smachine=`echo $1 | sed -e "s;--smachine=;;"`
+   ;;
+   --bmachine=*)
+   bmachine=`echo $1 | sed -e "s;--bmachine=;;"`
+   ;;
+  --owner=*)
+   owner=`echo $1 | sed -e "s;--owner=;;"`
+   ;;
+  --tarball=*) 
+   tarball=`echo $1 | sed -e "s;--tarball=;;"`
+   ;;
+  --logdir=*)
+   logdir=`echo $1 | sed -e "s;--logdir=;;"`
+   ;;
+  --local )
+  local_build=1
+  ;; 
+  --skip-perl )
+  skip_perl=1
+  ;; 
+  * ) break ;;
+  esac
+  shift
+done
 
 echo "Removing old MySQL packages"
 rm -rf $rpmdir/BUILD/mysql-*
@@ -31,16 +95,34 @@
 rm -f $rpmdir/SRPMS/MySQL-*
 rm -f $rpmdir/SPEC/mysql-*
 
+if [ ! -d "$logdir" ]; then
+ echo "$logdir does not exist, creating"
+ mkdir -p $logdir
+fi
+
+if [ ! -f "$tarball" ]; then
+ echo "Tarball file $tarball does not exist, please make one first"
+ exit 1
+fi
+
 echo "Building RPM for MySQL version $VER on $bmachine"
 
-log=$bpath/Logs/Log-RPM-`date +%y%m%d-%H%M`
+log=$logdir/Log-RPM-`date +%y%m%d-%H%M`
 
 (
 set -x
 # Copy MySQL source and spec files
-scp $bpath/mysql-$VER.tar.gz $owner@$bmachine:$rpmdir/SOURCES
-scp $bpath/Docs/Images/mysql-logo.gif $owner@$bmachine:$rpmdir/SOURCES/mysql.gif
-scp $bpath/support-files/mysql-$VER.spec $owner@$bmachine:$rpmdir/SPECS
+
+#Sasha: I left the scp stuff commented out instead of deleted to make it
+#easy to revert in a hurry, if there is a need. Once everything is tested
+#and works perfectly, the scp stuff should be deleted to avoid confusion
+
+#scp $bpath/mysql-$VER.tar.gz $owner@$bmachine:$rpmdir/SOURCES
+copy_to_bmachine $tarball $rpmdir/SOURCES
+#scp $bpath/Docs/Images/mysql-logo.gif $owner@$bmachine:$rpmdir/SOURCES/mysql.gif
+copy_to_bmachine $bpath/Docs/Images/mysql-logo.gif $rpmdir/SOURCES/mysql.gif
+#scp $bpath/support-files/mysql-$VER.spec $owner@$bmachine:$rpmdir/SPECS
+copy_to_bmachine $bpath/support-files/mysql-$VER.spec $rpmdir/SPECS
 
 # Copy perl things. Has to be uncompressed since Compress.pm is not
 # installed yet. Set CEXT to .gz when we support compression.
@@ -52,7 +134,7 @@
 # cd /usr/lib/perl5/site_perl/5.005; ln -s ../* .; rm -f 5.005
 
 TMP_SCRIPT_MYSQL=00-temp-for-do-rpm.$$
-cat > $bpath/Logs/$TMP_SCRIPT_MYSQL <<END
+cat > $logdir/$TMP_SCRIPT_MYSQL <<END
 set -x
 
 # Check environment
@@ -67,32 +149,34 @@
 rm -f /tmp/$TMP_SCRIPT_MYSQL
 END
 
-TMP_SCRIPT_PERL=00-temp-for-perl-rpm.$$
-cat > $bpath/Logs/$TMP_SCRIPT_PERL <<END
-set -x
+if [ ! x$skip_perl=x1 ]; then
 
-# First clean up so we do not get old versions when wildcard matching
-rm -f $rpmdir/SOURCES/DBI-*.spec
-rm -f $rpmdir/RPMS/i386/Perl-*.rpm
-rm -f $rpmdir/SRPMS/Perl-*.rpm
-rm -f $rpmdir/RPMS/i386/MySQL*-$VER_NO_DASH*.rpm
-rm -f $rpmdir/SRPMS/MySQL*-$VER_NO_DASH*.rpm
+  TMP_SCRIPT_PERL=00-temp-for-perl-rpm.$$
+  cat > $logdir/$TMP_SCRIPT_PERL <<END
+  set -x
+
+  # First clean up so we do not get old versions when wildcard matching
+  rm -f $rpmdir/SOURCES/DBI-*.spec
+  rm -f $rpmdir/RPMS/i386/Perl-*.rpm
+  rm -f $rpmdir/SRPMS/Perl-*.rpm
+  rm -f $rpmdir/RPMS/i386/MySQL*-$VER_NO_DASH*.rpm
+  rm -f $rpmdir/SRPMS/MySQL*-$VER_NO_DASH*.rpm
 
-chmod a+x ${MAKERPM}
-rm 
+  chmod a+x ${MAKERPM}
+  rm 
 
-${MAKERPM} --verbose --package-name=DBI --package-version ${DBI_VERSION} \
+  ${MAKERPM} --verbose --package-name=DBI --package-version ${DBI_VERSION} \
  --specs --source=DBI-${DBI_VERSION}.tar$CEXT
 
-rpm -ba $rpmdir/SPECS/DBI-${DBI_VERSION}.spec
+  rpm -ba $rpmdir/SPECS/DBI-${DBI_VERSION}.spec
 
-${MAKERPM} --verbose --package-name=Data-ShowTable \
+  ${MAKERPM} --verbose --package-name=Data-ShowTable \
  --package-version ${DATA_SHOWTABLE_VERSION} \
  --specs --source=Data-ShowTable-${DATA_SHOWTABLE_VERSION}.tar$CEXT
 
-rpm -ba $rpmdir/SPECS/Data-ShowTable-${DATA_SHOWTABLE_VERSION}.spec
+  rpm -ba $rpmdir/SPECS/Data-ShowTable-${DATA_SHOWTABLE_VERSION}.spec
 
-for v in ${DBD_MYSQL_VERSION}; do
+  for v in ${DBD_MYSQL_VERSION}; do
     ${MAKERPM} 
         --specs \
         --source=Msql-Mysql-modules-$v.tar$CEXT \
@@ -103,32 +187,46 @@
 		         --nomsql-install --nomsql1-install' \
 	--require=perl-Data-ShowTable --require=perl-DBI
     rpm -ba $rpmdir/SPECS/DBD-mysql-$v.spec
-done
+  done
 
-for srcrpm in $rpmdir/SRPMS/perl-*.src.rpm
-do
-  rpm --rebuild $srcrpm
-done
+  for srcrpm in $rpmdir/SRPMS/perl-*.src.rpm
+  do
+    rpm --rebuild $srcrpm
+  done
 
-rm -f /tmp/$TMP_SCRIPT_PERL
+  rm -f /tmp/$TMP_SCRIPT_PERL
 END
+fi
+
+ # scp $bpath/Logs/$TMP_SCRIPT_MYSQL $owner@$bmachine:/tmp/$TMP_SCRIPT_MYSQL
+
+# ssh $bmachine -l $owner bash $bpath/Logs/$TMP_SCRIPT_MYSQL
 
-# scp $bpath/Logs/$TMP_SCRIPT_MYSQL $owner@$bmachine:/tmp/$TMP_SCRIPT_MYSQL
+cmd=$logdir/$TMP_SCRIPT_MYSQL
+run_command $cmd
 
-ssh $bmachine -l $owner bash $bpath/Logs/$TMP_SCRIPT_MYSQL
+if [ $? != 0 ]; then
+ echo "$cmd failed, perhaps the following will help figure out why:"
+ tail $log
+fi 
 
-# Build perl RPM (we currently need to be root to do this and that is
-# not possible)
+if [ ! x$local_build=x1 ]; then
 
-#scp $bpath/Logs/$TMP_SCRIPT_PERL $owner@$bmachine:/tmp/$TMP_SCRIPT_PERL
-#ssh $bmachine -l root bash /tmp/$TMP_SCRIPT_PERL
+ # Build perl RPM (we currently need to be root to do this and that is
+ # not possible)
 
-# Copy RPMs back to the source dir. We must do this here since the
-# $bmachine may not have permission to access $smachine.
-scp $owner@$bmachine:$rpmdir/RPMS/i386/MySQL*-$VER_NO_DASH*.rpm $bpath/NEW-RPMS
-scp $owner@$bmachine:$rpmdir/SRPMS/MySQL*-$VER_NO_DASH*.rpm $bpath/NEW-RPMS
+ #scp $bpath/Logs/$TMP_SCRIPT_PERL $owner@$bmachine:/tmp/$TMP_SCRIPT_PERL
+ #ssh $bmachine -l root bash /tmp/$TMP_SCRIPT_PERL
 
-# And the perl ones
-#scp $owner@$bmachine:$rpmdir/RPMS/i386/Perl*-*.rpm $bpath/NEW-RPMS
-#scp $owner@$bmachine:$rpmdir/SRPMS/Perl*-*.rpm $bpath/NEW-RPMS
+ # Copy RPMs back to the source dir. We must do this here since the
+ # $bmachine may not have permission to access $smachine.
+ scp $owner@$bmachine:$rpmdir/RPMS/i386/MySQL*-$VER_NO_DASH*.rpm $bpath/NEW-RPMS
+ scp $owner@$bmachine:$rpmdir/SRPMS/MySQL*-$VER_NO_DASH*.rpm $bpath/NEW-RPMS
+
+ # And the perl ones
+ #scp $owner@$bmachine:$rpmdir/RPMS/i386/Perl*-*.rpm $bpath/NEW-RPMS
+ #scp $owner@$bmachine:$rpmdir/SRPMS/Perl*-*.rpm $bpath/NEW-RPMS
+fi 
 )  > $log 2>&1
+
+

--- 1.33/support-files/mysql.spec.sh	Tue Jun 12 04:10:23 2001
+++ 1.34/support-files/mysql.spec.sh	Mon Sep  3 13:09:07 2001
@@ -151,9 +151,9 @@
 # The --enable-assembler simply does nothing on systems that does not
 # support assembler speedups.
 sh -c  "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \
-	CC=\"${MYSQL_BUILD_CC:-egcs}\" \
+	CC=\"${MYSQL_BUILD_CC:-gcc}\" \
 	CFLAGS=\"${MYSQL_BUILD_CFLAGS:- -O3}\" \
-	CXX=\"${MYSQL_BUILD_CXX:-egcs}\" \
+	CXX=\"${MYSQL_BUILD_CXX:-gcc}\" \
 	CXXFLAGS=\"${MYSQL_BUILD_CXXFLAGS:- -O3 \
 	          -felide-constructors -fno-exceptions -fno-rtti \
 		  }\" \
@@ -204,6 +204,7 @@
 
 # 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 cf $RBR/shared-libs.tar *.so*)
 (cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*)
 
@@ -219,6 +220,7 @@
 	   "--with-mysqld-ldflags='-all-static'" \
 	   "--with-client-ldflags='-all-static'" \
 	   "--without-berkeley-db --without-innodb"
+nm --numeric-sort sql/mysqld > sql/mysqld.sym
 
 %install -n mysql-%{mysql_version}
 RBR=$RPM_BUILD_ROOT
@@ -240,6 +242,10 @@
 # install saved mysqld-max
 install -m755 $MBD/sql/mysqld-max $RBR/usr/sbin/mysqld-max
 
+# install symbol files ( for stack trace resolution)
+install -m644 $MBD/sql/mysqld-max.sym $RBR/usr/lib/mysql/mysqld-max.sym
+install -m644 $MBD/sql/mysqld.sym $RBR/usr/lib/mysql/mysqld.sym
+
 # Install logrotate and autostart
 install -m644 $MBD/support-files/mysql-log-rotate $RBR/etc/logrotate.d/mysql
 install -m755 $MBD/support-files/mysql.server $RBR/etc/rc.d/init.d/mysql
@@ -349,6 +355,7 @@
 %attr(644, root, root) /usr/info/mysql.info*
 
 %attr(755, root, root) /usr/sbin/mysqld
+%attr(644, root, root) /usr/lib/mysql/mysqld.sym
 
 %attr(644, root, root) /etc/logrotate.d/mysql
 %attr(755, root, root) /etc/rc.d/init.d/mysql
@@ -403,6 +410,7 @@
 
 %files Max
 %attr(755, root, root) /usr/sbin/mysqld-max
+%attr(644, root, root) /usr/lib/mysql/mysqld-max.sym
 
 %changelog 
 

--- 1.3/BUILD/compile-pentium-max	Fri Apr 13 12:55:35 2001
+++ 1.4/BUILD/compile-pentium-max	Mon Sep  3 13:09:07 2001
@@ -7,6 +7,7 @@
 extra_configs="$pentium_configs"
 strip=yes
 
-extra_configs="$extra_configs --with-innodb --with-berkeley-db"
+extra_configs="$extra_configs --with-innodb --with-berkeley-db \
+ --enable-thread-safe-client"
 
 . "$path/FINISH.sh"
Thread
bk commit into 3.23 treesasha3 Sep