Skip to main content

steeve

Tiny GNU Stow–based package manager.

Summary

steeve is not a replacement for any full-fledged package manager like dpkg or yum, but instead an addition, designed to handle manually built software and binary distributions. Instead of polluting /usr/local with binaries and libraries that aren’t tracked by any package manager and thus cannot be safely removed or upgraded, steeve provides a structured approach that allows for managing multiple software versions in a matter of a command.

Packages

By default packages live in /usr/local/stow. This location is configured either via environment variable STEEVE_DIR or command-line option -d, --dir. A package consists of one or multiple subdirectories named after version. Each version has directories with files that will be linked into target directory, which is /usr/local by default. Target directory can be changed via environment variable STEEVE_TARGET or command-line option -t, --target. The prominent part of a package is symbolic link named current that points to current version.

Here’s an example of a valid package tree:

$ tree /usr/local/stow/tig
/usr/local/stow/tig
├── 2.1
│   ├── bin
│   │   └── tig
│   └── etc
│       └── tigrc
├── 2.1.1
│   ├── bin
│   │   └── tig
│   └── etc
│       └── tigrc
└── current -> /usr/local/stow/tig/2.1.1

7 directories, 4 files

Tree Folding

The main gotcha is GNU Stow’s tree folding mechanism. Please, get accustomed to it by reading chapter Installing Packages of GNU Stow manual. You can disable folding by setting environment variable STEEVE_NO_FOLDING or passing --no-folding option.

Dependencies

  • Python 2.7

  • GNU Stow 2.2

Installation

Get the package from PyPI:

$ pip install steeve

Or get the latest development version:

$ git clone https://github.com/Perlence/steeve.git
$ cd steeve
$ pip install --editable .

To install bash completion, download the script and source it from your .bashrc.

To install fish completion, download the script and put it in ~/.config/fish/completions.

Usage

Run steeve with --help option to see the list of commands:

$ steeve --help

To see usage of a command, run:

$ steeve COMMAND --help

steeve helps you install manually built programs. For example, to install tig, text-mode interface for git, first download the release tarball:

$ curl -O -L http://jonas.nitro.dk/tig/releases/tig-2.1.1.tar.gz

Then configure, make and install with prefix:

$ ./configure
$ make prefix=/usr/local
$ sudo make install prefix=/usr/local/stow/tig/2.1.1

Finally, stow tig 2.1.1 into /usr/local with steeve:

$ sudo steeve stow tig 2.1.1

Under the covers steeve stow creates a symbolic link to current version and runs stow to link contents of current into /usr/local:

$ sudo ln -s /usr/local/stow/tig/2.1.1 /usr/local/stow/tig/current
$ sudo stow -t /usr/local -d tig current

To restow symbolic links, simply run steeve stow:

$ sudo steeve stow tig

Also steeve can manage binary distributions. For instance, let’s install p4merge binaries:

$ curl -O -L http://cdist2.perforce.com/perforce/r15.2/bin.linux26x86_64/p4v.tgz
$ tar xf p4v.tgz
$ ls p4v-2015.2.1315639
bin/  lib/

Now, install p4merge from directory with steeve install:

$ sudo steeve install p4v 2015.2.1315639 ./p4v-2015.2.1315639

This will copy folder contents to /usr/local/stow/p4v/2015.2.1315639, delete stowed files from current version if any, link 2015.2.1315639 to current, and stow files into /usr/local.

If you forgot to install some files, you can install the package once again:

$ sudo steeve install p4v 2015.2.1315639 ./p4v-2015.2.1315639

It’s achieved by uninstalling the package followed by installing it again, so steeve will prompt you before reinstalling.

To delete stowed files, run steeve with command unstow:

$ sudo steeve unstow tig

To list packages, run command ls without arguments:

$ steeve ls
node
tig

To list package version, run command ls with package name:

$ steeve ls tig
  2.1
* 2.1.1

steeve marks current version with an asterisk as seen above.

To remove specific version of a package, run command uninstall with package name and version:

$ sudo steeve uninstall tig 2.1.1

This will delete stowed files if version 2.1.1 is current, and remove folder 2.1.1.

Finally, to remove package with all its versions, run command uninstall with only a package name:

$ sudo steeve uninstall tig

Thanks

Thanks to authors of GoboLinux from which I borrowed the idea of package structure.

Thanks to Armin Ronacher and contributors for Click which is *click* nice.

Metadata

Release files for steeve 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for steeve 0.2
File Size Uploaded
steeve-0.2.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for steeve 0.2
File Interpreter ABI Platform
steeve-0.2-py2-none-any.whl Python 2 none any Details

Total release size: 15.2 kB

Release files / steeve-0.2.tar.gz

Download URL steeve-0.2.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ddcfabfd07853c59104d9e10de9eb025fde5368db1fd28edad1fdb3bc55ead4f
BLAKE2b-256 checksum
How to use checksums
0bc4cbc91438d780cba8abe162b479b594f9fd94c92bc92659ad479b4af2d6e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / steeve-0.2-py2-none-any.whl

Download URL steeve-0.2-py2-none-any.whl
Size 8.9 kB
Tags Python 2
SHA-256 checksum
How to use checksums
97a31911f5b089a0e06f8fd71c76a6e7c01416a6710164e368655d0f4d650825
BLAKE2b-256 checksum
How to use checksums
eae2a7476c53405dbc93fc59d9777d8df8a06ddcd085c47d247c1d41c4be2218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page