From: Chris Koeritz Date: Sat, 2 Oct 2021 23:27:45 +0000 (-0400) Subject: Merge branch 'release-2.140.128' into main X-Git-Tag: 2.140.134~12 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=a6c25613042235a647ab5cef8972492249278d39;hp=318b779c5d45c9c073e68e16dcd680f250ef9053;p=feisty_meow.git Merge branch 'release-2.140.128' into main --- diff --git a/graphiq/.settings/language.settings.xml b/graphiq/.settings/language.settings.xml index 0fb11ece..9cd52918 100644 --- a/graphiq/.settings/language.settings.xml +++ b/graphiq/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + diff --git a/infobase/applications/the_top_suite.txt b/infobase/applications/the_top_suite.txt deleted file mode 100644 index 2b11eb61..00000000 --- a/infobase/applications/the_top_suite.txt +++ /dev/null @@ -1,10 +0,0 @@ - - -top: shows processor and memory usage by processes. - -iftop: shows network interface usage by internet address. - -iotop: shows input/output activity by processes. - - - diff --git a/infobase/configuration/grub/system76_grub_mod/10_linux b/infobase/configuration/grub/system76_grub_mod/10_linux new file mode 100755 index 00000000..88122553 --- /dev/null +++ b/infobase/configuration/grub/system76_grub_mod/10_linux @@ -0,0 +1,379 @@ +#! /bin/sh +set -e + +# grub-mkconfig helper script. +# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc. +# +# GRUB is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GRUB is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GRUB. If not, see . + +prefix="/usr" +exec_prefix="/usr" +datarootdir="/usr/share" +ubuntu_recovery="1" +quiet_boot="1" +quick_boot="1" +gfxpayload_dynamic="1" +# 2019-02-14: fred moved vt_handoff from 1 to 0 to try to address sleep freezes +# 2021-01-05: this seems to help a lot, but doesn't totally eliminate the freezes. +vt_handoff="0" + +. "$pkgdatadir/grub-mkconfig_lib" + +export TEXTDOMAIN=grub +export TEXTDOMAINDIR="${datarootdir}/locale" + +CLASS="--class gnu-linux --class gnu --class os" +SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd upstart:/sbin/upstart" + +if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then + OS=GNU/Linux +else + case ${GRUB_DISTRIBUTOR} in + Ubuntu|Kubuntu) + OS="${GRUB_DISTRIBUTOR}" + ;; + *) + OS="${GRUB_DISTRIBUTOR} GNU/Linux" + ;; + esac + CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" +fi + +# loop-AES arranges things so that /dev/loop/X can be our root device, but +# the initrds that Linux uses don't like that. +case ${GRUB_DEVICE} in + /dev/loop/*|/dev/loop[0-9]) + GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"` + # We can't cope with devices loop-mounted from files here. + case ${GRUB_DEVICE} in + /dev/*) ;; + *) exit 0 ;; + esac + ;; +esac + +# btrfs may reside on multiple devices. We cannot pass them as value of root= parameter +# and mounting btrfs requires user space scanning, so force UUID in this case. +if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \ + || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \ + || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then + LINUX_ROOT_DEVICE=${GRUB_DEVICE} +else + LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} +fi + +case x"$GRUB_FS" in + xbtrfs) + rootsubvol="`make_system_path_relative_to_its_root /`" + rootsubvol="${rootsubvol#/}" + if [ "x${rootsubvol}" != x ]; then + GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}" + fi;; + xzfs) + rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true` + bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`" + LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs}" + ;; +esac + +title_correction_code= + +if [ -x /lib/recovery-mode/recovery-menu ]; then + GRUB_CMDLINE_LINUX_RECOVERY=recovery +else + GRUB_CMDLINE_LINUX_RECOVERY=single +fi +if [ "$ubuntu_recovery" = 1 ]; then + GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY nomodeset" +fi + +if [ "$vt_handoff" = 1 ]; then + for word in $GRUB_CMDLINE_LINUX_DEFAULT; do + if [ "$word" = splash ]; then + GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT \$vt_handoff" + fi + done +fi + +linux_entry () +{ + os="$1" + version="$2" + type="$3" + args="$4" + + if [ -z "$boot_device_id" ]; then + boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" + fi + if [ x$type != xsimple ] ; then + case $type in + recovery) + title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")" ;; + init-*) + title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "${type#init-}")" ;; + *) + title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;; + esac + if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then + replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')" + quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)" + title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;" + grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")" + fi + echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/" + else + echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/" + fi + if [ "$quick_boot" = 1 ]; then + echo " recordfail" | sed "s/^/$submenu_indentation/" + fi + if [ x$type != xrecovery ] ; then + save_default_entry | grub_add_tab + fi + + # Use ELILO's generic "efifb" when it's known to be available. + # FIXME: We need an interface to select vesafb in case efifb can't be used. + if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then + echo " load_video" | sed "s/^/$submenu_indentation/" + else + if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then + echo " load_video" | sed "s/^/$submenu_indentation/" + fi + fi + if ([ "$ubuntu_recovery" = 0 ] || [ x$type != xrecovery ]) && \ + ([ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 1 ]); then + echo " gfxmode \$linux_gfx_mode" | sed "s/^/$submenu_indentation/" + fi + + echo " insmod gzio" | sed "s/^/$submenu_indentation/" + echo " if [ x\$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi" | sed "s/^/$submenu_indentation/" + + if [ x$dirname = x/ ]; then + if [ -z "${prepare_root_cache}" ]; then + prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)" + fi + printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/" + else + if [ -z "${prepare_boot_cache}" ]; then + prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)" + fi + printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" + fi + if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then + message="$(gettext_printf "Loading Linux %s ..." ${version})" + sed "s/^/$submenu_indentation/" << EOF + echo '$(echo "$message" | grub_quote)' +EOF + fi + if test -d /sys/firmware/efi && test -e "${linux}.efi.signed"; then + sed "s/^/$submenu_indentation/" << EOF + linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args} +EOF + else + if [ x"$GRUB_FORCE_PARTUUID" = x ]; then + sed "s/^/$submenu_indentation/" << EOF + linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} +EOF + else + sed "s/^/$submenu_indentation/" << EOF + linux ${rel_dirname}/${basename} root=PARTUUID=${GRUB_FORCE_PARTUUID} ro ${args} +EOF + fi + fi + if test -n "${initrd}" && [ x"$GRUB_DISABLE_INITRD" != xtrue ]; then + # TRANSLATORS: ramdisk isn't identifier. Should be translated. + if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then + message="$(gettext_printf "Loading initial ramdisk ...")" + sed "s/^/$submenu_indentation/" << EOF + echo '$(echo "$message" | grub_quote)' +EOF + fi + sed "s/^/$submenu_indentation/" << EOF + initrd ${rel_dirname}/${initrd} +EOF + fi + sed "s/^/$submenu_indentation/" << EOF +} +EOF +} + +machine=`uname -m` +case "x$machine" in + xi?86 | xx86_64) + list= + for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do + if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi + done ;; + *) + list= + for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do + if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi + done ;; +esac + +case "$machine" in + i?86) GENKERNEL_ARCH="x86" ;; + mips|mips64) GENKERNEL_ARCH="mips" ;; + mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;; + arm*) GENKERNEL_ARCH="arm" ;; + *) GENKERNEL_ARCH="$machine" ;; +esac + +prepare_boot_cache= +prepare_root_cache= +boot_device_id= +title_correction_code= + +cat << 'EOF' +function gfxmode { + set gfxpayload="${1}" +EOF +if [ "$vt_handoff" = 1 ]; then + cat << 'EOF' + if [ "${1}" = "keep" ]; then + set vt_handoff=vt.handoff=1 + else + set vt_handoff= + fi +EOF +fi +cat << EOF +} +EOF + +# Use ELILO's generic "efifb" when it's known to be available. +# FIXME: We need an interface to select vesafb in case efifb can't be used. +if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 0 ]; then + echo "set linux_gfx_mode=$GRUB_GFXPAYLOAD_LINUX" +else + cat << EOF +if [ "\${recordfail}" != 1 ]; then + if [ -e \${prefix}/gfxblacklist.txt ]; then + if hwmatch \${prefix}/gfxblacklist.txt 3; then + if [ \${match} = 0 ]; then + set linux_gfx_mode=keep + else + set linux_gfx_mode=text + fi + else + set linux_gfx_mode=text + fi + else + set linux_gfx_mode=keep + fi +else + set linux_gfx_mode=text +fi +EOF +fi +cat << EOF +export linux_gfx_mode +EOF + +# Extra indentation to add to menu entries in a submenu. We're not in a submenu +# yet, so it's empty. In a submenu it will be equal to '\t' (one tab). +submenu_indentation="" + +is_top_level=true +while [ "x$list" != "x" ] ; do + linux=`version_find_latest $list` + case $linux in + *.efi.signed) + # We handle these in linux_entry. + list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` + continue + ;; + esac + gettext_printf "Found linux image: %s\n" "$linux" >&2 + basename=`basename $linux` + dirname=`dirname $linux` + rel_dirname=`make_system_path_relative_to_its_root $dirname` + version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` + alt_version=`echo $version | sed -e "s,\.old$,,g"` + linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" + + initrd= + for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \ + "initrd-${version}" "initramfs-${version}.img" \ + "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ + "initrd-${alt_version}" "initramfs-${alt_version}.img" \ + "initramfs-genkernel-${version}" \ + "initramfs-genkernel-${alt_version}" \ + "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ + "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do + if test -e "${dirname}/${i}" ; then + initrd="$i" + break + fi + done + + config= + for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do + if test -e "${i}" ; then + config="${i}" + break + fi + done + + initramfs= + if test -n "${config}" ; then + initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"` + fi + + if test -n "${initrd}" ; then + gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2 + elif test -z "${initramfs}" ; then + # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's + # no initrd or builtin initramfs, it can't work here. + linux_root_device_thisversion=${GRUB_DEVICE} + fi + + if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then + linux_entry "${OS}" "${version}" simple \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" + + submenu_indentation="$grub_tab" + + if [ -z "$boot_device_id" ]; then + boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" + fi + # TRANSLATORS: %s is replaced with an OS name + echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {" + is_top_level=false + fi + + linux_entry "${OS}" "${version}" advanced \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" + for supported_init in ${SUPPORTED_INITS}; do + init_path="${supported_init#*:}" + if [ -x "${init_path}" ] && [ "$(readlink -f /sbin/init)" != "$(readlink -f "${init_path}")" ]; then + linux_entry "${OS}" "${version}" "init-${supported_init%%:*}" \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} init=${init_path}" + fi + done + if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then + linux_entry "${OS}" "${version}" recovery \ + "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}" + fi + + list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '` +done + +# If at least one kernel was found, then we need to +# add a closing '}' for the submenu command. +if [ x"$is_top_level" != xtrue ]; then + echo '}' +fi + +echo "$title_correction_code" diff --git a/infobase/fortunes.dat b/infobase/fortunes.dat index 1c983a92..312db4a5 100644 --- a/infobase/fortunes.dat +++ b/infobase/fortunes.dat @@ -43914,3 +43914,48 @@ Naval Lint! Belly up to the finest barnacle scrub on the market, and have your teams boat bright as a button! Only $9.99 a bottle, sold at all Ben Franklin Department Stores. -- fictional product developed due to misspelling of navel lint +~ +(a missing phone haiku) + +tech disconnection +no friends, no spam, brain at peace +must log back in now! + + -- fred t. hamster +~ +Many people, especially ignorant people, want to punish you for speaking the +truth, for being correct, for being you. Never apologize for being correct, +or for being years ahead of your time. If you're right and you know it, +speak your mind. Speak your mind. Even if you are a minority of one, the +truth is still the truth. + -- Mahatma Gandhi +~ + The sky is pure, open space, free from all obstructions. The nature of +our mind is similar: the afflictions, self-centered attitude, and other +obscurations are not in its essential nature. Just as clouds may temporarily +obscure the open sky, anger, attachment, and confusion can temporarily obscure +our mind. When they do, the pure, open nature of the mind still remains; we +just can't see it at the time. + By generating the wisdom realizing the emptiness of inherent existence, we +will be able to eradicate obscurations from our mind forever and enjoy the +sky-like spaciousness of a purified mind. + -- Thubten Chodron, from "Awaken Every Day: 365 Buddhist Reflections to + Invite Mindfulness and Joy", Shambhala Publications +~ +i buy all my hats +at interdimensional +pancake restaurant + -- fred t. hamster +~ +Love is about finding something pleasant in everyone. It can't be external +appearance, or what the person is engaged in at the moment; it has to be just +the fact that this is a sentient being who wants happiness and does not want +suffering and who has been the best of friends at some time in the limitless +past. A Tibetan definition of love is that the person pleasantly comes to +mind (yid du 'ong ba). Rather than pushing people away, you experience a core +similarity and closeness in them that makes you receptive to their basic +being, regardless of the problem--regardless of how distorted their current +attitudes and behavior are. That's how strong spiritual love is. + -- Jeffrey Hopkins, from "A Truthful Heart: Buddhist Practices for + Connecting with Others", Shambhala Publications + diff --git a/infobase/metaverse/viewer_list.txt b/infobase/metaverse/viewer_list.txt deleted file mode 100644 index 209f493a..00000000 --- a/infobase/metaverse/viewer_list.txt +++ /dev/null @@ -1,15 +0,0 @@ - - -best opensim and second life viewers in my opinion are these: - -kokua -http://wiki.kokuaviewer.org/wiki/Kokua/Downloads -favorite 3d viewer for a while. - -phoenix firestorm -http://www.firestormviewer.org/downloads/ -good standard 3d viewer. - -radegast -https://radegast.life/downloads/ -good simple viewer as a remote control, not great for 3d interactive. diff --git a/nucleus/.settings/language.settings.xml b/nucleus/.settings/language.settings.xml index 71923ccf..21256358 100644 --- a/nucleus/.settings/language.settings.xml +++ b/nucleus/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + diff --git a/nucleus/library/basis/functions.h b/nucleus/library/basis/functions.h index 821d3e62..4b2c6eb6 100644 --- a/nucleus/library/basis/functions.h +++ b/nucleus/library/basis/functions.h @@ -67,7 +67,7 @@ bool operator >= (const T1 &x, const T2 &y) { return !(x < y); } template target_type *cast_or_throw(source_type &to_cast, const target_type &ignored) { - if (!&ignored) {} // do nothing. +// if (!&ignored) {} // do nothing. target_type *cast = dynamic_cast(&to_cast); if (!cast) throw "error: casting problem, unknown RTTI cast."; return cast; @@ -77,7 +77,7 @@ target_type *cast_or_throw(source_type &to_cast, const target_type &ignored) template const target_type *cast_or_throw(const source_type &to_cast, const target_type &ignored) { - if (!&ignored) {} // do nothing. +// if (!&ignored) {} // do nothing. const target_type *cast = dynamic_cast(&to_cast); if (!cast) throw "error: casting problem, unknown RTTI cast."; return cast; diff --git a/nucleus/library/crypto/blowfish_crypto.cpp b/nucleus/library/crypto/blowfish_crypto.cpp index f5f7681b..77b70f28 100644 --- a/nucleus/library/crypto/blowfish_crypto.cpp +++ b/nucleus/library/crypto/blowfish_crypto.cpp @@ -124,7 +124,7 @@ blowfish_crypto::blowfish_crypto(const blowfish_crypto &to_copy) blowfish_crypto::~blowfish_crypto() { - FUNCDEF("dtor"); + FUNCDEF("destructor"); LOG("prior to key whack"); WHACK(_key); LOG("after key whack"); diff --git a/nucleus/library/crypto/rsa_crypto.cpp b/nucleus/library/crypto/rsa_crypto.cpp index 165f66b6..b96b3cdc 100644 --- a/nucleus/library/crypto/rsa_crypto.cpp +++ b/nucleus/library/crypto/rsa_crypto.cpp @@ -98,7 +98,7 @@ rsa_crypto::rsa_crypto(const rsa_crypto &to_copy) rsa_crypto::~rsa_crypto() { - FUNCDEF("dtor"); + FUNCDEF("destructor"); LOG("prior to rsa free"); auto_synchronizer mutt(__single_stepper()); RSA_free(_key); diff --git a/nucleus/library/crypto/ssl_init.cpp b/nucleus/library/crypto/ssl_init.cpp index 161874cb..abb62ad6 100644 --- a/nucleus/library/crypto/ssl_init.cpp +++ b/nucleus/library/crypto/ssl_init.cpp @@ -67,7 +67,7 @@ ssl_init::ssl_init() ssl_init::~ssl_init() { - FUNCDEF("dtor"); + FUNCDEF("destructor"); LOG("prior to crypto cleanup"); CRYPTO_cleanup_all_ex_data(); diff --git a/nucleus/library/filesystem/heavy_file_ops.h b/nucleus/library/filesystem/heavy_file_ops.h index debb5773..d728c43b 100644 --- a/nucleus/library/filesystem/heavy_file_ops.h +++ b/nucleus/library/filesystem/heavy_file_ops.h @@ -81,14 +81,14 @@ public: //!< method can be exported for use by shared libs. static basis::outcome copy_file(const basis::astring &source, const basis::astring &destination, - int copy_chunk_factor = copy_chunk_factor()); + int copy_chunk_factor = heavy_file_operations::copy_chunk_factor()); //!< copies a file from the "source" location to the "destination". /*!< the outcomes could be from this class or from common::outcomes. the "copy_chunk_factor" is the read buffer size to use while copying. */ static basis::outcome write_file_chunk(const basis::astring &target, double byte_start, const basis::byte_array &chunk, bool truncate = true, - int copy_chunk_factor = copy_chunk_factor()); + int copy_chunk_factor = heavy_file_operations::copy_chunk_factor()); //!< stores a chunk of bytes into the "target" file. /*!< writes the content stored in "chunk" into the file "target" at the position "byte_start". the entire "chunk" will be used, which means the diff --git a/nucleus/library/loggers/program_wide_logger.h b/nucleus/library/loggers/program_wide_logger.h index 70280742..bb73a748 100644 --- a/nucleus/library/loggers/program_wide_logger.h +++ b/nucleus/library/loggers/program_wide_logger.h @@ -72,8 +72,8 @@ class null_logger : public virtual standard_log_base public: virtual ~null_logger() {} DEFINE_CLASS_NAME("null_logger"); - virtual basis::outcome log(const basis::base_string &info, int filter) { - if (filter || !(&info)) {} + virtual basis::outcome log(const basis::base_string &formal(info), int formal(filter)) { + /* if (filter || !(&info)) {} */ return basis::common::OKAY; } }; diff --git a/nucleus/library/nodes/symbol_tree.cpp b/nucleus/library/nodes/symbol_tree.cpp index 0cf01c6c..bd985a27 100644 --- a/nucleus/library/nodes/symbol_tree.cpp +++ b/nucleus/library/nodes/symbol_tree.cpp @@ -33,12 +33,14 @@ using namespace textual; namespace nodes { +//hmmm: used for... explain please. class symbol_tree_associations : public symbol_table { public: symbol_tree_associations(int estimated_elements) : symbol_table(estimated_elements) {} virtual ~symbol_tree_associations() { +//hmmm: why was this here? was it ever needed? // for (int i = 0; i < symbols(); i++) { // WHACK(use(i)); // } @@ -91,8 +93,12 @@ outcome symbol_tree::prune(tree *to_zap_in) FUNCDEF("prune"); #endif symbol_tree *to_zap = dynamic_cast(to_zap_in); - if (!to_zap) + if (!to_zap) { +#ifdef DEBUG_SYMBOL_TREE + LOG("about to barf due to null symtree after dynamic cast."); +#endif throw("error: symbol_tree::prune: wrong type of node in prune"); + } #ifdef DEBUG_SYMBOL_TREE LOG(astring("zapping node for ") + to_zap->name()); #endif diff --git a/nucleus/library/nodes/tree.cpp b/nucleus/library/nodes/tree.cpp index 59ca5d70..7398274b 100644 --- a/nucleus/library/nodes/tree.cpp +++ b/nucleus/library/nodes/tree.cpp @@ -17,6 +17,7 @@ #include #include #include +#include //#define DEBUG_TREE // uncomment if you want lots of debugging info. @@ -25,6 +26,7 @@ #define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s) using namespace basis; +using namespace loggers; namespace nodes { @@ -54,8 +56,8 @@ bool tree::iterator::next_node(tree *&to_return) #ifdef DEBUG_TREE if ( (_order != to_branches) && (_order != reverse_branches) ) { - if (_aim == AWAY_FROM_ROOT) LOG("going down") - else LOG("going up"); + if (_aim == AWAY_FROM_ROOT) LOG("going down...") + else LOG("going up..."); } #endif switch (_order) { @@ -274,6 +276,7 @@ tree::tree() tree::~tree() { + FUNCDEF("destructor"); // must at least unhook ourselves from the parent so we don't become a lost // cousin. tree *my_parent = parent(); @@ -281,6 +284,7 @@ tree::~tree() my_parent = NULL_POINTER; // disavow since we are loose now. #if 0 + //hmmm: clean this code when it's been examined long enough. maybe already. //original version suffers from being too recursive on windoze, //which blows out the stack. linux never showed this problem. so, i @@ -298,6 +302,7 @@ tree::~tree() // newer version of delete doesn't recurse; it just iterates instead, // which avoids the massive recursive depth of the original approach. tree *curr_node = this; + tree *stop_node = this; // don't whack self. while (curr_node != NULL_POINTER) { // make a breadcrumb for getting back to 'here' in the tree. tree *way_back = curr_node; @@ -306,7 +311,7 @@ tree::~tree() // or there are no kids at all. curr_node = curr_node->branch(0); - if (curr_node = NULL_POINTER) { + if (curr_node == NULL_POINTER) { // wayback has no children, so we can take action. // if wayback is the same as "this", then we exit from iterations since @@ -320,19 +325,14 @@ tree::~tree() // our remit, since wayback is not the same node as the top level one // in the destructor (as long as there are no cycles in the tree...). curr_node = way_back->parent(); // go up in tree on next iteration. - delete way_back; // whack a node, finally. - + WHACK(way_back); // whack a node, finally. } else { // okay, there's a node below here. we will spider down to it. continue; } - - } #endif - - } tree *tree::parent() const { return (tree *)get_link(BACKWARDS_BRANCH); } diff --git a/nucleus/library/structures/amorph.h b/nucleus/library/structures/amorph.h index c4992cfb..69cf27b1 100644 --- a/nucleus/library/structures/amorph.h +++ b/nucleus/library/structures/amorph.h @@ -55,7 +55,7 @@ namespace structures { template -class amorph : private basis::array +class amorph : protected basis::array { public: amorph(int elements = 0); diff --git a/nucleus/library/tests_filesystem/test_directory_tree.cpp b/nucleus/library/tests_filesystem/test_directory_tree.cpp index 5e9fe6b3..7897831b 100644 --- a/nucleus/library/tests_filesystem/test_directory_tree.cpp +++ b/nucleus/library/tests_filesystem/test_directory_tree.cpp @@ -54,7 +54,7 @@ int test_directory_tree::execute() { FUNCDEF("execute"); - astring path = "/usr/include"; + astring path = "/usr/lib"; #ifdef __WIN32__ // default path for windoze uses an area that should always exist. path = environment::get("COMMONPROGRAMFILES"); diff --git a/nucleus/library/tests_nodes/test_symbol_tree.cpp b/nucleus/library/tests_nodes/test_symbol_tree.cpp index bc938d1d..fa4a5c8c 100644 --- a/nucleus/library/tests_nodes/test_symbol_tree.cpp +++ b/nucleus/library/tests_nodes/test_symbol_tree.cpp @@ -28,9 +28,6 @@ #include #include -//#include -//#include - using namespace application; using namespace basis; using namespace filesystem; @@ -60,12 +57,11 @@ public: int test_symbol_tree::execute() { FUNCDEF("execute"); - LOG("please check memory usage and record it, then hit a key to start testing."); try { - // creates a crazy tree with only one branch per node, but 40,000 deep. - symbol_tree t("blork"); - symbol_tree *curr = &t; + // creates a crazy tree with only one branch per node, but hugely deep. + symbol_tree *t = new symbol_tree("blork"); + symbol_tree *curr = t; for (int i = 0; i < MAX_NODES_TESTED; i++) { // if the current node has any branches, we'll jump on one as the next // place. @@ -77,17 +73,16 @@ int test_symbol_tree::execute() astring rando = string_manipulation::make_random_name(1, 10); curr->add(new symbol_tree(rando)); } - LOG("check memory usage now with full size. then hit a key."); +LOG("about to whack dynamic tree..."); + WHACK(t); +LOG("dynamic tree whacked."); } catch (...) { LOG("crashed during tree stuffing."); return 1; } - LOG("check memory usage after the run. then hit a key to end " - "the program."); - -//create a more balanced tree structure... -//perform known operations and validate shape of tree. +//hmmm: create a more balanced tree structure... +// perform known operations and validate shape of tree. return final_report(); } diff --git a/nucleus/tools/clam_tools/value_tagger.cpp b/nucleus/tools/clam_tools/value_tagger.cpp index 9fb6c780..d90dac3e 100644 --- a/nucleus/tools/clam_tools/value_tagger.cpp +++ b/nucleus/tools/clam_tools/value_tagger.cpp @@ -166,6 +166,8 @@ public: simple_sorter(int index = 0, int value = 0) : _index(index), _value(value) {} bool operator < (const simple_sorter &to_compare) const { return _value < to_compare._value; } + bool operator > (const simple_sorter &to_compare) const + { return _value > to_compare._value; } bool operator == (const simple_sorter &to_compare) const { return _value == to_compare._value; } }; diff --git a/production/feisty_meow_config.ini b/production/feisty_meow_config.ini index 29a3ddd4..b9d0846f 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=127 +revision=128 build=420 # specifies the remainder of the version record info. diff --git a/readme.txt b/readme.txt index 2ac0a1a3..e77c89ab 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Quick Start Guide for the Feisty Meow Codebase -Commands that can be typed in a console or terminal are are prefixed with "$". +Commands that can be typed in a console or terminal are prefixed with "$". (Do not include the dollar sign when copying and pasting commands.) Information that varies by platform is prefixed with a '|' character. diff --git a/scripts/agenda/info_overload_report.sh b/scripts/agenda/info_overload_report.sh index e6b63b2f..1812d87e 100644 --- a/scripts/agenda/info_overload_report.sh +++ b/scripts/agenda/info_overload_report.sh @@ -115,7 +115,7 @@ full_report+="count\tcomplexity\tweight (kb)\tcategory\n\ #hmmm: don't fail if the hierarchy doesn't exist. # high priority stuff would be called urgent. -analyze_hierarchy_and_report $CLOUD_BASE/urgent "high priority (aieeee!)" +analyze_hierarchy_and_report $CLOUD_BASE/aaa_priority "high priority (aieeee!)" # notes are individual files of tasks, usually, although some are combined. analyze_hierarchy_and_report $CLOUD_BASE/grunty* "grunty (external facing) notes" @@ -146,16 +146,16 @@ analyze_hierarchy_and_report $CLOUD_BASE/reading "reading list (for a quiet afte analyze_by_dir_patterns "life's work and other oddities" $CLOUD_BASE/vocation* # scan all the items declared as active projects. -analyze_by_dir_patterns "active issues" $CLOUD_BASE/active* +analyze_by_dir_patterns "active issues" $CLOUD_BASE/*active* # rub alongside all the travel notes to see if any have interesting burrs. analyze_by_dir_patterns "travel plans" $CLOUD_BASE/walkabout* # scan across all appropriately named project or research folders. -analyze_by_dir_patterns "running projects" $CLOUD_BASE/project* $CLOUD_BASE/research* +analyze_by_dir_patterns "running projects" $CLOUD_BASE/*project* $CLOUD_BASE/*research* # look for our mad scientist style efforts. -analyze_by_dir_patterns "lab experiments" $CLOUD_BASE/experiment* +analyze_by_dir_patterns "lab experiments" $CLOUD_BASE/*experiment* # snag any work related items for that category. analyze_by_dir_patterns "jobby work tasks" $CLOUD_BASE/job* diff --git a/scripts/archival/snarf_notes.pl b/scripts/archival/snarf_notes.pl index b14d05d7..fac97bcf 100644 --- a/scripts/archival/snarf_notes.pl +++ b/scripts/archival/snarf_notes.pl @@ -49,8 +49,10 @@ local($snarf_file) = &snarf_name($snarf_file_base, $number); &snarf_by_pattern($snarf_file_base, "$root", "note"); &snarf_by_pattern($snarf_file_base, "$root", "nuage"); &snarf_by_pattern($snarf_file_base, "$root", "project"); +&snarf_by_pattern($snarf_file_base, "$root", "proj_"); &snarf_by_pattern($snarf_file_base, "$root", "task"); &snarf_by_pattern($snarf_file_base, "$root", "invention"); +&snarf_by_pattern($snarf_file_base, "$root", "transitory"); ############################################################################ diff --git a/scripts/clam/cpp/variables.def b/scripts/clam/cpp/variables.def index 94e0f3d0..9ab02a87 100644 --- a/scripts/clam/cpp/variables.def +++ b/scripts/clam/cpp/variables.def @@ -914,21 +914,25 @@ endif ############################################################################ ifeq "$(COMPILER)" "GNU_DARWIN" - # Darwin kernel GNU compiler... + # Darwin kernel GNU compiler... really more general macos (MacOS) here these days. CC = g++ COMPILER_ROOT_DIR = / PLATFORM_ADD_IN = darwin ARCHITECTURE = $(shell machine 2>/dev/null || arch 2>/dev/null || echo i686) -# COMPILER_FLAGS += -fgnu-runtime export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) DEFINITIONS += _FILE_OFFSET_BITS=64 DEPENDENCY_DEFINITIONS += NO_VERSION - DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(COMPILER_VERSION) -X/usr/include/c++/$(COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(COMPILER_VERSION)/include +# DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(COMPILER_VERSION) -X/usr/include/c++/$(COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(COMPILER_VERSION)/include + DEPENDENCY_ADDITIONS = -X/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include - COMPILER_HEADER_DIR := /usr/local/include /usr/include /System/Library/Frameworks/Foundation.framework/Versions/C/Headers + COMPILER_HEADER_DIR := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include +#/usr/local/include /usr/include +#old /System/Library/Frameworks/Foundation.framework/Versions/C/Headers +#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include +#/Library/Developer/CommandLineTools/usr/include # "USE_XWIN" specifies that this project needs X window system support. #USE_XWIN = @@ -936,12 +940,12 @@ ifeq "$(COMPILER)" "GNU_DARWIN" # ifeq "x86_64" "$(ARCHITECTURE)" # COMPILER_LIBRARY_DIR = /lib64 /usr/lib64 /usr/local/lib64 # else - - COMPILER_LIBRARY_DIR = /usr/lib /usr/local/lib -#/lib - + COMPILER_LIBRARY_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib +#/usr/lib /usr/local/lib # endif - DEFINITIONS += __LINUX__ linux __linux__ UNIX unix __UNIX__ __USE_GNU + +# DEFINITIONS += __LINUX__ linux __linux__ UNIX unix __UNIX__ __USE_GNU + DEFINITIONS += UNIX unix __UNIX__ __USE_GNU # X Window System not enabled by default. #DEFINITIONS += __XWINDOWS__ @@ -950,6 +954,8 @@ ifeq "$(COMPILER)" "GNU_DARWIN" # LOAD_FLAG_PREFIX += -Xlinker #mac has no o3??? #-O3 + # special flags for getting rid of warnings on fd_set. + LOAD_FLAG_PREFIX=-Wl,-U,___darwin_check_fd_set_overflow # -Xlinker --print-map : shows what went in and why. # -Xlinker -O3 : linker optimization @@ -971,6 +977,11 @@ ifeq "$(COMPILER)" "GNU_DARWIN" # pthread=thread libraries. # rt=real time libraries for shared memory. + # mac specific flags + COMPILER_FLAGS += -Wno-nullability-completeness +#trying this one again, which had been turned off. + COMPILER_FLAGS += -fgnu-runtime + ifneq "$(DEBUG)" "" # add in debugging flags. # COMPILER_FLAGS += -g3 -O0 diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 28c2f058..8ad72ccf 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -225,7 +225,8 @@ if [ -z "$skip_all" ]; then # local oldterm="$TERM" # export TERM=linux - /usr/bin/ssh -Y -C "${args[@]}" + /usr/bin/ssh -C "${args[@]}" +# removed -Y flag because considered dangerous to trust remote hosts to not abuse our X session. # # restore the terminal variable also. # TERM="$oldterm" @@ -465,9 +466,9 @@ if [ -z "$skip_all" ]; then # launch sudo with just the variables we want to reach the other side. local varmods= -# varmods+="PATH= " + varmods+="OLD_HOME=$HOME " 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 + if [ ! -z "$SSH_AUTH_SOCK" ]; then varmods+="SSH_AUTH_SOCK=$SSH_AUTH_SOCK "; fi /usr/bin/sudo $varmods "$@" retval=$? @@ -949,9 +950,11 @@ return 0 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 | \ +#hmmm: yes! a variable with a list of files that are considered TEXT_FILE_EXTENSIONS or something like that. +#hmmm: yes continued! also a variable for BINARY_FILE_EXTENSIONS to avoid those, where we need to in other scripts. + find "${dirs[@]}" -follow -maxdepth 1 -mindepth 1 -type f -and -not -iname ".[a-zA-Z0-9]*" | \ grep -i \ -"csv\|doc\|docx\|eml\|html\|jpeg\|jpg\|m4a\|mov\|mp3\|ods\|odt\|pdf\|png\|ppt\|pptx\|txt\|vsd\|vsdx\|xls\|xlsx\|xml\|zip" | \ +"csv\|doc\|docx\|eml\|html\|jpeg\|jpg\|m4a\|mov\|mp3\|ods\|odt\|pdf\|png\|ppt\|pptx\|rtf\|txt\|vsd\|vsdx\|xls\|xlsx\|xml\|zip" | \ sed -e 's/^/"/' | sed -e 's/$/"/' | \ xargs bash "$FEISTY_MEOW_SCRIPTS/files/spacem.sh" # drop the temp file now that we're done. diff --git a/scripts/core/inventory.sh b/scripts/core/inventory.sh index db33f74c..aa5b0494 100644 --- a/scripts/core/inventory.sh +++ b/scripts/core/inventory.sh @@ -7,11 +7,32 @@ source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" unset -v codename osname osver if [ $OPERATING_SYSTEM == "UNIX" ]; then - which lsb_release &>/dev/null - if [ $? -eq 0 ]; then - codename="$(lsb_release -cs 2>/dev/null)" - osname="$(lsb_release -is 2>/dev/null)" - osver="$(lsb_release -rs 2>/dev/null)" + if [ -z "$IS_DARWIN" ]; then + # we only try running lsb_release if not on a mac. + which lsb_release &>/dev/null + if [ $? -eq 0 ]; then + codename="$(lsb_release -cs 2>/dev/null)" + osname="$(lsb_release -is 2>/dev/null)" + osver="$(lsb_release -rs 2>/dev/null)" + fi + else + # darwin / mac doesn't have lsb since not linux. +#Usage: sw_vers [-productName|-productVersion|-buildVersion] + osname="$(sw_vers -productName 2>/dev/null)" + osver="$(sw_vers -productVersion 2>/dev/null)" + if [[ "$osver" =~ ^10\.15.*$ ]]; then + codename="Catalina" + elif [[ "$osver" =~ ^10\.14.*$ ]]; then + codename="Mojave" + elif [[ "$osver" =~ ^10\.13.*$ ]]; then + codename="High Sierra" + elif [[ "$osver" =~ ^11\.*$ ]]; then + codename="Big Sur" + elif [[ "$osver" =~ ^12\.*$ ]]; then + codename="Monterey" + else + codename="$(sw_vers -buildVersion 2>/dev/null)" + fi fi fi if [ -z "$codename" ]; then diff --git a/scripts/files/fast_counter.sh b/scripts/files/fast_counter.sh new file mode 100644 index 00000000..c0d0c1fd --- /dev/null +++ b/scripts/files/fast_counter.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# an attempt to have a "fast" counter of the number of files in a folder, or folders, which will not stray into any snapshot directories present in the filesystem. + +for dir in "${@}"; do + echo -n "files in '$dir': " + # seek out all files under the directory, except ones under the snapshot folder (pattern will match snapshots for either netapp (.snapshot) or dell (.snapshots). + find "$dir" -iname ".snapshot" -prune -or -iname "*" -type f | grep -v "\.snapshot" | wc -l + +#this implementation is the former one, and does not avoid traversing the .snapshot folder on netapp, thus making it super inefficient and complainy. +#the new implementation above is necessitated by needing to avoid multiplying our task by maybe 30 times, due to the snapshots looking mostly just like the original and having just as many files, in general. +# /bin/ls -1fR "$dir" | grep -v "^$" | grep -v "^\.$" | grep -v "^\.\.$" | grep -v ".*:$" | grep -v "\.snapshot" | wc -l +# # patterns that remove files from being counted, above: +# # +# # ^$ -- all blank lines +# # ^\.$ -- all lines with just a dot (current directory) +# # ^\.\.$ -- all lines with just two dots (parent directory) +# # .*:$ -- all lines that end with a colon (directory heading from recursive ls) +# # \.snapshot -- all lines mentioning the snapshot directory. + +done + + diff --git a/scripts/files/show_just_biggies.sh b/scripts/files/show_just_biggies.sh new file mode 100644 index 00000000..782ab15e --- /dev/null +++ b/scripts/files/show_just_biggies.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# iterates through the directories or files passed on the command line and does a summary disk usage, but only the +# things measurable in gigabytes, terabytes, or larger are shown. the smaller items are just omitted (so anything +# measurable within megabytes, kilobytes, and bytes, as decided by the human-readable du command. + +for dir in "${@}"; do + du -sh "$dir" 2>/dev/null | grep -v "^[ 0-9.]*K\|^[ 0-9.]*M\|^[ 0-9.]*B" +done diff --git a/scripts/files/summing_dir.pl b/scripts/files/summing_dir.pl index 82f4d29e..5cd9fa6b 100644 --- a/scripts/files/summing_dir.pl +++ b/scripts/files/summing_dir.pl @@ -40,6 +40,7 @@ if ($#ARGV < 0) { # add parameters to our chewed_line, but skip items if they are flags we don't # implement. foreach $dir (@arg_list) { +#hmmm: fix this by using a pattern, to exclude cmd line parms, but recognize some of them, like recursive? hmmm. if ($dir eq "-al") { next; } # skip ls directives. if ($dir eq "-l") { next; } # skip ls directives. $chewed_line = $chewed_line . " \"$dir\""; diff --git a/scripts/marks/create_marks.sh b/scripts/marks/create_marks.sh index a1ae5db2..40b07b4e 100644 --- a/scripts/marks/create_marks.sh +++ b/scripts/marks/create_marks.sh @@ -46,5 +46,5 @@ if [ $? != 0 ]; then fi \mv -f $genlinx $genlinx_moz $genlinx_js $GRUNTOSE_DIR/Info/Twain -#not needed: \mv -f $newmarx $HOME +\mv -f $newmarx $HOME diff --git a/scripts/schedule/cal.sh b/scripts/schedule/cal.sh index 0d22282e..0938e1db 100644 --- a/scripts/schedule/cal.sh +++ b/scripts/schedule/cal.sh @@ -1,12 +1,19 @@ #!/bin/bash # cal: a nicer interface to the unix cal program. +function our_date() +{ + date '+%A %B %d %Y' +} + case $# in - 0) set $(date); m=$2; y=$6 ;; # no arguments; use today - 1) m=$1; set $(date); y=$6 ;; # 1 argument; use this year + 0) set $(our_date); m=$2; y=$4 ;; # no arguments; use today + 1) m=$1; set $(our_date); y=$4 ;; # 1 argument; use this year *) m=$1; y=$2 ;; # 2 arguments; month and year esac +#echo would run, after first case: "/usr/bin/cal $m $y" + case $m in jan*|Jan*|JAN*) m=1 ;; feb*|Feb*|FEB*) m=2 ;; @@ -20,8 +27,9 @@ case $m in oct*|Oct*|OCT*) m=10 ;; nov*|Nov*|NOV*) m=11 ;; dec*|Dec*|DEC*) m=12 ;; -[1-9]|10|11|12) ;; # numeric month -*) y=$m; m="" ;; # just a year + [1-9]|10|11|12) ;; # numeric month + *) y=$m; m="" ;; # just a year esac +#echo running: "/usr/bin/cal $m $y" /usr/bin/cal $m $y # run the real one diff --git a/scripts/security/show_all_cert_chains.sh b/scripts/security/show_all_cert_chains.sh new file mode 100644 index 00000000..1fe4125b --- /dev/null +++ b/scripts/security/show_all_cert_chains.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +file="$1"; shift +if [ -z "$file" -o ! -f "$file" ]; then + echo This script requires a PEM-format file name to show the certificates within. + exit 1 +fi + +openssl crl2pkcs7 -nocrl -certfile "$file" | openssl pkcs7 -print_certs -text -noout + diff --git a/scripts/system/list_packages.sh b/scripts/system/list_packages.sh index 0a52aa64..d7317fbb 100644 --- a/scripts/system/list_packages.sh +++ b/scripts/system/list_packages.sh @@ -8,7 +8,7 @@ if [ -z "$*" ]; then else # we know the parameters are not empty, so we don't go with our # wildcard approach for listing the package names. - SEEK_PIECE=' grep $* ' + SEEK_PIECE=' grep -i $* ' fi if debian_like; then diff --git a/scripts/testing/squelch_unless_error.sh b/scripts/testing/squelch_unless_error.sh new file mode 100644 index 00000000..c26fd94b --- /dev/null +++ b/scripts/testing/squelch_unless_error.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# redirects standard out and standard error output to temp files and runs all +# the parameters to this script as a command. +# if there is no error, then the files are just deleted. +# if there was an error, then the two output files are sent to standard out +# and standard error, and an additional explanatory error message is sent to +# standard error about the command that failed. + +#echo "squelch args: $(printf -- "[%s] " "${@}")" + +newout="$(mktemp /tmp/squelch.out.XXXXXX)" +newerr="$(mktemp /tmp/squelch.err.XXXXXX)" + +eval "${@}" >"$newout" 2>"$newerr" +retval=$? + +if [ $retval != 0 ]; then + # there was an error during the execution of the command. + cat "$newout" + cat "$newerr" >&2 + echo "An error was returned during execution of: ${@}" >&2 +fi + +# clean up. +\rm "$newout" "$newerr" + +# pass along the error code we saw, whether success or failure, so that this command has same +# exit result as the original would have. +exit $retval + diff --git a/scripts/text/average_line_length.sh b/scripts/text/average_line_length.sh new file mode 100644 index 00000000..da344382 --- /dev/null +++ b/scripts/text/average_line_length.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +file="$1"; shift +if [ -z "$file" -o ! -f "$file" ]; then + echo This script needs a filename to operate on as a parameter. + echo The file will be examined and the average line length calculated. + exit 1 +fi + +cat "$file" | +awk ' { thislen=length($0); # printf("lines %-5s len %d total %d\n", numlines, thislen, totlen); + totlen+=thislen + if (thislen != 0) { numlines++ } } +END { printf("average line length: %d (no blank lines) or %d (counting blank lines)\n", totlen/numlines, totlen/NR); } ' + + diff --git a/testkit/doc/testkit_reference-source.html b/testkit/doc/testkit_reference-source.html index 255738bd..54ef5a48 100644 --- a/testkit/doc/testkit_reference-source.html +++ b/testkit/doc/testkit_reference-source.html @@ -6,7 +6,7 @@

$BRANDING TestKit Reference Manual

Author: Chris Koeritz

-
Version 1.0 ― Updated August 14 2020
+
Version 1.0 ― Updated September 23 2020

The $BRANDING TestKit

The TestKit is a collection of scripts that leverages the ShUnit unit testing environment.  The TestKit provides a pattern for creating @@ -14,12 +14,16 @@ reporting on test runs is provided in a convenient tabular format.

Generally, writing a test script using the TestKit is a matter of minutes.  A blank test is provided as a template, and that can be - expanded with whatever test steps are needed.

+ expanded with whatever test steps are needed.  (See + examples/blank_test.sh)

TestKit (and ShUnit) are implemented in the GNU Bash script language, but a TestKit test script can invoke external applications, written in whatever programming language or scripting tool is desired, using the - standard POSIX interfaces.
-

+ standard POSIX interfaces.

+

License

+

The testkit is provided under the Apache License, version 2.0 (the + "License").  The license is available at: http://www.apache.org/licenses/LICENSE-2.0

Getting the TestKit

Follow these steps to download and install a new "vanilla" version of the TestKit:
@@ -36,13 +40,16 @@ margin-left:0in;background:#DDD9C3">

-

The above steps were used to kick-start the local version of the TestKit.

-

It is possible to check out the TestKit within one's own code base (by - adding the Feisty Meow® Codebase that was retrieved above).  Then one - can retrieve an updated Feisty Meow® TestKit by running "git pull" on the - "feisty_meow" folder.  This will get the latest version of TestKit - without disturbing whatever project's revision control repository contains - the TestKit for testing.

+

The above steps may have been used to kick-start the local version of the + TestKit.  It is perfectly valid to download the testkit and then copy + it into one's own source code for use; this is enabled under the Apache + License.

+

It is also possible to check out the TestKit within one's own code base + (by adding the Feisty Meow® Codebase that was retrieved above).  Then + one can retrieve an updated Feisty Meow® TestKit by running "git pull" on + the "feisty_meow" folder.  This will get the latest version of + TestKit without disturbing whatever project's revision control repository + contains the TestKit for testing.

Preparing the TestKit on Linux

Linux is the easiest environment for running the TestKit, given that the tests were built using the bash shell within a Linux environment.  If @@ -273,6 +280,20 @@ margin-left:0in;background:#DDD9C3">https://github.com/kward/shunit2

+

Note however that we have made some customizations in reporting in the + version stored with the testkit, so some features may be missed if a newer + version is placed in the testkit's "shunit" folder.


diff --git a/testkit/doc/testkit_reference.html b/testkit/doc/testkit_reference.html index fe752cc4..a59e51d3 100644 --- a/testkit/doc/testkit_reference.html +++ b/testkit/doc/testkit_reference.html @@ -6,7 +6,7 @@

Feisty Meow® TestKit Reference Manual

Author: Chris Koeritz

-
Version 1.0 ― Updated August 14 2020
+
Version 1.0 ― Updated September 23 2020

The Feisty Meow® TestKit

The TestKit is a collection of scripts that leverages the ShUnit unit testing environment.  The TestKit provides a pattern for creating @@ -14,12 +14,16 @@ reporting on test runs is provided in a convenient tabular format.

Generally, writing a test script using the TestKit is a matter of minutes.  A blank test is provided as a template, and that can be - expanded with whatever test steps are needed.

+ expanded with whatever test steps are needed.  (See + examples/blank_test.sh)

TestKit (and ShUnit) are implemented in the GNU Bash script language, but a TestKit test script can invoke external applications, written in whatever programming language or scripting tool is desired, using the - standard POSIX interfaces.
-

+ standard POSIX interfaces.

+

License

+

The testkit is provided under the Apache License, version 2.0 (the + "License").  The license is available at: http://www.apache.org/licenses/LICENSE-2.0

Getting the TestKit

Follow these steps to download and install a new "vanilla" version of the TestKit:
@@ -36,13 +40,16 @@ margin-left:0in;background:#DDD9C3">

-

The above steps were used to kick-start the local version of the TestKit.

-

It is possible to check out the TestKit within one's own code base (by - adding the Feisty Meow® Codebase that was retrieved above).  Then one - can retrieve an updated Feisty Meow® TestKit by running "git pull" on the - "feisty_meow" folder.  This will get the latest version of TestKit - without disturbing whatever project's revision control repository contains - the TestKit for testing.

+

The above steps may have been used to kick-start the local version of the + TestKit.  It is perfectly valid to download the testkit and then copy + it into one's own source code for use; this is enabled under the Apache + License.

+

It is also possible to check out the TestKit within one's own code base + (by adding the Feisty Meow® Codebase that was retrieved above).  Then + one can retrieve an updated Feisty Meow® TestKit by running "git pull" on + the "feisty_meow" folder.  This will get the latest version of + TestKit without disturbing whatever project's revision control repository + contains the TestKit for testing.

Preparing the TestKit on Linux

Linux is the easiest environment for running the TestKit, given that the tests were built using the bash shell within a Linux environment.  If @@ -273,6 +280,20 @@ margin-left:0in;background:#DDD9C3">https://github.com/kward/shunit2

+

Note however that we have made some customizations in reporting in the + version stored with the testkit, so some features may be missed if a newer + version is placed in the testkit's "shunit" folder.


diff --git a/testkit/examples/blank_test.sh b/testkit/examples/blank_test.sh index 239cbe73..aa77ac3e 100644 --- a/testkit/examples/blank_test.sh +++ b/testkit/examples/blank_test.sh @@ -1,14 +1,15 @@ #!/bin/bash -# Test: X -# Author: Y +# Test: Blank +# Author: Fill ItIn export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory. cd "$WORKDIR" -# this needs to be relative to where the test will actually reside; the ../../../../../etc -# should get to the top of the tools and tests hierarchy. -source "../prepare_tools.sh" "../prepare_tools.sh" +# this needs to be relative to where the test will actually reside; the .. components below +# need to get to the top of the tools and tests hierarchy. +relative_depth=".." +source "$relative_depth/prepare_tools.sh" "$relative_depth/prepare_tools.sh" if [ -z "$TEST_TEMP" ]; then echo The TestKit could not be automatically located. exit 1 @@ -54,6 +55,93 @@ testDoAnotherThing() assertNotEquals "an explicit failure should be seen" 0 $? } +testShunitExamples() +{ + echo running through shunit tests available. + + # values must be the same. + assertEquals "equals test" 5 5 + + # similar test, different name. + assertSame "same test" oof oof + + # values must not be the same. + assertNotEquals "not equals test" 3 5 + + # a parallel not same test. + assertNotSame "not same test" orp 3 + + # value must have no content (or not be defined). + assertNull "empty null test" "" + assertNull "undefined null test" "$variableDoesntExistOrShouldntSinceWeDidntDefineIt" + + # value must have content. + assertNotNull "not null test" "sugarwater" + + # value must be true, which in bash means equal to zero. + assertTrue "true test simple" 0 + # this shows how true return value can be tested. + true + assertTrue "true test return value" $? + + # value must be false, or non-zero. + assertFalse "false test simple" 13 + # shows how false return value can be tested. + false + assertFalse "false test" $? +} + +testShowSkipping() +{ + # the failures below are intentionally skipped, so as to avoid the failure + # results in our full output. + # this shows two things; how to skip the rest of the tests if needed, + # and how to cause a test failure without using an assertion. + + # show if we're skipping already. + isSkipping + if [ $? -eq 0 ]; then + echo we are skipping tests. + else + echo we are not skipping tests. + fi + + # start skipping tests. + startSkipping + + # show that we're skipping. + isSkipping + if [ $? -eq 0 ]; then + echo we are skipping tests. + else + echo we are not skipping tests. + fi + + # can be used to set a test failed state, without using an assertion. + # this might be used if there is complex logic and one doesn't feel + # like boiling that down to a single variable to test on. + fail "one of the tests above failed" + + # indicates a failure because two values were not the same. + failNotSame "values should have been the same" toyBoat oatBoy + + # indicates a failure when two values should have been different. + failSame "values should not have been the same" 3 3 + + # stop skipping tests again. + endSkipping + + # show that we're no longer skipping. + isSkipping + if [ $? -eq 0 ]; then + echo we are skipping tests. + else + echo we are not skipping tests. + fi + + assertSame "shunit is cool" cool cool +} + oneTimeTearDown() { # cleaning up after test, if needed. true diff --git a/walrus/utilities/graphics/photo_management.txt b/walrus/utilities/graphics/photo_management.txt new file mode 100644 index 00000000..89aed4e4 --- /dev/null +++ b/walrus/utilities/graphics/photo_management.txt @@ -0,0 +1,10 @@ + + +on the off chance one is looking for photo stuff under graphics... + +shotwell is a great picture management tool for local folders. + +google gallery is also pretty okay, more for online (or on phone) management of your pics. + +coppermine gallery is an awesome photo management web tool for letting people see your pics. + diff --git a/walrus/utilities/metaverse/viewer_list.txt b/walrus/utilities/metaverse/viewer_list.txt new file mode 100644 index 00000000..209f493a --- /dev/null +++ b/walrus/utilities/metaverse/viewer_list.txt @@ -0,0 +1,15 @@ + + +best opensim and second life viewers in my opinion are these: + +kokua +http://wiki.kokuaviewer.org/wiki/Kokua/Downloads +favorite 3d viewer for a while. + +phoenix firestorm +http://www.firestormviewer.org/downloads/ +good standard 3d viewer. + +radegast +https://radegast.life/downloads/ +good simple viewer as a remote control, not great for 3d interactive. diff --git a/walrus/utilities/multimedia/multimedia_tools.txt b/walrus/utilities/multimedia/multimedia_tools.txt index 275bbde0..5b2c44ad 100644 --- a/walrus/utilities/multimedia/multimedia_tools.txt +++ b/walrus/utilities/multimedia/multimedia_tools.txt @@ -68,6 +68,14 @@ another useful tool for finding duplicate tracks in a music collection, but reli matches in the names(?). was not so powerful as dupeguru, but still useful. +----------------------------- +picture collection management +----------------------------- + +shotwell: +currently the top picture manipulation and manager tool i use at home. +the imaginations folder is based on the date management in shotwell. + diff --git a/walrus/utilities/os_tools/the_top_suite.txt b/walrus/utilities/os_tools/the_top_suite.txt new file mode 100644 index 00000000..2b11eb61 --- /dev/null +++ b/walrus/utilities/os_tools/the_top_suite.txt @@ -0,0 +1,10 @@ + + +top: shows processor and memory usage by processes. + +iftop: shows network interface usage by internet address. + +iotop: shows input/output activity by processes. + + +