TheySaySomethingInterrestingApparently: Fnct.D, continue to Evolve with fnct_debian_lib.


Iterpipes, Between Bash and Hash-bash

A library for running shell pipelines using shell-like syntax

Enables piping infinite streams through shell pipelines in Python

xhtml-css Bivalidator

Check your markup and style validity


Just type or paste an URL in the form above, and click on "check it" to see the magic. If you want to fine tune your validation, click on the "advanced" link. That's it!

Yet Another Comprehensive Content

Like, Young's modulus is a vibrating variation inside a solid... The times it take to respanw to an excess of energy is what molding apparence may look to not-so solid thing's... Like this Blog when adding content, the effor is like slapping it and the time it goes back, centered... we consider being more stable than usual...

jeudi 8 août 2013

Fnct.D, continue to Evolve with fnct_debian_lib.

-Available Thru Bash Shell-Lib, I'm a powerful user known had reputation on FedoraCore uses in Québec thru VDL2 / Phéromone inc ( name proposed by Myself in late 2003-2004 ), before I decide to travel a bit inside IT realm of Montreal region... Some Insider continue to plaid in flavor of uses of Debian and many related distribution.

- One Surpassing all of them ( Ubuntu ), was priory showed by Michel Dumais, Ledevoir Writer and Proudly Independent. By Installing drupal and many Tools management.

Since the Fedora Core from RedHat dump it's live support and active contribution to free world, Ubuntu had continue to grow in forum and uses.

- Having exclusively worked on Ubuntu branch, a weak version called Mint was an essay from some Friend working @CAIR ( Centre d'Aide en Informatique de Rosemont ), inside couple branch, I may doubt having him read my Firefox-Crash report and any report automatically send to the group.

- Having in mind some methodology developped to work over repository and NFS network link and even darker as Network-Link, fnct_debian_lib is another rewrite of fnct_lib which fail over loosing myself in an Eval Brace ( Is somewhat an answer to developping code, seeing and steeping inside a code by adding switch by function that disable execution and throw the command line )

- This Eval-Brace problem confirm me there is edge not polished enought after falling into deeper and deeper Variable transfert and loses of scope and visibility creating sub function , see :

Function A{
 --> Some variable-here like FA
 Function B{
  <-- Bash stipulate having FA being accessible
  Function C{
  <-- Bash stipulate having FA being accessible, while it's not true in some way .

even Worse with Eval-brace evaluating a code and throwing result to screen or executing them.  see :

### Equivalent to Function C
Function ExternOfC ()
  echo "echo \${StrEvalResult} "

Function A{
 --> Some variable-here like FA
 Function B{
  <-- Bash stipulate having FA being accessible
  - Using Eval to comonly evaluate FA like an one-line command:
  -> StrEvalResult = $( eval echo "${FA}" ) ;
  ### -> will show only on screen :
   echo ${FA} ### -> free to be executed if we do following command
   $( ${StrEvalResult} )
  and even darker:
  eval $( ${StrEvalResult} )
  Function C{
    ### outputing StrEvalResult:
     echo ${StrEvalResult} # Work 20% of time and lesser. Will work if Function C is inside the Function A and Also inside Function B
   ### ExternOfC , will work too but not if your're about to uses Function A { Function B {  Function C { ExternOfC } } }
  ### Like ECMA Scrible ( Jscript, Javascript ... ) Professional know how many time they had to write function { function { function { __Jscript_command } } }

So getting tired in a night of 25th december 2011, I'm wiping everything until fnct_debian_lib start to be urgent 

- Sharpening the rules of function creation, telling which types of transfert will stay, Prefixed-Var start is appealing. 

Some professional like Python user might understand how to pass CFLAGS, CXXFLAGS, LDFLAGS from by installing independent python package

CFLAGS="-g -O3 -march=bdver1 -m64 --param=ssp-buffer-size=8 --param=l1-cache-size=64 --param=l2-cache-size=256 -Wformat -Werror=format-security -D__PYTHON27__" CPPFLAGS="-D_FORTIFY_SOURCE=2" CXXFLAGS="-g -O3 --param=ssp-buffer-size=8 --param=l1-cache-size=64 --param=l2-cache-size=256 -Wformat" FFLAGS="-g -O3" LDFLAGS="-O3 -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions,-z,relro -fPIC -Xlinker -export-dynamic" install .

Are Prefixed Variable and some Package like Numpy will accept all parameter... In this case, working with an AMD Athlon Dual-Core with l2 cache of 256Kb and l1 cache of 64Kb, it's bare bottom optimisation and candy once it work, having 7% to 11% in time efficiency over many lib called at once a Dual-Core can start splitting correctly assembly code from Lib and share it corretly, I do have less than 5% of jitterring between processor and seems to work really equaly on heavy load.

So Back to Fnct.D fnct_debian_lib,

Two major uses,
- Package manager repository being managed by PackageRepositoryMgmt and PackageRepositoryRest

Internal Structure start like debugger listing:
You do a PackageRepositoryMgmt --help it show you this :

Function PackageRepositoryMgmt
Default Variable Value:
Variable PkgRepoMgmtPathArchives ,
    Default Value:/var/cache/apt/archives
Variable PkgRepoMgmtStrFmt ,
    Default Value:"%f "
Variable PkgRepoMgmtFileFormat ,
    Default Value:deb
Variable PkgRepoMgmtRepository ,
    Default Value:/media/COMST500GB/Linux-Debian/archives/Mint-14_x86-64
Variable PkgRepoMgmtReposIndex ,
    Default Value:/media/COMST500GB/Linux-Debian/archives/Mint-14_x86-64/index
Variable PkgRepoMgmtLatestIndexName ,
    Default Value:latest
Variable PkgRepoMgmtAddPkgLst ,
    Default Value:False
Variable PkgRepoMgmtPkgExt ,
    Default Value:bz2.base64
Variable PkgRepoMgmtLinkerName ,
    Default Value:/bin/ln
Variable PkgRepoMgmtLinkerOption ,
    Default Value:-s
Variable PkgRepoMgmtReposIndexFmt ,
    Default Value:__ID__:__FILE__
Variable PkgRepoMgmtReposIndexAction ,
    Default Value:"mkdir -p __PATH__"
Variable PkgRepoMgmtReposDriveDebug ,
    Default Value:False
Variable PkgRepoMgmtReposIndexTest ,
    Default Value:! -d
Variable PkgRepoMgmtReposAwkLst ,
    Default Value:/etc/init.d/Fnct.d/awk-script/dpkg-package-id-listing.awk
Variable PkgRepoMgmtReposIndexDay ,
    Default Value:0
Variable PkgRepoMgmtReposBkpAct ,
    Default Value:mv __SRC__/__FILE__ __DEST__ __VIRG__ ln -s __DEST__/__FILE__ __SRC__/__FILE__
Following switch are available:

    --startservices    Start the application normally.
    --get        Return value of Internal Variable.
    --list        List all Internal Pre-fixed Variable available to query or get.
    --add-snapshoot    Add DPKG Listing inside Current Index File.
            Only Store an ID in the index-file and the content into UUID-name from index path.


While option  --startservices is a normal switch and is the default one,
--add-snapshoot create inside the Index repository being ( /media/COMST500GB/Linux-Debian/archives/Mint-14_x86-64/index ) it will create a file named of the day you start the Management
Will look like :

DATE:20130808 00:24:24:ID:682e63e4-ffe2-11e2-a21d-001b3875b29c
DATE:20130808 00:25:16:ID:None
DATE:20130808 00:27:45:ID:None
DATE:20130808 00:29:01:ID:None
DATE:20130808 00:32:05:ID:7abdcf6c-ffe3-11e2-a21d-001b3875b29c
DATE:20130808 12:57:39:ID:a2711984-004b-11e3-a21d-001b3875b29c
DATE:20130808 13:09:30:ID:4a35f684-004d-11e3-a21d-001b3875b29c
NEW TRANSACTION:20130808 13:09:30
COMMIT TRANSACTION:ID:4a3493b6-004d-11e3-a21d-001b3875b29c:NB_FILE:104:SHA1SUM:3b6174521345ebe08cde462f54061b2719217afa:20130808 13:09:30


Where  :
4a3493b6-004d-11e3-a21d-001b3875b29c is the last ID being created and store everything inside /media/COMST500GB/Linux-Debian/archives/Mint-14_x86-64 

The folowing lines:
NEW TRANSACTION:20130808 13:09:30
COMMIT TRANSACTION:ID:4a3493b6-004d-11e3-a21d-001b3875b29c:NB_FILE:104:SHA1SUM:3b6174521345ebe08cde462f54061b2719217afa:20130808 13:09:30

Hold the report of the commit ( or pending Package yield inside /var/cache/apt/archives )

- How many time people had to clean this section if you are running out of space !!!

The line:
COMMIT TRANSACTION:ID:4a3493b6-004d-11e3-a21d-001b3875b29c:NB_FILE:104:SHA1SUM:3b6174521345ebe08cde462f54061b2719217afa:20130808 13:09:30
Will show you Commit Name detail:
Name of the commit :  4a3493b6-004d-11e3-a21d-001b3875b29c
How many Package was transferred  to Repository : 104
Sha-Sum : 3b6174521345ebe08cde462f54061b2719217afa
  ShaSum is a derived experiment from not authorized hand re-crafting package by hand and also changing name inside the repository to push un-authorized package being installed if someone want to remake the /var/lib/dpkg/status, which is especially easy doing a "
$> dpkg --get-selections | cut -f 1 
and using dpkg-query to extract every version, names, and all title used inside  
/var/lib/dpkg/status to re-craft an install and pushing hacked package being recognized instantly and being linked to system thru dpkg-reconfigure... 

- The ShaSum will later being usefull to see if package name correspond to COMMIT, which is beautiful in my point of view... 

Even wringled than, following line :

DATE:20130808 13:09:30:ID:4a35f684-004d-11e3-a21d-001b3875b29c


 - Are PackageRepositoryMgmt --add-snapshoot and/or 
PkgRepoMgmtAddPkgLst=True PackageRepositoryMgmt
The ID : 4a35f684-004d-11e3-a21d-001b3875b29c mean:
- it exist a file named  4a35f684-004d-11e3-a21d-001b3875b29c.bz2.base64 
- Having SHA1SUM for perfect protection, 
it content is only a dpkg --get-selections with comma separated and ranked
package listed:
A sample will look like this :
 command to extract:

$> base64 -d < 4a35f684-004d-11e3-a21d-001b3875b29c.bz2.base64 | bzip2 -dc

1;aacplusenc;install 2;abcm2ps;install 3;account-plugin-facebook;install 4;account-plugin-flickr;install 5;account-plugin-google;install 6;account-plugin-icons;install 7;account-plugin-identica;install 8;account-plugin-tools;install 9;account-plugin-twitter;install 10;account-plugin-windows-live;install 11;accountsservice;install 12;acl;install 13;acpi-support;install 14;acpid;install 15;activity-log-manager-common;install 16;add-apt-key;install 17;adduser;install 18;adobe-flash-properties-gtk;install 19;adobe-flashplugin;install 20;advancecomp;install
You can't get only good integrity... Later I should add shasum of file inside the Listing allowing to see where I did things and probably forget it... Just look inside archive to see how far it change...

 Some Default switches from default Function inside fnct_debian_lib, --get and --list...
--get -> Will show you on prompt the value
 $> PackageRepositoryMgmt --get PkgRepoMgmtPathArchives
will show you 

And Real profesionnal will love doing test like this:
$> otherpath=/var/other_package_repository_path ; 
$> test ! -d $( PackageRepositoryMgmt --get PkgRepoMgmtPathArchives ) && \
                  PkgRepoMgmtPathArchives=${otherpath} \
                  PkgRepoMgmtAddPkgLst=True \
Will show you if the /var/cache/apt/archives exist and if it does not 
Prefixed Variable PkgRepoMgmtPathArchives=${otherpath} Will change it ! 

And  --list :
State of the art beauty it extract all the Prefixed-Variable, being tired to scroll up & down, the code inside the Function hold 
eval $( __GetVarReferenceList ) ;
 - Like a pragma to extract current variable list. ( you see eval are coming back like Sprite's ;-) )

Command line:
$> PackageRepositoryMgmt --list 
Show you :
PkgRepoMgmtPathArchives PkgRepoMgmtStrFmt PkgRepoMgmtFileFormat PkgRepoMgmtRepository PkgRepoMgmtReposIndex PkgRepoMgmtLatestIndexName PkgRepoMgmtAddPkgLst PkgRepoMgmtPkgExt PkgRepoMgmtLinkerName PkgRepoMgmtLinkerOption PkgRepoMgmtReposIndexFmt PkgRepoMgmtReposIndexAction PkgRepoMgmtReposDriveDebug PkgRepoMgmtReposIndexTest PkgRepoMgmtReposAwkLst PkgRepoMgmtReposIndexDay PkgRepoMgmtReposBkpAct

and loop is quite accessible:
$> declare -a ArrayMGMT=( $( PackageRepositoryMgmt --list ) ) ; 
$> for item in ${ArrayMGMT[@]} ; do  PackageRepositoryMgmt --get ${item} ; done 

Show you content of any Prefixed-Variable throw by 
PackageRepositoryMgmt --list

M.Shaned from College Rosemont should be loving seeing student having brain for this utopic design

 And can't be acheived without having some internal rules where Draft and definition are coming slowly...

- The method, Doing some work, leave it like working, Forgetting about it and some day going into reading it and write into common-similarity the design...

--- From Fnct.D there is also _sub_Git with Zenity-like GUI, helping selecting file from Shell-File Selection and a big Text-Area appearing to let you write information on evolution of your plenty-of-time ...

- Things impossible with some widget let you write code and create marklov loop inside git to let you behave having really work inside the code when is just old junk with variable and some comment re-definition... Some's inside git let you beleive having work 200hours a day and had no several acheivement than having merely same look than Initial version fading-away because the real developper left earth of vanishing into long-term hospitalization, if it's not eternal vacation...

But GitHubCommit is not ready, testing some expansion and eval it does already work, go back couple version ahead and it should give you the GUI and the commit message as well .