From: Chris Koeritz Date: Tue, 20 Feb 2018 15:58:01 +0000 (-0500) Subject: Merge branch 'release-2.140.109' X-Git-Tag: 2.140.109^0 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=e768391ab81b189397f0fd19827999365f8b3e33;hp=31dae48314150fc56b73ffbd21ae8a906b6221d8 Merge branch 'release-2.140.109' updates from dev branch for new release --- diff --git a/documentation/feisty_meow_command_reference.txt b/documentation/feisty_meow_command_reference.txt index e7f3382f..acb6aa26 100644 --- a/documentation/feisty_meow_command_reference.txt +++ b/documentation/feisty_meow_command_reference.txt @@ -41,17 +41,23 @@ generally useful commands deleted files in "$TMP/zz_safedel_keep" and writes a report of the deletion history in "$TMP/zz_safedel_report.txt". + note about safe deletion support: + currently there is no "empty the trash" function aside from running a + command such as: + $ \rm -rf $TMP/zz_safedel* + the backslash forces bash to run the "rm" tool from the path rather than + using the feisty meow alias. a trash flushing feature is planned for the + somewhat near future. + + regenerate: + runs the feisty meow reconfiguration process to adapt to a new version of + the scripts. this also updates the current shell's functions and aliases + to reflect any changes. + get_feisty: - update the feisty meow codebase from its origin and run the reconfigure + update the feisty meow codebase from its origin and run the regeneration script to update the current user's feisty meow configuration. -note: currently there is no "empty the trash" function aside from running a -command such as: - # \rm -rf $TMP/zz_safedel* -the backslash forces bash to run the "rm" tool from the path rather than -using the feisty meow alias. a trash flushing feature is planned for the -somewhat near future. - revision control commands ========================= diff --git a/infobase/fortunes.dat b/infobase/fortunes.dat index 674d6289..c1ee8956 100644 --- a/infobase/fortunes.dat +++ b/infobase/fortunes.dat @@ -43121,4 +43121,82 @@ arise.   -- Khenchen Thrangu, "Essential Practice: Lectures on Kamalashīla’s Stages of Meditation in the Middle Way School", published by Shambhala Publications +~ + When they related this to Buddha, he poured water into a little vessel and +asked, “Will this water remain without evaporating?” Because India is very +hot, the Hearers thought, “In a few days the water will evaporate. This +must mean that our virtue will not remain at all.” They were extremely +worried. Then Buddha asked, “If this water is poured in the ocean, how long +will it stay? It will remain until the ocean itself evaporates.” + Therefore, if you do not just leave this virtue, but dedicate it, making a +prayer petition that it become a cause of help and happiness for limitless +sentient beings, then until that actually occurs, the virtue will not be lost. +Like a small amount of water poured into the ocean, which will last until the +ocean itself dries up, so the fruit of your virtue will remain until it has +ripened. The benefit of hearing, thinking, and meditating, in terms of +causing all persons to possess happiness and the causes of happiness, is +inconceivable, but if it is not dedicated, then when anger arises, it will be +destroyed. This benefit cannot be seen with the eye, but it is inconceivable. +  -- Kensur Lekden, from "Meditations of a Tibetan Tantric Abbot: The Main + Practices of the Mahayana Buddhist Path", translated and edited by + Jeffrey Hopkins, published by Shambhala Publications +~ +Because you need to obtain the happy effects and the causes producing them, +and because it is necessary for yourself and others to attain them, you must +meditate. In this world there were nihilists who said that one should not +meditate, doing only those activities that will bring about marvelous +happiness, comfort, and prosperity in this lifetime. The nihilists said that +one should gather possessions and clothing, and if one’s body is sick, one +should take medicine, that these activities were justified, but that nothing +else was needed. Such a philosophy appeared in the world and with respect to +it there is this Buddhist teaching: You need a job for your livelihood, you +need to work for the sake of your country, for the sake of yourself and +others, to set up factories, to plant fields; still you should act mainly for +the sake of your future life, because you will not always remain in this +lifetime. All persons will definitely die, and the time of death is +indefinite. At the time of death, nothing helps except religious practice. +This is how it is. Therefore, even though you need happiness and comfort in +this life and even though it is necessary to strive for the sake of food and +drink now, this lifetime is short. Our longest condition of life is our +countless future lives. If you consider only this which you can see now and +you do not consider all the future lives which you cannot see, you will incur +immeasurable fault. You will harm yourself. +  -- Kensur Lekden, from "Meditations of a Tibetan Tantric Abbot: The Main + Practices of the Mahayana Buddhist Path", translated and edited by + Jeffrey Hopkins, published by Shambhala Publications +~ +The ground of primal wisdom +Where the truth beyond all concepts is beheld +Is reached more easily by humans than by gods. +The essence also of the deep path of the Vajrayāna +Is more easily attained by those who find a human form. +The basis of the Dharma of both great and lesser vehicles +Is said to be supremely noble-- +This human state endowed with freedoms and advantages. + +Just like a beggar who has chanced upon a treasure of great price, +Reflect with joy upon your freedoms and advantages. +In doubt and apprehension that you might be dreaming, +Implement the sacred Dharma-- +Source of happiness and benefit in this and future lives! + -- Longchenpa, from "Finding Rest in the Nature of the Mind", published + by Shambhala Publications +~ +This lifetime passes like the weeping clouds +Where dance the lightning garlands of the Lord of Death, +And from them, day and night, there falls +An endless rain to bathe the shoots +That grow in the three levels of existence. + +The world and its inhabitants will pass. +The universe is formed and then destroyed +By seven fires, a flood, and then the scattering wind. +The all-encircling sea, the continents, +And even mighty Sumeru compounded of four jewels, +All girded by the rings of lesser peaks--all this will pass. +The time will come when all will have dissolved +Into a single space. +Remember this and practice Dharma from your heart. + -- Longchenpa, from "Finding Rest in the Nature of the Mind", published + by Shambhala Publications diff --git a/production/feisty_meow_config.ini b/production/feisty_meow_config.ini index 77e2091f..8cdddd87 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=108 +revision=109 build=420 # specifies the remainder of the version record info. diff --git a/production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html b/production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html index 81ba2ece..71db45c8 100644 --- a/production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html +++ b/production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html @@ -1,7 +1,7 @@ - + Cake LAMP VM Documentation @@ -11,7 +11,7 @@ Koeritz
feisty meow® concerns ltd.

Vintage: cakelampvm v002    - Updated: 2018-1-7 (rev. i)

+ Updated: 2018-2-7 (rev. j)

The cakelampvm project provides a Virtualbox VM that acts as an "internet in a bottle", serving up your web sites securely and only to your local host.  The virtual machine provides DNS services (gnome display manager

  • Main VM User: developer (password distributed separately)
  • -
  • Database Access: mysql root account, password: (password distributed - separately)
  • +
  • Database Access: mysql root account (password distributed separately)
  • How to set up virtualbox for your host PC

      @@ -134,6 +133,8 @@ nat net config

    Starting up the VM and Connecting to It

    +

    ★ This section requires that the VM is already configured properly for + Host-Only and NAT networks.

    Using the Virtualbox interface, you should now be able to start your virtual machine.  Virtualbox will complain if it detects any remaining configuration problems in the VM.  The Linux boot sequence @@ -153,15 +154,35 @@ with:

    ssh developer@10.28.42.20
    # or perform the equivalent connection with your ssh client.

    And then provide the password to log in.

    -

    Once the DNS services are set up (discussed in detail below), you will be - able to run the much friendlier command:

    +

    + +

    +

    + + ★ It is very important that the ssh connection is working properly before + proceeding to other configuration steps.  If ssh is not working, try + pinging the host:

    +
    ping 10.28.42.20
    +

    If the ping is also failing, then please re-check the two network + configuration sections above (for Host-Only networking and NAT + networking).  These are both required for the VM's network to + function as designed.

    +

    Optional: Once the DNS services are set up (discussed in detail below), + you will be able to run the much friendlier command:

    ssh developer@cakelampvm.com

    Key Forwarding to the VM

    It is important to set up ssh key forwarding to enable your use of git repositories while logged into the VM.  Key forwarding should be enabled for the VM's two fake host identities:

    cakelampvm.com
    10.28.42.20
    +

    The details of configuring ssh key forwarding vary for each ssh + client.  For Linux ssh, the ~/.ssh/config file might contain + this information:

    +
    Host cakelampvm.com 10.28.42.20
      ForwardAgent yes
    +

    Updating cakelampvm to the Latest Model

    +

    ★ This section requires that the VM is already configured and is + accessible via ssh.

    The cakelampvm v002 is released with the intention that it not need to be released again.  Version 001 was not built with that explicit intention, which then required the release of Version 002.  But we @@ -169,12 +190,13 @@

    There is an update feature built into the VM that is quite easy to use.  The updates are driven by the feisty meow script repository in conjunction with a local scripted command.  To activate the "update - process" for your VM, run the following commands on the VM:

    -
    # update to the latest version of feisty meow.
    rpuffer $FEISTY_MEOW_APEX; reconfigure_feisty_meow
    # enact any configuration changes needed, such as permissions and account setup. + process" for your VM, run the following commands on the VM, logged in as + the developer user:

    +
    # update to the latest version of feisty meow.
    rpuffer $FEISTY_MEOW_APEX; regenerate
    # enact any configuration changes needed, such as permissions and account setup. revamp_cakelampvm

    These two commands can be run at any time to patch up your VM to the - latest.

    + latest configuration.

    Recent versions of feisty meow support a new "get_feisty" command, which will behave the same as the first line above.  Once you have run the "puffer..." command above for the first time (on @@ -189,7 +211,9 @@ revamp_cakelampvm

    gone astray, especially for problems with permissions.

    First Tasks as the Developer User

    -

    Here are some first steps that will make the vm your own:

    +

    ★ This section requires that the VM is already configured and is + accessible via ssh.

    +

    Here are some first steps that will make the vm your own.

    1. Change your password for the developer account.  (This may eventually be required and automatic.)  First, log into the VM with @@ -240,6 +264,8 @@ meow

      (The feisty meow codebase is already configured for the developer account on the cakelampvm virtual machine.)

      Using the guest VM's DNS services

      +

      ★ This section requires that the VM is already configured and is + accessible via ssh.

      The cakelampvm has been set up to provide a DNS server which will answer name lookup requests on any of the sites that the cakelampvm is hosting for you.  It will also serve as a general DNS server for any other @@ -397,6 +423,114 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com describes how to set up Cygwin to run X server, which enables X11 forwarding to your local display.

      ...{insert that info}...

      +

      Handy Techniques for Using cakelampvm

      +

      Assorted Guides and Cheat-Sheets

      +

      A Cheat sheet for the Vim editor (there are many of these available): https://vim.rtorr.com/

      +

      A git branching model that seems to work well: http://nvie.com/posts/a-successful-git-branching-model/

      +

      This is a basic guide to the Google Developer Console and API Key + management: Google + API Docs 

      +

      Using the "meld" Tool to Compare Files & Directories

      +

      Meld is a great comparison tool that displays differences between two + files or directories or directory trees in a graphical view.  Meld is + pre-installed on the VM.  This tool can be launched either in the + VM's X Windowing System (on the console) or if X11 forwarding is enabled.

      +

      To run meld, just type this command:

      +
      meld A B
      +

      where A and B are either both file names or they are both directory + names.  If A and B are directories, meld will compare the entire tree + structure between the two directories.  It allows one to copy from + one side to the other, even if the item that needs to be copied is an + entire subdirectory.

      +

      Get the network address on the guest vm

      +

      Run this command:

      +
      ifconfig
      +

      In the results, look for "inet addr".  + There may be more than one, if there are multiple network interfaces.

      +

      The standard IP address is 10.28.42.20 for the cakelampvm.

      +

      How to cleanly reboot or shut down the guest VM

      +

      When you've got the DNS and everything integrated, these commands will + manage the vm's state:

      +

      First, log into the guest VM:

      +
      ssh developer@cakelampvm.com
      +

      Then, to reboot the guest VM:

      +
      sudo reboot
      +

      Or, to halt the guest VM:

      +
      sudo shutdown -h now
      +

      Using these commands is kinder to the VM than just cycling the power from + the Virtualbox control panel.

      +

      Gritty Details of the Nitty Variety

      +

      This is the lowest level of plumbing for your VM.  Hopefully you + will not need to engage with this section.  The most useful doc + section here is the one below about the "Virtualbox guest additions", + which you will probably need at some future point.  Oracle releases + updates to the guest additions fairly regularly.

      +

      Configuring the guest VM

      +

      The guest VM should already be set up appropriately.  These steps + are provided for reference and updates.

      +

      Set up Virtualbox guest additions for the VM

      + This procedure is needed if the guest provides an older or incompatible + version of the guest additions (which have already been installed on the + guest vm).  It may also be necessary when a new version of the guest + additions becomes available. +
        +
      1. To install the guest additions, open the guest VM and have its window + in focus.
      2. +
      3. Choose the "Devices" menu and select "Insert Guest Additions CD + Image".  This will mount the CD's ISO image on the VM.
      4. +
      5. On the guest VM, it may be necessary to mount the CD image that's now + available:
        +
        sudo mount /dev/sr0 /media/cdrom
        +

        Linux will mention that the device is mounted "read-only".

        +
      6. +
      7. Since the VM currently has no windowing system installed, one must + start the Guest Additions install manually:
        +
        cd /media/cdrom
        sudo sh VBoxLinuxAdditions.run
        +
      8. +
      9. The latest Virtualbox guest additions should now be installed.
      10. +
      +

      Set up network adapters on guest VM

      +

      The network interfaces should already be configured on the guest within + the Virtualbox configuration.  This is available by clicking on the + VM in the Virtualbox manager and selecting "Settings".  These are the + configuration settings used:

      + Adapter 1:
      +   Attached to: Host-only Adapter
      +   Name: vboxnet0 
      +

      Adapter 2:
      +   Attached to: Nat Network
      +   Name: NatNetwork

      +

      On the guest VM itself, the network settings are specified in a file + called /etc/network/interfaces.  Here are the current contents of + that file:

      +
      source /etc/network/interfaces.d/*

      auto lo
      iface lo inet loopback

      auto enp0s3
      iface enp0s3 inet static
        address 10.28.42.20
        netmask 255.255.255.0
        network 10.28.42.0
        broadcast 10.28.42.255
        dns-domain cakelampvm.com
        dns-search cakelampvm.com
        dns-nameservers 127.0.0.1 8.8.8.8
      +
      auto enp0s8
      +
      iface enp0s8 inet dhcp
      +

      +

      Compacting the VM Disk Image

      +

      To minimize the size used for the disk image, there are three major + steps.

      +

      1. While running the VM, run this command:

      +
      sudo apt clean
      +

      This throws away any cached data from the apt tool, which can be + substantial.

      +

      If there are other junk files you know of that can be removed, delete + those now also.

      +

      2. Reboot the VM to the gparted ISO image (available at the gparted + site) and run the following command:

      +
      sudo zerofree /dev/sda
      +

      This sets all free space to the zero byte, enabling Virtualbox to free + that space in the next step.

      +

      3. Shut the vm down after zerofree is complete and run this command on + the host PC (this is the Linux version of the command):

      +
      VBoxManage modifyhd --compact ~/cake_lamp_vm/cake-lamp-vm-hd.vdi
      +

      Replace the ~/cake_lamp_vm + path with the real VM storage path.  This command compacts the root + (and only) partition of the VM.

      +

      After these steps are complete, the VM should be its minimal size.

      Adding a new website and domain on the guest VM

      Note: these instructions, even the quick approaches below, pale in comparison to the ease of use of the "standup" command in feisty meow's @@ -515,114 +649,6 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com for any error messages that can be corrected.  The log files are stored in "/var/log/apache2" and are named after the website (if configured through the above process).

      -

      Handy Techniques for Using cakelampvm

      -

      Assorted Guides and Cheat-Sheets

      -

      A Cheat sheet for the Vim editor (there are many of these available): https://vim.rtorr.com/

      -

      A git branching model that seems to work well: http://nvie.com/posts/a-successful-git-branching-model/

      -

      This is a basic guide to the Google Developer Console and API Key - management: Google - API Docs 

      -

      Using the "meld" Tool to Compare Files & Directories

      -

      Meld is a great comparison tool that displays differences between two - files or directories or directory trees in a graphical view.  Meld is - pre-installed on the VM.  This tool can be launched either in the - VM's X Windowing System (on the console) or if X11 forwarding is enabled.

      -

      To run meld, just type this command:

      -
      meld A B
      -

      where A and B are either both file names or they are both directory - names.  If A and B are directories, meld will compare the entire tree - structure between the two directories.  It allows one to copy from - one side to the other, even if the item that needs to be copied is an - entire subdirectory.

      -

      Get the network address on the guest vm

      -

      Run this command:

      -
      ifconfig
      -

      In the results, look for "inet addr".  - There may be more than one, if there are multiple network interfaces.

      -

      The standard IP address is 10.28.42.20 for the cakelampvm.

      -

      How to cleanly reboot or shut down the guest VM

      -

      When you've got the DNS and everything integrated, these commands will - manage the vm's state:

      -

      First, log into the guest VM:

      -
      ssh developer@cakelampvm.com
      -

      Then, to reboot the guest VM:

      -
      sudo reboot
      -

      Or, to halt the guest VM:

      -
      sudo shutdown -h now
      -

      Using these commands is kinder to the VM than just cycling the power from - the Virtualbox control panel.

      -

      Gritty Details of the Nitty Variety

      -

      This is the lowest level of plumbing for your VM.  Hopefully you - will not need to engage with this section.  The most useful doc - section here is the one below about the "Virtualbox guest additions", - which you will probably need at some future point.  Oracle releases - updates to the guest additions fairly regularly.

      -

      Configuring the guest VM

      -

      The guest VM should already be set up appropriately.  These steps - are provided for reference and updates.

      -

      Set up Virtualbox guest additions for the VM

      - This procedure is needed if the guest provides an older or incompatible - version of the guest additions (which have already been installed on the - guest vm).  It may also be necessary when a new version of the guest - additions becomes available. -
        -
      1. To install the guest additions, open the guest VM and have its window - in focus.
      2. -
      3. Choose the "Devices" menu and select "Insert Guest Additions CD - Image".  This will mount the CD's ISO image on the VM.
      4. -
      5. On the guest VM, it may be necessary to mount the CD image that's now - available:
        -
        sudo mount /dev/sr0 /media/cdrom
        -

        Linux will mention that the device is mounted "read-only".

        -
      6. -
      7. Since the VM currently has no windowing system installed, one must - start the Guest Additions install manually:
        -
        cd /media/cdrom
        sudo sh VBoxLinuxAdditions.run
        -
      8. -
      9. The latest Virtualbox guest additions should now be installed.
      10. -
      -

      Set up network adapters on guest VM

      -

      The network interfaces should already be configured on the guest within - the Virtualbox configuration.  This is available by clicking on the - VM in the Virtualbox manager and selecting "Settings".  These are the - configuration settings used:

      - Adapter 1:
      -   Attached to: Host-only Adapter
      -   Name: vboxnet0 
      -

      Adapter 2:
      -   Attached to: Nat Network
      -   Name: NatNetwork

      -

      On the guest VM itself, the network settings are specified in a file - called /etc/network/interfaces.  Here are the current contents of - that file:

      -
      source /etc/network/interfaces.d/*

      auto lo
      iface lo inet loopback

      auto enp0s3
      iface enp0s3 inet static
        address 10.28.42.20
        netmask 255.255.255.0
        network 10.28.42.0
        broadcast 10.28.42.255
        dns-domain cakelampvm.com
        dns-search cakelampvm.com
        dns-nameservers 127.0.0.1 8.8.8.8
      -
      auto enp0s8
      -
      iface enp0s8 inet dhcp
      -

      -

      Compacting the VM Disk Image

      -

      To minimize the size used for the disk image, there are three major - steps.

      -

      1. While running the VM, run this command:

      -
      sudo apt clean
      -

      This throws away any cached data from the apt tool, which can be - substantial.

      -

      If there are other junk files you know of that can be removed, delete - those now also.

      -

      2. Reboot the VM to the gparted ISO image (available at the gparted - site) and run the following command:

      -
      sudo zerofree /dev/sda
      -

      This sets all free space to the zero byte, enabling Virtualbox to free - that space in the next step.

      -

      3. Shut the vm down after zerofree is complete and run this command on - the host PC (this is the Linux version of the command):

      -
      VBoxManage modifyhd --compact ~/cake_lamp_vm/cake-lamp-vm-hd.vdi
      -

      Replace the ~/cake_lamp_vm - path with the real VM storage path.  This command compacts the root - (and only) partition of the VM.

      -

      After these steps are complete, the VM should be its minimal size.

      Notes on building the Cake Lamp VM

      This is all work that should already have been done.  It is mentioned here just as breadcrumbs for a future vm builder.

      diff --git a/readme.txt b/readme.txt index aaa8283b..b042ed8c 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,8 @@ 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 are prefixed with "$". +(Do not include the dollar sign when copying and pasting commands.) Information that varies by platform is prefixed with a '|' character. This documentation assumes that the code is stored in the default location: @@ -19,20 +20,19 @@ How to get the feisty meow codebase | https://feistymeow.org/feisty_meow/documentation/cygwin_install_list.txt (web) Retrieve a clone of the feisty meow codebase: -# git clone git://feistymeow.org/feisty_meow +$ git clone git://feistymeow.org/feisty_meow ============== How to load the feisty meow script environment Set up the feisty_meow scripts; this is only needed once, when you first get -the codebase. It will also regenerate the scripts using the latest installed -version. -# bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh +the codebase. +$ bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh Connect the feisty meow scripts to your login script (in ~/.bashrc). Note that this actually modifies ~/.bashrc. This step is only needed once. -# bash /opt/feistymeow.org/feisty_meow/scripts/core/connect_feisty_meow.sh +$ bash /opt/feistymeow.org/feisty_meow/scripts/core/connect_feisty_meow.sh | For the root user, you can pass a flag '--root' to the connect_feisty_meow | script. This will add an alias for 'feistyme' which loads the feisty meow @@ -42,13 +42,13 @@ Load the script environment into the current shell. This can be done for any new shell. This is idempotent, so it does no harm to run it again. Note that you should not need this step if you connected feisty meow to ~/.bashrc above. -# source /opt/feistymeow.org/feisty_meow/scripts/core/launch_feisty_meow.sh +$ source /opt/feistymeow.org/feisty_meow/scripts/core/launch_feisty_meow.sh When the feisty meow script environment loaded, many new aliases and functions are available for use. These come from the $FEISTY_MEOW_SCRIPTS folder. -See the full list of commands at: -(hmmm: To be completed in 2018) +There is a list of feisty meow script commands available at: +https://feistymeow.org/feisty_meow/documentation/feisty_meow_command_reference.txt ============== @@ -59,13 +59,25 @@ differ utility and the feisty meow customization system). They can be installed with either apt-get or CPAN. Install using apt-get (on Ubuntu or Debian-based OS): -# sudo apt-get install libfile-which-perl libtext-diff-perl +$ sudo apt-get install libfile-which-perl libtext-diff-perl or Install using perl's CPAN: -# sudo cpan install Text::Diff File::Which +$ sudo cpan install Text::Diff File::Which or on Cygwin (MS-Windows), install with apt-cyg: -# apt-cyg install perl-File-Which perl-Text-Diff +$ apt-cyg install perl-File-Which perl-Text-Diff + +============== + +How to update the feisty meow codebase to the latest online version + +This assumes that a somewhat current version of feisty meow is already +installed and the scripts are loaded (see above section for how to load). + +The command below retrieves the latest version of feisty meow codebase +from the online repository and regenerates the scripts. + +$ rpuffer $FEISTY_MEOW_APEX ; regenerate ============== @@ -75,10 +87,10 @@ These dependencies are used for building the applications, tools and tests in the "nucleus", "octopi", "graphiq" and other C++ collections. | Ubuntu / Debian: -| # sudo apt-get install build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev +| $ sudo apt-get install build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev | Centos / Redhat / Fedora: -| # sudo yum install gcc gcc-c++ openssl-devel.x86_64 curl-devel +| $ sudo yum install gcc gcc-c++ openssl-devel.x86_64 curl-devel The "kona" collection depends on Java version 8 or better. @@ -91,7 +103,7 @@ The "kona" collection depends on Java version 8 or better. How to build the feisty meow codebase Run the following command to build the feisty meow libraries and applications. -# produce_feisty_meow +$ produce_feisty_meow After the build is complete, the feisty meow applications can be found in the folder pointed at by the $FEISTY_MEOW_BINARIES environment variable. @@ -101,7 +113,7 @@ the folder pointed at by the $FEISTY_MEOW_BINARIES environment variable. How to clean up the files generated by the build This command cleans out all the generated files: -# whack_build clean +$ whack_build clean ============== diff --git a/scripts/core/common.alias b/scripts/core/common.alias index 9eda7788..ea906108 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -55,7 +55,7 @@ fi # re-use work we did on 'exp' macro for the longer windows command. define_yeti_alias explorer=exp define_yeti_alias fix_ssh_perms='chmod 700 $HOME/.ssh ; chmod 600 $HOME/.ssh/*' -define_yeti_alias get_feisty='rpuffer $FEISTY_MEOW_APEX; reconfigure_feisty_meow' +define_yeti_alias get_feisty='rpuffer $FEISTY_MEOW_APEX; regenerate' define_yeti_alias halt='sudo shutdown -h now' define_yeti_alias i=inventory define_yeti_alias l='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl' @@ -146,8 +146,3 @@ unalias fredme feistyme &>/dev/null ############## -# set the sentinel alias that says this file was handled. -#alias CORE_ALIASES_LOADED=true - -############## - diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index dc01d786..4ace5d80 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -452,6 +452,7 @@ if [ -z "$skip_all" ]; then unalias CORE_ALIASES_LOADED &>/dev/null unset -f function_sentinel # reload feisty meow environment in current shell. + echo "reloading the feisty meow scripts." source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" # run nechung oracle to give user a new fortune. nechung diff --git a/scripts/core/reconfigure_feisty_meow.sh b/scripts/core/reconfigure_feisty_meow.sh index 2224c716..cf1e1b0f 100644 --- a/scripts/core/reconfigure_feisty_meow.sh +++ b/scripts/core/reconfigure_feisty_meow.sh @@ -81,3 +81,4 @@ if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo ============== fi + diff --git a/scripts/customize/fred/scripts/games/fallout_new_vegas_link_fixer.sh b/scripts/customize/fred/scripts/games/fallout_new_vegas_link_fixer.sh new file mode 100644 index 00000000..a9a8ed82 --- /dev/null +++ b/scripts/customize/fred/scripts/games/fallout_new_vegas_link_fixer.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# sets up links to make fallout new vegas work properly under wine. +# some mods will look for paths that are incorrectly case sensitive, and this +# script just sets up all those links that we believe are required. + +source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" + +if [ ! -d Data ]; then + echo ' +This script needs to run from the "Fallout New Vegas" install directory, +which is usually found under "steam/steamapps/common". +' + exit 1 +fi + +function make_local_dir_link() +{ + dir="$1"; shift + name="$1"; shift + new_name="$1"; shift + pushd "$dir" &>/dev/null + if [ -L "$new_name" ]; then + echo "Skipping creation of existing link $dir/$new_name" + popd &>/dev/null + return + fi + if [ ! -d "$name" ]; then + echo "Skipping creation of link $dir/$new_name due to missing directory $dir/$name" + popd &>/dev/null + return + fi + ln -s "$name" "$new_name" + test_or_die "creating link for $dir/$new_name from $dir/$name" + echo "Created link $dir/$new_name from $dir/$name" + popd &>/dev/null +} + +make_local_dir_link Data Sound sound +make_local_dir_link Data Textures textures +make_local_dir_link Data Meshes meshes +make_local_dir_link Data/Meshes Landscape landscape +make_local_dir_link Data/Meshes Weapons weapons +make_local_dir_link Data/Sound Voice voice +make_local_dir_link Data/Textures Landscape landscape +make_local_dir_link Data/Textures Landscape weapons +make_local_dir_link Data/Textures Landscape clutter + diff --git a/scripts/opensim/opensim_utils.sh b/scripts/opensim/opensim_utils.sh index 431c85a6..130e9cdd 100644 --- a/scripts/opensim/opensim_utils.sh +++ b/scripts/opensim/opensim_utils.sh @@ -41,7 +41,8 @@ local boguslog=$HOME/screen_junk_$(date_stringer).log #maybe they unbroke it in 17.10? yes, but it requires NO space now. *&@#*&@# #hmmm: bring back old version but check for ubuntu 17.04 vs 17.10 now. #actually they made it a new parm. arghhh! - screen -L $boguslog -S "$screen_name" -d -m nice -n $NICENESS_LEVEL mono "$app_name" + screen -L -S "$screen_name" -d -m nice -n $NICENESS_LEVEL mono "$app_name" +#$boguslog echo "$(date_stringer ' '): $screen_name started." # only sleep if we are not at the last process that gets started. diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 0c8cec27..b96bcb34 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -411,7 +411,7 @@ function do_careful_git_update() remote_branch_info=$(git ls-remote --heads origin $bran 2>/dev/null) if [ ! -z "$remote_branch_info" ]; then # we are pretty sure the remote branch does exist. - git pull $PULL_ADDITION origin "$bran" | $TO_SPLITTER + git pull --tags $PULL_ADDITION origin "$bran" | $TO_SPLITTER # we may want to choose to do fast forward, to avoid crazy multiple merge histories # without any changes in them. --no-ff promote_pipe_return 0 @@ -425,7 +425,7 @@ function do_careful_git_update() # now pull down any changes in our own origin in the repo, to stay in synch # with any changes from others. - git pull $PULL_ADDITION --all | $TO_SPLITTER + git pull --tags $PULL_ADDITION --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? # --no-ff @@ -467,7 +467,7 @@ function do_update() elif [ -d ".git" ]; then if test_writeable ".git"; then $blatt - git pull $PULL_ADDITION 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER + git pull --tags $PULL_ADDITION 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER #ordinary pulls should be allowed to do fast forward: --no-ff promote_pipe_return 0 test_or_die "git pull of origin" diff --git a/scripts/security/password_functions.sh b/scripts/security/password_functions.sh new file mode 100644 index 00000000..f1e0df13 --- /dev/null +++ b/scripts/security/password_functions.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +# a set of useful functions for managing operations with passwords. +# a set of very simple operations, but the file needs to be protected from +# undesirable access. a good way to do that is to make the file owned by +# root, and for it to have permssions of "600" (full access by owner only), +# and to only try to read the password file when in sudo mode. the first +# two requirements are done automatically by the store_password function. + +# load_password: +# provides a way to read a password out of a file. the filename is the first +# paramater and the variable to fill with the password is the second. +function load_password() +{ + local passfile="$1"; shift + local varname="$1"; shift + if [ -z "$passfile" ]; then + echo 'The load_password function needs a filename to read the password from.' + return 1 + fi + if [ ! -f "$passfile" ]; then + # no file, which is not an error necessarily, but return a blank password + # in any case. + return 0 + fi + local passwd + read passwd < "$passfile" + + # return the password in the variable they provided. + eval $varname="$passwd" +} + +# stores a password into a password file. the password file should be the +# first parameter and the password should be the second. +# this makes sure that only root can read the file. +function store_password() +{ + local passfile="$1"; shift + local passwd="$1"; shift + if [ -z "$passfile" -o -z "$passwd" ]; then + echo ' +The store_password function needs (1) the file to store the password into, +and (2) the password that should be stored. +' + return 1 + fi + + echo "$passwd" > "$passfile" + test_or_die "writing password into the file $passfile" + + chown root:root "$passfile" + test_or_die "chowning the password file to root ownership for: $passfile" + + chmod 600 "$passfile" + test_or_die "restricting permissions on password file for: $passfile" +} + +# reads a password from the console, without echoing the letters when they +# are typed. the prompt to show the user is required as the first parameter, +# and the variable to fill with the result is the second parameter. +function read_password() +{ + local prompt="$1"; shift + local varname="$1"; shift +#hmmm: complain if not enough parms. + echo -n "$prompt " + # turn off echo but remember former setting. + stty_orig=`stty -g` + stty -echo + local the_passwd + read the_passwd + # turn echo back on. + stty $stty_orig + # return the password in the variable they provided. + eval $varname="$the_passwd" +} + + diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index 180574eb..2b021416 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -16,21 +16,22 @@ export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )" export NO_HELLO=right source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh" +# load dependencies for our script. source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh" +source "$FEISTY_MEOW_SCRIPTS/security/password_functions.sh" ############## -# new requirement is to get the sql root password, since we need to do some sql db configuration. -echo -n "Please enter the MySQL root account password: " -# turn off echo but remember former setting. -stty_orig=`stty -g` -stty -echo -read mysql_passwd -# turn echo back on. -stty $stty_orig +# it's a requirement to have sql root password, since we may need some sql db configuration. +load_password /etc/mysql/secret_password mysql_passwd +if [ -z "$mysql_passwd" ]; then + read_password "Please enter the MySQL root account password:" mysql_passwd +fi if [ -z "$mysql_passwd" ]; then echo "This script must have the sql root password to proceed." exit 1 +else + store_password /etc/mysql/secret_password "$mysql_passwd" fi ############## @@ -39,8 +40,8 @@ sep echo "Regenerating feisty meow loading dock." -reconfigure_feisty_meow -test_or_die "feisty meow reconfiguration" +regenerate +test_or_die "regenerating feisty meow configuration" chown -R "$(logname)":"$(logname)" /home/$(logname)/.[a-zA-Z0-9]* test_or_die "fix after reconfigured as sudo" @@ -323,17 +324,9 @@ fi sep -# repair the google config key for mapsdemo, which lives over in fred's account. -search_replace \ - "^[[:blank:]]*'key'[[:blank:]]*=>[[:blank:]]*'AIzaSyCd2kfOBf8tyd-_m2aM_ayMoAq8r_M1yUk'," \ - "\t'key' => 'AIzaSyCvKs62XudEWPZpA21rCGI1Dkh6UxSQzzQ'," \ - ~fred/apps/mapsdemo/avenger5/config/config_google.php - -if [ $? -ne 0 ]; then - echo Google config key for mapsdemo in fred account seems to already be patched. -else - echo Patched the google config key for mapsdemo app in fred account. -fi +echo Adding site avenger packages to composer. +# add in site avenger dependencies so we can build avcore properly. +composer config -g repositories.siteavenger composer https://packages.siteavenger.com/ ############## ############## @@ -352,7 +345,7 @@ echo " Thanks for revamping your cakelampvm. :-) You may want to update your current shell's feisty meow environment by typing: - reconfigure_feisty_meow + regenerate " ##############