25c64ec48e9bbf3f5fb2aad878cf1b7dcce6d50b maximilianh Mon Apr 28 16:06:03 2025 +0200 building htdocs now in gbic for ARM diff --git src/product/installer/browserSetup.sh src/product/installer/browserSetup.sh index 9eeb34cacff..299ba142036 100755 --- src/product/installer/browserSetup.sh +++ src/product/installer/browserSetup.sh @@ -1393,32 +1393,32 @@ # Read only access to genome databases for the browser CGI binaries $MYSQL -e "CREATE USER readonly@localhost IDENTIFIED BY 'access';" $MYSQL -e "GRANT SELECT, CREATE TEMPORARY TABLES on "\ "*.* TO readonly@localhost;" $MYSQL -e "GRANT SELECT, INSERT, CREATE TEMPORARY TABLES on hgTemp.* TO "\ "readonly@localhost;" # Readwrite access to hgcentral for browser CGI binaries to keep session state $MYSQL -e "CREATE USER readwrite@localhost IDENTIFIED BY 'update';" $MYSQL -e "GRANT SELECT, INSERT, UPDATE, "\ "DELETE, CREATE, DROP, ALTER on hgcentral.* TO readwrite@localhost; " # create /gbdb and let the apache user write to it # hgConvert will download missing liftOver files on the fly and needs write # write access - mkdir -p $GBDBDIR - chown $APACHEUSER:$APACHEUSER $GBDBDIR + sudo mkdir -p $GBDBDIR + sudo chown $APACHEUSER:$APACHEUSER $GBDBDIR # the custom track database needs it own user and permissions $MYSQL -e "CREATE USER ctdbuser@localhost IDENTIFIED BY 'ctdbpassword';" $MYSQL -e "GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX "\ "on customTrash.* TO ctdbuser@localhost;" # removed these now for the new hgGateway page, Apr 2016 # by default hgGateway needs an empty hg19 database, will crash otherwise # $MYSQL -e 'CREATE DATABASE IF NOT EXISTS hg19' # mm9 needs an empty hg18 database $MYSQL -e 'CREATE DATABASE IF NOT EXISTS hg18' $MYSQL -e "FLUSH PRIVILEGES;" } @@ -1427,37 +1427,32 @@ function setupBuildOsx () { # install clang installOsxDevTools which -s brew > /dev/null if [[ $? != 0 ]] ; then echo2 Homebrew not found. Installing now. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" else brew update fi echo2 Installing homebrew packages libpng, openssl, mariadb, git brew install libpng openssl mariadb git - #if ! libpng-config --version > /dev/null 2>&1; then - #if ! mariadb --version > /dev/null 2>&1; then - #if ! git --version > /dev/null 2>&1; then - #if ! openssl --version > /dev/null 2>&1; then - - echo2 Allowing write for all on Apple's Apache htdocs/cgi-bin directories - echo2 This requires sudo, so please enter the admin password now + echo2 Allowing write access for all on Apple\'s Apache htdocs/cgi-bin directories. + echo2 The chmod command requires sudo - please enter the admin password now: sudo chmod a+rw /Library/WebServer/CGI-Executables sudo chmod a+rw /Library/WebServer/Documents # create symlinks to Apple's paths so all our normal makefiles work if [ ! -e /usr/local/apache ]; then echo2 Creating /usr/local/apache to fill with symlinks later sudo mkdir -p /usr/local/apache sudo chmod a+rw /usr/local/apache fi if [ ! -e /usr/local/apache/cgi-bin ]; then echo2 Creating symlink /usr/local/apache/cgi-bin to /Library/WebServer/CGI-Executables sudo ln -s /Library/WebServer/CGI-Executables /usr/local/apache/cgi-bin fi if [ ! -e /usr/local/apache/htdocs ]; then @@ -1494,31 +1489,31 @@ setupBuildLinux fi if [ ! -e ~/kent ]; then echo2 Cloning kent repo into ~/kent using git with --depth=1 waitKey cd ~ git clone https://github.com/ucscGenomeBrowser/kent.git --depth=1 fi echo2 Now building CGIs from ~/kent to /usr/local/apache/cgi-bin echo2 Copying JS/HTML/CSS to /usr/local/apache/htdocs waitKey cd ~/kent/src make -j8 cgi-alpha - make -j8 htdocs + make -j8 doc-alpha } # main function, installs the browser on Redhat/Debian and potentially even on OSX function installBrowser () { if [ -f $COMPLETEFLAG ]; then echo2 error: the file $COMPLETEFLAG exists. It seems that you have installed the browser already. echo2 If you want to reset the Apache directory, you can run '"rm -rf /usr/local/apache"' and echo2 then run this script again. exit 100 fi echo '--------------------------------' echo UCSC Genome Browser installation echo '--------------------------------' @@ -1843,30 +1838,33 @@ waitKey } # stop the mysql database server, so we can write into its data directory function stopMysql { if [ -f /etc/init.d/mysql ]; then service mysql stop elif [ -f /etc/init.d/mysqld ]; then service mysqld stop elif [ -f /etc/init.d/mariadb ]; then service mariadb stop elif [ -f /usr/lib/systemd/system/mariadb.service ]; then # RHEL 7, etc use systemd instead of SysV systemctl stop mariadb + elif [ which brew > /dev/null ]; then + # homebrew on ARMs or X86 + brew services stop mariadb elif [ -f /usr/lib/systemd/system/mysql.service ]; then # at least seen in Fedora 17 systemctl stop mysql else echo2 Could not find mysql nor mysqld file in /etc/init.d nor a systemd command. Please email genome-mirror@soe.ucsc.edu. fi } # start the mysql database server function startMysql { if [ -f /etc/init.d/mysql ]; then service mysql start elif [ -f /etc/init.d/mysqld ]; then service mysqld start @@ -2155,42 +2153,45 @@ # detect the OS version, linux distribution unameStr=`uname` DIST=none MACH=`uname -m` if [[ "$unameStr" == MINGW32_NT* ]] ; then echo Sorry Windows/CYGWIN is not supported exit 100 fi # set a few very basic variables we need to function if [[ "$unameStr" == Darwin* ]]; then OS=OSX DIST=OSX - VER=`sw_vers -productVersion` - APACHECONFDIR=$APACHEDIR/ext/conf # only used by the OSX-spec part - APACHECONF=$APACHECONFDIR/001-browser.conf - APACHEUSER=_www # predefined by Apple - MYSQLDIR=$APACHEDIR/mysqlData - MYSQLUSER=_mysql # predefined by Apple - MYSQL="$APACHEDIR/ext/bin/mysql --socket=$APACHEDIR/ext/mysql.socket" - MYSQLADMIN="$APACHEDIR/ext/bin/mysqladmin --socket=$APACHEDIR/ext/mysql.socket" + VERNUM=`sw_vers -productVersion` + VER=$VERNUM SEDINPLACE="sed -Ei .bak" # difference BSD vs Linux + + # Not used anymore, but good to know that these are possible: + #APACHECONFDIR=$APACHEDIR/ext/conf # only used by the OSX-spec part + #APACHECONF=$APACHECONFDIR/001-browser.conf + #APACHEUSER=_www # predefined by Apple + #MYSQLDIR=$APACHEDIR/mysqlData + #MYSQLUSER=_mysql # predefined by Apple + #MYSQL="$APACHEDIR/ext/bin/mysql --socket=$APACHEDIR/ext/mysql.socket" + #MYSQLADMIN="$APACHEDIR/ext/bin/mysqladmin --socket=$APACHEDIR/ext/mysql.socket" # make sure resulting binaries can be run on OSX 10.7 # this is a gcc option, not a global variable for this script - export MACOSX_DEPLOYMENT_TARGET=10.7 + #export MACOSX_DEPLOYMENT_TARGET=10.7 elif [[ $unameStr == Linux* ]] ; then OS=linux if [ -f /etc/debian_version ] ; then DIST=debian # Ubuntu, etc VER=$(cat /etc/debian_version) APACHECONF=/etc/apache2/sites-available/001-browser.conf APACHEUSER=www-data elif [[ -f /etc/redhat-release ]] ; then DIST=redhat VER=$(cat /etc/redhat-release) APACHECONF=/etc/httpd/conf.d/001-browser.conf APACHEUSER=apache elif [[ -f /etc/os-release ]]; then # line looks like this on Amazon AMI Linux: 'ID_LIKE="rhel fedora"'