37ab391fe381c15194bd46529e9508d9953a8a68
max
  Mon Sep 13 07:55:52 2021 -0700
fixing Gbic again for Centos8, because Fedora support broke centos8 support, refs #27795

diff --git src/product/installer/browserSetup.sh src/product/installer/browserSetup.sh
index b178bc8..869b57f 100755
--- src/product/installer/browserSetup.sh
+++ src/product/installer/browserSetup.sh
@@ -760,43 +760,48 @@
         # start mysql now
         /sbin/service $MYSQLD start
 
         secureMysql
         SET_MYSQL_ROOT=1
     else
         echo2 Mysql already installed
     fi
 
     # MySQL-python is required for hgGeneGraph
     # CentOS up to and including 7 default to python2, so MySQL-python is in the repos
     if yum list MySQL-python 2> /dev/null ; then
             yum -y install MySQL-python
     # Centos 8 defaults to python3 and it does not have a package MySQL-python anymore
     # So we install python2, the mysql libraries and fix up my_config.h manually
-    # This is strange, but I was unable to find a different working solution. MariaDB does not have my_config.h
+    # This is strange, but I was unable to find a different working solution. MariaDB simply does not have my_config.h
     else
             yum install -y python2 mysql-devel python2-devel wget gcc
             if [ -f /usr/include/mysql/my_config.h ]; then
                     echo my_config.h found
             else
                 wget https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h -P /usr/include/mysql/
             fi
 
 	    # this is very strange, but was necessary on Fedora https://github.com/DefectDojo/django-DefectDojo/issues/407
-	    sed '/st_mysql_options options;/a unsigned int reconnect;' /usr/include/mysql/mysql.h -i.bkp
+            # somehow the mysql.h does not have the "reconnect" field anymore in Fedora
+            if grep -q "bool reconnect;" /usr/include/mysql/mysql.h ; then
+                echo /usr/include/mysql/mysql.h already has reconnect attribute
+            else
+                sed '/st_mysql_options options;/a    bool reconnect; // added by UCSC Genome browserSetup.sh script' /usr/include/mysql/mysql.h -i.bkp
+            fi
 
-	    # fedora > 34 doesn't have any pip2 package anymore
+	    # fedora > 34 doesn't have any pip2 package anymore so install it now
 	    if ! type "pip2" > /dev/null; then
                  wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
 		 python2 get-pip.py
 		 mv /usr/bin/pip /usr/bin/pip2
 
 	    fi
             pip2 install MySQL-python
     fi
 
 }
 
 # OSX specific setup of the installation
 function installOsx () 
 {
    # check for xcode