Comment 1 for bug 1170024

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Possible regression from:

revno: 463.1.1 [merge]
     fixes bug: https://launchpad.net/bugs/710799
     committer: Alexey Bychko <email address hidden>
     branch nick: bug710799-5.5
     timestamp: Thu 2013-03-07 19:45:40 +0700
     message:
       fix for bug 710799, version 5.5
       [-] disabled uncongitional manual creation of /var/lib/mysql/*
       [+] added conditional call of mysql_install_db, only for clean installation, but not for upgrade
       [+] added debug possibility for %post
     diff:
     === modified file 'build/percona-server.spec'
     --- build/percona-server.spec 2013-02-26 16:40:25 +0000
     +++ build/percona-server.spec 2013-03-07 12:45:40 +0000
     @@ -710,13 +710,16 @@
      fi

      %post -n Percona-Server-server%{product_suffix}
     -
     +if [ X${PERCONA_DEBUG} == X1 ]; then
     + set -x
     +fi
      # ATTENTION: Parts of this are duplicated in the "triggerpostun" !

      mysql_datadir=%{mysqldatadir}
      NEW_VERSION=%{mysql_version}-%{release}
      STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER

     +if [ $1 -eq 1 ]; then
      # ----------------------------------------------------------------------
      # Create data directory if needed, check whether upgrade or install
      # ----------------------------------------------------------------------
     @@ -734,8 +737,11 @@
         # If the directory exists, we may assume it is an upgrade.
         echo "MySQL RPM upgrade to version $NEW_VERSION" >> $STATUS_FILE
      fi
     -if [ ! -d $mysql_datadir/test ] ; then mkdir $mysql_datadir/test; fi
     +if [ ! -d $mysql_datadir/test ]; then
     + mkdir $mysql_datadir/test;
     +fi
     +%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
     +fi
      # ----------------------------------------------------------------------
      # Make MySQL start/shutdown automatically when the machine does it.
      # ----------------------------------------------------------------------
     @@ -761,26 +767,19 @@
      usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true

      # ----------------------------------------------------------------------
     +# Initiate databases if needed
     +# ----------------------------------------------------------------------
     +# ----------------------------------------------------------------------
     +# Upgrade databases if needed would go here - but it cannot be automated yet
     +# ----------------------------------------------------------------------
     +
     +# ----------------------------------------------------------------------
      # Change permissions so that the user that will run the MySQL daemon
      # owns all database files.
      # ----------------------------------------------------------------------
      chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir

      # ----------------------------------------------------------------------
     -# Initiate databases if needed
     -# ----------------------------------------------------------------------
     -
     -# ----------------------------------------------------------------------
     -# Upgrade databases if needed would go here - but it cannot be automated yet
     -# ----------------------------------------------------------------------
     -
     -# ----------------------------------------------------------------------
     -# Change permissions again to fix any new files.
     -# ----------------------------------------------------------------------
     -chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
     -
     -# ----------------------------------------------------------------------
      # Fix permissions for the permission database so that only the user
      # can read them.
      # ----------------------------------------------------------------------
         ------------------------------------------------------------

which was fix for https://bugs.launchpad.net/percona-server/+bug/710799