List:Commits« Previous MessageNext Message »
From:Joerg Bruehe Date:December 12 2012 9:52am
Subject:bzr push into mysql-trunk branch (joerg.bruehe:5219 to 5221)
View as plain text  
 5221 Joerg Bruehe	2012-12-12 [merge]
      Upmerge a merge - empty.

 5220 Joerg Bruehe	2012-12-12 [merge]
      Merge an upmerge

    modified:
      packaging/rpm-uln/mysql.spec.sh
      scripts/mysql_install_db.pl.in
      support-files/mysql.spec.sh
 5219 sayantan.dutta@stripped	2012-12-12 [merge]
      upmerge 14737171 5.6=>trunk

    modified:
      mysql-test/mysql-test-run.pl
=== modified file 'packaging/rpm-uln/mysql.spec.sh'
--- a/packaging/rpm-uln/mysql.spec.sh	2012-12-11 09:53:43 +0000
+++ b/packaging/rpm-uln/mysql.spec.sh	2012-12-12 09:44:20 +0000
@@ -150,9 +150,9 @@
       %endif
     %endif
 %else
-  %define generic_kernel %(uname -r | cut -d. -f1-2)
-  %define distro_description            Generic Linux (kernel %{generic_kernel})
-  %define distro_releasetag             linux%{generic_kernel}
+  %define glibc_version %(/lib/libc.so.6 | grep stable | cut -d, -f1 | cut -c38-)
+  %define distro_description            Generic Linux (glibc %{glibc_version})
+  %define distro_releasetag             linux_glibc%{glibc_version}
   %define distro_buildreq               gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
   %define distro_requires               coreutils grep procps /sbin/chkconfig /usr/sbin/useradd /usr/sbin/groupadd
 %endif

=== modified file 'scripts/mysql_install_db.pl.in'
--- a/scripts/mysql_install_db.pl.in	2012-11-21 12:44:48 +0000
+++ b/scripts/mysql_install_db.pl.in	2012-12-12 09:41:58 +0000
@@ -93,15 +93,20 @@ EOF2
                        uses the compiled binaries and support files within the
                        source tree, useful for if you don't want to install
                        MySQL yet and just want to create the system tables.
+EOF3
+  if ( $^O !~ m/^(MSWin32|cygwin)$/ ) {
+    print <<EOF4;
   --user=user_name     The login username to use for running mysqld.  Files
                        and directories created by mysqld will be owned by this
                        user.  You must be root to use this option.  By default
                        mysqld runs using your current login name and files and
                        directories that it creates will be owned by you.
-
+EOF4
+  }
+  print <<EOF5;
 Any other options are passed to the mysqld program.
 
-EOF3
+EOF5
   exit 1;
 }
 
@@ -353,8 +358,8 @@ sub tell_root_password {
 sub generate_random_password {
   # Short term:
   # On (at least) Linux and Solaris, a "random" device is available, use it:
-  # cat /dev/urandom | LC_CTYPE=C tr -dc "[:alnum:]" | fold -w 8  | head -1
-  # Without LC_CTYPE, "tr" may not know the "alnum" character class -
+  # cat /dev/urandom | LC_ALL=C tr -dc "[:alnum:]" | fold -w 8  | head -1
+  # Without LC_ALL, "tr" may not know the "alnum" character class -
   # and there are user profiles which do not have this set.
   # Note: There is no guarantee the results will pass a validation checker
   # as resulted from WL#2739
@@ -366,7 +371,7 @@ sub generate_random_password {
   # http://search.cpan.org/~cgrau/String-MkPasswd/bin/mkpasswd.pl
   # Using it got approved recently.
   #
-  my $password = `cat /dev/urandom | LC_CTYPE=C tr -dc "[:alnum:]" | fold -w 8  | head -1`;
+  my $password = `cat /dev/urandom | LC_ALL=C tr -dc "[:alnum:]" | fold -w 8  | head -1`;
   chomp ($password);
   return $password;
 }
@@ -633,10 +638,30 @@ if ( ! -d $parent ) {
         "restart this script.",
         "If some other path was intended, please use the correct path when restarting this script.");
 }
+
+my $opt_user= $opt->{user};
+my @pwnam;
+if ($opt_user)
+{
+  if ( $^O =~ m/^(MSWin32|cygwin)$/ )
+  {
+    warning($opt, "The --user option is not supported on Windows, ignoring");
+    $opt_user= undef;
+  }
+  else
+  {
+    @pwnam= getpwnam($opt_user);
+  }
+}
+
 foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql", "$opt->{ldata}/test" )
 {
   mkdir($dir, 0700) unless -d $dir;
-  chown($opt->{user}, $dir) if -w "/" and !$opt->{user};
+  if ($opt_user and -w "/")
+  {
+    chown($pwnam[2], $pwnam[3], $dir)
+      or error($opt, "Could not chown directory $dir");
+  }
 }
 
 push(@args, "--user=$opt->{user}") if $opt->{user};

=== modified file 'support-files/mysql.spec.sh'
--- a/support-files/mysql.spec.sh	2012-11-21 15:32:54 +0000
+++ b/support-files/mysql.spec.sh	2012-12-12 09:41:58 +0000
@@ -199,9 +199,9 @@
     %endif
   %endif
 %else
-  %define generic_kernel %(uname -r | cut -d. -f1-2)
-  %define distro_description            Generic Linux (kernel %{generic_kernel})
-  %define distro_releasetag             linux%{generic_kernel}
+  %define glibc_version %(/lib/libc.so.6 | grep stable | cut -d, -f1 | cut -c38-)
+  %define distro_description            Generic Linux (glibc %{glibc_version})
+  %define distro_releasetag             linux_glibc%{glibc_version}
   %define distro_buildreq               gcc-c++ gperf ncurses-devel perl  time zlib-devel
   %define distro_requires               coreutils grep procps /sbin/chkconfig /usr/sbin/useradd /usr/sbin/groupadd
 %endif

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (joerg.bruehe:5219 to 5221) Joerg Bruehe12 Dec