From: Chris Koeritz Date: Wed, 1 Jul 2020 17:57:16 +0000 (-0400) Subject: Merge branch 'release-2.140.123' X-Git-Tag: 2.140.123^0 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=87950dbd8c16d3216c25bcfc781733908968a4fc;hp=95d216b2381107474bea0a65a915936a5402df0f Merge branch 'release-2.140.123' --- diff --git a/.dev_bran b/.dev_bran new file mode 100644 index 00000000..e91d326b --- /dev/null +++ b/.dev_bran @@ -0,0 +1,2 @@ + +tickling a check-in diff --git a/.gitignore b/.gitignore index 022cb9f5..a9f06ada 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ .DS_Store *.log *.gz +.no-checkin *.o *.obj *_version.rc diff --git a/production/feisty_meow_config.ini b/production/feisty_meow_config.ini index a780a635..3a77540b 100644 --- a/production/feisty_meow_config.ini +++ b/production/feisty_meow_config.ini @@ -3,7 +3,7 @@ # specifies the version of the code that is being constructed here. major=2 minor=140 -revision=122 +revision=123 build=420 # specifies the remainder of the version record info. diff --git a/readme.txt b/readme.txt index 1491d573..2ac0a1a3 100644 --- a/readme.txt +++ b/readme.txt @@ -155,3 +155,4 @@ More information is available at the official site: https://feistymeow.org ============== + diff --git a/scripts/clam/cpp/rules.def b/scripts/clam/cpp/rules.def index ca59f823..7a04cc83 100644 --- a/scripts/clam/cpp/rules.def +++ b/scripts/clam/cpp/rules.def @@ -104,6 +104,10 @@ endif ############################################################################### ifeq "$(COMPILER)" "GNU_DARWIN" + # finds the crypto code on macos. + HEADER_SEARCH_PATH += /usr/local/opt/openssl/include + LIBRARY_SEARCH_PATH += /usr/local/opt/openssl/lib/ + ifneq "$(USE_XWIN)" "" DEFINITIONS += __XWINDOWS__ __X__ LIBS_USED += @@ -111,7 +115,7 @@ ifeq "$(COMPILER)" "GNU_DARWIN" #need to separate out with a USE_MOTIF kind of thing. #LIBS_USED += Xmu HEADER_SEARCH_PATH += /usr/include/X11 /usr/X11R6/include /usr/include/g++ - LIBRARY_SEARCH_PATH += /usr/X11R6/lib + LIBRARY_SEARCH_PATH += /usr/X11R6/lib endif ifneq "$(USE_SSL)" "" diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 44f6155d..07d6447b 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -437,9 +437,11 @@ if [ -z "$skip_all" ]; then fi # launch sudo with just the variables we want to reach the other side. - # we take an extra step to null out the PATH, since MacOS seems to want - # to pass that even for a login shell (-i) somehow. - PATH= /usr/bin/sudo --preserve-env=SSH_AUTH_SOCK,IMPORTED_XAUTH "$@" + local varmods= +# varmods+="PATH= " + if [ ! -z "$IMPORTED_XAUTH" ]; then varmods+="IMPORTED_XAUTH=$IMPORTED_XAUTH "; fi + if [ ! -z "$SSH_AUTH_SOCK" ]; then varmods+="SSH_AUTH_SOCK=$SSH_AUTH_SOCK"; fi + /usr/bin/sudo $varmods "$@" retval=$? # take the xauth info away again if it wasn't set already. @@ -919,9 +921,10 @@ return 0 fi local charnfile="$(mktemp $TMP/zz_charn.XXXXXX)" +#hmmm: any way to do the below more nicely or reusably? find "${dirs[@]}" -follow -maxdepth 1 -mindepth 1 -type f | \ grep -i \ -"doc\|docx\|eml\|html\|jpeg\|jpg\|m4a\|mov\|mp3\|ods\|odt\|pdf\|png\|ppt\|pptx\|txt\|vsd\|vsdx\|xls\|xlsx\|zip" | \ +"csv\|doc\|docx\|eml\|html\|jpeg\|jpg\|m4a\|mov\|mp3\|ods\|odt\|pdf\|png\|ppt\|pptx\|txt\|vsd\|vsdx\|xls\|xlsx\|zip" | \ sed -e 's/^/"/' | sed -e 's/$/"/' | \ xargs bash "$FEISTY_MEOW_SCRIPTS/files/spacem.sh" # drop the temp file now that we're done. @@ -930,7 +933,21 @@ return 0 ############## - # site avenger aliases + # tty relevant functions... + + # keep_awake: sends a message to the screen from the background. + function keep_awake() + { + # just starts the keep_awake process in the background. + bash $FEISTY_MEOW_SCRIPTS/tty/keep_awake_process.sh & + # this should leave the job running as %1 or a higher number if there + # are pre-existing background jobs. + } + + ############## + + # site avenger functions... + function switchto() { THISDIR="$FEISTY_MEOW_SCRIPTS/site_avenger" diff --git a/scripts/customize/fred/java_profile.sh b/scripts/customize/fred/java_profile.sh index b8e71a33..f98030a6 100644 --- a/scripts/customize/fred/java_profile.sh +++ b/scripts/customize/fred/java_profile.sh @@ -22,16 +22,24 @@ function intuition_failure() ############################ -# set some fairly liberal limits for ant. -#no. export ANT_OPTS="-Xms512m -Xmx768m -XX:MaxPermSize=768m" - -############################ - # start guessing some settings... +# whatever we figure out, we want to export the java home variable. +export JAVA_HOME + # this bin portion works for most javas... export JAVA_BIN_PIECE=bin +# try using java itself to locate the JAVA_HOME if we can. +if [ ! -d "$JAVA_HOME" ]; then + JAVA_HOME=$(java -XshowSettings:properties -version 2>&1 | grep -i java.home | sed -e 's/.*java.home = \(.*\)$/\1/') +fi + +# if that didn't work, then we try a series of random bizarro places where +# we have seen java live before. + +#hmmm: below list is way out of date. we really hope the first attempt above works. + if [ ! -d "$JAVA_HOME" ]; then # try a recent version. export JAVA_HOME=/usr/lib/jvm/java-8-oracle diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 703e003d..80142d05 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -260,9 +260,9 @@ function check_branch_state() local to_return=120 # unknown issue. - local local_branch=$(git rev-parse @) + local local_branch=$(git rev-parse HEAD) local remote_branch=$(git rev-parse "$branch") - local merge_base=$(git merge-base @ "$branch") + local merge_base=$(git merge-base HEAD "$branch") local to_echo= if [ "$local_branch" == "$remote_branch" ]; then @@ -357,7 +357,7 @@ function do_revctrl_careful_update() # now pull down any changes in our own origin in the repo, to stay in synch # with any changes from others. - git pull --tags --all | $TO_SPLITTER + git fetch --tags --all | $TO_SPLITTER #is the above really important when we did this branch already in the loop? #it does an --all, but is that effective or different? should we be doing that in above loop? promote_pipe_return 0 diff --git a/scripts/system/moodle_updater.sh b/scripts/system/moodle_updater.sh new file mode 100644 index 00000000..676b8a1e --- /dev/null +++ b/scripts/system/moodle_updater.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +# updates the moodle install, assuming all paths are at the default. + +source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" + +#### +# some constants that we know are not really. +moodle_parent=/var/www/html + # parent directory is one level up from where moodle lives. +moodle_dir=moodle + # this variable is just the directory name for moodle itself, not a path. +moodle_release=moodle-3.9 + # the name of the release we're expecting to download and install +download_url="https://download.moodle.org/download.php/direct/stable39/${moodle_release}.tgz" + # where we can get the latest version of moodle for our chosen releases. +#### + +# everything below should be version invariant. + +moodle_path="$moodle_parent/$moodle_dir" + # composing the parent plus directory name should get us to moodle. + +if [ ! -d "$moodle_path" ]; then + echo "There was no moodle installation found at: $moodle_path" + exit 1 +fi + +# where we unpack our temporary stuff. +temp_install="$(mktemp -d /tmp/update_moodle.XXXXXX)" +#echo temp install dir is: $temp_install +if [ ! -d "$temp_install" ]; then + echo The temporary installation directory at: $temp_install could not be created. + exit 1 +fi + +# quit the running moodle instance. +systemctl stop httpd +exit_on_error stopping httpd process before moodle upgrade. + +# jump into our new work area. +pushd "$temp_install" + +# get the latest moodle version. this could change over time, +# but it's the best link i could find. +wget "$download_url" +exit_on_error downloading latest version of moodle. + +# use the feisty meow unpack script to extract the moodle data. +unpack "${moodle_release}.tgz" +exit_on_error unpacking latest version of moodle. + +# rename the old moodle directory to a unique name in the same area. +old_moodle_path="$moodle_parent/moodle-$(basename $temp_install)" +mv "$moodle_parent/$moodle_dir" "$old_moodle_path" +exit_on_error renaming old version of moodle. + +# move the new stuff into place. +mv "${moodle_release}/$moodle_dir" "$moodle_parent"/ +exit_on_error moving new version of moodle into place. + +# grab our important configuration files and put them back in the new directory. +cp "$old_moodle_path/config.php" "$moodle_path" +exit_on_error copying existing moodle configuration file: config.php + +echo -e "\ +==== +NOTE: This script does not copy any plugins or themes. If you are using\n\ +updated or specialized additions to moodle, please copy them from here:\n\ + $old_moodle_path\n\ +into the new install at:\n\ + $moodle_path\n\ +====\n\ +" + +# restart the running moodle instance. +systemctl stop httpd +exit_on_error starting httpd process after moodle upgrade. + +# sunshine and roses! we are through the gauntlet. + diff --git a/scripts/tty/keep_awake.sh b/scripts/tty/keep_awake.sh deleted file mode 100644 index 861425f3..00000000 --- a/scripts/tty/keep_awake.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# keep_awake: sends a message to the screen from the background. -# -# This program is really just a way to start the keep_awake process in the -# background instead of needing to start a subshell here. There was some -# kind of snafu with the ksh environment variable $$ where it would always -# record the previous shell's number and not the current one or something.... -# -(bash $FEISTY_MEOW_SCRIPTS/tty/keep_awake_process.sh) & diff --git a/scripts/tty/keep_awake_process.sh b/scripts/tty/keep_awake_process.sh index 7c32cef7..683575b1 100644 --- a/scripts/tty/keep_awake_process.sh +++ b/scripts/tty/keep_awake_process.sh @@ -1,18 +1,18 @@ #!/bin/bash + # This program is meant to be started by the program keep_awake and has -# the basic guts that are meant to execute inside of a semi-perpetual loop. +# the guts that are meant to execute inside of a semi-perpetual loop. source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" +#hmmm: is there still a process management thingy, referred to below, active in our scripts??? # save the process id for the goodbye program to deal with. #echo $$ >>$TMP/trash.last_keep_awake_process #don't let the shutdown guy know who we are; we want to keep running now. # loop sort of forever. while true; do -# this version is for keeping a modem awake. -# ping -c 7 www.gruntose.com >/dev/null - - echo "trying not to fall asleep at $(date_stringer)" - sleep 120 + echo -e "\n\ntrying not to fall asleep at $(date_stringer)\n" + # magical number of seconds to sleep... + sleep 64 done