Merge branch 'release-2.140.123' 2.140.123
authorChris Koeritz <fred@gruntose.com>
Wed, 1 Jul 2020 17:57:16 +0000 (13:57 -0400)
committerChris Koeritz <fred@gruntose.com>
Wed, 1 Jul 2020 17:57:16 +0000 (13:57 -0400)
.dev_bran [new file with mode: 0644]
.gitignore
production/feisty_meow_config.ini
readme.txt
scripts/clam/cpp/rules.def
scripts/core/functions.sh
scripts/customize/fred/java_profile.sh
scripts/rev_control/version_control.sh
scripts/system/moodle_updater.sh [new file with mode: 0644]
scripts/tty/keep_awake.sh [deleted file]
scripts/tty/keep_awake_process.sh

diff --git a/.dev_bran b/.dev_bran
new file mode 100644 (file)
index 0000000..e91d326
--- /dev/null
+++ b/.dev_bran
@@ -0,0 +1,2 @@
+
+tickling a check-in
index 022cb9f5218e8174c4fb339b344142d269567e42..a9f06ada1915a29642e616dba1431880fd7675dd 100644 (file)
@@ -7,6 +7,7 @@
 .DS_Store
 *.log
 *.gz
+.no-checkin
 *.o
 *.obj
 *_version.rc
index a780a6354cb57f8dcb68e1f83e3235c410941af4..3a77540b4bd95cd3baeda272753f90b50b0872b5 100644 (file)
@@ -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.
index 1491d573090c7b0e6cee242dc1f245799ca60243..2ac0a1a3306dc4cb3e8d395164a53c0cdc95657f 100644 (file)
@@ -155,3 +155,4 @@ More information is available at the official site: https://feistymeow.org
 
 ==============
 
+
index ca59f82360a30ad4341b456d98c1872406c927b5..7a04cc83c1bac59296339bd5e64a9ce81ead0a9a 100644 (file)
@@ -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)" ""
index 44f6155df5417f846af6e6110af554c6c007e271..07d6447bcccbbf4ebc2dcb08d308937b657e6fb9 100644 (file)
@@ -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"
index b8e71a33b4827f2d67127d93a6c14e691a938703..f98030a679856d2d5dcec81fa4dcb87fabe4e23a 100644 (file)
@@ -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
index 703e003ddf52269c1215b5a9db6cbe59f784cff6..80142d053debab14d300c517248e9ccfc4f08457 100644 (file)
@@ -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 (file)
index 0000000..676b8a1
--- /dev/null
@@ -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 (file)
index 861425f..0000000
+++ /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) &
index 7c32cef738a2b28c8ca5421f3617e0af3960e42e..683575b19c257fe73b0ce43de3512a277990064d 100644 (file)
@@ -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