7a7fb5b8ca16c8256b2886b784e55bdc69ac78d1 chmalee Thu Mar 9 15:13:32 2023 -0800 Fix sql_mode setting on gbibs that self-upgrade, refs #24254 diff --git src/browserbox/root/updateBrowser.sh src/browserbox/root/updateBrowser.sh index 0ee51be..a7b934e 100755 --- src/browserbox/root/updateBrowser.sh +++ src/browserbox/root/updateBrowser.sh @@ -138,30 +138,33 @@ apt-get clean && sudo apt-get autoremove apt-get purge -y $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')") # add the below to /etc/apt/apt.conf so non-interactive update will work (https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1640274/comments/5): echo 'Dpkg::Options { "--force-confold"; }' >> /etc/apt/apt.conf # finally do the upgrade do-release-upgrade -f DistUpgradeViewNonInteractive # restore the swapfile dd if=/dev/zero of=/swapfile bs=1M count=1024 chmod 600 /swapfile mkswap /swapfile swapon /swapfile + # newer mysql versions require more permissive sql_mode, see #18324 + sed -Ei '/^.(mysqld|server).$/a sql_mode=' /etc/mysql/my.cnf + # turn off apparmor because it doesn't play nice with mysql systemctl stop apparmor.service update-rc.d -f apparmor remove # do a restart to force apparmor changes # need a flag to tell the OS to restart mysql after the changes touch /root/doRestartMysql shutdown -r now fi if [ -e /root/doRestartMysql ]; then service mysql restart rm -f /root/doRestartMysql fi