Commit ddb47b9e authored by unknown's avatar unknown
Browse files

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

into hundin.mysql.fi:/home/marko/mysql-5.0

parents ed4dbd12 e7dceff5
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"
+183 −0
Original line number Diff line number Diff line
#!/usr/bin/perl
#
# Script to create Solaris packages
#
$INTERACTIVE= 0;
chomp ($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)");
# Clean-up the ~/packaging/ area
system ("(rm -rf mysql*)");
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");
+10 −6
Original line number Diff line number Diff line
@@ -918,9 +918,11 @@ if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
then
  AC_CHECK_FUNC(gtty, , AC_CHECK_LIB(compat, gtty))
fi
# We make a special variable for client library's to avoid including
# thread libs in the client.
NON_THREADED_CLIENT_LIBS="$LIBS $ZLIB_LIBS"

# We make a special variable for non-threaded version of LIBS to avoid
# including thread libs into non-threaded version of MySQL client library.
# Later in this script LIBS will be augmented with a threads library.
NON_THREADED_LIBS="$LIBS"

AC_MSG_CHECKING([for int8])
case $SYSTEM_TYPE in
@@ -1497,7 +1499,7 @@ then
  if test -f /usr/lib/libxnet.so -a "$SYSTEM_TYPE" = "sni-sysv4"
  then
    LIBS="-lxnet $LIBS"
    NON_THREADED_CLIENT_LIBS="$NON_THREADED_CLIENT_LIBS -lxnet"
    NON_THREADED_LIBS="-lxnet $NON_THREADED_LIBS"
    with_named_thread="-Kthread $LDFLAGS -lxnet"
    LD_FLAGS=""
    CFLAGS="-Kthread $CFLAGS"
@@ -2444,7 +2446,7 @@ dnl This probably should be cleaned up more - for now the threaded
dnl client is just using plain-old libs.
sql_client_dirs="libmysql strings regex client"
linked_client_targets="linked_libmysql_sources"
CLIENT_LIBS=$NON_THREADED_CLIENT_LIBS

if test "$THREAD_SAFE_CLIENT" != "no"
then
  sql_client_dirs="libmysql_r $sql_client_dirs"
@@ -2452,9 +2454,11 @@ then
  AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should be client be thread safe])
fi

CLIENT_LIBS="$CLIENT_LIBS $STATIC_NSS_FLAGS"
CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS"

AC_SUBST(CLIENT_LIBS)
AC_SUBST(NON_THREADED_LIBS)
AC_SUBST(STATIC_NSS_FLAGS)
AC_SUBST(sql_client_dirs)
AC_SUBST(linked_client_targets)

Loading