Changes To Experiment: mmmv_silkexec: Deprecated Version 1
Not logged in

Changes to "Experiment: mmmv_silkexec: Deprecated Version 1" between 2017-03-19 19:49:00 and 2017-03-19 19:57:55

     1         -<p>fff</p>
            1  +<p><b><font color="#ff0000">Currently code for the mmmv_silkexec does not exist</font></b>,
            2  +but the development deliverables will be among versioned files, when it becomes
            3  +available.</p>
            4  +
            5  +<p><br>
            6  +</p>
            7  +
            8  +<p>Deprecated Versions of this Specification</p>
            9  +
           10  +<p></p>
           11  +<ul>
           12  +<li><a href="./wiki?name=Experiment:+mmmv_silkexec:+Deprecated+Version+1">Deprecated
           13  +Version 1</a></li>
           14  +</ul>
           15  +
           16  +<p></p>
           17  +
           18  +<p><br>
           19  +</p>
           20  +
           21  +<p>A <b>mmmv_silkexec application (hereafter: silkexapp) is wrapper to other
           22  +applications</b>, including other mmmv_silkexec applications. <b>The purpose of
           23  +the wrapping is to use extra tags and user specific configuration parameters</b>
           24  +for using the wrappable application.</p>
           25  +
           26  +<p>The mmmv_silkexec project consists of the following tools:</p>
           27  +
           28  +<p></p>
           29  +<ul>
           30  +<li>The mmmv_silkexec command line tool for executing silkexapps by
           31  +automatically prefixing the PATH with a silkexapp specific PATH value. Call
           32  +syntax: &nbsp;</li>
           33  +</ul>
           34  +
           35  +<blockquote>mmmv_silkexec &lt;full path of or a name on the PATH&gt; &lt;the
           36  +command line args of the silkexapp&gt;</blockquote>
           37  +
           38  +<div><br>
           39  +</div>
           40  +<ul>
           41  +<li>An application for maintaining the tags, for example, tester specific test
           42  +results.</li>
           43  +<li>An application for maintaining mmmv_silkexec local installation specific
           44  +global configuration and the collection of silkexapps.<br>
           45  +</li>
           46  +</ul>
           47  +
           48  +<p></p>
           49  +
           50  +<p>No technical solution is going to compensate for crappy work, because
           51  +technical tools can be switched off or the original authors of software may
           52  +leave edge cases out of consideration. The main ideas behind the mmmv_silkexec
           53  +are<b>&nbsp;</b>to <b>allow the execution of only those silkexapps that have
           54  +been tested and/or verified by trusted parties</b>, the
           55  +<a href="https://nixos.org/nix/">NixOS package manager</a> idea that each
           56  +application is executed in an environment, where <b>the LD_LIBRARY_PATH and the
           57  +PATH have silkexapp specific prefixes</b>, the reliance on operating system
           58  +services is&nbsp;<b>limited to the UNIX standard</b> to give the mmmv_silkexec
           59  +a chance to be ported to all operating systems that have the UNIX layer <i>(Linux,
           60  +BSD, GNU Hurd, Genode OS, Minix3),</i> the&nbsp;mmmv_silkexec must be fully <b>usable
           61  +without having any root access</b>.</p>
           62  +
           63  +<p><br>
           64  +</p>
           65  +
           66  +<p><br>
           67  +</p>
           68  +
           69  +<h1>Silkexapp Format</h1>
           70  +
           71  +<p>None of the silkexapp standard file and folder names contain any spaces,
           72  +tabulation characters, line breaks. All silkexapp configuration text files, the
           73  +ones at the silkexapp etc folder, are preprocessed by removing all spaces,
           74  +tabulation characters, <b>single-line-comments that start with either "#" or
           75  +"//"</b>. After the single-line-comments deletion preprocessing step all of the
           76  +linebreaks are deleted, except for the list_of_immediate_dependencies.txt.</p>
           77  +
           78  +<p><br>
           79  +</p>
           80  +<pre>&lt;relateive ID as folder name&gt;
           81  +</pre>
           82  +<pre>    |</pre>
           83  +<pre><pre>    +--bin  # is a symlink to ./build/bin . The symlink gets created by</pre><pre><pre>    |       # the mmmv_silkexec after the building of the silkexapp has succeeded. </pre><pre>    |       # The mmmv_silkexec deletes this symlink before the execution of the build_script.bash .</pre><pre>    |       # If the build_script.bash exited with an error, the mmmv_silkexec does not create this symlink.</pre></pre></pre>
           84  +<pre>    |</pre>
           85  +<pre>    +--doc  # is an optional symlink to ./build/doc . The symlink gets created by</pre>
           86  +<pre><pre>    |       # the mmmv_silkexec after the building of the silkexapp has succeeded. </pre><pre>    |       # The mmmv_silkexec deletes this symlink before the execution of the build_script.bash .</pre><pre>    |       # If the build_script.bash exited with an error, the mmmv_silkexec does not create this symlink.</pre></pre>
           87  +<pre>    |</pre>
           88  +<pre>    +-- etc # is an optional folder</pre>
           89  +<pre>    |    +--runtime_environment # is an optional folder</pre>
           90  +<pre>    |    |    |</pre>
           91  +<pre><pre>    |    |    +--overriding_values_of_environment_variable_values   # the existence of this folder is optional</pre><pre>    |    |    |    |  # All files in this folder are optional. File names without the ".txt" suffix</pre><pre>    |    |    |    |  # must match with the environment variable name. File names are case sensitive.</pre><pre>    |    |    |    |  </pre><pre>    |    |    |    +--LD_LIBRARY_PATH.txt</pre><pre>    |    |    |    +--PATH.txt</pre><pre>    |    |    |    +--CFLAGS.txt</pre><pre>    |    |    |    +--&lt;other environment variables&gt;</pre><pre>    |    |    |</pre></pre>
           92  +<pre>    |    |    +--prefixes_of_environment_variable_values   # the existence of this folder is optional</pre>
           93  +<pre><pre>    |    |         |  # All files in this folder are optional. File names without the ".txt" suffix</pre><pre>    |    |         |  # must match with the environment variable name. File names are case sensitive.</pre><pre>    |    |         |  </pre></pre>
           94  +<pre>    |    |         +--LD_LIBRARY_PATH.txt</pre>
           95  +<pre>    |    |         +--PATH.txt</pre>
           96  +<pre>    |    |         +--CFLAGS.txt</pre>
           97  +<pre>    |    |         +--&lt;other environment variables&gt;</pre>
           98  +<pre>    |    |</pre>
           99  +<pre>    |    +--buildtime_environment # is an optional folder.</pre>
          100  +<pre><pre>    |    |                        # The content of this folder has the same format</pre><pre>    |    |                        # as does the folder ./runtime_environment</pre></pre>
          101  +<pre><pre>    |    |</pre><pre><pre>    |    +--list_of_immediate_dependencies.txt # Optional. If exists, then </pre><pre>    |    |                                     # there is one <a href="http://www.softf1.com/cgi-bin/tree1/technology/flaws/silktorrent.bash/wiki?name=Algorithm+and+Implementation">Silktorrent packet</a> name per line.</pre><pre>    |    |                                     # All of the Silktorrent packets are required to </pre><pre>    |    |                                     # conform to the Silkexapp format.</pre><pre>    |    |                                     # The list includes build dependencies.</pre><pre>    |    |</pre></pre><pre>    |    +--list_of_aggregate_Silktorrent_packets.txt # Optional. If exists, then </pre><pre>    |                                                 # there is one <a href="./wiki?name=Algorithm+and+Implementation">Silktorrent packet</a> name per line.</pre><pre>    |                                                 # From the point of view of this mmmv_silkexec</pre><pre>    |                                                 # specification the content of those Silktorrent packets</pre><pre>    |                                                 # is not determined.</pre><pre>    |</pre><pre>    +--src # After unpacking it is recursively set to file permissions 04AB, </pre><pre>    |    | # where A,B inSet{4,0} and each of them, the A and the B, is </pre><pre>    |    | # determined by mmmv_silkexec settings, which are manipulated by </pre><pre>    |    | # mmmv_silkexec sys-commands. Everything in the this folder, the src,</pre><pre>    |    | # is automatically copied to the build folder before building. </pre><pre>    |    |</pre><pre>    |    +--silkexapp_control</pre><pre>    |    |    |</pre><pre>    |    |    +--build_script.bash # is executed as a copy in the subfolder of the build folder. </pre><pre>    |    |    |                    # Building always includes bootstrapping. If the build fails,</pre><pre>    |    |    |                    # then the build_script.bash must exit with a non-0 error code.</pre><pre>    |    |    |</pre><pre><pre>    |    |    +--run_all_tests_and_exit_with_0_if_all_tests_pass_t1.bash # should describe failures at stdout or stderr</pre><pre>    |    |    |</pre><pre>    |    |    +--si_storage_space_size_in_bytes_without_including_dependencies.bash # Prints a number to console.</pre><pre>    |    |    |                                                                     # The printout may include </pre><pre>    |    |    |                                                                     # a line break.</pre><pre>    |    |    |</pre><pre><pre>    |    |    +--si_recursive_storage_space_size_of_all_immediate_dependencies_in_bytes.bash </pre><pre>    |    |    |                                                                     # Prints a number to console.</pre><pre>    |    |    |                                                                     # The printout may include </pre><pre>    |    |    |                                                                     # a line break.</pre><pre>    |    |    |</pre><pre>    |    |    +--s_silkexapp_core_version.bash # Prints a string to console. To facilitate </pre><pre>    |    |    |                                # the use of signatures, the string is allowed to  </pre><pre>    |    |    |                                # include line breaks, spaces, tabulation characters.</pre><pre>    |    |    |                                # </pre><pre>    |    |    |                                # The idea is that different silkexapps can use the same  </pre><pre>    |    |    |                                # version of an application source, but the application source </pre><pre>    |    |    |                                # can be built by using different build parameters. </pre><pre>    |    |    |                                # Different silkexapps that build the application by </pre><pre>    |    |    |                                # using the same build parameters, can have 
          102  +</pre><pre>    |    |    |                                # different silkexapp scripts and different developers.</pre><pre>    |    |    |</pre><pre>    |    |    +--sb_is_ready_4_silkexapp_package_format_tests.bash # Prints a string from the set {"t","f"}, </pre><pre>    |    |    |                                                    # where "t" stands for "true" </pre><pre>    |    |    |                                                    # and "f" stands for "false".</pre><pre>    |    |    |                                                    # The string does not end with a line break.</pre><pre>    |    |    |                                                    # 
          103  +</pre><pre>    |    |    |                                                    # The "f" indicates that not all 
          104  +</pre><pre>    |    |    |                                                    # silkexapp format specific scripts and </pre><pre>    |    |    |                                                    # folders are present or ready to be used.</pre><pre>    |    |    |                                                    # The "t" indicates that the current </pre><pre>    |    |    |                                                    # specification is expected to be met</pre><pre>    |    |    |                                                    # to the extent that the silkexapp scripts</pre><pre>    |    |    |                                                    # can be tested. The output value can be
          105  +</pre><pre>    |    |    |                                                    # calculated during runtime, dynamically. </pre><pre>    |    |    |                                                    # For example, the script may study the </pre><pre>    |    |    |                                                    # value of environment variables and the presence</pre><pre>    |    |    |                                                    # and content of files.</pre><pre>    |    |    |                                                    # </pre><pre>    |    |    |                                                    # An optional command line parameter, </pre><pre>    |    |    |                                                    # "explanation", without the quotes, </pre><pre>    |    |    |                                                    # is expected to change the output mode </pre><pre>    |    |    |                                                    # from the "t" and "f" to a freestyle </pre><pre>    |    |    |                                                    # text that explains the circumstances </pre><pre>    |    |    |                                                    # that effect the choice between the </pre><pre>    |    |    |                                                    # "t" and "f". The freestyle text can</pre><pre>    |    |    |                                                    # contain line brakes, tabulation characters and </pre><pre>    |    |    |                                                    # spaces.</pre><pre>    |    |    |
          106  +</pre></pre><pre>    |    |    +--delete_cache_content_t1.bash # sets silkexapp state to as if it were installed the 1. time</pre><pre>    |    |                                    # If build succeeds and this file exists, then </pre><pre>    |    |                                    # it is automatically called by the mmmv_silkexec</pre><pre>    |    |                                    # after the build. It must be able to handle a case, </pre><pre>    |    |                                    # where there is no copy of the cache.</pre></pre><pre>    |    |</pre><pre>    |    +--upstream_deliverables # is a folder for unpatched, unmodified, originals</pre><pre>    |</pre><pre>    +--build  # is deleted by the mmmv_silkexec every time before the silkexapp is built .</pre></pre>
          107  +<pre><pre>         |    # The mmmv_silkexec sets its file permissions recursively </pre><pre>         |    # to 07AB before executing the build_script.bash. </pre><pre>         |    # The A and the B are the same as with the src folder.</pre><pre>         | </pre><pre>         +--bin # is the target of the silkexapp bin folder symlink. This folder </pre><pre>         |      # is created automatically before the build_script.bash is run.</pre><pre>         |</pre><pre>         +--doc # an optional folder that is meant to be created by the build_script.bash .</pre><pre>         |      # If this folder exists and the build_script.bash has </pre><pre>         |      # exited without any errors, id est with error code 0, </pre><pre>         |      # then mmmv_silkexec creates a symlink to this folder </pre><pre>         |      # from the silkexapp folder.</pre><pre>         |</pre><pre>         +--silkexapp_control  # copy of the folder from the src</pre><pre><br>
          108  +
          109  +
          110  +</pre>
          111  +</pre>
          112  +
          113  +<p>Silkexapps are installed/unpacked to</p>
          114  +<ul>
          115  +<li>~/.silktorrent/mmmv_silkexec/silkexapps/&lt;various folders that have their
          116  +name derived from silkexapp Silktorrent packet name&gt;/&lt;Silkexapp
          117  +Silktorrent packet name&gt;_dir</li>
          118  +</ul>
          119  +
          120  +<p>To make it possible to share silkexapps between different users of a same
          121  +system, packages are allowed to assume that they have write access only to&nbsp;</p>
          122  +
          123  +<p></p>
          124  +<ul>
          125  +<li>/tmp</li>
          126  +<li>~/.silktorrent/mmmv_silkexec/applications_write_area/&lt;`whoami`&gt;/&lt;relative
          127  +path from package collection root&gt;</li>
          128  +<li>&lt;list of folders that can be queried by "mmmv_silkexec sys_&lt;something&gt;,
          129  +for example: mmmv_silkexec sys_s_fp_ramdisk_1 &gt;</li>
          130  +</ul>
          131  +
          132  +<p></p>
          133  +
          134  +<p>The mmmv_silkexec preprocesses silkexapp names by removing a single instance
          135  +of the following prefixes:<b> "sys_", "usr_".</b> A silkexapp that is on PATH
          136  +and has a name of "sys_foo" should be executed as "mmmv_silkexec usr_sys_foo".
          137  +The<b> prefix "sys_" is reserved for mmmv_silkexec commands.</b> Preprocessing
          138  +is not applied, when the silkexapp executable is referred through a full path.
          139  +&nbsp;The mmmv_silkexec sets the values of silkexapp runtime and buildtime
          140  +enironment variables according to the following precedence:&nbsp;</p>
          141  +
          142  +<p></p>
          143  +<ol>
          144  +<li>If configuration exists, override the value of the environment variable.</li>
          145  +<li>Prefix the value from the step 1 with the value from the configuration
          146  +file.</li>
          147  +<li>Prefix the value from the step 2 with the full path of the silkexapp bin
          148  +folder.</li>
          149  +<li>&lt;Execute the executable from the silkexapp bin folder or
          150  +silkexapp_control folder.&gt;</li>
          151  +</ol>
          152  +
          153  +<p></p>
          154  +
          155  +<p><br>
          156  +</p>
          157  +
          158  +<p><br>
          159  +</p>
          160  +
          161  +<h1>Testing (Including Verification and Audits)</h1>
          162  +
          163  +<p>Silkexecapp is executed only, if all of its dependencies have been
          164  +recursively audited/tested by trusted parties. Different parties trust
          165  +different other parties. Trust is a multidimensional value. A very kindhearted
          166  +and not corrupt person can be totally untrustworthy from their capabilities
          167  +point of view. On the other hand, sometimes, at some narrow contexts, enemies
          168  +can be more trustworthy than friends. For example, enemies might have a good
          169  +track record of fine skills and being rigorous and they might use some
          170  +component, software package, at some security wise extremely critical role,
          171  +while being very rigorous at the construction of their software component.</p>
          172  +
          173  +<p>Given that
          174  +<a href="http://martin.softf1.com/g/yellow_soap_opera_blog/the-future-of-security-audits-episode-0">the
          175  +only proper way to verify/review code is to study it in a fully automated way</a><i>(<a href="https://archive.is/h3HJ4">archival
          176  +copy</a>)</i>, there has to be a way to subscribe to the testing/verification
          177  +system of the trusted parties. To avoid a Denial of Service attack by hacking
          178  +into the testing/verification systems of one of the trusted parties, the local
          179  +settings of the mmmv_silkexec should treat a test failure of a formerly
          180  +accepted component as a timed warning, where the warning state moves to a
          181  +blocked/failed state with a delay. The delay gives the trusted party time to
          182  +handle the hack.</p>
          183  +
          184  +<p><br>
          185  +</p>
          186  +
          187  +<p><br>
          188  +</p>
          189  +
          190  +<h1>Components to Study</h1>
          191  +
          192  +<p></p>
          193  +<ul>
          194  +<li><a href="https://firejail.wordpress.com/">Firejail</a> (<a href="https://github.com/netblue30/firejail">src</a>)
          195  +is a Linux specific component, but it might be a useful add-on on Linux.</li>
          196  +</ul>
          197  +
          198  +<p></p>
          199  +
          200  +<p><br>
          201  +</p>
          202  +
          203  +<p><br>
          204  +</p>
          205  +
          206  +<h1><a href="./wiki?name=Experiment:+mmmv_silkexec:+sub-specifications:">Experimental
          207  +Subspecifications</a></h1>
          208  +
          209  +<p><br>
          210  +</p>
          211  +
          212  +<h1><a href="./wiki?name=Experiment:+mmmv_silkexec:+References">References</a></h1>
          213  +
          214  +<p><br>
          215  +</p>