|
1 Introduction
Stow is a tool for managing the installation of multiple software packages (from sources) in the same run-time directory tree. One historical difficulty of this task has been the need to administer, upgrade, install, and remove files in independent packages without confusing them with other files sharing the same filesystem space.
2 Exemple
# apt-get install stow
$ mkdir -p ~/soft/toto
$ echo 'echo "Hello"' > ~/soft/toto/toto
$ cd ~/soft
$ stow -v toto
Stowing package toto...
LINK /data1/ubuntu64/home/nroche/toto to soft/toto/toto
$ stow -D -v toto
UNLINK /data1/ubuntu64/home/nroche/toto
3 Using it on SLC
- Install stow:
$ cd /tmp
$ wget ftp://ftp.gnu.org/gnu/stow/stow-1.3.3.tar.gz
$ tar -zxf stow-1.3.3.tar.gz
$ cd stow-1.3.3
$ ./configure --prefix=~/libLDA/usr
$ make
# make install
# mkdir /usr/local/stow
- Build external libraries:
$ mkdir tgz
$ wget -P tgz http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download
$ wget -P tgz http://ftp.gnu.org/gnu/bison/bison-2.4.tar.gz
$ wget -P tgz http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz
$ tar -jxf tgz/flex-2.5.35.tar.bz2 -C /tmp
$ tar -zxf tgz/bison-2.4.tar.gz -C /tmp
$ tar -zxf tgz/libpcap-1.1.1.tar.gz -C /tmp
$ cd /tmp/flex-2.5.35
$ ./configure --prefix=/usr/local/stow/flex-2.5.35
$ make
# make install
$ cd /tmp/bison-2.4
$ ./configure --prefix=/usr/local/stow/bison-2.4
$ make
# make install
$ cd /tmp/libpcap-1.1.1
$ PATH=/usr/local/stow/flex-2.5.35/bin:/usr/local/stow/bison-2.4/bin:$PATH \
./configure --prefix=/usr/local/stow/libpcap-1.1.1
$ PATH=/usr/local/stow/flex-2.5.35/bin:/usr/local/stow/bison-2.4/bin:$PATH \
make
# make install
# cd /usr/local
# tar -zcf externalLibs.tgz stow/
# mv externalLibs.tgz ~nroche/libLDA/usr/
# chown nroche. ~nroche/libLDA/usr/externalLibs.tgz
- Install external libraries:
$ svn co svn+ssh://svn-calice/calice/online-sw/trunk/libLDA
# tar -zxf libLDA/usr/externalLibs.tgz -C /usr/local
# cd /usr/local/stow
# /home/calice/libLDA/usr/bin/stow -v flex-2.5.35
# /home/calice/libLDA/usr/bin/stow -v bison-2.4
# /home/calice/libLDA/usr/bin/stow -v libpcap-1.1.1
- avr-libc:
$ cd /tmp
$ wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-1.0.5.tar.bz2
$ tar -jxf avr-libc-1.0.5.tar.bz2
$ cd avr-libc-1.0.5
(arf, do not compile with gcc4)
- libcap:
$ cd /tmp
$ wget http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.20.tar.bz2
$ tar -jxf libcap-2.20.tar.bz2
$ cd libcap-2.20
$ ./configure --prefix=/usr/local/stow/libcap-2.20
# yum install libattr-devel
$ make
$ env DESTDIR=/usr/local/stow/libcap-2.20 make install
$ cd /usr/local/stow/
# stow -v libcap-2.20
# cat >> /etc/ld.so.conf
/usr/local/lib
^D
# ldconfig
# ldconfig -p | grep libcap
# cd /tmp/libcap-2.20
# env DESTDIR=/usr/local/stow/libcap-2.20 make install
# cd /usr/local/stow/
# stow -v libcap-2.20
(arf Since 2.6.24-rc2 the file system support for POSIX Capabilities is part of mainline.
So there is no kernel patching needed.
Because the PCaps for files are stored in the extended attributes of that file,
a further prerequisite is a file system, that supports extended attributes like ext3.)
$ uname -a
2.6.18
|