This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

Feature: System Administration

Installing and tracking software updates with toast

By Ben Martin on April 23, 2008 (4:00:00 PM)

Share    Print    Comments   

Using toast takes the burden out of building, installing, and keeping track of software built from source. You can use toast to build and maintain software installed in your /home directory as a regular user, or to set up software for all users in /usr/local. toast can obtain packages over HTTP, HTTPS, FTP, and via SSH and CVS. It can handle most archive formats, as well as .rpm and .deb packages.

For toast itself, no packages exist for Ubuntu, Fedora, or openSUSE. Its main requirement is Perl. You can either download the uncompressed Perl script and shove it into your $PATH to install it with default settings, or use toast to install itself, either inside your home directory, if you are the only user who is going to use toast, or system-wide to allow all users to use the same toast. Using toast to install itself into your home directory is shown below. If you need to use a Web proxy to download files you need to set the environment variable in order for toast to install itself.

$ export http_proxy= $ wget -O-|perl -x - arm toast

When you install toast as a user, it will maintain its packages inside $HOME/.toast. The toast tool itself will reside in $HOME/.toast/armed/bin. Instead of placing this armed/bin directory into your path, you should invoke toast with its env command to get output that also sets manual, info, header file, and library paths to also include the software that you have installed with toast into your home directory.

You are likely to want to invoke toast env every time you boot up so that software installed with toast can be used without needing to explicitly modify your environment. The first command below shows you what environment variables are modified. The second command alters the bashrc to set up toast for new shells by calling eval to set these environment variables instead of printing them to the screen.

$ $HOME/.toast/armed/bin/toast env PATH=/home/saru/.toast/armed/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/bin:/usr/bin:/home/saru/bin; MANPATH=/home/saru/.toast/armed/man:/usr/kerberos/man:/usr/local/share/man:/usr/share/man/en:/usr/share/man:/usr/local/man; INFOPATH=/home/saru/.toast/armed/info:; CPATH=/home/saru/.toast/armed/include; LIBRARY_PATH=/home/saru/.toast/armed/lib; XML_CATALOG_FILES='/home/saru/.toast/armed/etc/xml/toast-xml-catalog /etc/xml/toast-xml-catalog'; $ echo 'eval `$HOME/.toast/armed/bin/toast env` ' >> ~/.bashrc

See the toast manual for directions on system-wide installation of toast. I ran into issues with directory permissions when I tried to invoke toast as a regular user when toast itself was installed system-wide, so I used version 1.453 of toast installed as user ben.

The toast command is aware of many of the source repositories and metadata Web sites for open source software. For example, if you want to install the sshfs FUSE filesystem, you do not have to download the tarball first. toast's find command will show you if the software can see an application, where it thinks it can download it from, and what versions are available -- but you must know the correct package name. For instance, in the case of sshfs, the project name of the software is sshfs-fuse. Once I knew that toast could find the package, I used the arm command to download, build, install, and create softlinks to the package.

$ toast find sshfs ... can't find sshfs $ toast find sshfs-fuse ... sshfs-fuse version 1.7: found urls: version 1.8: found urls: version 1.9: found urls: $ toast arm sshfs-fuse ... mkdir /home/ben/.toast/pkg/sshfs-fuse mkdir /home/ben/.toast/pkg/sshfs-fuse/v1.9 ... # creating /home/ben/.toast/pkg/sshfs-fuse/v1.9/archive.tmp/sshfs-fuse-1.9.tar.gz # fetching ... export LD_PRELOAD=/home/ben/.toast/pkg/sshfs-fuse/v1.9/1/helpers/ (cd /home/ben/.toast/pkg/sshfs-fuse/v1.9/1/src/sshfs-fuse-1.9; ./configure --prefix=/home/ben/.toast/armed) checking for a BSD-compatible install... /home/ben/.toast/pkg/sshfs-fuse/v1.9/1/helpers/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... gcc ... $ ls -lh ~/.toast/armed/bin lrwxrwxrwx 1 ben ben 53 2008-04-07 09:40 sshfs -> /home/ben/.toast/pkg/sshfs-fuse/v1.9/1/root/bin/sshfs* lrwxrwxrwx 1 ben ben 50 2008-04-07 09:37 toast -> /home/ben/.toast/pkg/toast/v1.454/1/root/bin/toast*

One major advantage of using toast to perform the installation is that it tracks what you have installed and can update any software that it installed. You can get the status of any package with the status command and update any installed package with the upgrade command. If you provide no package name to either of these commands then toast will perform the operation on all packages.

$ toast status sshfs-fuse version 1.9: stored urls: build 1: armed toast version 1.454: stored urls: build 1: armed $ toast upgrade # fetching # fetching # fetching sshfs-fuse version 1.9 appears to be the latest available version [/home/ben/.toast/armed/bin/toast: 4787/5855/5855/5872/5880/6718 v1.454]

Special considerations

When a build does not follow the normal ./configure; make; make install procedure, you have to step in to make toast work. As an example, consider the archivemount tool. This program is not listed on, so the first thing to do is use the add command to tell toast where to find archivemount. The project's Web page just lists a bunch of tarballs. Trying to install archivemount with toast will fail because you can't execute make install for the software.

$ toast add $ toast install archivemount ... # fetching # fetching rm -f /home/ben/.toast/pkg/archivemount/vunknown/archive.tmp/archivemount # creating /home/ben/.toast/pkg/archivemount/vunknown/archive.tmp/archivemount-0.5.3.tar.gz # fetching ... (cd /home/ben/.toast/pkg/archivemount/vunknown/1/src/archivemount-0.5.3; make install) make: *** No rule to make target `install'. Stop. make install returned 512

The quickest way to get around this is to create a patch that adds an install target, and tell toast about the patch when you invoke the toast arm command. With the patch included as part of the sources to the arm command, the build, installation, and softlinking is performed and everything completes successfully. After the installation the status command shows that toast is aware that the installation of archivemount was patched and records where the patch came from. This comes in handy when a new version of archivemount is released.

$ cd /home/ben/.toast/pkg/archivemount/v0.5.3/1/src/archivemount-0.5.3 $ cd .. $ mkdir $ cp archivemount-0.5.3/Makefile $ vi $ diff -Nuar archivemount-0.5.3/Makefile --- archivemount-0.5.3/Makefile 2006-12-29 01:32:47.000000000 +1000 +++ 2008-04-07 10:35:13.000000000 +1000 @@ -49,3 +49,5 @@ .PHONY: all test clean dist +install: + install --mode 555 archivemount /usr/local/bin $ diff -Nuar archivemount-0.5.3/Makefile >| /home/ben/.toast/archivemount-makefile.patch $ toast clean archivemount $ toast arm archivemount/0.5.3: \ [ \ ~/.toast/archivemount-makefile.patch ] ... $ toast status archivemount version 0.5.3: stored urls: file://localhost/home/ben/.toast/archivemount-makefile.patch build 1: armed

With toast, installing new or esoteric software is a fairly quick and easy task. If a project is listed on, you can just feed the project name into toast and if all goes well have the latest version of that package downloaded, compiled, and installed for your personal use with minimal interaction. A major advantage of using toast is having it track what it installed so you can easily monitor and update your software.

Ben Martin has been working on filesystems for more than 10 years. He completed his Ph.D. and now offers consulting services focused on libferris, filesystems, and search solutions.

Share    Print    Comments   


on Installing and tracking software updates with toast

Note: Comments are owned by the poster. We are not responsible for their content.

Installing and tracking software updates with toast

Posted by: toronto on April 29, 2008 03:18 AM
Very <a href="" target="_blank">detailed</a> article. <a href="" target="_blank">Thanks</a> for the post.
[Modified by: toronto on May 10, 2008 04:38 AM]


This story has been archived. Comments can no longer be posted.

Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya