Merge branch 'release-2.140.93' into dev
authorChris Koeritz <fred@gruntose.com>
Sat, 11 Nov 2017 03:50:16 +0000 (22:50 -0500)
committerChris Koeritz <fred@gruntose.com>
Sat, 11 Nov 2017 03:50:16 +0000 (22:50 -0500)
getting release branch stuff into dev

14 files changed:
documentation/history_anat.txt
feisty_inits/dot.bashrc-normal-user [deleted file]
feisty_inits/dot.bashrc-root [deleted file]
infobase/feisty_inits/dot.bashrc-normal-user [new file with mode: 0644]
infobase/feisty_inits/dot.bashrc-root [new file with mode: 0644]
production/setup_src/whole_build_package/whole_build_manifest.txt
scripts/archival/snarf_feisty_meow.pl
scripts/core/connect_feisty_meow.sh
scripts/core/generate_aliases.pl
scripts/core/launch_feisty_meow.sh
scripts/core/reconfigure_feisty_meow.sh
scripts/core/variables.sh
scripts/customize/fred/refred.sh
scripts/system/add_apache_site.sh

index 6f727015c9a6578787987552a1e89be8bc891d5e..46f95fc2899d6273267a54503afd459e5596d3c1 100644 (file)
@@ -74,18 +74,22 @@ octopi/
     Octopus design pattern and CROMP protocol reference implementations.  Assorted applications
     based on these.
 
-infabase/
+infobase/
     Some files considered critical to the operations of Feisty Meow Concerns Ltd.  This includes
     the database of fortunes used by the Nechung Oracle Program.
 
-documentation/
-    Helpful guides and information for Feisty Meow.  Also includes a code documentation generator
-    configuration for feisty meow that produces a nice set of web docs, using doxygen.
+infobase/feisty_inits
+    Some example startup files for use with feisty meow.  These are deployed automatically by
+    the "connect_feisty_meow" command.
 
-examples/
+infobase/examples/
     Some files that show how to get work done with Feisty Meow or that show how to do certain
     tasks in different scripting / programming languages.
 
+documentation/
+    Helpful guides and information for Feisty Meow.  Also includes a code documentation generator
+    configuration for feisty meow that produces a nice set of web docs, using doxygen.
+
 kona/
     Our burgeoning Java libraries.  Not much to see here yet, but there is some code piling
     up for these that we will try to release soon.
diff --git a/feisty_inits/dot.bashrc-normal-user b/feisty_inits/dot.bashrc-normal-user
deleted file mode 100644 (file)
index edc83b7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-##############
-
-# initializes the feisty meow environment for "normal" users (not intended for the root user).
-
-##############
-
-# drag in the default version of this file.  this may not be needed if your
-# .bashrc script already has substantial code or already does this.
-source /etc/bash.bashrc
-
-##############
-
-# set the history sizes to be much larger, and do this whether we load the
-# feisty meow environment or not.
-
-export HISTSIZE=1000000
-export HISTFILESIZE=8000000
-
-##############
-
-# system-wide install:
-export FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow"
-# personal install:
-#export FEISTY_MEOW_APEX="$HOME/feisty_meow"
-
-# sets up the feisty_meow scripts if appropriate for the environment.
-if [ "${TERM}" != "dumb" -a -z "$PBS_ENVIRONMENT" ]; then
-  source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
-fi
-
-# if not commented out, then feisty meow will run all the unit tests during builds.
-#export RUN_ALL_TESTS=true
-
-# turns on noisy debugging in feisty meow scripts if uncommented.
-#export DEBUG_FEISTY_MEOW=true
-
-##############
-
diff --git a/feisty_inits/dot.bashrc-root b/feisty_inits/dot.bashrc-root
deleted file mode 100644 (file)
index ac41d0c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-
-##############
-
-# provides a macro to initialize the feisty meow environment for the "root" user.
-
-##############
-
-# drag in the default version of this file.  this may not be needed if your
-# .bashrc script already has substantial code or already does this.
-source /etc/bash.bashrc
-
-##############
-
-# set the history sizes to be much larger, and do this whether we load the
-# feisty meow environment or not.
-
-export HISTSIZE=1000000
-export HISTFILESIZE=8000000
-
-##############
-
-# system-wide install:
-export FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow"
-# personal install:
-#export FEISTY_MEOW_APEX="$HOME/feisty_meow"
-
-# the "fredme" macro enables the feisty_meow environment.
-alias fredme='source "$FEISTY_MEOW_APEX/feisty_meow/scripts/core/launch_feisty_meow.sh"'
-
-# if not commented out, then feisty meow will run all the unit tests during builds.
-#export RUN_ALL_TESTS=true
-
-# turns on noisy debugging in feisty meow scripts if uncommented.
-#export DEBUG_FEISTY_MEOW=true
-
-##############
-
diff --git a/infobase/feisty_inits/dot.bashrc-normal-user b/infobase/feisty_inits/dot.bashrc-normal-user
new file mode 100644 (file)
index 0000000..edc83b7
--- /dev/null
@@ -0,0 +1,39 @@
+
+##############
+
+# initializes the feisty meow environment for "normal" users (not intended for the root user).
+
+##############
+
+# drag in the default version of this file.  this may not be needed if your
+# .bashrc script already has substantial code or already does this.
+source /etc/bash.bashrc
+
+##############
+
+# set the history sizes to be much larger, and do this whether we load the
+# feisty meow environment or not.
+
+export HISTSIZE=1000000
+export HISTFILESIZE=8000000
+
+##############
+
+# system-wide install:
+export FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow"
+# personal install:
+#export FEISTY_MEOW_APEX="$HOME/feisty_meow"
+
+# sets up the feisty_meow scripts if appropriate for the environment.
+if [ "${TERM}" != "dumb" -a -z "$PBS_ENVIRONMENT" ]; then
+  source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
+fi
+
+# if not commented out, then feisty meow will run all the unit tests during builds.
+#export RUN_ALL_TESTS=true
+
+# turns on noisy debugging in feisty meow scripts if uncommented.
+#export DEBUG_FEISTY_MEOW=true
+
+##############
+
diff --git a/infobase/feisty_inits/dot.bashrc-root b/infobase/feisty_inits/dot.bashrc-root
new file mode 100644 (file)
index 0000000..20a9023
--- /dev/null
@@ -0,0 +1,37 @@
+
+##############
+
+# provides a macro to initialize the feisty meow environment for the "root" user.
+
+##############
+
+# drag in the default version of this file.  this may not be needed if your
+# .bashrc script already has substantial code or already does this.
+source /etc/bash.bashrc
+
+##############
+
+# set the history sizes to be much larger, and do this whether we load the
+# feisty meow environment or not.
+
+export HISTSIZE=1000000
+export HISTFILESIZE=8000000
+
+##############
+
+# system-wide install:
+export FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow"
+# personal install:
+#export FEISTY_MEOW_APEX="$HOME/feisty_meow"
+
+# the "fredme" macro enables the feisty_meow environment.
+alias fredme='source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"'
+
+# if not commented out, then feisty meow will run all the unit tests during builds.
+#export RUN_ALL_TESTS=true
+
+# turns on noisy debugging in feisty meow scripts if uncommented.
+#export DEBUG_FEISTY_MEOW=true
+
+##############
+
index e12d8425c1da8bd05b3bf3d3bae9a7d1fb771afa..017b534b12a73a909890709d04bd4fceb74b17aa 100644 (file)
@@ -8,9 +8,7 @@ production_inis=t
 docs=t
 top_makefile=t
 production_makefile=t
-##customize=t
-database=t
-examples=t
+infobase=t
 scripts=t
 nucleus=t
 octopi=t
@@ -70,7 +68,7 @@ keyword=sources
 #recurse=1
 #keyword=sources
 
-[database]
+[infobase]
 source=$FEISTY_MEOW_APEX/infobase
 target=$TARGET/infobase
 recurse=1
@@ -82,12 +80,6 @@ target=$TARGET/documentation
 recurse=1
 keyword=sources
 
-[examples]
-source=$FEISTY_MEOW_APEX/examples
-target=$TARGET/examples
-recurse=1
-keyword=sources
-
 [scripts]
 source=$FEISTY_MEOW_APEX/scripts
 target=$TARGET/scripts
index d79a73f5f9187e768b243e6be6f2bac0b98f555c..c695be7371d98820e388d3cb67bc24da5fb6fa3b 100644 (file)
@@ -42,9 +42,7 @@ local($root) = &canonicalize("$FEISTY_MEOW_APEX");
 ###moved &backup_hierarchy($snarf_file_base, $number, $root, "customize");
 &backup_hierarchy($snarf_file_base, $number, $root, "infobase");
 &backup_hierarchy($snarf_file_base, $number, $root, "documentation");
-&backup_hierarchy($snarf_file_base, $number, $root, "examples");
 &backup_hierarchy($snarf_file_base, $number, $root, "experiments");
-&backup_hierarchy($snarf_file_base, $number, $root, "feisty_inits");
 &backup_hierarchy($snarf_file_base, $number, $root, "graphiq");
 &backup_hierarchy($snarf_file_base, $number, $root, "huffware");
 &backup_hierarchy($snarf_file_base, $number, $root, "kona");
index 25db1171ce13d1c63e9fe65718d0a19c77441277..9a5c81d548bb3b98b6b22e36a3009641f6cdb868 100644 (file)
@@ -17,7 +17,7 @@ if [ -f "$HOME/.bashrc" ] && grep -q "launch_feisty_meow.sh" "$HOME/.bashrc"; th
 else
   # stuff the normal user init file into .bashrc.  not appropriate for root probably, but
   # this is the easy quick start script for normal folks.
-  cat $FEISTY_MEOW_APEX/feisty_inits/dot.bashrc-normal-user |
+  cat $FEISTY_MEOW_APEX/infobase/feisty_inits/dot.bashrc-normal-user |
     sed -e \
       "s?FEISTY_MEOW_APEX=\".*\"?FEISTY_MEOW_APEX=\"$FEISTY_MEOW_APEX\"?" \
       >> "$HOME/.bashrc"
index a9c4043518db769c17edfe061c71cd92a2da14dc..4ed01fb74641794fe21613eeb98ee0d4e35d1513 100644 (file)
@@ -94,11 +94,13 @@ sub rebuild_script_aliases {
   }
   if (length($DEBUG_FEISTY_MEOW)) {
     print "using these alias files:\n";
+print "HEY IS THIS PROBLEM CHILD?\n";
     foreach $i (@ALIAS_DEFINITION_FILES) {
       local $base_of_dir = &basename(&dirname($i));
       local $basename = &basename($i);
       print "  $base_of_dir/$basename\n";
     }
+print "WAS PROBLEM CHILD ABOVE HERE?\n";
   }
 
   # write the aliases for sh and bash scripts.
index 82eb5a7fcbd466739e001ca166258d2366fc7632..80226899a83bad279656c1986bfc825ebc186775 100644 (file)
 
 ##############
 
+# this script cannot handle figuring out where it lives, so approaches that
+# get the WORKDIR will fail.  this is a consequence of this always being used
+# in bash's 'source' directive, which does not pass the script name as
+# argument 0.  instead, we just check for the bad condition of a malconfigured
+# script system and try to repair it.
+
+# check if any crucial folder is hosed.  we will torch the existing config
+# to the extent we can.
+if [ ! -d "$FEISTY_MEOW_SCRIPTS" -o ! -d "$FEISTY_MEOW_APEX" ]; then
+  # wipe out the offending variable(s).
+  unset FEISTY_MEOW_SCRIPTS FEISTY_MEOW_APEX
+  # clean out any unfortunate wrongness that may exist in our generated areas.
+  if [ -d "$"FEISTY_MEOW_LOADING_DOCK ]; then \rm -rf "$FEISTY_MEOW_LOADING_DOCK"; fi
+  if [ -d "$FEISTY_MEOW_GENERATED_STORE" ]; then \rm -rf "$FEISTY_MEOW_GENERATED_STORE"; fi
+  # also wipe any values from the variables pointing at generated stuff.
+  unset FEISTY_MEOW_LOADING_DOCK FEISTY_MEOW_GENERATED_STORE
+  exec "$*"
+fi
+
+##############
+
 # some preconditions we want to establish before loading anything...
 
 # make sure that aliases can be used in non-interactive shells.
index dad26d1477cbdd79d404d90ca38673bd1de55e68..b6421224607bcd18d5fd39ca55e630eff0046113 100644 (file)
@@ -7,7 +7,7 @@
 #
 # Note: this does not yet ensure that the profile is executed on shell
 # startup.  that can be added manually by editing your .bashrc file.
-# read the examples/feisty_meow_startup/bashrc_user file for more details.
+# read the files infobase/feisty_inits for more details.
 
 ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && /bin/pwd )"
 CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )"
@@ -21,6 +21,9 @@ source "$CORE_SCRIPTS_DIR/functions.sh"
 export FEISTY_MEOW_APEX="$(/bin/pwd)"
 #echo feisty now is FEISTY_MEOW_APEX=$FEISTY_MEOW_APEX
 
+# make the variables script run again.
+unset CORE_VARIABLES_LOADED
+
 # repetitive bit stolen from variables.  should make a file out of this somehow.
 IS_DOS=$(uname | grep -i ming)
 if [ -z "$IS_DOS" ]; then IS_DOS=$(uname | grep -i cygwin); fi
@@ -42,7 +45,12 @@ if [ ! -d "$FEISTY_MEOW_LOADING_DOCK" ]; then
   mkdir -p "$FEISTY_MEOW_LOADING_DOCK"
 fi
 # need to add some paths explicitly until we've bootstrapped ourselves.
-export PERLLIB=$PERLLIB:"$FEISTY_MEOW_SCRIPTS/files":"$FEISTY_MEOW_SCRIPTS/generator"
+#hmmm: this is tasty reusable code...
+export PERLLIB=$(echo $PERLLIB | sed -e "s?\([:]*\)\([^:]*feisty_meow[^:]*\)\([:]*\)??g")
+
+PERLLIB=$PERLLIB:"$FEISTY_MEOW_SCRIPTS/core":"$FEISTY_MEOW_SCRIPTS/files":"$FEISTY_MEOW_SCRIPTS/generator"
+PERL5LIB=$PERLLIB
+#echo PERLLIB after modification is $PERLLIB
 # make toast out of generated files right away, but leave any custom scripts.
 find "$FEISTY_MEOW_LOADING_DOCK" -maxdepth 1 -type f -exec perl "$FEISTY_MEOW_SCRIPTS/files/safedel.pl" "{}" ';'
 # &>/dev/null
@@ -61,11 +69,13 @@ done
 # load our variables so we can run our perl scripts successfully.
 source "$FEISTY_MEOW_SCRIPTS/core/variables.sh"
 
-# create our common aliases.
-perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl"
+# create our common aliases.  we need to refresh the PERLLIB since the shell
+# seems to keep accumulating the value in a weird way.
+PERLLIB=$PERLLIB PERL5LIB=$PERLLIB perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl"
+#echo after the generate aliases, perllib is $PERLLIB
 
 if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then
-  echo established these variables for feisty_meow assets:
+  echo this is the variable config file for feisty_meow assets:
   echo ==============
   cat "$FEISTY_MEOW_VARIABLES_LOADING_FILE"
   echo ==============
index e743345d94cd70a7b3d4ae473032efae9d2645e7..b6311dacff8517b02357178abcc4ff9a3f09ab6f 100644 (file)
@@ -175,7 +175,6 @@ define_yeti_variable DEFAULT_FEISTYMEOW_ORG_DIR=/opt/feistymeow.org
   # variables for perl.
   
   define_yeti_variable PERLLIB+="/usr/lib/perl5"
-  define_yeti_variable PERL5LIB+="/usr/lib/perl5"
   if [ "$OS" == "Windows_NT" ]; then
     define_yeti_variable PERLIO=:perlio
       # choose perl's IO over the ms-windows version so we can handle file
@@ -190,10 +189,10 @@ define_yeti_variable DEFAULT_FEISTYMEOW_ORG_DIR=/opt/feistymeow.org
       ls $i/*.pl &>/dev/null
       if [ $? -eq 0 ]; then
         PERLLIB+=":$(dos_to_unix_path $i)"
-        PERL5LIB+=":$(dos_to_unix_path $i)"
       fi
     fi
   done
+  define_yeti_variable PERL5LIB=$PERLLIB
   #echo PERLLIB is now $PERLLIB
   
   ##############
index 3b671bd7eea7091ba96418a78471835f15371617..2f00854a2c675b44ff9738dd50460cae6de3571b 100644 (file)
@@ -18,7 +18,7 @@ function refred()
   # special case that makes our software hierarchy folder, if it doesn't exist.
   # everything else is only re-permed if it exists.
   if [ ! -d "$DEFAULT_FEISTYMEOW_ORG_DIR" ]; then
-    sudo mkdir 
+    sudo mkdir "$DEFAULT_FEISTYMEOW_ORG_DIR"
   fi
 
   # iterate across the list of dirs we want fred to own and change their ownership.
index 6b0956347d17406dc8ddc28e19354e89f1d6cea1..e99f371a1dec349de0c82cb79635c132d2044c42 100644 (file)
@@ -16,6 +16,8 @@ function write_apache_config()
 {
   local appname="$1"; shift
   local sitename="$1"; shift
+  local site_path="$1"; shift
+
   local site_config="/etc/apache2/sites-available/${sitename}.conf"
 
   # check if config file already exists and bail if so.
@@ -30,12 +32,19 @@ function write_apache_config()
   echo "Creating a new apache2 site for $sitename with config file:"
   echo "  $site_config"
 
-  # path where site gets checked out, in some arcane manner, and which happens to be
-  # above the path where we put webroot (in the storage suffix, if defined).
-  local path_above="${BASE_PATH}/${appname}"
-  # no slash between appname and suffix, in case suffix is empty.
-  local full_path="${BASE_PATH}/${appname}${STORAGE_SUFFIX}"
+  # if no path, then we default to our standard app storage location.  otherwise, we
+  # put the site where they told us to.
+  if [ -z "$site_path" ]; then
+    # path where site gets checked out, in some arcane manner, and which happens to be
+    # above the path where we put webroot (in the storage suffix, if defined).
+    local path_above="${BASE_PATH}/${appname}"
+    # no slash between appname and suffix, in case suffix is empty.
+    local full_path="${path_above}${STORAGE_SUFFIX}"
 #echo really full path is $full_path
+  else
+    # we'll go with their specification for the site storage.
+    local full_path="$site_path"
+  fi
 
   echo "
 # set up the user's web folder as an apache user web directory.
@@ -125,16 +134,24 @@ fi
 
 appname="$1"; shift
 site="$1"; shift
+site_path="$1"; shift
 
 if [ -z "$appname" -o -z "$site" ]; then
-  echo "This script needs to know (1) the appname (application name) for the new"
-  echo "site and (2) the DNS name for the apache virtual host."
-  echo "The appname should work as a file-system compatible folder name."
+#hmmm: move to a print_instructions function.
+  echo "
+$(basename $0): {app name} {dns name} [site path]
+
+This script needs to know (1) the application name for the new site and
+(2) the DNS name for the apache virtual host.  The appname should be an
+appropriate name for a file-system compatible folder name.  There is an
+optional third parameter (3) the path for site storage.  If the site path
+is not provided, we'll use this path:
+  $BASE_PATH/{app name}/$STORAGE_SUFFIX"
   exit 1
 fi
 
 maybe_create_site_storage "$appname"
-write_apache_config "$appname" "$site"
+write_apache_config "$appname" "$site" "$site_path"
 enable_site "$site"
 restart_apache