Commit 2359f1fa authored by unknown's avatar unknown
Browse files

Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0

into gluh.mysql.r18.ru:/home/gluh/MySQL/mysql-5.0


sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
parents 02fadb6d e7bac81f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
#! /bin/sh

path=`dirname $0`
. "$path/SETUP.sh"
. "$path/SETUP.sh" $@ --with-debug=full

extra_flags="$pentium_cflags $debug_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
+1 −1
Original line number Diff line number Diff line
#! /bin/sh

path=`dirname $0`
. "$path/SETUP.sh"
. "$path/SETUP.sh" $@ --with-debug=full

extra_flags="$pentium_cflags $debug_cflags $max_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
+3 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ mronstrom@build.mysql.com
mronstrom@mysql.com
mskold@mysql.com
msvensson@build.mysql.com
msvensson@neptunus.homeip.net
mwagner@cash.mwagner.org
mwagner@evoq.mwagner.org
mwagner@here.mwagner.org
@@ -161,6 +162,7 @@ mwagner@work.mysql.com
mydev@mysql.com
mysql@home.(none)
mysql@mc04.(none)
mysqldev@bk-internal.mysql.com
mysqldev@build.mysql2.com
mysqldev@melody.local
mysqldev@mysql.com
@@ -197,6 +199,7 @@ ram@gw.mysql.r18.ru
ram@gw.udmsearch.izhnet.ru
ram@mysql.r18.ru
ram@ram.(none)
ramil@mysql.com
ranger@regul.home.lan
rburnett@build.mysql.com
reggie@bob.(none)
+181 −0
Original line number Diff line number Diff line
#!/usr/bin/perl
#
# Script to create Solaris packages
#
$INTERACTIVE= 0;
$hostname= `hostname`;
$find = "/usr/bin/find";
$pkgproto = "/usr/bin/pkgproto";
$pkgmk = "/usr/bin/pkgmk -o";
$pkgtrans = "/usr/bin/pkgtrans";
$temp = "/tmp/prototype$$";
$prototype = "prototype";
$pkginfo = "pkginfo";
($gid ,$pkg ,$uid ,$userInfo ,$email ,$quota ,$group ,$passwd
,$category ,$userHome ,$vendor ,$loginShell ,$pstamp ,$basedir)=();

$fullname = shift @ARGV;
$fullname or die "No package name was specified";
-d $fullname or die "That directory is not present!";

$fullname =~ s,/+$,,;             # Remove ending slash if any

$pkgdir= `cd ../$hostname; pwd`;
$pwd = `pwd`;
if ($pwd =~ '\/usr\/local') {
        $pwd = $`;
}
die  "Wrong location, please cd to <PKGBASE>/usr/local/ and run again.\n"
    	if ($pwd eq "");

system  ("$find . -print | $pkgproto > $temp");
open (PREPROTO,"<$temp") or die "Unable to read prototype information ($!)\n";
open (PROTO,">$prototype") or die "Unable to write file prototype ($!)\n";
print PROTO "i pkginfo=./$pkginfo\n";
while (<PREPROTO>) {
        # Read the prototype information from /tmp/prototype$$
        chomp;
        $thisline = $_;
        if ($thisline =~ " prototype "
         or $thisline =~ " pkginfo ") {
          # We don't need that line
        } elsif ($thisline =~ "^[fd] ") {
          # Change the ownership for files and directories
          ($dir, $none, $file, $mode, $user, $group) = split / /,$thisline;
          print PROTO "$dir $none $file $mode bin bin\n";
        } else {
          # Symlinks and other stuff should be printed as well ofcourse
          print PROTO "$thisline\n";
        }
}
close PROTO;
close PREPROTO;

# Clean up
unlink $temp or warn "Unable to remove tempfile ($!)\n";

# Now we can start building the package
#
# First get some info

$fullname =~ /^((mysql)-.+)-([\d\.]+)-.+$/
  or die "This name is not what I expected - \"$fullname\"";

$default{"name"}= $2;
$default{"version"}= $3;
$default{"pkg"}= $1;
$default{"arch"} = `uname -m`;
chomp $default{"arch"};
$default{"category"}= "application";
$default{"vendor"}= "MySQL AB";
$default{"email"}= "build\@mysql.com";
$default{"pstamp"}= "MySQL AB Build Engineers";
$os = `uname -r`;
$os =~ '\.';
$os = "sol$'";
chomp $os;
$default{"basedir"}= "/usr/local";
$default{"packagename"}= $fullname . '.pkg';

# Check for correctness of guessed values by userinput

%questions = (
  pkg => "Please give the name for this package",
  name => "Now enter the real name for this package",
  arch => "What architecture did you build the package on?",
  version => "Enter the version number of the package",
  category => "What category does this package belong to?",
  vendor => "Who is the vendor of this package?",
  email => "Enter the email adress for contact",
  pstamp => "Enter your own name",
  basedir => "What is the basedir this package will install into?",
  packagename => "How should I call the packagefile?",
);

@vars = qw(pkg name arch version category vendor email pstamp basedir
    	   packagename);
foreach $varname (@vars) {
        getvar_noq($varname);
}

if ($INTERACTIVE) {
  while (!&chkvar()) {
    print "\n";
    foreach $varname (@vars) {
      getvar($varname);
    }
    @vars = qw(pkg name arch version category vendor email pstamp basedir
    	   packagename);
  }
}
$classes = "none";

# Create the pkginfo file

print "\nNow creating $pkginfo file\n";
open (PKGINFO,">$pkginfo") || die "Unable to open $pkginfo for writing ($!)\n";
print PKGINFO "PKG=\"$pkg\"\n";
print PKGINFO "NAME=\"$name\"\n";
print PKGINFO "ARCH=\"$arch\"\n";
print PKGINFO "VERSION=\"$version\"\n";
print PKGINFO "CATEGORY=\"$category\"\n";
print PKGINFO "VENDOR=\"$vendor\"\n";
print PKGINFO "EMAIL=\"$email\"\n";
print PKGINFO "PSTAMP=\"$pstamp\"\n";
print PKGINFO "BASEDIR=\"$basedir\"\n";
print PKGINFO "CLASSES=\"$classes\"\n";
close PKGINFO;
print "Done.\n";

# Build and zip the package

print "Building package\n";
system ("$pkgmk -r `pwd`");
system ("(cd /var/spool/pkg; $pkgtrans -s -o `pwd` /tmp/$packagename $pkg)");
system ("gzip /tmp/$packagename");

# Clean-up the spool area
system ("(cd /var/spool/pkg; rm -rf $pkg)");
unlink $pkginfo;
unlink $prototype;
system ("mv /tmp/${packagename}.gz $pkgdir");
print "Done. (~/$hostname/$packagename.gz)\n";
# The subroutines
sub chkvar {
  print "\n";

  print "PKG=$pkg\n";
  print "NAME=$name\n";
  print "ARCH=$arch\n";
  print "VERSION=$version\n";
  print "CATEGORY=$category\n";
  print "VENDOR=$vendor\n";
  print "EMAIL=$email\n";
  print "PSTAMP=$pstamp\n";
  print "BASEDIR=$basedir\n";
  print "PACKAGENAME=$packagename\n";

  
  print "\nIs this information correct? [Y/n]: ";
  my $answer= <STDIN>;
  chomp $answer;
  $answer= 'Y' if ($answer eq "");
  $answer= uc $answer;
  my $res= ($answer eq 'Y')? 1 : 0;
  return($res);
}

sub getvar_noq {
        my $questionname = "@_";
        $$questionname = $default{$questionname};
}

sub getvar {
        my $questionname = "@_";
        my $ucquestionname= uc $questionname;
        print "$ucquestionname: $questions{$questionname} [$default{\"$questionname\"}]: ";
        my $answer = <STDIN>;
        chomp $answer;
        $$questionname = $answer;
        $$questionname = $default{$questionname} if ($$questionname eq "");
}
+1 −1
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ static void usage(void)
  puts("and you are welcome to modify and redistribute it under the GPL license.\n");
  puts("This program can be used to CHECK (-c,-m,-C), REPAIR (-r), ANALYZE (-a)");
  puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
  puts("used at the same time. It works on MyISAM and in some cases on BDB tables.");
  puts("used at the same time. Not all options are supported by all storage engines.");
  puts("Please consult the MySQL manual for latest information about the");
  puts("above. The options -c,-r,-a and -o are exclusive to each other, which");
  puts("means that the last option will be used, if several was specified.\n");
Loading