171 lines
7.8 KiB
HTML
171 lines
7.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<!-- This manual describes GNU Stow version 2.3.2-fixbug56727
|
|
(2 November 2023), a program for managing farms of symbolic links.
|
|
|
|
Software and documentation is copyrighted by the following:
|
|
|
|
© 1993, 1994, 1995, 1996 Bob Glickstein <bobg+stow@zanshin.com>
|
|
|
|
|
|
© 2000, 2001 Guillaume Morin <gmorin@gnu.org>
|
|
|
|
|
|
© 2007 Kahlil (Kal) Hodgson <kahlil@internode.on.net>
|
|
|
|
|
|
© 2011 Adam Spiers <stow@adamspiers.org>
|
|
|
|
Permission is granted to make and distribute verbatim copies of this
|
|
manual provided the copyright notice and this permission notice are
|
|
preserved on all copies.
|
|
|
|
|
|
Permission is granted to copy and distribute modified versions of this
|
|
manual under the conditions for verbatim copying, provided also that the
|
|
section entitled "GNU General Public License" is included with the
|
|
modified manual, and provided that the entire resulting derived work is
|
|
distributed under the terms of a permission notice identical to this
|
|
one.
|
|
|
|
Permission is granted to copy and distribute translations of this manual
|
|
into another language, under the above conditions for modified versions,
|
|
except that this permission notice may be stated in a translation
|
|
approved by the Free Software Foundation. -->
|
|
<title>Introduction (Stow)</title>
|
|
|
|
<meta name="description" content="Introduction (Stow)">
|
|
<meta name="keywords" content="Introduction (Stow)">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="makeinfo">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
|
|
<link href="index.html" rel="start" title="Top">
|
|
<link href="Index.html" rel="index" title="Index">
|
|
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
|
<link href="index.html" rel="up" title="Top">
|
|
<link href="Terminology.html" rel="next" title="Terminology">
|
|
<link href="index.html" rel="prev" title="Top">
|
|
<style type="text/css">
|
|
<!--
|
|
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
|
|
div.example {margin-left: 3.2em}
|
|
span:hover a.copiable-link {visibility: visible}
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en">
|
|
<div class="chapter-level-extent" id="Introduction">
|
|
<div class="nav-panel">
|
|
<p>
|
|
Next: <a href="Terminology.html" accesskey="n" rel="next">Terminology</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
<hr>
|
|
<h2 class="chapter" id="Introduction-1"><span>1 Introduction<a class="copiable-link" href="#Introduction-1"> ¶</a></span></h2>
|
|
|
|
<p>GNU Stow is a symlink farm manager which takes distinct sets of
|
|
software and/or data located in separate directories on the
|
|
filesystem, and makes them all appear to be installed in a single
|
|
directory tree.
|
|
</p>
|
|
<p>Originally Stow was born to address the need to administer, upgrade,
|
|
install, and remove files in independent software packages without
|
|
confusing them with other files sharing the same file system space.
|
|
For instance, many years ago it used to be common to compile programs
|
|
such as Perl and Emacs from source and install them in
|
|
<samp class="file">/usr/local</samp>. When one does so, one winds up with the following
|
|
files<a class="footnote" id="DOCF1" href="#FOOT1"><sup>1</sup></a> in
|
|
<samp class="file">/usr/local/man/man1</samp>:
|
|
</p>
|
|
<div class="example">
|
|
<pre class="example-preformatted">a2p.1
|
|
ctags.1
|
|
emacs.1
|
|
etags.1
|
|
h2ph.1
|
|
perl.1
|
|
s2p.1
|
|
</pre></div>
|
|
|
|
<p>Now suppose it’s time to uninstall Perl. Which man pages
|
|
get removed? Obviously <samp class="file">perl.1</samp> is one of them, but it should not
|
|
be the administrator’s responsibility to memorize the ownership of
|
|
individual files by separate packages.
|
|
</p>
|
|
<p>The approach used by Stow is to install each package into its own
|
|
tree, then use symbolic links to make it appear as though the files are
|
|
installed in the common tree. Administration can be performed in the
|
|
package’s private tree in isolation from clutter from other packages.
|
|
Stow can then be used to update the symbolic links. The structure
|
|
of each private tree should reflect the desired structure in the common
|
|
tree; i.e. (in the typical case) there should be a <samp class="file">bin</samp> directory
|
|
containing executables, a <samp class="file">man/man1</samp> directory containing section 1
|
|
man pages, and so on.
|
|
</p>
|
|
<p>While this is useful for keeping track of system-wide and per-user
|
|
installations of software built from source, in more recent times
|
|
software packages are often managed by more sophisticated package
|
|
management software such as
|
|
<a class="uref" href="https://en.wikipedia.org/wiki/Rpm_(software)"><code class="command">rpm</code></a>,
|
|
<a class="uref" href="https://en.wikipedia.org/wiki/Dpkg"><code class="command">dpkg</code></a>, and
|
|
<a class="uref" href="https://en.wikipedia.org/wiki/Nix_package_manager">Nix</a> /
|
|
<a class="uref" href="https://en.wikipedia.org/wiki/GNU_Guix">GNU Guix</a>, or
|
|
language-native package managers such as
|
|
<a class="uref" href="https://en.wikipedia.org/wiki/RubyGems">Ruby’s <code class="command">gem</code></a>,
|
|
<a class="uref" href="https://en.wikipedia.org/wiki/Pip_(package_manager)">Python’s
|
|
<code class="command">pip</code></a>, <a class="uref" href="https://en.wikipedia.org/wiki/Npm_(software)">Javascript’s <code class="command">npm</code></a>, and so on.
|
|
</p>
|
|
<p>However Stow is still used not only for software package management,
|
|
but also for other purposes, such as facilitating a more controlled
|
|
approach to management of configuration files in the user’s home
|
|
directory<a class="footnote" id="DOCF2" href="#FOOT2"><sup>2</sup></a>,
|
|
especially when coupled with version control
|
|
systems<a class="footnote" id="DOCF3" href="#FOOT3"><sup>3</sup></a>.
|
|
</p>
|
|
<p>Stow was inspired by Carnegie Mellon’s Depot program, but is
|
|
substantially simpler and safer. Whereas Depot required database
|
|
files to keep things in sync, Stow stores no extra state between runs,
|
|
so there’s no danger (as there was in Depot) of mangling directories
|
|
when file hierarchies don’t match the database. Also unlike Depot,
|
|
Stow will never delete any files, directories, or links that appear in
|
|
a Stow directory (e.g., <samp class="file">/usr/local/stow/emacs</samp>), so it’s always
|
|
possible to rebuild the target tree (e.g., <samp class="file">/usr/local</samp>).
|
|
</p>
|
|
<p>Stow is implemented as a combination of a Perl script providing a CLI
|
|
interface, and a backend Perl module which does most of the work.
|
|
</p>
|
|
<p>For information about the latest version of Stow, you can refer to
|
|
<a class="uref" href="http://www.gnu.org/software/stow/">http://www.gnu.org/software/stow/</a>.
|
|
</p>
|
|
|
|
</div>
|
|
<div class="footnotes-segment">
|
|
<hr>
|
|
<h4 class="footnotes-heading">Footnotes</h4>
|
|
|
|
<h5 class="footnote-body-heading"><a id="FOOT1" href="#DOCF1">(1)</a></h5>
|
|
<p>As of Perl 4.036 and Emacs 19.22. These are now
|
|
ancient releases but the example still holds valid.</p>
|
|
<h5 class="footnote-body-heading"><a id="FOOT2" href="#DOCF2">(2)</a></h5>
|
|
<p><a class="uref" href="http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html">http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html</a></p>
|
|
<h5 class="footnote-body-heading"><a id="FOOT3" href="#DOCF3">(3)</a></h5>
|
|
<p><a class="uref" href="http://lists.gnu.org/archive/html/info-stow/2011-12/msg00000.html">http://lists.gnu.org/archive/html/info-stow/2011-12/msg00000.html</a></p>
|
|
</div>
|
|
<hr>
|
|
<div class="nav-panel">
|
|
<p>
|
|
Next: <a href="Terminology.html">Terminology</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|