Stork Tutorial: Packages
Creating a Package
Stork currently supports two types of packages: RPMs and tarballs.
Stork will install RPM packages according to the package scripts. RPMs
are generally suggested for complex installations, or where the package needs
to be installed outside of /root. However, for simple packages, it can be more
efficient to use a simple tarball package.
Creating a tarball package can be a great way to distribute your own
applications. With Stork, you can easily distribute your software to every
node that needs it. Stork also allows you to execute scripts before and
after you install or uninstall, making tarballs even more powerful.
Including scripts in your tarball is very simple. Just package
'.preinstall', '.postinstall', '.preremove', and/or '.postremove' scripts
along with your own files. Stork will automatically execute the script when
the user decides to install or uninstall your package. The scripts will run
from the same directory the tarball is unpacked (typically '/root/' or what
ever is defined to be the home directory). Note that these scripts are
completely optional.
For example, consider a simple directory called directory full
of dummy files, and also four scripts, .preinstall,
.postinstall, .preremove, .postremove. We can create a
simple zipped tarball by running the command:
tar -czf mypackage.tar.gz directory ...
Where "mypackage" is the name of the tarball to be created, and the
directory is the directory we wish to make into a package. Instead
directories, files can also be used.
Upon installing this package with
Stork, Stork will automatically run .preinstall, and will run
.postinstall after installation. This allows the package creator to
include scripts to confirm that installation is going to occur, and confirm
that it worked. Likewise, when the package is uninstalled, the preremove and
postremove scripts work in the same way.
After you have created a package, you can
install Stork, if you haven't already. If so,
move on to creating an identity.
Return to the tutorial contents.
Home Top
|