Virtual installation of software

From Virtualsquare
Revision as of 19:42, 27 December 2012 by Renzo (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

[this tutorial is for ViewOS 0.8.1, experimental branch]

View-OS allows the virtual installation of software. The following examples show hot to (virtually) install some Debian packets by ViewFS. It is possible to install software as users, there is no need to log in as root or to execute sudo commands.

Let us suppose that a user wants to try the tinyirc application, which we suppose it is not installed in the system:

$ tinyirc
bash: tinyirc: command not found

In a view-os machine our user can install it:

$ um_add_service viewfs
$ mkdir /tmp/newroot
$ viewsu
# mount -t viewfs -o mincow,except=/tmp,vstat /tmp/newroot /

some files must be deleted, recreated to avoid warnings (it is not possible to virtually access really protected files, but we can delete them or change them to read-write mode)

# rm -rf /root/.aptitude
# mkdir /root/.aptitude
# touch /root/.aptitude/config
# touch /var/cache/debconf/passwords.dat

Now the packet can be installed in the standard way:

# aptitude install tinyirc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
...
Unpacking tinyirc (from .../tinyirc_1%3a1.1.dfsg.1-1_i386.deb) ...
Processing triggers for menu ...
Processing triggers for man-db ...
Setting up tinyirc (1:1.1.dfsg.1-1) ...
Reading package lists... Done             
Building dependency tree       
Reading state information... Done
Reading extended state information       
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done         
# exit
$ tinyirc
TinyIRC 1.1 Copyright (C) 1991-1996 Nathan Laredo
This is free software with ABSOLUTELY NO WARRANTY.
....

it works.

It is possible to install more complex packets with all their libraries. Our user can install gnome-games.

$ viewsu
# aptitude install gnome-games
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information       
Initializing package states... Done
Reading task descriptions... Done  
The following NEW packages will be installed:
  ggzcore-bin{a} gnome-games libggz2{a} libggzcore9{a} libggzmod4{a} 
  libgnomeprint2.2-0{a} libgnomeprint2.2-data{a} libgnomeprintui2.2-0{a} 
  libgnomeprintui2.2-common{a} libsdl-mixer1.2{a} libsmpeg0{a} 
  python-bugbuddy{a} python-gnomeprint{a} 
0 packages upgraded, 13 newly installed, 0 to remove and 652 not upgraded.
Need to get 2603kB of archives. After unpacking 9933kB will be used.
Do you want to continue? [Y/n/?] 

Several Debian packets need to be installed, and can be installed just by typing 'Y' exactly in the same way used by a sysadm to do the same operation.

Writing extended state information... Done
Get:1 http://www.debian.org unstable/main libggz2 0.0.14.1-1 [73.3kB]
...
# exit
$ gnomine

... our user can enjoy the most important application of the history of personal computer: the minekeeper board game.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox