Download Latest Version stow-jail-0.9.tar.gz (3.2 kB)
Email in envelope

Get an email when there's a new version of stow-jail

Home
Name Modified Size InfoDownloads / Week
readme.txt 2011-03-30 4.8 kB
stow-jail-0.9.tar.gz 2011-03-30 3.2 kB
stow-jail-0.8.tar.gz 2011-03-27 3.4 kB
stow-jail.tar.gz 2011-03-24 2.1 kB
Totals: 4 Items   13.5 kB 1
This is an add-on to stow. If the make command did not work with DESTDIR argument:
make DESTDIR=/stow/package_name install
or program use another insteller,"Stow-jail" would close the installer command to the sandbox(unionfs+chroot),
in this way all go to the "/stow/package_name-version" directory.

Changelog:
+Database updater commands handling (for example:ldconfig)

Requirements:
    (-normal shell enviroment)
    -GNU Stow
    -aufs kernel module

Stow homepage:
http://savannah.gnu.org/projects/stow

Install instructions:

Stow install:

- Download: http://git.savannah.gnu.org/cgit/stow.git/snapshot/stow-master.tar.gz
- Unpack, cd
$ ./configure
$ make
$ sudo mkdir /stow
$ sudo make DESTDIR=/stow/stow-master install
$ sudo /stow/stow-master/usr/local/bin/stow --verbose --target=/ --dir=/stow stow-master

Stow-jail install:
- Copy this "stow-jail-0.8" directory to /stow
$ sudo /stow/stow-jail-0.8/usr/bin/stow-install stow-jail 0.8
$ sudo stow-install stow master

Examples:

Example to use stow-create and stow-install:

taxy@msi-desktop:~/compile/amsn/amsn$ ./configure
taxy@msi-desktop:~/compile/amsn/amsn$ make
taxy@msi-desktop:~/compile/amsn/amsn$ sudo stow-create amsn r12306
[sudo] password for taxy: 
Mounting jail...
chroot /tmp/jailroot
cd /home/taxy/compile/amsn/amsn
root@msi-desktop:~/compile/amsn/amsn# make install
rm -Rf /usr/share/amsn
mkdir -p /usr/share/amsn
mkdir -p /usr/bin
mkdir -p /usr/share/applications/
mkdir -p /usr/share/pixmaps/
find /usr/share/amsn -name '.svn' -print | xargs rm -Rf
ln -sf /usr/share/amsn/amsn /usr/bin/amsn
ln -sf /usr/share/amsn/amsn-remote /usr/bin/amsn-remote
ln -sf /usr/share/amsn/amsn-remote-CLI /usr/bin/amsn-remote-CLI
cp ./amsn.desktop /usr/share/applications/
ln -sf /usr/share/amsn/desktop-icons/48x48/apps/amsn.png /usr/share/pixmaps/
root@msi-desktop:~/compile/amsn/amsn# exit
exit
Cleanup...
Relativising link /usr/bin/amsn-remote-CLI -> ../share/amsn/amsn-remote-CLI
Relativising link /usr/bin/amsn-remote -> ../share/amsn/amsn-remote
Relativising link /usr/bin/amsn -> ../share/amsn/amsn
Relativising link /usr/share/pixmaps/amsn.png -> ../amsn/desktop-icons/48x48/apps/amsn.png
taxy@msi-desktop:~/compile/amsn/amsn$ sudo stow-install amsn r12306

Example to use stow-upgrade:

taxy@msi-desktop:~/compile/amsn/amsn$ make clean
...
taxy@msi-desktop:~/compile/amsn/amsn$ svn update
U    plugins/music/infoamarok2
U    plugins/music/plugininfo.xml
U    protocol.tcl
U    gui.tcl
U    utils/windows/NSIS/aMSN.nsi
Updated to revision 12311.
taxy@msi-desktop:~/compile/amsn/amsn$ ./configure
...
taxy@msi-desktop:~/compile/amsn/amsn$ make
...
taxy@msi-desktop:~/compile/amsn/amsn$ sudo stow-upgrade amsn r12311
[sudo] password for taxy: 
UNLINK: usr/bin/amsn-remote-CLI
UNLINK: usr/bin/amsn-remote
UNLINK: usr/bin/amsn
UNLINK: usr/share/pixmaps/amsn.png
UNLINK: usr/share/applications/amsn.desktop
UNLINK: usr/share/amsn
Mounting jail...
chroot /tmp/jailroot
cd /home/taxy/compile/amsn/amsn
root@msi-desktop:~/compile/amsn/amsn# make install
rm -Rf /usr/share/amsn
mkdir -p /usr/share/amsn
mkdir -p /usr/bin
mkdir -p /usr/share/applications/
mkdir -p /usr/share/pixmaps/
find /usr/share/amsn -name '.svn' -print | xargs rm -Rf
ln -sf /usr/share/amsn/amsn /usr/bin/amsn
ln -sf /usr/share/amsn/amsn-remote /usr/bin/amsn-remote
ln -sf /usr/share/amsn/amsn-remote-CLI /usr/bin/amsn-remote-CLI
cp ./amsn.desktop /usr/share/applications/
ln -sf /usr/share/amsn/desktop-icons/48x48/apps/amsn.png /usr/share/pixmaps/
root@msi-desktop:~/compile/amsn/amsn# exit
exit
Cleanup...
Relativising link /usr/bin/amsn-remote-CLI -> ../share/amsn/amsn-remote-CLI
Relativising link /usr/bin/amsn-remote -> ../share/amsn/amsn-remote
Relativising link /usr/bin/amsn -> ../share/amsn/amsn
Relativising link /usr/share/pixmaps/amsn.png -> ../amsn/desktop-icons/48x48/apps/amsn.png
LINK: usr/bin/amsn-remote-CLI => ../../stow/amsn-r12311/usr/bin/amsn-remote-CLI
LINK: usr/bin/amsn-remote => ../../stow/amsn-r12311/usr/bin/amsn-remote
LINK: usr/bin/amsn => ../../stow/amsn-r12311/usr/bin/amsn
LINK: usr/share/pixmaps/amsn.png => ../../../stow/amsn-r12311/usr/share/pixmaps/amsn.png
LINK: usr/share/applications/amsn.desktop => ../../../stow/amsn-r12311/usr/share/applications/amsn.desktop
LINK: usr/share/amsn => ../../stow/amsn-r12311/usr/share/amsn

To handle the updating conflicts:
Configuration files: Delete, merge, or save the latest config file.
Database files: If you discover that during the installation a database file is changed,
then the following needs to be done:
    1.Uninstall and remove package from the /stow directory.
    2.Find out from the installer source code which command caused the change in database.
    3.Add this command full path name to the /usr/share/stow-jail/update-commands file.
    4.Recreate package with the stow-create command.
Source: readme.txt, updated 2011-03-30