OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   09-Jun-2003 13:24:04
  Branch: OPENPKG_1_STABLE                 Handle: 2003060912240400

  Modified files:           (Branch: OPENPKG_1_STABLE)
    openpkg-src/mysql       my.cnf mysql.patch mysql.spec

  Log:
    merge last MySQL 3 state up to 1-STABLE branch for possible inclusion
    into OpenPKG 1.3

  Summary:
    Revision    Changes     Path
    1.5.2.1     +8  -6      openpkg-src/mysql/my.cnf
    1.3.2.3     +11 -153    openpkg-src/mysql/mysql.patch
    1.49.2.4    +45 -24     openpkg-src/mysql/mysql.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/mysql/my.cnf
  ============================================================================
  $ cvs diff -u -r1.5 -r1.5.2.1 my.cnf
  --- openpkg-src/mysql/my.cnf  16 Jan 2003 08:35:07 -0000      1.5
  +++ openpkg-src/mysql/my.cnf  9 Jun 2003 11:24:04 -0000       1.5.2.1
  @@ -6,16 +6,18 @@
   socket       = @l_prefix@/var/mysql/mysql.sock
   port         = 3306
   
  +[mysqld]
  +bind-address = 127.0.0.1
  +port         = 3306
  +
   [safe_mysqld]
   datadir      = @l_prefix@/var/mysql
   socket       = @l_prefix@/var/mysql/mysql.sock
   set-variable = [EMAIL PROTECTED]@/var/mysql/mysqld.pid
  -host         = 127.0.0.1
  -port         = 3306
   user         = @l_rusr@
   basedir      = @l_prefix@
   
  -#   logfile destinations (update rc.mysql accordingly)
  +#   logfile destinations (overwrite values of rc.mysql in rc.conf accordingly)
   log          = @l_prefix@/var/mysql/common.log
   log-update   = @l_prefix@/var/mysql/update.log
   
  @@ -38,9 +40,9 @@
   set-variable = tmp_table_size=32M
   
   #   Berkeley DB
  -set-variable = [EMAIL PROTECTED]@
  -set-variable = [EMAIL PROTECTED]@
  -set-variable = [EMAIL PROTECTED]@
  +set-variable = [EMAIL PROTECTED]@
  +set-variable = [EMAIL PROTECTED]@
  +set-variable = [EMAIL PROTECTED]@
   
   #   Innobase
   #set-variable = innodb_buffer_pool_size=70M
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/mysql/mysql.patch
  ============================================================================
  $ cvs diff -u -r1.3.2.2 -r1.3.2.3 mysql.patch
  --- openpkg-src/mysql/mysql.patch     19 Mar 2003 11:16:44 -0000      1.3.2.2
  +++ openpkg-src/mysql/mysql.patch     9 Jun 2003 11:24:04 -0000       1.3.2.3
  @@ -1,5 +1,5 @@
  ---- sql/mini_client.cc.dist  Thu Jan 16 13:37:46 2003
  -+++ sql/mini_client.cc       Thu Jan 16 13:38:03 2003
  +--- sql/mini_client.cc.dist  Tue Mar 18 12:10:58 2003
  ++++ sql/mini_client.cc       Tue Mar 18 12:11:17 2003
   @@ -318,7 +318,7 @@
       */
    
  @@ -9,9 +9,9 @@
        return(-1);
    
      if (s_err)
  ---- sql/mysqld.cc.dist       Thu Jan 16 13:35:14 2003
  -+++ sql/mysqld.cc    Tue Mar 18 10:18:18 2003
  -@@ -2475,7 +2475,7 @@
  +--- sql/mysqld.cc.dist       Tue Mar 18 12:10:58 2003
  ++++ sql/mysqld.cc    Tue Mar 18 12:11:18 2003
  +@@ -2476,7 +2476,7 @@
        {
          size_socket length=sizeof(struct sockaddr_in);
          new_sock = accept(sock, my_reinterpret_cast(struct sockaddr *) (&cAddr),
  @@ -20,7 +20,7 @@
          if (new_sock != INVALID_SOCKET ||
          (socket_errno != SOCKET_EINTR && socket_errno != SOCKET_EAGAIN))
        break;
  -@@ -2541,7 +2541,7 @@
  +@@ -2542,7 +2542,7 @@
          size_socket dummyLen;
          struct sockaddr dummy;
          dummyLen = sizeof(struct sockaddr);
  @@ -29,60 +29,8 @@
          {
        sql_perror("Error on new connection socket");
        (void) shutdown(new_sock,2);
  -@@ -3633,7 +3633,10 @@
  -       use_temp_pool=1;
  -       break;
  -     case 'u':
  --      mysqld_user=optarg;
  -+      if (!mysqld_user)
  -+    mysqld_user=optarg;
  -+      else
  -+    fprintf(stderr, "Warning: Ignoring user change to '%s' because the user was 
set to '%s' earlier on the command line\n", optarg, mysqld_user);
  -       break;
  -     case 'v':
  -     case 'V':
  ---- sql/ha_myisam.cc.dist    Tue Mar 18 09:52:28 2003
  -+++ sql/ha_myisam.cc Tue Mar 18 09:54:38 2003
  -@@ -427,7 +427,7 @@
  -   
  -   if (my_copy(fn_format(src_path, table->path,"", reg_ext, 4),
  -          dst_path,
  --         MYF(MY_WME | MY_HOLD_ORIGINAL_MODES )))
  -+         MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_DONT_OVERWRITE_FILE)))
  -   {
  -     error = HA_ADMIN_FAILED;
  -     errmsg = "Failed copying .frm file: errno = %d";
  -@@ -443,7 +443,7 @@
  - 
  -   if (my_copy(fn_format(src_path, table->path,"", MI_NAME_DEXT, 4),
  -           dst_path,
  --          MYF(MY_WME | MY_HOLD_ORIGINAL_MODES ))  )
  -+          MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_DONT_OVERWRITE_FILE))  )
  -     {
  -       errmsg = "Failed copying .MYD file: errno = %d";
  -       error= HA_ADMIN_FAILED;
  ---- sql/ha_gemini.cc.dist    Tue Mar 18 10:15:05 2003
  -+++ sql/ha_gemini.cc Tue Mar 18 10:14:47 2003
  -@@ -2985,7 +2985,7 @@
  -   
  -   if (my_copy(fn_format(src_path, table->path,"", reg_ext, 4),
  -          dst_path,
  --         MYF(MY_WME | MY_HOLD_ORIGINAL_MODES )))
  -+         MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_DONT_OVERWRITE_FILE)))
  -   {
  -     error = HA_ADMIN_FAILED;
  -     errmsg = "Failed copying .frm file: errno = %d";
  -@@ -3006,7 +3006,7 @@
  - 
  -   if (my_copy(fn_format(src_path, table->path,"", ha_gemini_ext, 4),
  -           dst_path,
  --          MYF(MY_WME | MY_HOLD_ORIGINAL_MODES ))  )
  -+          MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_DONT_OVERWRITE_FILE))  )
  -   {
  -     errmsg = "Failed copying .GMD file: errno = %d";
  -     error= HA_ADMIN_FAILED;
  ---- scripts/mysql_install_db.sh.dist Thu Jan 16 13:38:44 2003
  -+++ scripts/mysql_install_db.sh      Thu Jan 16 13:38:52 2003
  +--- scripts/mysql_install_db.sh.dist Tue Mar 18 12:10:58 2003
  ++++ scripts/mysql_install_db.sh      Tue Mar 18 12:11:18 2003
   @@ -133,14 +133,13 @@
      fi
    fi
  @@ -133,17 +81,9 @@
        echo
      fi
      echo "Please report any problems with the @scriptdir@/mysqlbug script!"
  ---- mysys/default.c.dist     Thu Jan 16 13:39:26 2003
  -+++ mysys/default.c  Wed Mar 19 01:25:09 2003
  -@@ -39,6 +39,7 @@
  - #include "mysys_priv.h"
  - #include "m_string.h"
  - #include "m_ctype.h"
  -+#include <my_dir.h>
  - 
  - char *defaults_extra_file=0;
  - 
  -@@ -48,7 +49,7 @@
  +--- mysys/default.c.dist     Tue Mar 18 12:10:58 2003
  ++++ mysys/default.c  Tue Mar 18 12:11:18 2003
  +@@ -49,7 +49,7 @@
    #ifdef __WIN__
    "C:/",
    #else
  @@ -152,85 +92,3 @@
    #endif
    #ifdef DATADIR
    DATADIR,
  -@@ -241,6 +242,20 @@
  -   {
  -     strmov(name,config_file);
  -   }
  -+  fn_format(name,name,"","",4);
  -+#if !defined(__WIN__) && !defined(OS2)
  -+  {
  -+    MY_STAT stat_info;
  -+    if (!my_stat(name,&stat_info,MYF(0)))
  -+      return 0;
  -+    if (stat_info.st_mode & S_IWOTH) /* ignore world-writeable files */
  -+    {
  -+      fprintf(stderr, "warning: World-writeable config file %s is ignored\n",
  -+              name);
  -+      return 0;
  -+    }
  -+  }
  -+#endif
  -   if (!(fp = my_fopen(fn_format(name,name,"","",4),O_RDONLY,MYF(0))))
  -     return 0;                                       /* Ignore wrong files */
  - 
  ---- mysys/my_copy.c.dist     Tue Mar 18 10:17:00 2003
  -+++ mysys/my_copy.c  Tue Mar 18 10:17:20 2003
  -@@ -32,17 +32,29 @@
  - #endif
  - 
  - 
  --    /*
  --      Ordinary ownership and accesstimes are copied from 'from-file'
  --      if MyFlags & MY_HOLD_ORIGINAL_MODES is set and to-file exists then
  --      the modes of to-file isn't changed
  --      Dont set MY_FNABP or MY_NABP bits on when calling this function !
  --      */
  -+/*
  -+  int my_copy(const char *from, const char *to, myf MyFlags)
  -+
  -+  NOTES
  -+    Ordinary ownership and accesstimes are copied from 'from-file'
  -+    If MyFlags & MY_HOLD_ORIGINAL_MODES is set and to-file exists then
  -+    the modes of to-file isn't changed
  -+    If MyFlags & MY_DONT_OVERWRITE_FILE is set, we will give an error
  -+    if the file existed.
  -+
  -+  WARNING
  -+    Don't set MY_FNABP or MY_NABP bits on when calling this function !
  -+
  -+  RETURN
  -+    0       ok
  -+    #       Error
  -+
  -+*/
  - 
  - int my_copy(const char *from, const char *to, myf MyFlags)
  - {
  -   uint Count;
  --  int new_file_stat;
  -+  int new_file_stat, create_flag;
  -   File from_file,to_file;
  -   char buff[IO_SIZE];
  -   struct stat stat_buff,new_stat_buff;
  -@@ -63,8 +75,10 @@
  -     }
  -     if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat)
  -       stat_buff=new_stat_buff;
  -+    create_flag= (MyFlags & MY_DONT_OVERWRITE_FILE) ? O_EXCL : O_TRUNC;
  -+
  -     if ((to_file=  my_create(to,(int) stat_buff.st_mode,
  --                         O_WRONLY | O_TRUNC | O_BINARY | O_SHARE,
  -+                         O_WRONLY | create_flag | O_BINARY | O_SHARE,
  -                          MyFlags)) < 0)
  -       goto err;
  - 
  ---- include/my_sys.h.dist    Tue Mar 18 10:16:16 2003
  -+++ include/my_sys.h Tue Mar 18 10:16:32 2003
  -@@ -73,6 +73,7 @@
  - #define MY_FREE_ON_ERROR 128        /* my_realloc() ; Free old ptr on error */
  - #define MY_HOLD_ON_ERROR 256        /* my_realloc() ; Return old ptr on error */
  - #define MY_THREADSAFE       128     /* pread/pwrite:  Don't allow interrupts */
  -+#define MY_DONT_OVERWRITE_FILE 1024    /* my_copy; Don't overwrite file */
  - 
  - #define MY_CHECK_ERROR      1       /* Params to my_end; Check open-close */
  - #define MY_GIVE_INFO        2       /* Give time info about process*/
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/mysql/mysql.spec
  ============================================================================
  $ cvs diff -u -r1.49.2.3 -r1.49.2.4 mysql.spec
  --- openpkg-src/mysql/mysql.spec      19 Mar 2003 11:16:44 -0000      1.49.2.3
  +++ openpkg-src/mysql/mysql.spec      9 Jun 2003 11:24:04 -0000       1.49.2.4
  @@ -25,7 +25,7 @@
   
   #   package version
   %define       V_major   3.23
  -%define       V_minor   54a
  +%define       V_minor   56
   
   #   package information
   Name:         mysql
  @@ -37,29 +37,13 @@
   Group:        Database
   License:      GPL
   Version:      %{V_major}.%{V_minor}
  -Release:      1.20030319
  +Release:      1.20030609
   
   #   package options
   %option       with_berkeleydb  yes
   %option       with_innobase    no
   %option       with_gemini      no
   
  -#   package option decisions
  -%if "%{with_berkeleydb}" == "yes"
  -%define       mysql_bdb_cache_size        8M
  -%define       mysql_bdb_log_buffer_size   32k
  -%define       mysql_bdb_max_lock          10000
  -%else
  -%define       mysql_bdb_cache_size        0
  -%define       mysql_bdb_log_buffer_size   0
  -%define       mysql_bdb_max_lock          0
  -%endif
  -%if "%{with_berkeleydb}" == "yes" || "%{with_innobase}" == "yes" || 
"%{with_gemini}" == "yes"
  -%define       mysqld     mysqld
  -%else
  -%define       mysqld     mysqld-max
  -%endif
  -
   #   list of sources
   Source0:      
http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQL-%{V_major}/mysql-%{version}.tar.gz
   Source1:      my.cnf
  @@ -70,8 +54,8 @@
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
  -BuildPreReq:  OpenPKG, openpkg >= 1.20030103, gcc
  -PreReq:       OpenPKG, openpkg >= 1.20030103
  +BuildPreReq:  OpenPKG, openpkg >= 20030103, gcc, zlib
  +PreReq:       OpenPKG, openpkg >= 20030103, zlib
   AutoReq:      no
   AutoReqProv:  no
   Provides:     MYSQL
  @@ -95,6 +79,24 @@
           -e 's;@l_prefix@;%{l_prefix};g' \
           mysys/default.c
   
  +    #   patch socklen_t for Sol6
  +    case "%{l_target}" in
  +        *-solaris2.6* )
  +            %{l_shtool} subst \
  +                -e 's;socklen_t;size_t;g' \
  +                acinclude.m4 \
  +                aclocal.m4 \
  +                configure \
  +                include/global.h \
  +                include/my_global.h \
  +                libmysql/acinclude.m4
  +            %{l_shtool} subst \
  +                -e 's;socklen_t;size_socket;g' \
  +                sql/mini_client.cc \
  +                sql/mysqld.cc
  +        ;;
  +    esac
  +
       #   determine additional configure options
       case "%{l_target}" in
           *-freebsd* ) opt="--with-client-ldflags=-static 
--with-mysqld-ldflags=-static" ;;
  @@ -102,6 +104,9 @@
           *-solaris* ) opt="--with-client-ldflags=-static 
--with-mysqld-ldflags=-static" ;;
       esac
   
  +    #   only use system default path
  +    unset LD_LIBRARY_PATH || true
  +
       #   configure source tree
       CC="%{l_cc}" \
       CXX="%{l_cxx}" \
  @@ -156,14 +161,30 @@
       strip  $RPM_BUILD_ROOT%{l_prefix}/bin/*     2>/dev/null || true
       strip  $RPM_BUILD_ROOT%{l_prefix}/libexec/* 2>/dev/null || true
   
  +    #   determine default parameters
  +%if "%{with_berkeleydb}" == "yes"
  +    l_mysql_bdb_cache_size=8M
  +    l_mysql_bdb_log_buffer_size=32k
  +    l_mysql_bdb_max_lock=10000
  +%else
  +    l_mysql_bdb_cache_size=0
  +    l_mysql_bdb_log_buffer_size=0
  +    l_mysql_bdb_max_lock=0
  +%endif
  +%if "%{with_berkeleydb}" == "yes" || "%{with_innobase}" == "yes" || 
"%{with_gemini}" == "yes"
  +    l_mysqld=mysqld
  +%else
  +    l_mysqld=mysqld-max
  +%endif
  +
       #   install global configuration
       %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/mysql
       %{l_shtool} install -c -m 644 \
           -e 's;@l_prefix@;%{l_prefix};g' \
           -e 's;@l_rusr@;%{l_rusr};g' \
  -        -e 's;@mysql_bdb_cache_size@;%{mysql_bdb_cache_size};g' \
  -        -e 's;@mysql_bdb_log_buffer_size@;%{mysql_bdb_log_buffer_size};g' \
  -        -e 's;@mysql_bdb_max_lock@;%{mysql_bdb_max_lock};g' \
  +        -e "s;@l_mysql_bdb_cache_size@;${l_mysql_bdb_cache_size};g" \
  +        -e "s;@l_mysql_bdb_log_buffer_size@;${l_mysql_bdb_log_buffer_size};g" \
  +        -e "s;@l_mysql_bdb_max_lock@;${l_mysql_bdb_max_lock};g" \
           %{SOURCE my.cnf} \
           $RPM_BUILD_ROOT%{l_prefix}/etc/mysql/
       %{l_shtool} install -c -m 600 \
  @@ -176,7 +197,7 @@
           -e 's;@l_prefix@;%{l_prefix};g' \
           -e 's;@l_rusr@;%{l_rusr};g' \
           -e 's;@l_rgrp@;%{l_rgrp};g' \
  -        -e 's;@mysqld@;%{mysqld};g' \
  +        -e "s;@l_mysqld@;${l_mysqld};g" \
           %{SOURCE rc.mysql} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   
       #   make sure the database directory exists
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to