1 \input texinfo @c -*- texinfo -*-
7 @c @setchapternewpage odd
8 @c @footnotestyle separate
17 This manual describes GNU Stow version @value{VERSION}
18 (@value{UPDATED}), a program for managing farms of symbolic links.
20 Software and documentation is copyrighted by the following:
22 @copyright{} 1993, 1994, 1995, 1996 Bob Glickstein @email{bobg+stow@@zanshin.com}
24 @copyright{} 2000, 2001 Guillaume Morin @email{gmorin@@gnu.org}
26 @copyright{} 2007 Kahlil (Kal) Hodgson @email{kahlil@@internode.on.net}
28 @copyright{} 2011 Adam Spiers @email{stow@@adamspiers.org}
31 Permission is granted to make and distribute verbatim copies of this
32 manual provided the copyright notice and this permission notice are
33 preserved on all copies.
36 Permission is granted to process this file through TeX and print the
37 results, provided the printed document carries a copying permission
38 notice identical to this one except for the removal of this paragraph
39 (this paragraph not being relevant to the printed manual).
42 Permission is granted to copy and distribute modified versions of this
43 manual under the conditions for verbatim copying, provided also that the
44 section entitled ``GNU General Public License'' is included with the
45 modified manual, and provided that the entire resulting derived work is
46 distributed under the terms of a permission notice identical to this
49 Permission is granted to copy and distribute translations of this manual
50 into another language, under the above conditions for modified versions,
51 except that this permission notice may be stated in a translation
52 approved by the Free Software Foundation.
56 @dircategory System administration
58 * Stow: (stow). GNU Stow.
61 @c ===========================================================================
63 @title Stow @value{VERSION}
64 @subtitle Managing the installation of software packages
65 @author Bob Glickstein, Zanshin Software, Inc.
66 @author Kahlil Hodgson, RMIT University, Australia.
67 @author Guillaume Morin
70 @vskip 0pt plus 1filll
74 @c FIXME: How to include the TOC in the TOC?
75 @c @node Table of Contents, Top, (dir), (dir)
76 @c @unnumbered Table of Contents
79 @c ==========================================================================
84 This manual describes GNU Stow @value{VERSION} (@value{UPDATED}), a
85 symlink farm manager which takes distinct sets of software and/or data
86 located in separate directories on the filesystem, and makes them
87 appear to be installed in a single directory tree.
91 * Introduction:: Description of Stow.
92 * Terminology:: Terms used by this manual.
93 * Invoking Stow:: Option summary.
94 * Ignore Lists:: Controlling what gets stowed.
95 * Installing Packages:: Using Stow to install.
96 * Deleting Packages:: Using Stow to uninstall.
97 * Conflicts:: When Stow can't stow.
98 * Mixing Operations:: Multiple actions per invocation.
99 * Multiple Stow Directories:: Further segregating software.
100 * Target Maintenance:: Cleaning up mistakes.
101 * Resource Files:: Setting default command line options.
102 * Compile-time vs. Install-time:: Faking out `make install'.
103 * Bootstrapping:: When stow and perl are not yet stowed.
104 * Reporting Bugs:: How, what, where, and when to report.
105 * Known Bugs:: Don't report any of these.
106 * GNU General Public License:: Copying terms.
107 * Index:: Index of concepts.
110 --- The Detailed Node Listing ---
114 * Motivation For Ignore Lists::
115 * Types And Syntax Of Ignore Lists::
116 * Justification For Yet Another Set Of Ignore Files::
118 Advice on changing compilation and installation parameters
121 * Other FSF Software::
123 * Perl and Perl 5 Modules::
128 @c ===========================================================================
129 @node Introduction, Terminology, Top, Top
130 @chapter Introduction
132 GNU Stow is a symlink farm manager which takes distinct sets of
133 software and/or data located in separate directories on the
134 filesystem, and makes them all appear to be installed in a single
137 Originally Stow was born to address the need to administer, upgrade,
138 install, and remove files in independent software packages without
139 confusing them with other files sharing the same file system space.
140 For instance, many years ago it used to be common to compile programs
141 such as Perl and Emacs from source and install them in
142 @file{/usr/local}. When one does so, one winds up with the following
143 files@footnote{As of Perl 4.036 and Emacs 19.22. These are now
144 ancient releases but the example still holds valid.} in
145 @file{/usr/local/man/man1}:
158 Now suppose it's time to uninstall Perl. Which man pages
159 get removed? Obviously @file{perl.1} is one of them, but it should not
160 be the administrator's responsibility to memorize the ownership of
161 individual files by separate packages.
163 The approach used by Stow is to install each package into its own
164 tree, then use symbolic links to make it appear as though the files are
165 installed in the common tree. Administration can be performed in the
166 package's private tree in isolation from clutter from other packages.
167 Stow can then be used to update the symbolic links. The structure
168 of each private tree should reflect the desired structure in the common
169 tree; i.e. (in the typical case) there should be a @file{bin} directory
170 containing executables, a @file{man/man1} directory containing section 1
171 man pages, and so on.
173 While this is useful for keeping track of system-wide and per-user
174 installations of software built from source, in more recent times
175 software packages are often managed by more sophisticated package
176 management software such as
177 @uref{https://en.wikipedia.org/wiki/Rpm_(software), @command{rpm}},
178 @uref{https://en.wikipedia.org/wiki/Dpkg, @command{dpkg}}, and
179 @uref{https://en.wikipedia.org/wiki/Nix_package_manager, Nix} /
180 @uref{https://en.wikipedia.org/wiki/GNU_Guix, GNU Guix}, or
181 language-native package managers such as
182 @uref{https://en.wikipedia.org/wiki/RubyGems, Ruby's @command{gem}},
183 @uref{https://en.wikipedia.org/wiki/Pip_(package_manager), Python's
184 @command{pip}}, @uref{https://en.wikipedia.org/wiki/Npm_(software),
185 Javascript's @command{npm}}, and so on.
187 However Stow is still used not only for software package management,
188 but also for other purposes, such as facilitating a more controlled
189 approach to management of configuration files in the user's home
190 directory@footnote{@uref{http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html}},
191 especially when coupled with version control
192 systems@footnote{@uref{http://lists.gnu.org/archive/html/info-stow/2011-12/msg00000.html}}.
194 Stow was inspired by Carnegie Mellon's Depot program, but is
195 substantially simpler and safer. Whereas Depot required database
196 files to keep things in sync, Stow stores no extra state between runs,
197 so there's no danger (as there was in Depot) of mangling directories
198 when file hierarchies don't match the database. Also unlike Depot,
199 Stow will never delete any files, directories, or links that appear in
200 a Stow directory (e.g., @file{/usr/local/stow/emacs}), so it's always
201 possible to rebuild the target tree (e.g., @file{/usr/local}).
203 Stow is implemented as a combination of a Perl script providing a CLI
204 interface, and a backend Perl module which does most of the work.
206 For information about the latest version of Stow, you can refer to
207 @uref{http://www.gnu.org/software/stow/}.
210 @c ===========================================================================
211 @node Terminology, Invoking Stow, Introduction, Top
216 A @dfn{package} is a related collection of files and directories that
217 you wish to administer as a unit --- e.g., Perl or Emacs --- and that needs
218 to be installed in a particular directory structure --- e.g., with
219 @file{bin}, @file{lib}, and @file{man} subdirectories.
221 @cindex target directory
222 A @dfn{target directory} is the root of a tree in which one or more
223 packages wish to @emph{appear} to be installed. @file{/usr/local} is a
224 common choice for this, but by no means the only such location. Another
225 common choice is @file{~} (i.e.@: the user's @code{$HOME} directory) in
226 the case where Stow is being used to manage the user's configuration
227 (``dotfiles'') and other files in their @code{$HOME}. The examples in
228 this manual will use @file{/usr/local} as the target directory.
230 @cindex stow directory
231 A @dfn{stow directory} is the root of a tree containing separate
232 packages in private subtrees. When Stow runs, it uses the current
233 directory as the default stow directory. The examples in this manual
234 will use @file{/usr/local/stow} as the stow directory, so that
235 individual packages will be, for example, @file{/usr/local/stow/perl}
236 and @file{/usr/local/stow/emacs}.
238 @cindex installation image
239 An @dfn{installation image} is the layout of files and directories
240 required by a package, relative to the target directory. Thus, the
241 installation image for Perl includes: a @file{bin} directory containing
242 @file{perl} and @file{a2p} (among others); an @file{info} directory
243 containing Texinfo documentation; a @file{lib/perl} directory containing
244 Perl libraries; and a @file{man/man1} directory containing man pages.
247 This is a @emph{pre-}installation image which exists even before Stow
248 has installed any symlinks into the target directory which point to it.
251 @cindex package directory
253 A @dfn{package directory} is the root of a tree containing the
254 installation image for a particular package. Each package directory
255 must reside in a stow directory --- e.g., the package directory
256 @file{/usr/local/stow/perl} must reside in the stow directory
257 @file{/usr/local/stow}. The @dfn{name} of a package is the name of its
258 directory within the stow directory --- e.g., @file{perl}.
260 Thus, the Perl executable might reside in
261 @file{/usr/local/stow/perl/bin/perl}, where @file{/usr/local} is the
262 target directory, @file{/usr/local/stow} is the stow directory,
263 @file{/usr/local/stow/perl} is the package directory, and
264 @file{bin/perl} within is part of the installation image.
268 @cindex symlink source
269 @cindex symlink destination
270 @cindex relative symlink
271 @cindex absolute symlink
272 A @dfn{symlink} is a symbolic link, i.e.@: an entry on the filesystem
273 whose path is sometimes called the @dfn{symlink source}, which points to
274 another location on the filesystem called the @dfn{symlink destination}.
275 There is no guarantee that the destination actually exists.
277 In general, symlinks can be @dfn{relative} or @dfn{absolute}. A symlink
278 is absolute when the destination names a full path; that is, one
279 starting from @file{/}. A symlink is relative when the destination
280 names a relative path; that is, one not starting from @file{/}. The
281 destination of a relative symlink is computed starting from the
282 symlink's own directory, i.e.@: the directory containing the symlink
286 Stow only creates symlinks within the target directory which point to
287 locations @emph{outside} the target directory and inside the stow
290 Consequently, we avoid referring to symlink destinations as symlink
291 @emph{targets}, since this would result in the word ``target'' having
292 two different meanings:
297 the target directory, i.e.@: the directory into which Stow targets
298 installation, where symlinks are managed by Stow, and
301 the destinations of those symlinks.
305 If we did not avoid the second meaning of ``target'', then it would lead
306 to confusing language, such as describing Stow as installing symlinks
307 into the target directory which point to targets @emph{outside} the
310 Similarly, the word ``source'' can have two different meanings in this
316 the installation image, or some of its contents, and
319 the location of symlinks (the ``source'' of the link, vs.@: its
324 Therefore it should also be avoided, or at least care taken to ensure
325 that the meaning is not ambiguous.
329 @c ===========================================================================
330 @node Invoking Stow, Ignore Lists, Terminology, Top
331 @chapter Invoking Stow
333 The syntax of the @command{stow} command is:
336 stow [@var{options}] [@var{action flag}] @var{package @dots{}}
340 Each @var{package} is the name of a package (e.g., @samp{perl}) in the stow
341 directory that we wish to install into (or delete from) the target directory.
342 The default action is to install the given packages, although alternate actions
343 may be specified by preceding the package name(s) with an @var{action flag}.
346 The following options are supported:
351 @itemx --dir=@var{dir}
352 Set the stow directory to @var{dir}. Defaults to the value of the environment
353 variable @env{STOW_DIR} if set, or the current directory otherwise.
356 @itemx --target=@var{dir}
357 Set the target directory to @var{dir} instead of the parent of the stow
358 directory. Defaults to the parent of the stow directory, so it is typical to
359 execute @command{stow} from the directory @file{/usr/local/stow}.
361 @item --ignore=@var{regexp}
362 This (repeatable) option lets you suppress acting on files that match the
363 given Perl regular expression. For example, using the options
366 --ignore='.*\.orig' --ignore='.*\.dist'
370 will cause stow to ignore files ending in @file{.orig} or @file{.dist}.
372 Note that the regular expression is anchored to the end of the filename,
373 because this is what you will want to do most of the time.
375 Also note that by default Stow automatically ignores a ``sensible''
376 built-in list of files and directories such as @file{CVS}, editor
377 backup files, and so on. @xref{Ignore Lists}, for more details.
379 @item --defer=@var{regexp}
380 This (repeatable) option avoids stowing a file matching the given
381 regular expression, if that file is already stowed by another package.
382 This is effectively the opposite of @option{--override}.
384 (N.B. the name @option{--defer} was chosen in the sense that the package
385 currently being stowed is treated with lower precedence than any
386 already installed package, not in the sense that the operation is
387 being postponed to be run at a later point in time; do not confuse
388 this nomenclature with the wording used in @ref{Deferred Operation}.)
390 For example, the following options
393 --defer=man --defer=info
397 will cause stow to skip over pre-existing man and info pages.
399 Equivalently, you could use @samp{--defer='man|info'} since the
400 argument is just a Perl regular expression.
402 Note that the regular expression is anchored to the beginning of the path
403 relative to the target directory, because this is what you will want to do most
406 @item --override=@var{regexp}
407 This (repeatable) option forces any file matching the regular expression to be
408 stowed, even if the file is already stowed to another package. For example,
409 the following options
412 --override=man --override=info
416 will permit stow to overwrite links that point to pre-existing man and info
417 pages that are owned by stow and would otherwise cause a conflict.
419 The regular expression is anchored to the beginning of the path relative to
420 the target directory, because this is what you will want to do most of the time.
425 Enable special handling for @emph{dotfiles} (files or folders whose
426 name begins with a period) in the package directory. If this option is
427 enabled, Stow will add a preprocessing step for each file or folder
428 whose name begins with @samp{dot-}, and replace the @samp{dot-} prefix
429 in the name by a period @samp{.}. This is useful when Stow is used to
430 manage collections of dotfiles, to avoid having a package directory
431 full of hidden files.
433 For example, suppose we have a package containing two files,
434 @file{stow/dot-bashrc} and @file{stow/dot-emacs.d/init.el}. With this
435 option, Stow will create symlinks from @file{.bashrc} to
436 @file{stow/dot-bashrc} and from @file{.emacs.d/init.el} to
437 @file{stow/dot-emacs.d/init.el}. Any other files, whose name does not
438 begin with @samp{dot-}, will be processed as usual.
442 This disables any further tree folding (@pxref{tree folding}) or
443 refolding (@pxref{tree refolding}). If a new subdirectory is
444 encountered whilst stowing a new package, the subdirectory is created
445 within the target, and its contents are symlinked, rather than just
446 creating a symlink for the directory. If removal of symlinks whilst
447 unstowing a package causes a subtree to be foldable (i.e.@: only
448 containing symlinks to a single package), that subtree will not be
449 removed and replaced with a symlink.
451 @cindex adopting existing files
453 @strong{Warning!} This behaviour is specifically intended to alter the
454 contents of your stow directory. If you do not want that, this option
457 When stowing, if a target is encountered which already exists but is a
458 plain file (and hence not owned by any existing stow package), then
459 normally Stow will register this as a conflict and refuse to proceed.
460 This option changes that behaviour so that the file is moved to the
461 same relative place within the package's installation image within the
462 stow directory, and then stowing proceeds as before. So effectively,
463 the file becomes adopted by the stow package, without its contents
466 This is particularly useful when the stow package is under the control
467 of a version control system, because it allows files in the target
468 tree, with potentially different contents to the equivalent versions
469 in the stow package's installation image, to be adopted into the
470 package, then compared by running something like @samp{git diff ...}
471 inside the stow package, and finally either kept (e.g. via @samp{git
472 commit ...}) or discarded (@samp{git checkout HEAD ...}).
475 @cindex simulated run
479 Do not perform any operations that modify the file system; in combination with
480 @option{-v} can be used to merely show what would happen.
482 @cindex verbosity levels
484 @itemx --verbose[=@var{n}]
485 Send verbose output to standard error describing what Stow is
486 doing. Verbosity levels are from 0 to 5; 0 is the default. Using
487 @option{-v} or @option{--verbose} increases the verbosity by one; using
488 @samp{--verbose=@var{n}} sets it to @var{n}.
492 Scan the whole target tree when unstowing. By default, only
493 directories specified in the @dfn{installation image} are scanned
494 during an unstow operation. Scanning the whole tree can be
495 prohibitive if your target tree is very large. This option restores
496 the legacy behaviour; however, the @option{--badlinks} option to the
497 @command{chkstow} utility may be a better way of ensuring that your
498 installation does not have any dangling symlinks (@pxref{Target
503 Show Stow version number, and exit.
507 Show Stow command syntax, and exit.
510 The following @var{action flags} are supported:
515 Delete (unstow) the package name(s) that follow this option from the @dfn{target
516 directory}. This option may be repeated any number of times.
520 Restow (first unstow, then stow again) the package names that follow this
521 option. This is useful for pruning obsolete symlinks from the target tree
522 after updating the software in a package. This option may be repeated any
527 explictly stow the package name(s) that follow this option. May be
528 omitted if you are not using the @option{-D} or @option{-R} options in the
529 same invocation. @xref{Mixing Operations}, for details of when you
530 might like to use this feature. This option may be repeated any number
535 @c ===========================================================================
536 @node Ignore Lists, Installing Packages, Invoking Stow, Top
537 @chapter Ignore Lists
540 @cindex ignoring files and directories
543 * Motivation For Ignore Lists::
544 * Types And Syntax Of Ignore Lists::
545 * Justification For Yet Another Set Of Ignore Files::
548 @c ===========================================================================
549 @node Motivation For Ignore Lists, Types And Syntax Of Ignore Lists, Ignore Lists, Ignore Lists
550 @section Motivation For Ignore Lists
552 In many situations, there will exist files under the package
553 directories which it would be undesirable to stow into the target
554 directory. For example, files related version control such as
555 @file{.gitignore}, @file{CVS}, @file{*,v} (RCS files) should typically
556 not have symlinks from the target tree pointing to them. Also there
557 may be files or directories relating to the build of the package which
558 are not needed at run-time.
560 In these cases, it can be rather cumbersome to specify a
561 @option{--ignore} parameter for each file or directory to be ignored.
562 This could be worked around by ensuring the existence of
563 @file{~/.stowrc} containing multiple @option{--ignore} lines, or if a
564 different set of files/directories should be ignored depending on
565 which stow package is involved, a @file{.stowrc} file for each stow
566 package, but this would require the user to ensure that they were in
567 the correct directory before invoking stow, which would be tedious and
568 error-prone. Furthermore, since Stow shifts parameters from
569 @file{.stowrc} onto ARGV at run-time, it could clutter up the process
570 table with excessively long parameter lists, or even worse, exceed the
571 operating system's limit for process arguments.
574 Therefore in addition to @option{--ignore} parameters, Stow provides a
575 way to specify lists of files and directories to ignore.
577 @c ===========================================================================
578 @node Types And Syntax Of Ignore Lists, Justification For Yet Another Set Of Ignore Files, Motivation For Ignore Lists, Ignore Lists
579 @section Types And Syntax Of Ignore Lists
581 If you put Perl regular expressions, one per line, in a
582 @file{.stow-local-ignore} file within any top level package directory,
583 in which case any file or directory within that package matching any
584 of these regular expressions will be ignored. In the absence of this
585 package-specific ignore list, Stow will instead use the contents of
586 @file{~/.stow-global-ignore}, if it exists. If neither the
587 package-local or global ignore list exist, Stow will use its own
588 built-in default ignore list, which serves as a useful example of the
589 format of these ignore list files:
592 @verbatiminclude default-ignore-list
595 Stow first iterates through the chosen ignore list (built-in, global,
596 or package-local) as per above, stripping out comments (if you want to
597 include the @samp{#} symbol in a regular expression, escape it with a
598 blackslash) and blank lines, placing each regular expressions into one
599 of two sets depending on whether it contains the @samp{/} forward
602 Then in order to determine whether a file or directory should be
607 Stow calculates its path relative to the top-level package directory,
608 prefixing that with @samp{/}. If any of the regular expressions
609 containing a @samp{/} @emph{exactly}@footnote{Exact matching means the
610 regular expression is anchored at the beginning and end, in contrast
611 to unanchored regular expressions which will match a substring.} match
612 a subpath@footnote{In this context, ``subpath'' means a contiguous
613 subset of path segments; e.g for the relative path
614 @file{one/two/three}, there are six valid subpaths: @file{one},
615 @file{two}, @file{three}, @file{one/two}, @file{two/three},
616 @file{one/two/three}.} of this relative path, then the file or
617 directory will be ignored.
620 If none of the regular expressions containing a @samp{/} match in the
621 manner described above, Stow checks whether the
622 @emph{basename}@footnote{The ``basename'' is the name of the file or
623 directory itself, excluding any directory path prefix - as returned by
624 the @command{basename} command.} of the file or directory matches
625 @emph{exactly} against the remaining regular expressions which do not
626 contain a @samp{/}, and if so, ignores the file or directory.
629 Otherwise, the file or directory is not ignored.
632 @c N.B. if you change the examples below, please also consider
633 @c updating test_examples_in_manual() in t/ignore.t.
635 For example, if a file @file{bazqux} is in the @file{foo/bar}
636 subdirectory of the package directory, Stow would use
637 @samp{/foo/bar/bazqux} as the text for matching against regular
638 expressions which contain @samp{/}, and @samp{bazqux} as the text for
639 matching against regular expressions which don't contain @samp{/}.
640 Then regular expressions @samp{bazqux}, @samp{baz.*}, @samp{.*qux},
641 @samp{bar/.*x}, and @samp{^/foo/.*qux} would all match (causing the
642 file to be ignored), whereas @samp{bar}, @samp{baz}, @samp{qux}, and
643 @samp{o/bar/b} would not (although @samp{bar} would cause its parent
644 directory to be ignored and prevent Stow from recursing into that
645 anyway, in which case the file @file{bazqux} would not even be
646 considered for stowing).
648 As a special exception to the above algorithm, any
649 @file{.stow-local-ignore} present in the top-level package directory
650 is @emph{always} ignored, regardless of the contents of any ignore
651 list, because this file serves no purpose outside the stow directory.
653 @c ===========================================================================
654 @node Justification For Yet Another Set Of Ignore Files, , Types And Syntax Of Ignore Lists, Ignore Lists
655 @section Justification For Yet Another Set Of Ignore Files
657 The reader may note that this format is very similar to existing
658 ignore list file formats, such as those for @command{cvs}, @command{git},
659 @command{rsync} etc., and wonder if another set of ignore lists is
660 justified. However there are good reasons why Stow does not simply
661 check for the presence of say, @file{.cvsignore}, and use that if it
662 exists. Firstly, there is no guarantee that a stow package would
663 contain any version control meta-data, or permit introducing this if
664 it didn't already exist.
666 Secondly even if it did, version control system ignore lists generally
667 reflect @emph{build-time} ignores rather than @emph{install-time}, and
668 there may be some intermediate or temporary files on those ignore
669 lists generated during development or at build-time which it would be
670 inappropriate to stow, even though many files generated at build-time
671 (binaries, libraries, documentation etc.) certainly do need to be
672 stowed. Similarly, if a file is @emph{not} in the version control
673 system's ignore list, there is no way of knowing whether the file is
674 intended for end use, let alone whether the version control system is
677 Therefore it seems clear that ignore lists provided by version control
678 systems do not provide sufficient information for Stow to determine
679 which files and directories to stow, and so it makes sense for Stow to
680 support independent ignore lists.
682 @c ===========================================================================
683 @node Installing Packages, Deleting Packages, Ignore Lists, Top
684 @chapter Installing Packages
687 The default action of Stow is to install a package. This means creating
688 symlinks in the target tree that point into the package tree. Stow
689 attempts to do this with as few symlinks as possible; in other words, if
690 Stow can create a single symlink that points to an entire subtree within
691 the package tree, it will choose to do that rather than create a
692 directory in the target tree and populate it with symlinks.
694 @anchor{tree folding}
695 @section Tree folding
697 @cindex directory folding
698 @cindex folding trees
699 For example, suppose that no packages have yet been installed in
700 @file{/usr/local}; it's completely empty (except for the @file{stow}
701 subdirectory, of course). Now suppose the Perl package is installed.
702 Recall that it includes the following directories in its installation
703 image: @file{bin}; @file{info}; @file{lib/perl}; @file{man/man1}.
704 Rather than creating the directory @file{/usr/local/bin} and populating
705 it with symlinks to @file{../stow/perl/bin/perl} and
706 @file{../stow/perl/bin/a2p} (and so on), Stow will create a
707 single symlink, @file{/usr/local/bin}, which points to
708 @file{stow/perl/bin}. In this way, it still works to refer to
709 @file{/usr/local/bin/perl} and @file{/usr/local/bin/a2p}, and fewer
710 symlinks have been created. This is called @dfn{tree folding}, since an
711 entire subtree is ``folded'' into a single symlink.
713 To complete this example, Stow will also create the symlink
714 @file{/usr/local/info} pointing to @file{stow/perl/info}; the symlink
715 @file{/usr/local/lib} pointing to @file{stow/perl/lib}; and the symlink
716 @file{/usr/local/man} pointing to @file{stow/perl/man}.
718 Now suppose that instead of installing the Perl package into an empty
719 target tree, the target tree is not empty to begin with. Instead, it
720 contains several files and directories installed under a different
721 system-administration philosophy. In particular, @file{/usr/local/bin}
722 already exists and is a directory, as are @file{/usr/local/lib} and
723 @file{/usr/local/man/man1}. In this case, Stow will descend into
724 @file{/usr/local/bin} and create symlinks to
725 @file{../stow/perl/bin/perl} and @file{../stow/perl/bin/a2p} (etc.),
726 and it will descend into @file{/usr/local/lib} and create the
727 tree-folding symlink @file{perl} pointing to
728 @file{../stow/perl/lib/perl}, and so on. As a rule, Stow only
729 descends as far as necessary into the target tree when it can create a
730 tree-folding symlink. However, this behaviour can be changed via
731 the @option{--no-folding} option; @pxref{Invoking Stow}.
733 @anchor{Tree unfolding}
734 @section Tree unfolding
735 @cindex splitting open folded trees
736 @cindex unfolding trees
737 @cindex tree unfolding
738 @cindex tree unsplitting
739 The time often comes when a tree-folding symlink has to be undone
740 because another package uses one or more of the folded subdirectories in
741 its installation image. This operation is called @dfn{splitting open} or
742 @dfn{unfolding} a folded tree. It involves removing the original symlink from
743 the target tree, creating a true directory in its place, and then populating the
744 new directory with symlinks to the newly-installed package @emph{and} to
745 the old package that used the old symlink. For example, suppose that
746 after installing Perl into an empty @file{/usr/local}, we wish to
747 install Emacs. Emacs's installation image includes a @file{bin}
748 directory containing the @file{emacs} and @file{etags} executables,
749 among others. Stow must make these files appear to be installed
750 in @file{/usr/local/bin}, but presently @file{/usr/local/bin} is a
751 symlink to @file{stow/perl/bin}. Stow therefore takes the
752 following steps: the symlink @file{/usr/local/bin} is deleted; the
753 directory @file{/usr/local/bin} is created; links are made from
754 @file{/usr/local/bin} to @file{../stow/emacs/bin/emacs} and
755 @file{../stow/emacs/bin/etags}; and links are made from
756 @file{/usr/local/bin} to @file{../stow/perl/bin/perl} and
757 @file{../stow/perl/bin/a2p}.
761 When splitting open a folded tree, Stow makes sure that the
762 symlink it is about to remove points inside a valid package in the
763 current stow directory. @emph{Stow will never delete anything
764 that it doesn't own}. Stow ``owns'' everything living in the
765 target tree that points into a package in the stow directory. Anything
766 Stow owns, it can recompute if lost: symlinks that point into a package in
767 the stow directory, or directories that only contain symlinks that stow
768 ``owns''. Note that by this definition, Stow doesn't ``own'' anything
769 @emph{in} the stow directory or in any of the packages.
771 @section Conflicts during installation
773 @cindex installation conflicts
774 If Stow needs to create a directory or a symlink in the target
775 tree and it cannot because that name is already in use and is not owned
776 by Stow, then a @dfn{conflict} has arisen. @xref{Conflicts}.
779 @c ===========================================================================
780 @node Deleting Packages, Conflicts, Installing Packages, Top
781 @chapter Deleting Packages
784 When the @option{-D} option is given, the action of Stow is to
785 delete a package from the target tree. Note that Stow will not
786 delete anything it doesn't ``own''. Deleting a package does @emph{not}
787 mean removing it from the stow directory or discarding the package
790 To delete a package, Stow recursively scans the target tree, skipping over any
791 directory that is not included in the installation image.@footnote{This
792 approach was introduced in version 2 of GNU Stow. Previously, the whole
793 target tree was scanned and stow directories were explicitly omitted. This
794 became problematic when dealing with very large installations. The only
795 situation where this is useful is if you accidentally delete a directory in
796 the package tree, leaving you with a whole bunch of dangling links. Note that
797 you can enable the old approach with the @option{-p} option. Alternatively, you can
798 use the @option{--badlinks} option get stow to search for dangling links in your target tree and remove the offenders manually.}
799 For example, if the target directory is @file{/usr/local} and the
800 installation image for the package being deleted has only a @file{bin}
801 directory and a @file{man} directory at the top level, then we only scan
802 @file{/usr/local/bin} and @file{/usr/local/man}, and not
803 @file{/usr/local/lib} or @file{/usr/local/share}, or for that matter
804 @file{/usr/local/stow}. Any symlink it finds that points into the package
805 being deleted is removed. Any directory that contained only symlinks to the
806 package being deleted is removed.
808 @anchor{tree refolding}
809 @section Refolding ``foldable'' trees.
810 @cindex refolding trees
811 @cindex tree refolding
813 After removing symlinks and empty subdirectories, any directory that
814 contains only symlinks to a single other package is considered to be a
815 previously ``folded'' tree that was ``split open.'' Stow will refold
816 the tree by removing the symlinks to the surviving package, removing
817 the directory, then linking the directory back to the surviving
818 package. However, this behaviour can be prevented via the
819 @option{--no-folding} option; @pxref{Invoking Stow}.
821 @c ===========================================================================
822 @node Conflicts, Mixing Operations, Deleting Packages, Top
826 If, during installation, a file or symlink exists in the target tree and
827 has the same name as something Stow needs to create, and if the
828 existing name is not a folded tree that can be split open, then a
829 @dfn{conflict} has arisen. A conflict also occurs if a directory exists
830 where Stow needs to place a symlink to a non-directory. On the
831 other hand, if the existing name is merely a symlink that already points
832 where Stow needs it to, then no conflict has occurred. (Thus it
833 is harmless to install a package that has already been installed.)
835 For complex packages, scanning the stow and target trees in tandem,
836 and deciding whether to make directories or links, split-open or fold
837 directories, can actually take a long time (a number of seconds).
838 Moreover, an accurate analysis of potential conflicts requires us to
839 take into account all of these operations.
841 @anchor{Deferred Operation}
842 @section Deferred Operation
843 @cindex deferred operation
845 Since version 2.0, Stow now adopts a two-phase algorithm, first
846 scanning for any potential conflicts before any stowing or unstowing
847 operations are performed. If any conflicts are found, they are
848 displayed and then Stow terminates without making any modifications to
849 the filesystem. This means that there is much less risk of a package
850 being partially stowed or unstowed due to conflicts.
852 Prior to version 2.0, if a conflict was discovered, the stow or unstow
853 operation could be aborted mid-flow, leaving the target tree in an
856 @c ===========================================================================
857 @node Mixing Operations, Multiple Stow Directories, Conflicts, Top
858 @chapter Mixing Operations
859 @cindex mixing operations
861 Since version 2.0, multiple distinct actions can be specified in a single
862 invocation of GNU Stow. For example, to update an installation of Emacs from
863 version 21.3 to 21.4a you can now do the following:
866 stow -D emacs-21.3 -S emacs-21.4a
870 which will replace emacs-21.3 with emacs-21.4a using a single invocation.
872 @cindex deferred operation
873 This is much faster and cleaner than performing two separate
874 invocations of stow, because redundant folding/unfolding operations
875 can be factored out. In addition, all the operations are calculated
876 and merged before being executed (@pxref{Deferred Operation}), so the
877 amount of time in which GNU Emacs is unavailable is minimised.
879 You can mix and match any number of actions, for example,
882 stow -S pkg1 pkg2 -D pkg3 pkg4 -S pkg5 -R pkg6
886 will unstow pkg3, pkg4 and pkg6, then stow pkg1, pkg2, pkg5 and pkg6.
888 @c ===========================================================================
889 @node Multiple Stow Directories, Target Maintenance, Mixing Operations, Top
890 @chapter Multiple Stow Directories
892 If there are two or more system administrators who wish to maintain
893 software separately, or if there is any other reason to want two or more
894 stow directories, it can be done by creating a file named @file{.stow}
895 in each stow directory. The presence of @file{/usr/local/foo/.stow}
896 informs Stow that, though @file{foo} is not the current stow
897 directory, even if it is a subdirectory of the target directory,
898 nevertheless it is @emph{a} stow directory and as such Stow
899 doesn't ``own'' anything in it (@pxref{Installing Packages}). This will
900 protect the contents of @file{foo} from a @samp{stow -D}, for instance.
902 @c There is a test for the following case in t/examples.t:
904 When multiple stow directories share a target tree, if a tree-folding
905 symlink is encountered and needs to be split open during an
906 installation, as long as the top-level stow directory into which the
907 existing symlink points contains @file{.stow}, Stow knows how to split
908 open the tree in the correct manner.
910 @c ===========================================================================
911 @node Target Maintenance, Resource Files, Multiple Stow Directories, Top
912 @chapter Target Maintenance
915 From time to time you will need to clean up your target tree. Since
916 version 2, Stow provides a new utility @command{chkstow} to help with
917 this. It includes three operational modes which performs checks that
918 would generally be too expensive to be performed during normal stow
921 The syntax of the @command{chkstow} command is:
924 chkstow [@var{options}]
928 The following options are supported:
933 @itemx --target=@var{dir}
934 Set the target directory to @var{dir} instead of the parent of the stow
935 directory. Defaults to the parent of the stow directory, so it is typical to
936 execute @command{stow} from the directory @file{/usr/local/stow}.
940 Checks target directory for bogus symbolic links. That is, links that point to
945 Checks for files in the target directory that are not symbolic links. The
946 target directory should be managed by stow alone, except for directories that
947 contain a @file{.stow} file.
951 Will display the target package for every symbolic link in the stow target
956 @c ===========================================================================
957 @node Resource Files, Compile-time vs. Install-time, Target Maintenance, Top
958 @chapter Resource Files
959 @cindex resource files
960 @cindex configuration files
962 Default command line options may be set in @file{.stowrc} (current
963 directory) or @file{~/.stowrc} (home directory). These are parsed in
964 that order, and are appended together if they both exist. The effect of
965 the options in the resource file is similar to simply prepending the
966 options to the command line. This feature can be used for some
969 For example, suppose your site uses more than one stow directory, perhaps in
970 order to share around responsibilities with a number of systems
971 administrators. One of the administrators might have the following in their
972 @file{~/.stowrc} file:
975 --dir=/usr/local/stow2
981 so that the @command{stow} command will default to operating on the
982 @file{/usr/local/stow2} directory, with @file{/usr/local} as the
983 target, and ignoring vi backup files and CVS directories.
985 If you had a stow directory @file{/usr/local/stow/perl-extras} that
986 was only used for Perl modules, then you might place the following in
987 @file{/usr/local/stow/perl-extras/.stowrc}:
990 --dir=/usr/local/stow/perl-extras
994 --ignore='perllocal\.pod'
995 --ignore='\.packlist'
999 so that when you are in the @file{/usr/local/stow/perl-extras}
1000 directory, @command{stow} will regard any subdirectories as stow
1001 packages, with @file{/usr/local} as the target (rather than the
1002 immediate parent directory @file{/usr/local/stow}), overriding any
1003 pre-existing links to bin files or man pages, and ignoring some cruft
1004 that gets installed by default.
1006 If an option is provided both on the command line and in a resource file,
1007 the command line option takes precedence. For options that provide a single
1008 value, such as @command{--target} or @command{--dir}, the command line
1009 option will overwrite any options in the resource file. For options that can
1010 be given more than once, @command{--ignore} for example, command line
1011 options and resource options are appended together.
1013 For options that take a file path, environment variables and the tilde
1014 character (@command{~}) are expanded. An environment variable can be
1015 given in either the @command{$VAR} or @command{$@{VAR@}} form. To
1016 prevent expansion, escape the @command{$} or @command{~} with a
1019 The options @command{-D}, @command{-S}, and @command{-R} are ignored in
1020 resource files. This is also true of any package names given in the
1023 @c ===========================================================================
1024 @node Compile-time vs. Install-time, Bootstrapping, Resource Files, Top
1025 @chapter Compile-time vs. Install-time
1027 Software whose installation is managed with Stow needs to be installed
1028 in one place (the package directory, e.g. @file{/usr/local/stow/perl})
1029 but needs to appear to run in another place (the target tree, e.g.,
1030 @file{/usr/local}). Why is this important? What's wrong with Perl, for
1031 instance, looking for its files in @file{/usr/local/stow/perl} instead
1032 of in @file{/usr/local}?
1034 The answer is that there may be another package, e.g.,
1035 @file{/usr/local/stow/perl-extras}, stowed under @file{/usr/local}. If
1036 Perl is configured to find its files in @file{/usr/local/stow/perl}, it
1037 will never find the extra files in the @samp{perl-extras} package, even
1038 though they're intended to be found by Perl. On the other hand, if Perl
1039 looks for its files in @file{/usr/local}, then it will find the
1040 intermingled Perl and @samp{perl-extras} files.
1042 This means that when you compile a package, you must tell it the
1043 location of the run-time, or target tree; but when you install it, you
1044 must place it in the stow tree.
1046 @section Advice on changing compilation and installation parameters
1047 Some software packages allow you to specify, at compile-time, separate
1048 locations for installation and for run-time. Perl is one such package;
1049 see @ref{Perl and Perl 5 Modules}. Others allow you to compile the
1050 package, then give a different destination in the @samp{make install}
1051 step without causing the binaries or other files to get rebuilt. Most
1052 GNU software falls into this category; Emacs is a notable exception.
1053 @xref{GNU Emacs}, and @ref{Other FSF Software}.
1055 Still other software packages cannot abide the idea of separate
1056 installation and run-time locations at all. If you try to @samp{make
1057 install prefix=/usr/local/stow/@var{foo}}, then first the whole package
1058 will be recompiled to hardwire the @file{/usr/local/stow/@var{foo}}
1059 path. With these packages, it is best to compile normally, then run
1060 @samp{make -n install}, which should report all the steps needed to
1061 install the just-built software. Place this output into a file, edit
1062 the commands in the file to remove recompilation steps and to reflect
1063 the Stow-based installation location, and execute the edited file as a
1064 shell script in place of @samp{make install}. Be sure to execute the
1065 script using the same shell that @samp{make install} would have used.
1067 (If you use GNU Make and a shell [such as GNU bash] that understands
1068 @command{pushd} and @command{popd}, you can do the following:
1072 Replace all lines matching @samp{make[@var{n}]: Entering directory
1073 @var{dir}} with @samp{pushd @var{dir}}.
1075 Replace all lines matching @samp{make[@var{n}]: Leaving directory
1076 @var{dir}} with @samp{popd}.
1078 Delete all lines matching @samp{make[@var{n}]: Nothing to be done for
1082 Then find other lines in the output containing @command{cd} or @command{make}
1083 commands and rewrite or delete them. In particular, you should be able
1084 to delete sections of the script that resemble this:
1087 for i in @var{dir_1} @var{dir_2} @r{@dots{}}; do \
1088 (cd $i; make @var{args} @r{@dots{}}) \
1093 Note, that's ``should be able to,'' not ``can.'' Be sure to modulate
1094 these guidelines with plenty of your own intelligence.
1096 The details of stowing some specific packages are described in the
1101 * Other FSF Software::
1103 * Perl and Perl 5 Modules::
1106 @c ---------------------------------------------------------------------------
1107 @node GNU Emacs, Other FSF Software, Compile-time vs. Install-time, Compile-time vs. Install-time
1110 Although the Free Software Foundation has many enlightened practices
1111 regarding Makefiles and software installation (see @pxref{Other FSF
1112 Software}), Emacs, its flagship program, doesn't quite follow the
1113 rules. In particular, most GNU software allows you to write:
1117 make install prefix=/usr/local/stow/@var{package}
1121 If you try this with Emacs, then the new value for @var{prefix} in the
1122 @samp{make install} step will cause some files to get recompiled with
1123 the new value of @var{prefix} wired into them. In Emacs 19.23 and
1124 later,@footnote{As I write this, the current version of Emacs is 19.31.}
1125 the way to work around this problem is:
1129 make install-arch-dep install-arch-indep prefix=/usr/local/stow/emacs
1132 In 19.22 and some prior versions of Emacs, the workaround was:
1136 make do-install prefix=/usr/local/stow/emacs
1139 @c ---------------------------------------------------------------------------
1140 @node Other FSF Software, Cygnus Software, GNU Emacs, Compile-time vs. Install-time
1141 @section Other FSF Software
1143 The Free Software Foundation, the organization behind the GNU project,
1144 has been unifying the build procedure for its tools for some time.
1145 Thanks to its tools @samp{autoconf} and @samp{automake}, most packages
1146 now respond well to these simple steps, with no other intervention
1150 ./configure @var{options}
1152 make install prefix=/usr/local/stow/@var{package}
1155 Hopefully, these tools can evolve to be aware of Stow-managed packages,
1156 such that providing an option to @samp{configure} can allow @samp{make}
1157 and @samp{make install} steps to work correctly without needing to
1158 ``fool'' the build process.
1160 @c ---------------------------------------------------------------------------
1161 @node Cygnus Software, Perl and Perl 5 Modules, Other FSF Software, Compile-time vs. Install-time
1162 @section Cygnus Software
1164 Cygnus is a commercial supplier and supporter of GNU software. It has
1165 also written several of its own packages, released under the terms of
1166 the GNU General Public License; and it has taken over the maintenance of
1167 other packages. Among the packages released by Cygnus are @samp{gdb},
1168 @samp{gnats}, and @samp{dejagnu}.
1170 Cygnus packages have the peculiarity that each one unpacks into a
1171 directory tree with a generic top-level Makefile, which is set up to
1172 compile @emph{all} of Cygnus' packages, any number of which may reside
1173 under the top-level directory. In other words, even if you're only
1174 building @samp{gnats}, the top-level Makefile will look for, and try to
1175 build, @file{gdb} and @file{dejagnu} subdirectories, among many others.
1177 The result is that if you try @samp{make -n install
1178 prefix=/usr/local/stow/@var{package}} at the top level of a Cygnus
1179 package, you'll get a bewildering amount of output. It will then be
1180 very difficult to visually scan the output to see whether the install
1181 will proceed correctly. Unfortunately, it's not always clear how to
1182 invoke an install from the subdirectory of interest.
1184 In cases like this, the best approach is to run your @samp{make install
1185 prefix=@r{@dots{}}}, but be ready to interrupt it if you detect that it
1186 is recompiling files. Usually it will work just fine; otherwise,
1189 @c ---------------------------------------------------------------------------
1190 @node Perl and Perl 5 Modules, , Cygnus Software, Compile-time vs. Install-time
1191 @section Perl and Perl 5 Modules
1193 Perl 4.036 allows you to specify different locations for installation
1194 and for run-time. It is the only widely-used package in this author's
1195 experience that allows this, though hopefully more packages will adopt
1198 Unfortunately, the authors of Perl believed that only AFS sites need
1199 this ability. The configuration instructions for Perl 4 misleadingly
1200 state that some occult means are used under AFS to transport files from
1201 their installation tree to their run-time tree. In fact, that confusion
1202 arises from the fact that Depot, Stow's predecessor, originated at
1203 Carnegie Mellon University, which was also the birthplace of AFS. CMU's
1204 need to separate install-time and run-time trees stemmed from its use of
1205 Depot, not from AFS.
1207 The result of this confusion is that Perl 5's configuration script
1208 doesn't even offer the option of separating install-time and run-time
1209 trees @emph{unless} you're running AFS. Fortunately, after you've
1210 entered all the configuration settings, Perl's setup script gives you
1211 the opportunity to edit those settings in a file called
1212 @file{config.sh}. When prompted, you should edit this file and replace
1216 inst@r{@dots{}}/usr/local@r{@dots{}}
1223 inst@r{@dots{}}/usr/local/stow/perl@r{@dots{}}
1227 You can do this with the following Unix command:
1230 sed 's,^\(inst.*/usr/local\),\1/stow/perl,' config.sh > config.sh.new
1231 mv config.sh.new config.sh
1234 Hopefully, the Perl authors will correct this deficiency in Perl 5's
1235 configuration mechanism.
1237 Perl 5 modules---i.e., extensions to Perl 5---generally conform to a set
1238 of standards for building and installing them. The standard says that
1239 the package comes with a top-level @file{Makefile.PL}, which is a Perl
1240 script. When it runs, it generates a @file{Makefile}.
1242 If you followed the instructions above for editing @file{config.sh} when
1243 Perl was built, then when you create a @file{Makefile} from a
1244 @file{Makefile.PL}, it will contain separate locations for run-time
1245 (@file{/usr/local}) and install-time (@file{/usr/local/stow/perl}).
1255 and the files will be installed into @file{/usr/local/stow/perl}.
1256 However, you might prefer each Perl module to be stowed separately. In
1257 that case, you must edit the resulting Makefile, replacing
1258 @file{/usr/local/stow/perl} with @file{/usr/local/stow/@var{module}}.
1259 The best way to do this is:
1263 find . -name Makefile -print | \
1264 xargs perl -pi~ -e 's,^(INST.*/stow)/perl,$1/@var{module},;'
1270 (The use of @samp{find} and @samp{xargs} ensures that all Makefiles in
1271 the module's source tree, even those in subdirectories, get edited.) A
1272 good convention to follow is to name the stow directory for a Perl
1273 @var{module} @file{cpan.@var{module}}, where @samp{cpan} stands for
1274 Comprehensive Perl Archive Network, a collection of FTP sites that is
1275 the source of most Perl 5 extensions. This way, it's easy to tell at a
1276 glance which of the subdirectories of @file{/usr/local/stow} are Perl 5
1279 When you stow separate Perl 5 modules separately, you are likely to
1280 encounter conflicts (@pxref{Conflicts}) with files named @file{.exists}
1281 and @file{perllocal.pod}. One way to work around this is to remove
1282 those files before stowing the module. If you use the
1283 @file{cpan.@var{module}} naming convention, you can simply do this:
1287 find cpan.* \( -name .exists -o -name perllocal.pod \) -print | \
1292 @c ---------------------------------------------------------------------------
1293 @node Bootstrapping, Reporting Bugs, Compile-time vs. Install-time, Top
1294 @chapter Bootstrapping
1296 Suppose you have a stow directory all set up and ready to go:
1297 @file{/usr/local/stow/perl} contains the Perl installation,
1298 @file{/usr/local/stow/stow} contains Stow itself, and perhaps you have
1299 other packages waiting to be stowed. You'd like to be able to do this:
1307 but @command{stow} is not yet in your @env{PATH}. Nor can you do this:
1315 because the @samp{#!} line at the beginning of @command{stow} tries to
1316 locate Perl (usually in @file{/usr/local/bin/perl}), and that won't be
1317 found. The solution you must use is:
1321 perl/bin/perl stow/bin/stow -vv *
1324 @c ===========================================================================
1325 @node Reporting Bugs, Known Bugs, Bootstrapping, Top
1326 @chapter Reporting Bugs
1328 You can report bugs to the current maintainers in one of three ways:
1332 Send e-mail to @email{bug-stow@@gnu.org}.
1335 File an issue in @uref{https://savannah.gnu.org/bugs/?group=stow,
1336 the Savannah bug tracker}.
1340 @uref{https://github.com/aspiers/stow/issues/, the GitHub project}.
1343 While GitHub is arguably the most convenient of these three options, it
1344 @uref{https://www.gnu.org/software/repo-criteria-evaluation.html#GitHub,
1345 is not the most ethical or freedom-preserving way to host software
1346 projects}. Therefore the GitHub project may be
1347 @uref{https://github.com/aspiers/stow/issues/43, moved to a more ethical
1348 hosting service} in the future.
1350 Before reporting a bug, it is recommended to check whether it is already
1351 known, so please first @pxref{Known Bugs}.
1353 When reporting a new bug, please include:
1357 the version number of Stow (@samp{stow --version});
1360 the version number of Perl (@samp{perl -v});
1363 the system information, which can often be obtained with @samp{uname
1367 a description of the bug;
1370 the precise command you gave;
1373 the output from the command (preferably verbose output, obtained by
1374 adding @samp{--verbose=5} to the Stow command line).
1377 If you are really keen, consider developing a minimal test case and
1378 creating a new test. See the @file{t/} directory in the source for lots
1379 of examples, and the @file{CONTRIBUTING.md} file for a guide on how to
1382 Before reporting a bug, please read the manual carefully, especially
1383 @ref{Known Bugs}, to see whether you're encountering
1384 something that doesn't need reporting.
1385 (@pxref{Conflicts}).
1387 @c ===========================================================================
1388 @node Known Bugs, GNU General Public License, Reporting Bugs, Top
1391 Known bugs can be found in the following locations:
1395 @uref{https://github.com/aspiers/stow/issues/, the GitHub issue tracker}
1398 @uref{https://savannah.gnu.org/bugs/?group=stow, the Savannah bug
1402 the @uref{https://lists.gnu.org/archive/html/bug-stow/, bug-stow list
1406 If you think you have found a new bug, please @pxref{Reporting Bugs}.
1408 @c ===========================================================================
1409 @node GNU General Public License, Index, Known Bugs, Top
1410 @unnumbered GNU General Public License
1412 @center Version 3, 29 June 2007
1414 @c This file is intended to be included within another document,
1415 @c hence no sectioning command or @node.
1418 Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{https://fsf.org/}
1420 Everyone is permitted to copy and distribute verbatim copies of this
1421 license document, but changing it is not allowed.
1426 The GNU General Public License is a free, copyleft license for
1427 software and other kinds of works.
1429 The licenses for most software and other practical works are designed
1430 to take away your freedom to share and change the works. By contrast,
1431 the GNU General Public License is intended to guarantee your freedom
1432 to share and change all versions of a program---to make sure it remains
1433 free software for all its users. We, the Free Software Foundation,
1434 use the GNU General Public License for most of our software; it
1435 applies also to any other work released this way by its authors. You
1436 can apply it to your programs, too.
1438 When we speak of free software, we are referring to freedom, not
1439 price. Our General Public Licenses are designed to make sure that you
1440 have the freedom to distribute copies of free software (and charge for
1441 them if you wish), that you receive source code or can get it if you
1442 want it, that you can change the software or use pieces of it in new
1443 free programs, and that you know you can do these things.
1445 To protect your rights, we need to prevent others from denying you
1446 these rights or asking you to surrender the rights. Therefore, you
1447 have certain responsibilities if you distribute copies of the
1448 software, or if you modify it: responsibilities to respect the freedom
1451 For example, if you distribute copies of such a program, whether
1452 gratis or for a fee, you must pass on to the recipients the same
1453 freedoms that you received. You must make sure that they, too,
1454 receive or can get the source code. And you must show them these
1455 terms so they know their rights.
1457 Developers that use the GNU GPL protect your rights with two steps:
1458 (1) assert copyright on the software, and (2) offer you this License
1459 giving you legal permission to copy, distribute and/or modify it.
1461 For the developers' and authors' protection, the GPL clearly explains
1462 that there is no warranty for this free software. For both users' and
1463 authors' sake, the GPL requires that modified versions be marked as
1464 changed, so that their problems will not be attributed erroneously to
1465 authors of previous versions.
1467 Some devices are designed to deny users access to install or run
1468 modified versions of the software inside them, although the
1469 manufacturer can do so. This is fundamentally incompatible with the
1470 aim of protecting users' freedom to change the software. The
1471 systematic pattern of such abuse occurs in the area of products for
1472 individuals to use, which is precisely where it is most unacceptable.
1473 Therefore, we have designed this version of the GPL to prohibit the
1474 practice for those products. If such problems arise substantially in
1475 other domains, we stand ready to extend this provision to those
1476 domains in future versions of the GPL, as needed to protect the
1479 Finally, every program is threatened constantly by software patents.
1480 States should not allow patents to restrict development and use of
1481 software on general-purpose computers, but in those that do, we wish
1482 to avoid the special danger that patents applied to a free program
1483 could make it effectively proprietary. To prevent this, the GPL
1484 assures that patents cannot be used to render the program non-free.
1486 The precise terms and conditions for copying, distribution and
1487 modification follow.
1489 @heading TERMS AND CONDITIONS
1494 ``This License'' refers to version 3 of the GNU General Public License.
1496 ``Copyright'' also means copyright-like laws that apply to other kinds
1497 of works, such as semiconductor masks.
1499 ``The Program'' refers to any copyrightable work licensed under this
1500 License. Each licensee is addressed as ``you''. ``Licensees'' and
1501 ``recipients'' may be individuals or organizations.
1503 To ``modify'' a work means to copy from or adapt all or part of the work
1504 in a fashion requiring copyright permission, other than the making of
1505 an exact copy. The resulting work is called a ``modified version'' of
1506 the earlier work or a work ``based on'' the earlier work.
1508 A ``covered work'' means either the unmodified Program or a work based
1511 To ``propagate'' a work means to do anything with it that, without
1512 permission, would make you directly or secondarily liable for
1513 infringement under applicable copyright law, except executing it on a
1514 computer or modifying a private copy. Propagation includes copying,
1515 distribution (with or without modification), making available to the
1516 public, and in some countries other activities as well.
1518 To ``convey'' a work means any kind of propagation that enables other
1519 parties to make or receive copies. Mere interaction with a user
1520 through a computer network, with no transfer of a copy, is not
1523 An interactive user interface displays ``Appropriate Legal Notices'' to
1524 the extent that it includes a convenient and prominently visible
1525 feature that (1) displays an appropriate copyright notice, and (2)
1526 tells the user that there is no warranty for the work (except to the
1527 extent that warranties are provided), that licensees may convey the
1528 work under this License, and how to view a copy of this License. If
1529 the interface presents a list of user commands or options, such as a
1530 menu, a prominent item in the list meets this criterion.
1534 The ``source code'' for a work means the preferred form of the work for
1535 making modifications to it. ``Object code'' means any non-source form
1538 A ``Standard Interface'' means an interface that either is an official
1539 standard defined by a recognized standards body, or, in the case of
1540 interfaces specified for a particular programming language, one that
1541 is widely used among developers working in that language.
1543 The ``System Libraries'' of an executable work include anything, other
1544 than the work as a whole, that (a) is included in the normal form of
1545 packaging a Major Component, but which is not part of that Major
1546 Component, and (b) serves only to enable use of the work with that
1547 Major Component, or to implement a Standard Interface for which an
1548 implementation is available to the public in source code form. A
1549 ``Major Component'', in this context, means a major essential component
1550 (kernel, window system, and so on) of the specific operating system
1551 (if any) on which the executable work runs, or a compiler used to
1552 produce the work, or an object code interpreter used to run it.
1554 The ``Corresponding Source'' for a work in object code form means all
1555 the source code needed to generate, install, and (for an executable
1556 work) run the object code and to modify the work, including scripts to
1557 control those activities. However, it does not include the work's
1558 System Libraries, or general-purpose tools or generally available free
1559 programs which are used unmodified in performing those activities but
1560 which are not part of the work. For example, Corresponding Source
1561 includes interface definition files associated with source files for
1562 the work, and the source code for shared libraries and dynamically
1563 linked subprograms that the work is specifically designed to require,
1564 such as by intimate data communication or control flow between those
1565 subprograms and other parts of the work.
1567 The Corresponding Source need not include anything that users can
1568 regenerate automatically from other parts of the Corresponding Source.
1570 The Corresponding Source for a work in source code form is that same
1573 @item Basic Permissions.
1575 All rights granted under this License are granted for the term of
1576 copyright on the Program, and are irrevocable provided the stated
1577 conditions are met. This License explicitly affirms your unlimited
1578 permission to run the unmodified Program. The output from running a
1579 covered work is covered by this License only if the output, given its
1580 content, constitutes a covered work. This License acknowledges your
1581 rights of fair use or other equivalent, as provided by copyright law.
1583 You may make, run and propagate covered works that you do not convey,
1584 without conditions so long as your license otherwise remains in force.
1585 You may convey covered works to others for the sole purpose of having
1586 them make modifications exclusively for you, or provide you with
1587 facilities for running those works, provided that you comply with the
1588 terms of this License in conveying all material for which you do not
1589 control copyright. Those thus making or running the covered works for
1590 you must do so exclusively on your behalf, under your direction and
1591 control, on terms that prohibit them from making any copies of your
1592 copyrighted material outside their relationship with you.
1594 Conveying under any other circumstances is permitted solely under the
1595 conditions stated below. Sublicensing is not allowed; section 10
1596 makes it unnecessary.
1598 @item Protecting Users' Legal Rights From Anti-Circumvention Law.
1600 No covered work shall be deemed part of an effective technological
1601 measure under any applicable law fulfilling obligations under article
1602 11 of the WIPO copyright treaty adopted on 20 December 1996, or
1603 similar laws prohibiting or restricting circumvention of such
1606 When you convey a covered work, you waive any legal power to forbid
1607 circumvention of technological measures to the extent such
1608 circumvention is effected by exercising rights under this License with
1609 respect to the covered work, and you disclaim any intention to limit
1610 operation or modification of the work as a means of enforcing, against
1611 the work's users, your or third parties' legal rights to forbid
1612 circumvention of technological measures.
1614 @item Conveying Verbatim Copies.
1616 You may convey verbatim copies of the Program's source code as you
1617 receive it, in any medium, provided that you conspicuously and
1618 appropriately publish on each copy an appropriate copyright notice;
1619 keep intact all notices stating that this License and any
1620 non-permissive terms added in accord with section 7 apply to the code;
1621 keep intact all notices of the absence of any warranty; and give all
1622 recipients a copy of this License along with the Program.
1624 You may charge any price or no price for each copy that you convey,
1625 and you may offer support or warranty protection for a fee.
1627 @item Conveying Modified Source Versions.
1629 You may convey a work based on the Program, or the modifications to
1630 produce it from the Program, in the form of source code under the
1631 terms of section 4, provided that you also meet all of these
1636 The work must carry prominent notices stating that you modified it,
1637 and giving a relevant date.
1640 The work must carry prominent notices stating that it is released
1641 under this License and any conditions added under section 7. This
1642 requirement modifies the requirement in section 4 to ``keep intact all
1646 You must license the entire work, as a whole, under this License to
1647 anyone who comes into possession of a copy. This License will
1648 therefore apply, along with any applicable section 7 additional terms,
1649 to the whole of the work, and all its parts, regardless of how they
1650 are packaged. This License gives no permission to license the work in
1651 any other way, but it does not invalidate such permission if you have
1652 separately received it.
1655 If the work has interactive user interfaces, each must display
1656 Appropriate Legal Notices; however, if the Program has interactive
1657 interfaces that do not display Appropriate Legal Notices, your work
1658 need not make them do so.
1661 A compilation of a covered work with other separate and independent
1662 works, which are not by their nature extensions of the covered work,
1663 and which are not combined with it such as to form a larger program,
1664 in or on a volume of a storage or distribution medium, is called an
1665 ``aggregate'' if the compilation and its resulting copyright are not
1666 used to limit the access or legal rights of the compilation's users
1667 beyond what the individual works permit. Inclusion of a covered work
1668 in an aggregate does not cause this License to apply to the other
1669 parts of the aggregate.
1671 @item Conveying Non-Source Forms.
1673 You may convey a covered work in object code form under the terms of
1674 sections 4 and 5, provided that you also convey the machine-readable
1675 Corresponding Source under the terms of this License, in one of these
1680 Convey the object code in, or embodied in, a physical product
1681 (including a physical distribution medium), accompanied by the
1682 Corresponding Source fixed on a durable physical medium customarily
1683 used for software interchange.
1686 Convey the object code in, or embodied in, a physical product
1687 (including a physical distribution medium), accompanied by a written
1688 offer, valid for at least three years and valid for as long as you
1689 offer spare parts or customer support for that product model, to give
1690 anyone who possesses the object code either (1) a copy of the
1691 Corresponding Source for all the software in the product that is
1692 covered by this License, on a durable physical medium customarily used
1693 for software interchange, for a price no more than your reasonable
1694 cost of physically performing this conveying of source, or (2) access
1695 to copy the Corresponding Source from a network server at no charge.
1698 Convey individual copies of the object code with a copy of the written
1699 offer to provide the Corresponding Source. This alternative is
1700 allowed only occasionally and noncommercially, and only if you
1701 received the object code with such an offer, in accord with subsection
1705 Convey the object code by offering access from a designated place
1706 (gratis or for a charge), and offer equivalent access to the
1707 Corresponding Source in the same way through the same place at no
1708 further charge. You need not require recipients to copy the
1709 Corresponding Source along with the object code. If the place to copy
1710 the object code is a network server, the Corresponding Source may be
1711 on a different server (operated by you or a third party) that supports
1712 equivalent copying facilities, provided you maintain clear directions
1713 next to the object code saying where to find the Corresponding Source.
1714 Regardless of what server hosts the Corresponding Source, you remain
1715 obligated to ensure that it is available for as long as needed to
1716 satisfy these requirements.
1719 Convey the object code using peer-to-peer transmission, provided you
1720 inform other peers where the object code and Corresponding Source of
1721 the work are being offered to the general public at no charge under
1726 A separable portion of the object code, whose source code is excluded
1727 from the Corresponding Source as a System Library, need not be
1728 included in conveying the object code work.
1730 A ``User Product'' is either (1) a ``consumer product'', which means any
1731 tangible personal property which is normally used for personal,
1732 family, or household purposes, or (2) anything designed or sold for
1733 incorporation into a dwelling. In determining whether a product is a
1734 consumer product, doubtful cases shall be resolved in favor of
1735 coverage. For a particular product received by a particular user,
1736 ``normally used'' refers to a typical or common use of that class of
1737 product, regardless of the status of the particular user or of the way
1738 in which the particular user actually uses, or expects or is expected
1739 to use, the product. A product is a consumer product regardless of
1740 whether the product has substantial commercial, industrial or
1741 non-consumer uses, unless such uses represent the only significant
1742 mode of use of the product.
1744 ``Installation Information'' for a User Product means any methods,
1745 procedures, authorization keys, or other information required to
1746 install and execute modified versions of a covered work in that User
1747 Product from a modified version of its Corresponding Source. The
1748 information must suffice to ensure that the continued functioning of
1749 the modified object code is in no case prevented or interfered with
1750 solely because modification has been made.
1752 If you convey an object code work under this section in, or with, or
1753 specifically for use in, a User Product, and the conveying occurs as
1754 part of a transaction in which the right of possession and use of the
1755 User Product is transferred to the recipient in perpetuity or for a
1756 fixed term (regardless of how the transaction is characterized), the
1757 Corresponding Source conveyed under this section must be accompanied
1758 by the Installation Information. But this requirement does not apply
1759 if neither you nor any third party retains the ability to install
1760 modified object code on the User Product (for example, the work has
1761 been installed in ROM).
1763 The requirement to provide Installation Information does not include a
1764 requirement to continue to provide support service, warranty, or
1765 updates for a work that has been modified or installed by the
1766 recipient, or for the User Product in which it has been modified or
1767 installed. Access to a network may be denied when the modification
1768 itself materially and adversely affects the operation of the network
1769 or violates the rules and protocols for communication across the
1772 Corresponding Source conveyed, and Installation Information provided,
1773 in accord with this section must be in a format that is publicly
1774 documented (and with an implementation available to the public in
1775 source code form), and must require no special password or key for
1776 unpacking, reading or copying.
1778 @item Additional Terms.
1780 ``Additional permissions'' are terms that supplement the terms of this
1781 License by making exceptions from one or more of its conditions.
1782 Additional permissions that are applicable to the entire Program shall
1783 be treated as though they were included in this License, to the extent
1784 that they are valid under applicable law. If additional permissions
1785 apply only to part of the Program, that part may be used separately
1786 under those permissions, but the entire Program remains governed by
1787 this License without regard to the additional permissions.
1789 When you convey a copy of a covered work, you may at your option
1790 remove any additional permissions from that copy, or from any part of
1791 it. (Additional permissions may be written to require their own
1792 removal in certain cases when you modify the work.) You may place
1793 additional permissions on material, added by you to a covered work,
1794 for which you have or can give appropriate copyright permission.
1796 Notwithstanding any other provision of this License, for material you
1797 add to a covered work, you may (if authorized by the copyright holders
1798 of that material) supplement the terms of this License with terms:
1802 Disclaiming warranty or limiting liability differently from the terms
1803 of sections 15 and 16 of this License; or
1806 Requiring preservation of specified reasonable legal notices or author
1807 attributions in that material or in the Appropriate Legal Notices
1808 displayed by works containing it; or
1811 Prohibiting misrepresentation of the origin of that material, or
1812 requiring that modified versions of such material be marked in
1813 reasonable ways as different from the original version; or
1816 Limiting the use for publicity purposes of names of licensors or
1817 authors of the material; or
1820 Declining to grant rights under trademark law for use of some trade
1821 names, trademarks, or service marks; or
1824 Requiring indemnification of licensors and authors of that material by
1825 anyone who conveys the material (or modified versions of it) with
1826 contractual assumptions of liability to the recipient, for any
1827 liability that these contractual assumptions directly impose on those
1828 licensors and authors.
1831 All other non-permissive additional terms are considered ``further
1832 restrictions'' within the meaning of section 10. If the Program as you
1833 received it, or any part of it, contains a notice stating that it is
1834 governed by this License along with a term that is a further
1835 restriction, you may remove that term. If a license document contains
1836 a further restriction but permits relicensing or conveying under this
1837 License, you may add to a covered work material governed by the terms
1838 of that license document, provided that the further restriction does
1839 not survive such relicensing or conveying.
1841 If you add terms to a covered work in accord with this section, you
1842 must place, in the relevant source files, a statement of the
1843 additional terms that apply to those files, or a notice indicating
1844 where to find the applicable terms.
1846 Additional terms, permissive or non-permissive, may be stated in the
1847 form of a separately written license, or stated as exceptions; the
1848 above requirements apply either way.
1852 You may not propagate or modify a covered work except as expressly
1853 provided under this License. Any attempt otherwise to propagate or
1854 modify it is void, and will automatically terminate your rights under
1855 this License (including any patent licenses granted under the third
1856 paragraph of section 11).
1858 However, if you cease all violation of this License, then your license
1859 from a particular copyright holder is reinstated (a) provisionally,
1860 unless and until the copyright holder explicitly and finally
1861 terminates your license, and (b) permanently, if the copyright holder
1862 fails to notify you of the violation by some reasonable means prior to
1863 60 days after the cessation.
1865 Moreover, your license from a particular copyright holder is
1866 reinstated permanently if the copyright holder notifies you of the
1867 violation by some reasonable means, this is the first time you have
1868 received notice of violation of this License (for any work) from that
1869 copyright holder, and you cure the violation prior to 30 days after
1870 your receipt of the notice.
1872 Termination of your rights under this section does not terminate the
1873 licenses of parties who have received copies or rights from you under
1874 this License. If your rights have been terminated and not permanently
1875 reinstated, you do not qualify to receive new licenses for the same
1876 material under section 10.
1878 @item Acceptance Not Required for Having Copies.
1880 You are not required to accept this License in order to receive or run
1881 a copy of the Program. Ancillary propagation of a covered work
1882 occurring solely as a consequence of using peer-to-peer transmission
1883 to receive a copy likewise does not require acceptance. However,
1884 nothing other than this License grants you permission to propagate or
1885 modify any covered work. These actions infringe copyright if you do
1886 not accept this License. Therefore, by modifying or propagating a
1887 covered work, you indicate your acceptance of this License to do so.
1889 @item Automatic Licensing of Downstream Recipients.
1891 Each time you convey a covered work, the recipient automatically
1892 receives a license from the original licensors, to run, modify and
1893 propagate that work, subject to this License. You are not responsible
1894 for enforcing compliance by third parties with this License.
1896 An ``entity transaction'' is a transaction transferring control of an
1897 organization, or substantially all assets of one, or subdividing an
1898 organization, or merging organizations. If propagation of a covered
1899 work results from an entity transaction, each party to that
1900 transaction who receives a copy of the work also receives whatever
1901 licenses to the work the party's predecessor in interest had or could
1902 give under the previous paragraph, plus a right to possession of the
1903 Corresponding Source of the work from the predecessor in interest, if
1904 the predecessor has it or can get it with reasonable efforts.
1906 You may not impose any further restrictions on the exercise of the
1907 rights granted or affirmed under this License. For example, you may
1908 not impose a license fee, royalty, or other charge for exercise of
1909 rights granted under this License, and you may not initiate litigation
1910 (including a cross-claim or counterclaim in a lawsuit) alleging that
1911 any patent claim is infringed by making, using, selling, offering for
1912 sale, or importing the Program or any portion of it.
1916 A ``contributor'' is a copyright holder who authorizes use under this
1917 License of the Program or a work on which the Program is based. The
1918 work thus licensed is called the contributor's ``contributor version''.
1920 A contributor's ``essential patent claims'' are all patent claims owned
1921 or controlled by the contributor, whether already acquired or
1922 hereafter acquired, that would be infringed by some manner, permitted
1923 by this License, of making, using, or selling its contributor version,
1924 but do not include claims that would be infringed only as a
1925 consequence of further modification of the contributor version. For
1926 purposes of this definition, ``control'' includes the right to grant
1927 patent sublicenses in a manner consistent with the requirements of
1930 Each contributor grants you a non-exclusive, worldwide, royalty-free
1931 patent license under the contributor's essential patent claims, to
1932 make, use, sell, offer for sale, import and otherwise run, modify and
1933 propagate the contents of its contributor version.
1935 In the following three paragraphs, a ``patent license'' is any express
1936 agreement or commitment, however denominated, not to enforce a patent
1937 (such as an express permission to practice a patent or covenant not to
1938 sue for patent infringement). To ``grant'' such a patent license to a
1939 party means to make such an agreement or commitment not to enforce a
1940 patent against the party.
1942 If you convey a covered work, knowingly relying on a patent license,
1943 and the Corresponding Source of the work is not available for anyone
1944 to copy, free of charge and under the terms of this License, through a
1945 publicly available network server or other readily accessible means,
1946 then you must either (1) cause the Corresponding Source to be so
1947 available, or (2) arrange to deprive yourself of the benefit of the
1948 patent license for this particular work, or (3) arrange, in a manner
1949 consistent with the requirements of this License, to extend the patent
1950 license to downstream recipients. ``Knowingly relying'' means you have
1951 actual knowledge that, but for the patent license, your conveying the
1952 covered work in a country, or your recipient's use of the covered work
1953 in a country, would infringe one or more identifiable patents in that
1954 country that you have reason to believe are valid.
1956 If, pursuant to or in connection with a single transaction or
1957 arrangement, you convey, or propagate by procuring conveyance of, a
1958 covered work, and grant a patent license to some of the parties
1959 receiving the covered work authorizing them to use, propagate, modify
1960 or convey a specific copy of the covered work, then the patent license
1961 you grant is automatically extended to all recipients of the covered
1962 work and works based on it.
1964 A patent license is ``discriminatory'' if it does not include within the
1965 scope of its coverage, prohibits the exercise of, or is conditioned on
1966 the non-exercise of one or more of the rights that are specifically
1967 granted under this License. You may not convey a covered work if you
1968 are a party to an arrangement with a third party that is in the
1969 business of distributing software, under which you make payment to the
1970 third party based on the extent of your activity of conveying the
1971 work, and under which the third party grants, to any of the parties
1972 who would receive the covered work from you, a discriminatory patent
1973 license (a) in connection with copies of the covered work conveyed by
1974 you (or copies made from those copies), or (b) primarily for and in
1975 connection with specific products or compilations that contain the
1976 covered work, unless you entered into that arrangement, or that patent
1977 license was granted, prior to 28 March 2007.
1979 Nothing in this License shall be construed as excluding or limiting
1980 any implied license or other defenses to infringement that may
1981 otherwise be available to you under applicable patent law.
1983 @item No Surrender of Others' Freedom.
1985 If conditions are imposed on you (whether by court order, agreement or
1986 otherwise) that contradict the conditions of this License, they do not
1987 excuse you from the conditions of this License. If you cannot convey
1988 a covered work so as to satisfy simultaneously your obligations under
1989 this License and any other pertinent obligations, then as a
1990 consequence you may not convey it at all. For example, if you agree
1991 to terms that obligate you to collect a royalty for further conveying
1992 from those to whom you convey the Program, the only way you could
1993 satisfy both those terms and this License would be to refrain entirely
1994 from conveying the Program.
1996 @item Use with the GNU Affero General Public License.
1998 Notwithstanding any other provision of this License, you have
1999 permission to link or combine any covered work with a work licensed
2000 under version 3 of the GNU Affero General Public License into a single
2001 combined work, and to convey the resulting work. The terms of this
2002 License will continue to apply to the part which is the covered work,
2003 but the special requirements of the GNU Affero General Public License,
2004 section 13, concerning interaction through a network will apply to the
2005 combination as such.
2007 @item Revised Versions of this License.
2009 The Free Software Foundation may publish revised and/or new versions
2010 of the GNU General Public License from time to time. Such new
2011 versions will be similar in spirit to the present version, but may
2012 differ in detail to address new problems or concerns.
2014 Each version is given a distinguishing version number. If the Program
2015 specifies that a certain numbered version of the GNU General Public
2016 License ``or any later version'' applies to it, you have the option of
2017 following the terms and conditions either of that numbered version or
2018 of any later version published by the Free Software Foundation. If
2019 the Program does not specify a version number of the GNU General
2020 Public License, you may choose any version ever published by the Free
2021 Software Foundation.
2023 If the Program specifies that a proxy can decide which future versions
2024 of the GNU General Public License can be used, that proxy's public
2025 statement of acceptance of a version permanently authorizes you to
2026 choose that version for the Program.
2028 Later license versions may give you additional or different
2029 permissions. However, no additional obligations are imposed on any
2030 author or copyright holder as a result of your choosing to follow a
2033 @item Disclaimer of Warranty.
2035 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
2036 APPLICABLE LAW@. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
2037 HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
2038 WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
2039 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2040 A PARTICULAR PURPOSE@. THE ENTIRE RISK AS TO THE QUALITY AND
2041 PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE PROGRAM PROVE
2042 DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
2045 @item Limitation of Liability.
2047 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2048 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
2049 CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2050 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
2051 ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
2052 NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
2053 LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
2054 TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
2055 PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
2057 @item Interpretation of Sections 15 and 16.
2059 If the disclaimer of warranty and limitation of liability provided
2060 above cannot be given local legal effect according to their terms,
2061 reviewing courts shall apply local law that most closely approximates
2062 an absolute waiver of all civil liability in connection with the
2063 Program, unless a warranty or assumption of liability accompanies a
2064 copy of the Program in return for a fee.
2068 @heading END OF TERMS AND CONDITIONS
2070 @heading How to Apply These Terms to Your New Programs
2072 If you develop a new program, and you want it to be of the greatest
2073 possible use to the public, the best way to achieve this is to make it
2074 free software which everyone can redistribute and change under these
2077 To do so, attach the following notices to the program. It is safest
2078 to attach them to the start of each source file to most effectively
2079 state the exclusion of warranty; and each file should have at least
2080 the ``copyright'' line and a pointer to where the full notice is found.
2083 @var{one line to give the program's name and a brief idea of what it does.}
2084 Copyright (C) @var{year} @var{name of author}
2086 This program is free software: you can redistribute it and/or modify
2087 it under the terms of the GNU General Public License as published by
2088 the Free Software Foundation, either version 3 of the License, or (at
2089 your option) any later version.
2091 This program is distributed in the hope that it will be useful, but
2092 WITHOUT ANY WARRANTY; without even the implied warranty of
2093 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the GNU
2094 General Public License for more details.
2096 You should have received a copy of the GNU General Public License
2097 along with this program. If not, see @url{https://www.gnu.org/licenses/}.
2100 Also add information on how to contact you by electronic and paper mail.
2102 If the program does terminal interaction, make it output a short
2103 notice like this when it starts in an interactive mode:
2106 @var{program} Copyright (C) @var{year} @var{name of author}
2107 This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
2108 This is free software, and you are welcome to redistribute it
2109 under certain conditions; type @samp{show c} for details.
2112 The hypothetical commands @samp{show w} and @samp{show c} should show
2113 the appropriate parts of the General Public License. Of course, your
2114 program's commands might be different; for a GUI interface, you would
2115 use an ``about box''.
2117 You should also get your employer (if you work as a programmer) or school,
2118 if any, to sign a ``copyright disclaimer'' for the program, if necessary.
2119 For more information on this, and how to apply and follow the GNU GPL, see
2120 @url{https://www.gnu.org/licenses/}.
2122 The GNU General Public License does not permit incorporating your
2123 program into proprietary programs. If your program is a subroutine
2124 library, you may consider it more useful to permit linking proprietary
2125 applications with the library. If this is what you want to do, use
2126 the GNU Lesser General Public License instead of this License. But
2127 first, please read @url{https://www.gnu.org/licenses/why-not-lgpl.html}.
2129 @node Index, , GNU General Public License, Top