/[smeserver]/rpms/smeserver-mysql/sme10/smeserver-mysql-2.7.0-bz11899-sclo.patch
ViewVC logotype

Diff of /rpms/smeserver-mysql/sme10/smeserver-mysql-2.7.0-bz11899-sclo.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by jpp, Sun Mar 13 06:33:40 2022 UTC Revision 1.4 by jpp, Mon Mar 14 02:39:16 2022 UTC
# Line 15  diff -Nur --no-dereference smeserver-mys Line 15  diff -Nur --no-dereference smeserver-mys
15                 flush-engine-log flush-general-log flush-slow-log                 flush-engine-log flush-general-log flush-slow-log
16          fi          fi
17       endscript       endscript
18  diff -Nur --no-dereference smeserver-mysql-2.7.0.old/rootscl/sbin/e-smith/systemd/mariadb_VER_-initialize smeserver-mysql-2.7.0/rootscl/sbin/e-smith/systemd/mariadb_VER_-initialize  diff -Nur --no-dereference smeserver-mysql-2.7.0.old/rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_ smeserver-mysql-2.7.0/rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_
19  --- smeserver-mysql-2.7.0.old/rootscl/sbin/e-smith/systemd/mariadb_VER_-initialize      2022-03-12 00:27:43.000000000 -0500  --- smeserver-mysql-2.7.0.old/rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_    2022-03-12 16:39:10.000000000 -0500
20  +++ smeserver-mysql-2.7.0/rootscl/sbin/e-smith/systemd/mariadb_VER_-initialize  2022-03-13 01:24:53.334000000 -0500  +++ smeserver-mysql-2.7.0/rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_        2022-03-13 21:14:10.966000000 -0400
21  @@ -34,8 +34,11 @@  @@ -3,7 +3,7 @@
22           fi   $cfg['Servers'][$i]['host'] = 'localhost';
23           exit $ret   $cfg['Servers'][$i]['extension'] = 'mysqli';
24       fi   $cfg['Servers'][$i]['connect_type'] = 'socket';
25  -    # set root password  -$cfg['Servers'][$i]['socket'] = '/var/lib/mysql/mariadb!!!VER!!!.sock';
26  -    /opt/rh/rh-mariadb!!!VER!!!/root/usr/libexec/mysqld --bootstrap --datadir="$datadir" --user="mysql" < /var/lib/mysql/set.password  +$cfg['Servers'][$i]['socket'] = '!!!SOCKET!!!';
27  +    # set root password , 104 and above have a different syntax and allow root passwordless access   $cfg['Servers'][$i]['compress'] = false;
28  +    if [ !!!VER!!! -le  103 ]   # standalone or login mode
29  +    then   $scriptname=end(explode('/',$_SERVER['PHP_SELF']));
30  +      /opt/rh/rh-mariadb!!!VER!!!/root/usr/libexec/mysqld --bootstrap --datadir="$datadir" --user="mysql" < /var/lib/mysql/set.password  diff -Nur --no-dereference smeserver-mysql-2.7.0.old/rootscl/sbin/e-smith/systemd/mariadb_VER_-mysql.init smeserver-mysql-2.7.0/rootscl/sbin/e-smith/systemd/mariadb_VER_-mysql.init
31  +    fi  --- smeserver-mysql-2.7.0.old/rootscl/sbin/e-smith/systemd/mariadb_VER_-mysql.init      2022-03-11 20:43:05.000000000 -0500
32       # upgrade does not need to be run on a fresh datadir  +++ smeserver-mysql-2.7.0/rootscl/sbin/e-smith/systemd/mariadb_VER_-mysql.init  2022-03-13 21:13:39.386000000 -0400
33       #echo "5.7.24" >"$datadir/mysql_upgrade_info"  @@ -52,7 +52,7 @@
34       # In case we're running as root, make sure files are owned properly  
35  @@ -46,7 +49,10 @@   for i in $(seq 1 10)
36           /sbin/e-smith/expand-template /etc/e-smith/sql/init!!!VER!!!/00_restore_dumped_dbs   do
37       fi  -    if test -e /var/lib/mysql/mariadb!!!VER!!!.sock
38   else  +    if test -e !!!SOCKET!!!
39  -   # else we set root password anyway ! just to be sure !       then
40  -   /opt/rh/rh-mariadb!!!VER!!!/root/usr/libexec/mysqld --bootstrap --datadir="$datadir" --user="mysql" < /var/lib/mysql/set.password          exit_value=0
41  -          HOME=/root
42  +   # else we set root password anyway ! just to be sure ! 104 and above have a different syntax and allow root passwordless access  diff -Nur --no-dereference smeserver-mysql-2.7.0.old/root/etc/e-smith/templates/var/lib/mysql/set.password smeserver-mysql-2.7.0/root/etc/e-smith/templates/var/lib/mysql/set.password
43  +   if [ !!!VER!!! -le  103 ]  --- smeserver-mysql-2.7.0.old/root/etc/e-smith/templates/var/lib/mysql/set.password     2022-03-11 10:32:13.000000000 -0500
44  +   then  +++ smeserver-mysql-2.7.0/root/etc/e-smith/templates/var/lib/mysql/set.password 2022-03-13 22:32:50.035000000 -0400
45  +     /opt/rh/rh-mariadb!!!VER!!!/root/usr/libexec/mysqld --bootstrap --datadir="$datadir" --user="mysql" < /var/lib/mysql/set.password  @@ -3,9 +3,20 @@
46  +   fi  
47  +   exit 0       my $pw = esmith::util::LdapPassword();
48   fi  
49    -    $OUT .= "use mysql;\n";
50    -    $OUT .= "ALTER TABLE user MODIFY Password char(41) NOT NULL default '';\n";
51    -    $OUT .= "UPDATE user SET password=password('$pw') WHERE user='root';\n";
52    -    $OUT .= "DELETE FROM user WHERE user='';\n";
53    +    $OUT .= "DELIMITER //\n";
54    +    $OUT .= "use mysql //\n";
55    +    $OUT .= "SET \@vers := (SELECT REPLACE(SUBSTRING( \@\@VERSION , 1 , LOCATE( '.' , \@\@VERSION, LOCATE( '.' , \@\@VERSION )+1 ) ), '.','' ) ) //\n";
56    +    $OUT .= "BEGIN NOT ATOMIC \n";
57    +    $OUT .= "IF \@vers < 104 THEN \n";
58    +    $OUT .= "  ALTER TABLE user MODIFY Password char(41) NOT NULL default '';\n";
59    +    $OUT .= "  UPDATE user SET password=password('$pw') WHERE user='root';\n";
60    +    $OUT .= "  DELETE FROM db WHERE user='';\n";
61    +    $OUT .= "  DELETE FROM user WHERE user='';\n";
62    +    $OUT .= "ELSE  \n";
63    +    $OUT .= "  SET PASSWORD FOR 'root'\@localhost = PASSWORD(\"$pw\"); \n";
64    +    $OUT .= "END IF; \n";
65    +    $OUT .= "END // \n";
66    +    $OUT .= "DELIMITER ; \n";
67         $OUT .= "FLUSH PRIVILEGES;\n";
68    +
69     }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed