SFS Technology documentation
See also: RUNZ
The new SFS Technology solves software dependencies and installation problems. It consists of a unique file that can be mounted as a normal file-system with all libraries and files needed by the specific program. When mounted the sfslauncher will start the application stored into it.
The procedure is completely transparent to the end user; Just double click on the "program.sfs" and sfslauncher will do the magic.
Starting with version 0.3 we improved the integration: the operating system now knows the "sfs" file type as a native executable file.
How does it work?
Well, the file "program.sfs" is a zlib(squashfs) compressed file that can be used as a filesystem.
The .sfs file is a squashfs file that can be mounted in an hidden directory (/.mounted/"softwarename").
Once mounted the file, sfslauncher program will read the executable's name and all the parameters stored into the "parameters" file (a simple text file).
Then the sfslauncher will read the description.id file and will execute the executable file.
When the user will close the executable(the software into the package) sfslauncher will go with "flush" procedure: it will release the thread, unmount the .sfs file and delete the hidden directory.
What is NOT contained in the sfs file ?
The Desktop environment's libraries and other operating system's native libraries as for example KDE libraries, gtk+2, glib, libc6 and many more.
What will contain the .sfs file ?
The sfs file contains just the most necessary libraries to perform a correct software execution.
"program.sfs"
|
| |----------|icon.png (the incon file)
|--------|
|
|----------|parameters (this file contains the executable's name and additional parameters)
|
|
|
|----------/bin/executable(the executable file)
|
|
|
|----------/lib/All libraries and additional files (*.so)
|
|
|
|----------|description.id (see below for the description)
|
|
|
|----------|on_unmount (this executable file is optional and it is launched one step before unmounting the sfs file.
|
|
|----------|env_variables.conf (this file contains the environment variables useb by the program itself)
here under an example of "parameters" file
bin/kaudiocreator
"description.id" will contain :
1st line:"Software name"
2nd line:"architecture type (x86 or 64)"
3rd line:"Version (1 1.1 ...)
4th line:"Author name"
5th line:"Optional infos"
example:
Kaudio Creator
x86
1.13
Benjamin Meyer
Packed By Vincenzo Dentamaro
Extremely imprtant is the architecture type: The system checks the consistency between this value and the architecture of the computer executing it, if not consistent the execution stops. Also, if the software contained into the sfs file is designed for a 64bit architecture and the sfslauncher application is compiled for the 32bit architecture, the software contained into the sfs file will not be executed.
The architectures musts coincide!
The on_unmount executable file contains an additional script to be activated before the unmounting of the sfs file, when the program is closed.
This file can be a shell script, but remember to set it as executable !
env_variables.con = will contain the variables to export to the execution environment.
For example this is how to export the lib/ directory stored into the sfs file:
[ENVIRONMENT]
NumOfVar=2
Variable1=LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$WORKDIR/usr/lib:
Variable2=LD_LIBRARY=$LD_LIBRARY:$WORKDIR/usr/lib:
Where "NumOfVar" indicates the number of the variables to be exported-
The exported variable must be declared in the form of "VariableN=variablevalue", where N is the sequence number of the variable.
KDE's library path is defined in the variable LD_LIBRARY_PATH, use this path to export the libraries contained into the sfs file. In order to let other programs use these libraries while the sfs file is mounted, you must pay attention to properly export this path.
The $WORKDIR variable refers to the path where the sfs file is mounted on All the variables will be exported into the /etc/bash.bashrc environment and the variables will be also exported into the sfs configuration file, to permit the direct dynamic library linking between the programs.sfs softwares.<<<<<----
In order to create a .sfs file you must create a work directory which will contain:
1)The program's executable (what you want to execute)
2)The parameters file (parameters) with the executable's name and (optional)the additional parameters
3)The description.id file (description.id) created according to previous specifications.
4)All the libraries and what the executable need to run correctly
5)The icon.png file (the software's icon)
6)The on_unmount script
7)The env_variables.conf file
once the directory is ready use the sfsmaker software to create the sfs. You can download it from www.unixteam.net
or you can use the squashfs_tool:
mksquashfs "path_where_are_the_files_" $HOME/program.sfs
If you think this is a valuable and elegant technology, please help packing your favourite programs and share them on the Internet!
Limit of the SFS Technology (at present):
1) sfs file name must not contain spaces : "real player.sfs" is bad! "real_player.sfs" or "realplay.sfs" is OK!
(Problem partially solved from the version 0.3.0.3.)
2) The file name to pass at the sfs executable will not contain wildcards characters or special character as "'" "/" "()" "[]" "{}" and others...
As all other file in Unix.
3) The file name to pass at the sfs executable will not exceed 255 characters.
As all other file in Unix.
4) You cannot launch two instances of the same program. You cannot mount the same file twice on the same directory.
If you need it, just make a copy of the sfs file witha different name
5) No more than 256 sfs files can be mounted at the same time !
competing technologies can handle max 7 software simultaniously
These are what we think are the highlight of the SFS Technology:
1--ease of use;
2--ease of software sharing;
3--the base configuration of the operating systemn remains unaltered;
4--It allows dynamic library linking;
5--you can use different version of a software;
6--The sfs technology preserve the environment: it emulate to work in user mode;
7--Operates also in 64 Bit environment;
8--released under the GNU/GPL license;
Warning !! Be sure to use a kernel supporting the squashfs module!
The standard Linux Tiger kernel and most recent distributions should have no problem with it.
Source: http://www.unixteam.net/index.php?mod=Download&file=SFS_Documentation.txt (NO LONGER ONLINE)
See also
- RUNZ, similar technology