Initial build - GNU stow suitable for linking into your home dir using GNU stow

This commit is contained in:
Danielle McLean 2016-10-03 23:05:44 +11:00
commit db7dcc0653
No known key found for this signature in database
GPG Key ID: CC91589719027E94
41 changed files with 13044 additions and 0 deletions

113
.local/bin/chkstow Executable file
View File

@ -0,0 +1,113 @@
#!/usr/bin/perl
use strict;
use warnings;
require 5.006_001;
use File::Find;
use Getopt::Long;
my $DEFAULT_TARGET = '/usr/local/';
our $Wanted = \&bad_links;
our %Package = ();
our $Stow_dir = '';
our $Target = $DEFAULT_TARGET;
# put the main loop into a block so that tests can load this as a module
if ( not caller() ) {
if (@ARGV == 0) {
usage();
}
process_options();
#check_stow($Target, $Wanted);
check_stow();
}
sub process_options {
GetOptions(
'b|badlinks' => sub { $Wanted = \&bad_links },
'a|aliens' => sub { $Wanted = \&aliens },
'l|list' => sub { $Wanted = \&list },
't|target=s' => \$Target,
) or usage();
return;
}
sub usage {
print <<"EOT";
USAGE: chkstow [options]
Options:
-t DIR, --target=DIR Set the target directory to DIR
(default is $DEFAULT_TARGET)
-b, --badlinks Report symlinks that point to non-existent files
-a, --aliens Report non-symlinks in the target directory
-l, --list List packages in the target directory
--badlinks is the default mode.
EOT
exit(0);
}
sub check_stow {
#my ($Target, $Wanted) = @_;
my (%options) = (
wanted => $Wanted,
preprocess => \&skip_dirs,
);
find(\%options, $Target);
if ($Wanted == \&list) {
delete $Package{''};
delete $Package{'..'};
if (keys %Package) {
print map "$_\n", sort(keys %Package);
}
}
return;
}
sub skip_dirs {
# skip stow source and unstowed targets
if (-e ".stow" || -e ".notstowed" ) {
warn "skipping $File::Find::dir\n";
return ();
}
else {
return @_;
}
}
# checking for files that do not link to anything
sub bad_links {
-l && !-e && print "Bogus link: $File::Find::name\n";
}
# checking for files that are not owned by stow
sub aliens {
!-l && !-d && print "Unstowed file: $File::Find::name\n";
}
# just list the packages in the the target directory
# FIXME: what if the stow dir is not called 'stow'?
sub list {
if (-l) {
$_ = readlink;
s{\A(?:\.\./)+stow/}{}g;
s{/.*}{}g;
$Package{$_} = 1;
}
}
1; # Hey, it's a module!
# Local variables:
# mode: perl
# cperl-indent-level: 4
# End:
# vim: ft=perl

667
.local/bin/stow Executable file
View File

@ -0,0 +1,667 @@
#!/usr/bin/perl
# GNU Stow - manage the installation of multiple software packages
# Copyright (C) 1993, 1994, 1995, 1996 by Bob Glickstein
# Copyright (C) 2000, 2001 Guillaume Morin
# Copyright (C) 2007 Kahlil Hodgson
# Copyright (C) 2011 Adam Spiers
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
=head1 NAME
stow - software package installation manager
=head1 SYNOPSIS
stow [ options ] package ...
=head1 DESCRIPTION
This manual page describes GNU Stow 2.2.2, a program for managing
the installation of software packages. This is not the definitive
documentation for stow; for that, see the info manual.
Stow is a tool for managing the installation of multiple software
packages in the same run-time directory tree. One historical
difficulty of this task has been the need to administer, upgrade,
install, and remove files in independent packages without confusing
them with other files sharing the same filesystem space. For instance,
it is common to install Perl and Emacs in F</usr/local>. When one
does so, one winds up (as of Perl 4.036 and Emacs 19.22) with the
following files in F</usr/local/man/man1>: F<a2p.1>; F<ctags.1>;
F<emacs.1>; F<etags.1>; F<h2ph.1>; F<perl.1>; and F<s2p.1>. Now
suppose it's time to uninstall Perl. Which man pages get removed?
Obviously F<perl.1> is one of them, but it should not be the
administrator's responsibility to memorize the ownership of individual
files by separate packages.
The approach used by Stow is to install each package into its own
tree, then use symbolic links to make it appear as though the files
are installed in the common tree. Administration can be performed in
the package's private tree in isolation from clutter from other
packages. Stow can then be used to update the symbolic links. The
structure of each private tree should reflect the desired structure in
the common tree; i.e. (in the typical case) there should be a F<bin>
directory containing executables, a F<man/man1> directory containing
section 1 man pages, and so on.
Stow was inspired by Carnegie Mellon's Depot program, but is
substantially simpler and safer. Whereas Depot required database files
to keep things in sync, Stow stores no extra state between runs, so
there's no danger (as there was in Depot) of mangling directories when
file hierarchies don't match the database. Also unlike Depot, Stow
will never delete any files, directories, or links that appear in a
Stow directory (e.g., F</usr/local/stow/emacs>), so it's always
possible to rebuild the target tree (e.g., F</usr/local>).
=head1 TERMINOLOGY
A "package" is a related collection of files and directories that
you wish to administer as a unit -- e.g., Perl or Emacs -- and that
needs to be installed in a particular directory structure -- e.g.,
with F<bin>, F<lib>, and F<man> subdirectories.
A "target directory" is the root of a tree in which one or more
packages wish to B<appear> to be installed. A common, but by no means
the only such location is F</usr/local>. The examples in this manual
page will use F</usr/local> as the target directory.
A "stow directory" is the root of a tree containing separate
packages in private subtrees. When Stow runs, it uses the current
directory as the default stow directory. The examples in this manual
page will use F</usr/local/stow> as the stow directory, so that
individual packages will be, for example, F</usr/local/stow/perl> and
F</usr/local/stow/emacs>.
An "installation image" is the layout of files and directories
required by a package, relative to the target directory. Thus, the
installation image for Perl includes: a F<bin> directory containing
F<perl> and F<a2p> (among others); an F<info> directory containing
Texinfo documentation; a F<lib/perl> directory containing Perl
libraries; and a F<man/man1> directory containing man pages.
A "package directory" is the root of a tree containing the
installation image for a particular package. Each package directory
must reside in a stow directory -- e.g., the package directory
F</usr/local/stow/perl> must reside in the stow directory
F</usr/local/stow>. The "name" of a package is the name of its
directory within the stow directory -- e.g., F<perl>.
Thus, the Perl executable might reside in
F</usr/local/stow/perl/bin/perl>, where F</usr/local> is the target
directory, F</usr/local/stow> is the stow directory,
F</usr/local/stow/perl> is the package directory, and F<bin/perl>
within is part of the installation image.
A "symlink" is a symbolic link. A symlink can be "relative" or
"absolute". An absolute symlink names a full path; that is, one
starting from F</>. A relative symlink names a relative path; that
is, one not starting from F</>. The target of a relative symlink is
computed starting from the symlink's own directory. Stow only creates
relative symlinks.
=head1 OPTIONS
The stow directory is assumed to be the value of the C<STOW_DIR>
environment variable or if unset the current directory, and the target
directory is assumed to be the parent of the current directory (so it
is typical to execute F<stow> from the directory F</usr/local/stow>).
Each F<package> given on the command line is the name of a package in
the stow directory (e.g., F<perl>). By default, they are installed
into the target directory (but they can be deleted instead using
C<-D>).
=over 4
=item -n
=item --no
Do not perform any operations that modify the filesystem; merely show
what would happen.
=item -d DIR
=item --dir=DIR
Set the stow directory to C<DIR> instead of the current directory.
This also has the effect of making the default target directory be the
parent of C<DIR>.
=item -t DIR
=item --target=DIR
Set the target directory to C<DIR> instead of the parent of the stow
directory.
=item -v
=item --verbose[=N]
Send verbose output to standard error describing what Stow is
doing. Verbosity levels are 0, 1, 2, 3, and 4; 0 is the default.
Using C<-v> or C<--verbose> increases the verbosity by one; using
`--verbose=N' sets it to N.
=item -S
=item --stow
Stow the packages that follow this option into the target directory.
This is the default action and so can be omitted if you are only
stowing packages rather than performing a mixture of
stow/delete/restow actions.
=item -D
=item --delete
Unstow the packages that follow this option from the target directory rather
than installing them.
=item -R
=item --restow
Restow packages (first unstow, then stow again). This is useful
for pruning obsolete symlinks from the target tree after updating
the software in a package.
=item --adopt
B<Warning!> This behaviour is specifically intended to alter the
contents of your stow directory. If you do not want that, this option
is not for you.
When stowing, if a target is encountered which already exists but is a
plain file (and hence not owned by any existing stow package), then
normally Stow will register this as a conflict and refuse to proceed.
This option changes that behaviour so that the file is moved to the
same relative place within the package's installation image within the
stow directory, and then stowing proceeds as before. So effectively,
the file becomes adopted by the stow package, without its contents
changing.
=item --no-folding
Disable folding of newly stowed directories when stowing, and
refolding of newly foldable directories when unstowing.
=item --ignore=REGEX
Ignore files ending in this Perl regex.
=item --defer=REGEX
Don't stow files beginning with this Perl regex if the file is already
stowed to another package.
=item --override=REGEX
Force stowing files beginning with this Perl regex if the file is
already stowed to another package.
=item -V
=item --version
Show Stow version number, and exit.
=item -h
=item --help
Show Stow command syntax, and exit.
=back
=head1 INSTALLING PACKAGES
The default action of Stow is to install a package. This means
creating symlinks in the target tree that point into the package tree.
Stow attempts to do this with as few symlinks as possible; in other
words, if Stow can create a single symlink that points to an entire
subtree within the package tree, it will choose to do that rather than
create a directory in the target tree and populate it with symlinks.
For example, suppose that no packages have yet been installed in
F</usr/local>; it's completely empty (except for the F<stow>
subdirectory, of course). Now suppose the Perl package is installed.
Recall that it includes the following directories in its installation
image: F<bin>; F<info>; F<lib/perl>; F<man/man1>. Rather than
creating the directory F</usr/local/bin> and populating it with
symlinks to F<../stow/perl/bin/perl> and F<../stow/perl/bin/a2p> (and
so on), Stow will create a single symlink, F</usr/local/bin>, which
points to F<stow/perl/bin>. In this way, it still works to refer to
F</usr/local/bin/perl> and F</usr/local/bin/a2p>, and fewer symlinks
have been created. This is called "tree folding", since an entire
subtree is "folded" into a single symlink.
To complete this example, Stow will also create the symlink
F</usr/local/info> pointing to F<stow/perl/info>; the symlink
F</usr/local/lib> pointing to F<stow/perl/lib>; and the symlink
F</usr/local/man> pointing to F<stow/perl/man>.
Now suppose that instead of installing the Perl package into an empty
target tree, the target tree is not empty to begin with. Instead, it
contains several files and directories installed under a different
system-administration philosophy. In particular, F</usr/local/bin>
already exists and is a directory, as are F</usr/local/lib> and
F</usr/local/man/man1>. In this case, Stow will descend into
F</usr/local/bin> and create symlinks to F<../stow/perl/bin/perl> and
F<../stow/perl/bin/a2p> (etc.), and it will descend into
F</usr/local/lib> and create the tree-folding symlink F<perl> pointing
to F<../stow/perl/lib/perl>, and so on. As a rule, Stow only descends
as far as necessary into the target tree when it can create a
tree-folding symlink.
The time often comes when a tree-folding symlink has to be undone
because another package uses one or more of the folded subdirectories
in its installation image. This operation is called "splitting open"
a folded tree. It involves removing the original symlink from the
target tree, creating a true directory in its place, and then
populating the new directory with symlinks to the newly-installed
package B<and> to the old package that used the old symlink. For
example, suppose that after installing Perl into an empty
F</usr/local>, we wish to install Emacs. Emacs's installation image
includes a F<bin> directory containing the F<emacs> and F<etags>
executables, among others. Stow must make these files appear to be
installed in F</usr/local/bin>, but presently F</usr/local/bin> is a
symlink to F<stow/perl/bin>. Stow therefore takes the following
steps: the symlink F</usr/local/bin> is deleted; the directory
F</usr/local/bin> is created; links are made from F</usr/local/bin> to
F<../stow/emacs/bin/emacs> and F<../stow/emacs/bin/etags>; and links
are made from F</usr/local/bin> to F<../stow/perl/bin/perl> and
F<../stow/perl/bin/a2p>.
When splitting open a folded tree, Stow makes sure that the symlink
it is about to remove points inside a valid package in the current stow
directory.
=head2 Stow will never delete anything that it doesn't own.
Stow "owns" everything living in the target tree that points into a
package in the stow directory. Anything Stow owns, it can recompute if
lost. Note that by this definition, Stow doesn't "own" anything
B<in> the stow directory or in any of the packages.
If Stow needs to create a directory or a symlink in the target tree
and it cannot because that name is already in use and is not owned by
Stow, then a conflict has arisen. See the "Conflicts" section in the
info manual.
=head1 DELETING PACKAGES
When the C<-D> option is given, the action of Stow is to delete a
package from the target tree. Note that Stow will not delete anything
it doesn't "own". Deleting a package does B<not> mean removing it from
the stow directory or discarding the package tree.
To delete a package, Stow recursively scans the target tree, skipping
over the stow directory (since that is usually a subdirectory of the
target tree) and any other stow directories it encounters (see
"Multiple stow directories" in the info manual). Any symlink it
finds that points into the package being deleted is removed. Any
directory that contained only symlinks to the package being deleted is
removed. Any directory that, after removing symlinks and empty
subdirectories, contains only symlinks to a single other package, is
considered to be a previously "folded" tree that was "split open."
Stow will re-fold the tree by removing the symlinks to the surviving
package, removing the directory, then linking the directory back to
the surviving package.
=head1 SEE ALSO
The full documentation for F<stow> is maintained as a Texinfo manual.
If the F<info> and F<stow> programs are properly installed at your site, the command
info stow
should give you access to the complete manual.
=head1 BUGS
Please report bugs in Stow using the Debian bug tracking system.
Currently known bugs include:
=over 4
=item * The empty-directory problem.
If package F<foo> includes an empty directory -- say, F<foo/bar> --
then if no other package has a F<bar> subdirectory, everything's fine.
If another stowed package F<quux>, has a F<bar> subdirectory, then
when stowing, F<targetdir/bar> will be "split open" and the contents
of F<quux/bar> will be individually stowed. So far, so good. But when
unstowing F<quux>, F<targetdir/bar> will be removed, even though
F<foo/bar> needs it to remain. A workaround for this problem is to
create a file in F<foo/bar> as a placeholder. If you name that file
F<.placeholder>, it will be easy to find and remove such files when
this bug is fixed.
=item *
When using multiple stow directories (see "Multiple stow directories"
in the info manual), Stow fails to "split open" tree-folding symlinks
(see "Installing packages" in the info manual) that point into a stow
directory which is not the one in use by the current Stow
command. Before failing, it should search the target of the link to
see whether any element of the path contains a F<.stow> file. If it
finds one, it can "learn" about the cooperating stow directory to
short-circuit the F<.stow> search the next time it encounters a
tree-folding symlink.
=back
=head1 AUTHOR
This man page was originally constructed by Charles Briscoe-Smith from
parts of Stow's info manual, and then converted to POD format by Adam
Spiers. The info manual contains the following notice, which, as it
says, applies to this manual page, too. The text of the section
entitled "GNU General Public License" can be found in the file
F</usr/share/common-licenses/GPL> on any Debian GNU/Linux system. If
you don't have access to a Debian system, or the GPL is not there,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite
330, Boston, MA, 02111-1307, USA.
=head1 COPYRIGHT
Copyright (C)
1993, 1994, 1995, 1996 by Bob Glickstein <bobg+stow@zanshin.com>;
2000, 2001 by Guillaume Morin;
2007 by Kahlil Hodgson;
2011 by Adam Spiers;
and others.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that
the section entitled "GNU General Public License" is included with the
modified manual, and provided that the entire resulting derived work
is distributed under the terms of a permission notice identical to
this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by the Free Software Foundation.
=cut
use strict;
use warnings;
require 5.006_001;
use POSIX qw(getcwd);
use Getopt::Long;
use Cwd qw(abs_path);
use File::Basename qw(dirname);
use lib dirname(dirname(abs_path($0))) . '/share/perl';
use Stow;
use Stow::Util qw(parent error);
my $ProgramName = $0;
$ProgramName =~ s{.*/}{};
main() unless caller();
sub main {
my ($options, $pkgs_to_unstow, $pkgs_to_stow) = process_options();
my $stow = new Stow(%$options);
# current dir is now the target directory
$stow->plan_unstow(@$pkgs_to_unstow);
$stow->plan_stow (@$pkgs_to_stow);
my %conflicts = $stow->get_conflicts;
if (%conflicts) {
foreach my $action ('unstow', 'stow') {
next unless $conflicts{$action};
foreach my $package (sort keys %{ $conflicts{$action} }) {
warn "WARNING! ${action}ing $package would cause conflicts:\n";
#if $stow->get_action_count > 1;
foreach my $message (sort @{ $conflicts{$action}{$package} }) {
warn " * $message\n";
}
}
}
warn "All operations aborted.\n";
exit 1;
}
else {
if ($options->{simulate}) {
warn "WARNING: in simulation mode so not modifying filesystem.\n";
return;
}
$stow->process_tasks();
}
}
#===== SUBROUTINE ===========================================================
# Name : process_options()
# Purpose : parse command line options
# Parameters: none
# Returns : (\%options, \@pkgs_to_unstow, \@pkgs_to_stow)
# Throws : a fatal error if a bad command line option is given
# Comments : checks @ARGV for valid package names
#============================================================================
sub process_options {
my %options = ();
my @pkgs_to_unstow = ();
my @pkgs_to_stow = ();
my $action = 'stow';
unshift @ARGV, get_config_file_options();
#$,="\n"; print @ARGV,"\n"; # for debugging rc file
Getopt::Long::config('no_ignore_case', 'bundling', 'permute');
GetOptions(
\%options,
'verbose|v:+', 'help|h', 'simulate|n|no',
'version|V', 'compat|p', 'dir|d=s', 'target|t=s',
'adopt', 'no-folding',
# clean and pre-compile any regex's at parse time
'ignore=s' =>
sub {
my $regex = $_[1];
push @{$options{ignore}}, qr($regex\z);
},
'override=s' =>
sub {
my $regex = $_[1];
push @{$options{override}}, qr(\A$regex);
},
'defer=s' =>
sub {
my $regex = $_[1];
push @{$options{defer}}, qr(\A$regex);
},
# a little craziness so we can do different actions on the same line:
# a -D, -S, or -R changes the action that will be performed on the
# package arguments that follow it.
'D|delete' => sub { $action = 'unstow' },
'S|stow' => sub { $action = 'stow' },
'R|restow' => sub { $action = 'restow' },
# Handler for non-option arguments
'<>' =>
sub {
if ($action eq 'restow') {
push @pkgs_to_unstow, $_[0];
push @pkgs_to_stow, $_[0];
}
elsif ($action eq 'unstow') {
push @pkgs_to_unstow, $_[0];
}
else {
push @pkgs_to_stow, $_[0];
}
},
) or usage();
usage() if $options{help};
version() if $options{version};
sanitize_path_options(\%options);
check_packages(\@pkgs_to_unstow, \@pkgs_to_stow);
return (\%options, \@pkgs_to_unstow, \@pkgs_to_stow);
}
sub sanitize_path_options {
my ($options) = @_;
if (exists $options->{dir}) {
$options->{dir} =~ s/\A +//;
$options->{dir} =~ s/ +\z//;
}
else {
$options->{dir} = exists $ENV{STOW_DIR} ? $ENV{STOW_DIR} : getcwd();
}
if (exists $options->{target}) {
$options->{target} =~ s/\A +//;
$options->{target} =~ s/ +\z//;
}
else {
$options->{target} = parent($options->{dir}) || '.';
}
}
sub check_packages {
my ($pkgs_to_stow, $pkgs_to_unstow) = @_;
if (not @$pkgs_to_stow and not @$pkgs_to_unstow) {
usage("No packages to stow or unstow");
}
# check package arguments
for my $package (@$pkgs_to_stow, @$pkgs_to_unstow) {
$package =~ s{/+$}{}; # delete trailing slashes
if ($package =~ m{/}) {
error("Slashes are not permitted in package names");
}
}
}
#===== SUBROUTINE ============================================================
# Name : get_config_file_options()
# Purpose : search for default settings in any .stowrc files
# Parameters: none
# Returns : a list of default options
# Throws : no exceptions
# Comments : prepends the contents of '~/.stowrc' and '.stowrc' to the command
# : line so they get parsed just like normal arguments. (This was
# : hacked in so that Emil and I could set different preferences).
#=============================================================================
sub get_config_file_options {
my @defaults = ();
for my $file ("$ENV{HOME}/.stowrc", '.stowrc') {
if (-r $file) {
warn "Loading defaults from $file\n";
open my $FILE, '<', $file
or die "Could not open $file for reading\n";
while (my $line = <$FILE>){
chomp $line;
push @defaults, split " ", $line;
}
close $FILE or die "Could not close open file: $file\n";
}
}
return @defaults;
}
#===== SUBROUTINE ===========================================================
# Name : usage()
# Purpose : print program usage message and exit
# Parameters: $msg => string to prepend to the usage message
# Returns : n/a
# Throws : n/a
# Comments : if 'msg' is given, then exit with non-zero status
#============================================================================
sub usage {
my ($msg) = @_;
if ($msg) {
print "$ProgramName: $msg\n\n";
}
print <<"EOT";
$ProgramName (GNU Stow) version $Stow::VERSION
SYNOPSIS:
$ProgramName [OPTION ...] [-D|-S|-R] PACKAGE ... [-D|-S|-R] PACKAGE ...
OPTIONS:
-d DIR, --dir=DIR Set stow dir to DIR (default is current dir)
-t DIR, --target=DIR Set target to DIR (default is parent of stow dir)
-S, --stow Stow the package names that follow this option
-D, --delete Unstow the package names that follow this option
-R, --restow Restow (like stow -D followed by stow -S)
--ignore=REGEX Ignore files ending in this Perl regex
--defer=REGEX Don't stow files beginning with this Perl regex
if the file is already stowed to another package
--override=REGEX Force stowing files beginning with this Perl regex
if the file is already stowed to another package
--adopt (Use with care!) Import existing files into stow package
from target. Please read docs before using.
-p, --compat Use legacy algorithm for unstowing
-n, --no, --simulate Do not actually make any filesystem changes
-v, --verbose[=N] Increase verbosity (levels are 0,1,2,3;
-v or --verbose adds 1; --verbose=N sets level)
-V, --version Show stow version number
-h, --help Show this help
Report bugs to: bug-stow\@gnu.org
Stow home page: <http://www.gnu.org/software/stow/>
General help using GNU software: <http://www.gnu.org/gethelp/>
EOT
exit defined $msg ? 1 : 0;
}
sub version {
print "$ProgramName (GNU Stow) version $Stow::VERSION\n";
exit 0;
}
1; # This file is required by t/stow.t
# Local variables:
# mode: perl
# cperl-indent-level: 4
# end:
# vim: ft=perl

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,232 @@
Thu Jan 31 2008 Kahlil Hodgson <kal@grebo.cs.rmit.edu.au>
* stow.texi: Austin Wood and Chris Hoobin clean this up for version 2.
* texi2man: new script by Austin and Chris to generate a man page from the
texinfo file.
Sun Nov 25 19:31:32 2007 Kahlil Hodgson <kahlil@internode.con.net>
* all: Version 2.0.1
* AUTHORS: added Kahlil Hodgson as a new author and current maintainer.
* stow.in: major rewrite to produce version 2.0.1 see NEWS for details
* t/: added test suite and support code
* configure.in: renamed to configure.ac as per autotools recommendation.
* configure.ac:
Use AC_INT rather than obsolete AM_INTI_MAKEFILE usage.
Remove redundant VERSION and PACKAGE setttings
Remove redundant AC_ARG_PROGRAM
Use AM_INIT_AUTOMAKE([-Wall -Werror]) because we are pedantic.
Add AC_PREREQ([2.6.1])
* Makefile.am, configure.ac:
Use explicit rewrite in Makefile.am, rather than AC_CONFIG_FILES(stow.in),
as per autotools recommendation.
* Makefile.am:
Add TESTS and TEST_ENVIRONMENT for files in t/
Use dist_man_MANS instead of EXTRA_DIST for man page
* INSTALL: update to reflect autotools modernization.
* NEWS: update to describe cahnges in Version 2.0.1.
* README: update to point to the right websites and email addresses.
* THANKS:
Add Emil Mikulc who's ideas largely inspired Version 2 and
and Geoffrey Giesemann who did some initial testing and found some
important bugs.
* TODO: remove tasks that where implemented in Version 2
* stow.texi: update documentation to reflect Version 2 changes.
* stow.8: update to reflect Version 2 changes.
Sat Jan 26 16:15:21 2002 Guillaume Morin <gmorin@gnu.org>
* stow.in: if $ENV{'STOW_DIR'} is set, this becomes the default
Stow directory.
Sun Jan 06 12:18:50 2002 Guillaume Morin <gmorin@gnu.org>
* Makefile.am: use EXTRA_DIST to include manpage in distribution
Wed Jan 02 21:33:41 2002 Guillaume Morin <gmorin@gnu.org>
* stow.in: Stow now only warns the user if a subdirectory
is unreadable during unstowing.
Wed Jan 02 20:58:05 2002 Guillaume Morin <gmorin@gnu.org>
* stow.in: fixed JoinPaths so that subdirs called "0" are
correctly pushed. Thanks a lot to Gergely Nagy
<algernon@bonehunter.rulez.org> who patiently helped me to chase
this bug.
Sun Dec 30 21:58:25 2001 Guillaume Morin <gmorin@gnu.org>
* stow.in: fixed a bug introduced by previous changes when
Target argument was relative. (thanks to Luca Filipozzi
<lfilipoz@debian.org> for pointing this out)
Sun Dec 30 18:23:25 2001 Guillaume Morin <gmorin@gnu.org>
* stow.in: now requires Perl 5. Use POSIX getcwd instead of broken
fastcwd. Fixed bug when CommonParent is /. Stow does not remove
initially empty directories anymore.
Sun Dec 30 18:07:51 2001 Guillaume Morin <gmorin@gnu.org>
* configure.in: automake fixes (fp_ -> AC, +AC_INIT_AUTOMAKE)
Fri Oct 11 22:09:45 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* stow.html, configure.in: Version 1.3.2.
* README, stow.texi: Correct the URL again.
Fri Oct 11 18:20:42 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* configure.in: Version 1.3.1.
* stow.html: Update Stow manual URL. Mention version 1.3.1.
* README: Update Stow URL.
* Makefile.am: stow-manual.html -> manual.html.
* stow.texi:
Add a reference to the Stow home page on the GNU web server. Change
several occurrences of "which" to "that" for grammatical superiority.
Wed Oct 9 00:34:07 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* Makefile.am:
Add maintainer-only rules for stow-manual.html and stow-manual.texi.
Wed Oct 9 00:32:31 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* README: Refer to the new location for the Stow home page.
* stow.html: Make it right for the GNU web server.
Tue Oct 8 21:54:09 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* stow.texi: Document --restow
* stow.in: Add --restow (-R) option
* configure.in: Add "perl4" to search for Perl binary.
Bump version number to 1.3.
Mon Jun 24 23:23:03 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* stow.texi: Delete trailing whitespace.
Fri Jun 21 19:44:26 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* Makefile.am:
Don't explicitly mention version.texi. Automake now does it
automagically, by noticing the `@include version.texi' in
stow.texi. Awesome.
* stow.texi:
Use @include instead of @input. This is more Texinfoid, plus
allows Automake to automatically deduce the need for
version.texi.
* stow.in:
Elide trailing slashes from package names, then complain if
package names have slashes in them.
Tue Jun 18 23:19:04 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* README: Call it "Gnu Stow".
Tue Jun 18 22:15:45 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* configure.in:
Bump version number to 1.2.
Look for Perl under the names `perl' and `perl5'. If not found,
print a warning.
* stow.texi:
Add a section about bootstrapping. Add text about hacking Gnu
Make output.
* INSTALL:
Describe what happens when Perl isn't found during `configure'.
Mon Jun 17 19:43:25 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* THANKS: Thank Fritz.
Fri Jun 14 19:18:50 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* AUTHORS: Credit John Bazik and Gord Matzigkeit.
* stow.texi: Remove a "known bug" -- the pwd dependency is gone.
* stow.in:
Use fastcwd, from fastcwd.pl (which is GPL'd), to remove
dependency on an external pwd binary. Suggested by Gord
Matzigkeit.
* stow.in: Add a missing comma.
Thu Jun 13 21:52:10 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* stow.in:
Change three occurrences of `my' to `local' for Perl 4
compatibility.
Thu Jun 13 18:07:37 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* configure.in: Bump version number to 1.1.
* Makefile.am:
Add `stow' to the list of clean targets. Don't redirect output
directly into a make target.
* AUTHORS, README:
Use <bobg+stow@zanshin.com> as the contact address.
* TODO: New file.
* stow.in:
Refer to "Gnu Stow" in a few places. Use <bobg+stow@zanshin.com>
as the contact address. Handle long and short options. Handle
`version' and `help' options. Refer to "packages," not
"collections," for consistency with the manual.
* stow.texi:
Refer to "Gnu Stow" in a few places. Use <bobg+stow@zanshin.com>
as the contact address. Add sections on Reporting bugs and Known
bugs. Create a master menu. Minor rewording. Remove the period
from a node name.
* TODO, THANKS: New files.
Mon Jun 10 14:44:13 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* NEWS: Create NEWS file for release. 1.0 now ready.
* stow.texi: Big revisions in preparation for release.
Sun Jun 9 15:47:19 1996 Bob Glickstein <bobg@zoger.ipost.com>
* stow.in: Enhance argument parsing, losing Perl 4 support in the
process.
(later) Perl 4 support restored.
Fri Jun 7 12:13:33 1996 Bob Glickstein <bobg@hiro.zanshin.com>
* Created stow, formerly "depot."

View File

@ -0,0 +1,53 @@
README for GNU Stow
===================
This is GNU Stow, a symlink farm manager program which takes distinct
packages of software and/or data located in separate directories on
the filesystem, and makes them appear to be installed in the same
place. For example, /usr/local/bin could contain symlinks to files
within /usr/local/stow/emacs/bin, /usr/local/stow/perl/bin etc., and
likewise recursively for any other subdirectories such as .../share,
.../man, and so on.
This is particularly useful for keeping track of system-wide and
per-user installations of software built from source, but can also
facilitate a more controlled approach to management of configuration
files in the user's home directory, especially when coupled with
version control systems.
Stow is implemented as a combination of a Perl script providing a CLI
interface, and a backend Perl module which does most of the work.
You can get the latest information about Stow from the home page:
http://www.gnu.org/software/stow/
License
-------
Stow is free software, licensed under the GNU General Public License,
which can be found in the file COPYING.
Installation
------------
See INSTALL for installation instructions.
Feedback
--------
Please do send comments, questions, and constructive criticism. The
mailing lists and any other communication channels are detailed on the
above home page.
Brief history
-------------
Stow was inspired by Carnegie Mellon's "Depot" program, but is
substantially simpler. Whereas Depot requires database files to keep
things in sync, Stow stores no extra state between runs, so there's no
danger (as there is in Depot) of mangling directories when file
hierarchies don't match the database. Also unlike Depot, Stow will
never delete any files, directories, or links that appear in a Stow
directory (e.g., /usr/local/stow/emacs), so it's always possible to
rebuild the target tree (e.g., /usr/local).

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,89 @@
<html lang="en">
<head>
<title>Bootstrapping - Stow</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Stow">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Compile_002dtime-vs-Install_002dtime.html#Compile_002dtime-vs-Install_002dtime" title="Compile-time vs Install-time">
<link rel="next" href="Reporting-Bugs.html#Reporting-Bugs" title="Reporting Bugs">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual describes GNU Stow version 2.2.2
(9 November 2015), a program for managing the installation of software
packages.
Software and documentation is copyrighted by the following:
(C) 1993, 1994, 1995, 1996 Bob Glickstein <bobg+stow@zanshin.com>
(C) 2000, 2001 Guillaume Morin <gmorin@gnu.org>
(C) 2007 Kahlil (Kal) Hodgson <kahlil@internode.on.net>
(C) 2011 Adam Spiers <stow@adamspiers.org>
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission
notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided
also that the section entitled ``GNU General Public License'' is
included with the modified manual, and provided that the entire
resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for
modified versions, except that this permission notice may be
stated in a translation approved by the Free Software Foundation.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Bootstrapping"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Reporting-Bugs.html#Reporting-Bugs">Reporting Bugs</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Compile_002dtime-vs-Install_002dtime.html#Compile_002dtime-vs-Install_002dtime">Compile-time vs Install-time</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">13 Bootstrapping</h2>
<p>Suppose you have a stow directory all set up and ready to go:
<samp><span class="file">/usr/local/stow/perl</span></samp> contains the Perl installation,
<samp><span class="file">/usr/local/stow/stow</span></samp> contains Stow itself, and perhaps you have
other packages waiting to be stowed. You'd like to be able to do this:
<pre class="example"> cd /usr/local/stow
stow -vv *
</pre>
<p class="noindent">but <samp><span class="command">stow</span></samp> is not yet in your <samp><span class="env">PATH</span></samp>. Nor can you do this:
<pre class="example"> cd /usr/local/stow
stow/bin/stow -vv *
</pre>
<p class="noindent">because the &lsquo;<samp><span class="samp">#!</span></samp>&rsquo; line at the beginning of <samp><span class="command">stow</span></samp> tries to
locate Perl (usually in <samp><span class="file">/usr/local/bin/perl</span></samp>), and that won't be
found. The solution you must use is:
<pre class="example"> cd /usr/local/stow
perl/bin/perl stow/bin/stow -vv *
</pre>
<!-- =========================================================================== -->
</body></html>

View File

@ -0,0 +1,144 @@
<html lang="en">
<head>
<title>Compile-time vs Install-time - Stow</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Stow">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Resource-Files.html#Resource-Files" title="Resource Files">
<link rel="next" href="Bootstrapping.html#Bootstrapping" title="Bootstrapping">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual describes GNU Stow version 2.2.2
(9 November 2015), a program for managing the installation of software
packages.
Software and documentation is copyrighted by the following:
(C) 1993, 1994, 1995, 1996 Bob Glickstein <bobg+stow@zanshin.com>
(C) 2000, 2001 Guillaume Morin <gmorin@gnu.org>
(C) 2007 Kahlil (Kal) Hodgson <kahlil@internode.on.net>
(C) 2011 Adam Spiers <stow@adamspiers.org>
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission
notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided
also that the section entitled ``GNU General Public License'' is
included with the modified manual, and provided that the entire
resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for
modified versions, except that this permission notice may be
stated in a translation approved by the Free Software Foundation.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Compile-time-vs-Install-time"></a>
<a name="Compile_002dtime-vs-Install_002dtime"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Bootstrapping.html#Bootstrapping">Bootstrapping</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Resource-Files.html#Resource-Files">Resource Files</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">12 Compile-time vs Install-time</h2>
<p>Software whose installation is managed with Stow needs to be installed
in one place (the package directory, e.g. <samp><span class="file">/usr/local/stow/perl</span></samp>)
but needs to appear to run in another place (the target tree, e.g.,
<samp><span class="file">/usr/local</span></samp>). Why is this important? What's wrong with Perl, for
instance, looking for its files in <samp><span class="file">/usr/local/stow/perl</span></samp> instead
of in <samp><span class="file">/usr/local</span></samp>?
<p>The answer is that there may be another package, e.g.,
<samp><span class="file">/usr/local/stow/perl-extras</span></samp>, stowed under <samp><span class="file">/usr/local</span></samp>. If
Perl is configured to find its files in <samp><span class="file">/usr/local/stow/perl</span></samp>, it
will never find the extra files in the &lsquo;<samp><span class="samp">perl-extras</span></samp>&rsquo; package, even
though they're intended to be found by Perl. On the other hand, if Perl
looks for its files in <samp><span class="file">/usr/local</span></samp>, then it will find the
intermingled Perl and &lsquo;<samp><span class="samp">perl-extras</span></samp>&rsquo; files.
<p>This means that when you compile a package, you must tell it the
location of the run-time, or target tree; but when you install it, you
must place it in the stow tree.
<h3 class="section">12.1 Advice on changing compilation and installation parameters</h3>
<p>Some software packages allow you to specify, at compile-time, separate
locations for installation and for run-time. Perl is one such package;
see <a href="Perl-and-Perl-5-Modules.html#Perl-and-Perl-5-Modules">Perl and Perl 5 Modules</a>. Others allow you to compile the
package, then give a different destination in the &lsquo;<samp><span class="samp">make install</span></samp>&rsquo;
step without causing the binaries or other files to get rebuilt. Most
GNU software falls into this category; Emacs is a notable exception.
See <a href="GNU-Emacs.html#GNU-Emacs">GNU Emacs</a>, and <a href="Other-FSF-Software.html#Other-FSF-Software">Other FSF Software</a>.
<p>Still other software packages cannot abide the idea of separate
installation and run-time locations at all. If you try to &lsquo;<samp><span class="samp">make
install prefix=/usr/local/stow/</span><var>foo</var></samp>&rsquo;, then first the whole package
will be recompiled to hardwire the <samp><span class="file">/usr/local/stow/</span><var>foo</var></samp>
path. With these packages, it is best to compile normally, then run
&lsquo;<samp><span class="samp">make -n install</span></samp>&rsquo;, which should report all the steps needed to
install the just-built software. Place this output into a file, edit
the commands in the file to remove recompilation steps and to reflect
the Stow-based installation location, and execute the edited file as a
shell script in place of &lsquo;<samp><span class="samp">make install</span></samp>&rsquo;. Be sure to execute the
script using the same shell that &lsquo;<samp><span class="samp">make install</span></samp>&rsquo; would have used.
<p>(If you use GNU Make and a shell [such as GNU bash] that understands
<samp><span class="command">pushd</span></samp> and <samp><span class="command">popd</span></samp>, you can do the following:
<ol type=1 start=1>
<li>Replace all lines matching &lsquo;<samp><span class="samp">make[</span><var>n</var><span class="samp">]: Entering directory
</span><var>dir</var></samp>&rsquo; with &lsquo;<samp><span class="samp">pushd </span><var>dir</var></samp>&rsquo;.
<li>Replace all lines matching &lsquo;<samp><span class="samp">make[</span><var>n</var><span class="samp">]: Leaving directory
</span><var>dir</var></samp>&rsquo; with &lsquo;<samp><span class="samp">popd</span></samp>&rsquo;.
<li>Delete all lines matching &lsquo;<samp><span class="samp">make[</span><var>n</var><span class="samp">]: Nothing to be done for
</span><var>rule</var></samp>&rsquo;.
</ol>
<p>Then find other lines in the output containing <samp><span class="command">cd</span></samp> or <samp><span class="command">make</span></samp>
commands and rewrite or delete them. In particular, you should be able
to delete sections of the script that resemble this:
<pre class="example"> for i in <var>dir_1</var> <var>dir_2</var> <span class="roman">...</span>; do \
(cd $i; make <var>args</var> <span class="roman">...</span>) \
done
</pre>
<p class="noindent">Note, that's &ldquo;should be able to,&rdquo; not &ldquo;can.&rdquo; Be sure to modulate
these guidelines with plenty of your own intelligence.
<p>The details of stowing some specific packages are described in the
following sections.
<ul class="menu">
<li><a accesskey="1" href="GNU-Emacs.html#GNU-Emacs">GNU Emacs</a>
<li><a accesskey="2" href="Other-FSF-Software.html#Other-FSF-Software">Other FSF Software</a>
<li><a accesskey="3" href="Cygnus-Software.html#Cygnus-Software">Cygnus Software</a>
<li><a accesskey="4" href="Perl-and-Perl-5-Modules.html#Perl-and-Perl-5-Modules">Perl and Perl 5 Modules</a>
</ul>
<!-- -->
</body></html>

View File

@ -0,0 +1,100 @@
<html lang="en">
<head>
<title>Conflicts - Stow</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Stow">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Deleting-Packages.html#Deleting-Packages" title="Deleting Packages">
<link rel="next" href="Mixing-Operations.html#Mixing-Operations" title="Mixing Operations">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual describes GNU Stow version 2.2.2
(9 November 2015), a program for managing the installation of software
packages.
Software and documentation is copyrighted by the following:
(C) 1993, 1994, 1995, 1996 Bob Glickstein <bobg+stow@zanshin.com>
(C) 2000, 2001 Guillaume Morin <gmorin@gnu.org>
(C) 2007 Kahlil (Kal) Hodgson <kahlil@internode.on.net>
(C) 2011 Adam Spiers <stow@adamspiers.org>
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission
notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided
also that the section entitled ``GNU General Public License'' is
included with the modified manual, and provided that the entire
resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for
modified versions, except that this permission notice may be
stated in a translation approved by the Free Software Foundation.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Conflicts"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Mixing-Operations.html#Mixing-Operations">Mixing Operations</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Deleting-Packages.html#Deleting-Packages">Deleting Packages</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">7 Conflicts</h2>
<p><a name="index-conflicts-31"></a>If, during installation, a file or symlink exists in the target tree and
has the same name as something Stow needs to create, and if the
existing name is not a folded tree that can be split open, then a
<dfn>conflict</dfn> has arisen. A conflict also occurs if a directory exists
where Stow needs to place a symlink to a non-directory. On the
other hand, if the existing name is merely a symlink that already points
where Stow needs it to, then no conflict has occurred. (Thus it
is harmless to install a package that has already been installed.)
<p>For complex packages, scanning the stow and target trees in tandem,
and deciding whether to make directories or links, split-open or fold
directories, can actually take a long time (a number of seconds).
Moreover, an accurate analysis of potential conflicts requires us to
take into account all of these operations.
<p><a name="Deferred-Operation"></a>
<h3 class="section">7.1 Deferred Operation</h3>
<p><a name="index-deferred-operation-32"></a>
Since version 2.0, Stow now adopts a two-phase algorithm, first
scanning for any potential conflicts before any stowing or unstowing
operations are performed. If any conflicts are found, they are
displayed and then Stow terminates without making any modifications to
the filesystem. This means that there is much less risk of a package
being partially stowed or unstowed due to conflicts.
<p>Prior to version 2.0, if a conflict was discovered, the stow or unstow
operation could be aborted mid-flow, leaving the target tree in an
inconsistent state.
<!-- =========================================================================== -->
</body></html>

View File

@ -0,0 +1,95 @@
<html lang="en">
<head>
<title>Cygnus Software - Stow</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Stow">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Compile_002dtime-vs-Install_002dtime.html#Compile_002dtime-vs-Install_002dtime" title="Compile-time vs Install-time">
<link rel="prev" href="Other-FSF-Software.html#Other-FSF-Software" title="Other FSF Software">
<link rel="next" href="Perl-and-Perl-5-Modules.html#Perl-and-Perl-5-Modules" title="Perl and Perl 5 Modules">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual describes GNU Stow version 2.2.2
(9 November 2015), a program for managing the installation of software
packages.
Software and documentation is copyrighted by the following:
(C) 1993, 1994, 1995, 1996 Bob Glickstein <bobg+stow@zanshin.com>
(C) 2000, 2001 Guillaume Morin <gmorin@gnu.org>
(C) 2007 Kahlil (Kal) Hodgson <kahlil@internode.on.net>
(C) 2011 Adam Spiers <stow@adamspiers.org>
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission
notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided
also that the section entitled ``GNU General Public License'' is
included with the modified manual, and provided that the entire
resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for
modified versions, except that this permission notice may be
stated in a translation approved by the Free Software Foundation.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Cygnus-Software"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Perl-and-Perl-5-Modules.html#Perl-and-Perl-5-Modules">Perl and Perl 5 Modules</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Other-FSF-Software.html#Other-FSF-Software">Other FSF Software</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Compile_002dtime-vs-Install_002dtime.html#Compile_002dtime-vs-Install_002dtime">Compile-time vs Install-time</a>
<hr>
</div>
<h3 class="section">12.4 Cygnus Software</h3>
<p>Cygnus is a commercial supplier and supporter of GNU software. It has
also written several of its own packages, released under the terms of
the GNU General Public License; and it has taken over the maintenance of
other packages. Among the packages released by Cygnus are &lsquo;<samp><span class="samp">gdb</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">gnats</span></samp>&rsquo;, and &lsquo;<samp><span class="samp">dejagnu</span></samp>&rsquo;.
<p>Cygnus packages have the peculiarity that each one unpacks into a
directory tree with a generic top-level Makefile, which is set up to
compile <em>all</em> of Cygnus' packages, any number of which may reside
under the top-level directory. In other words, even if you're only
building &lsquo;<samp><span class="samp">gnats</span></samp>&rsquo;, the top-level Makefile will look for, and try to
build, <samp><span class="file">gdb</span></samp> and <samp><span class="file">dejagnu</span></samp> subdirectories, among many others.
<p>The result is that if you try &lsquo;<samp><span class="samp">make -n install
prefix=/usr/local/stow/</span><var>package</var></samp>&rsquo; at the top level of a Cygnus
package, you'll get a bewildering amount of output. It will then be
very difficult to visually scan the output to see whether the install
will proceed correctly. Unfortunately, it's not always clear how to
invoke an install from the subdirectory of interest.
<p>In cases like this, the best approach is to run your &lsquo;<samp><span class="samp">make install
prefix=...</span></samp>&rsquo;, but be ready to interrupt it if you detect that it
is recompiling files. Usually it will work just fine; otherwise,
install manually.
<!-- -->
</body></html>

View File

@ -0,0 +1 @@
<meta http-equiv="refresh" content="0; url=Conflicts.html#Deferred%20Operation">

View File

@ -0,0 +1,112 @@
<html lang="en">
<head>
<title>Deleting Packages - Stow</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Stow">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Installing-Packages.html#Installing-Packages" title="Installing Packages">
<link rel="next" href="Conflicts.html#Conflicts" title="Conflicts">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual describes GNU Stow version 2.2.2
(9 November 2015), a program for managing the installation of software
packages.
Software and documentation is copyrighted by the following:
(C) 1993, 1994, 1995, 1996 Bob Glickstein <bobg+stow@zanshin.com>
(C) 2000, 2001 Guillaume Morin <gmorin@gnu.org>
(C) 2007 Kahlil (Kal) Hodgson <kahlil@internode.on.net>
(C) 2011 Adam Spiers <stow@adamspiers.org>
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission
notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided
also that the section entitled ``GNU General Public License'' is
included with the modified manual, and provided that the entire
resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for
modified versions, except that this permission notice may be
stated in a translation approved by the Free Software Foundation.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Deleting-Packages"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Conflicts.html#Conflicts">Conflicts</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Installing-Packages.html#Installing-Packages">Installing Packages</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">6 Deleting Packages</h2>
<p><a name="index-deletion-28"></a>When the <samp><span class="option">-D</span></samp> option is given, the action of Stow is to
delete a package from the target tree. Note that Stow will not
delete anything it doesn't &ldquo;own&rdquo;. Deleting a package does <em>not</em>
mean removing it from the stow directory or discarding the package
tree.
<p>To delete a package, Stow recursively scans the target tree, skipping over any
directory that is not included in the installation image.<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>
For example, if the target directory is <samp><span class="file">/usr/local</span></samp> and the
installation image for the package being deleted has only a <samp><span class="file">bin</span></samp>
directory and a <samp><span class="file">man</span></samp> directory at the top level, then we only scan
<samp><span class="file">/usr/local/bin</span></samp> and <samp><span class="file">/usr/local/bin/man</span></samp>, and not
<samp><span class="file">/usr/local/lib</span></samp> or <samp><span class="file">/usr/local/share</span></samp>, or for that matter
<samp><span class="file">/usr/local/stow</span></samp>. Any symlink it finds that points into the package
being deleted is removed. Any directory that contained only symlinks to the
package being deleted is removed.
<p><a name="tree-refolding"></a>
<h3 class="section">6.1 Refolding &ldquo;foldable&rdquo; trees.</h3>
<p><a name="index-refolding-trees-29"></a><a name="index-tree-refolding-30"></a>
After removing symlinks and empty subdirectories, any directory that
contains only symlinks to a single other package is considered to be a
previously &ldquo;folded&rdquo; tree that was &ldquo;split open.&rdquo; Stow will refold
the tree by removing the symlinks to the surviving package, removing
the directory, then linking the directory back to the surviving
package. However, this behaviour can be prevented via the
<samp><span class="option">--no-folding</span></samp> option; see <a href="Invoking-Stow.html#Invoking-Stow">Invoking Stow</a>.
<!-- =========================================================================== -->
<div class="footnote">
<hr>
<h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> This
approach was introduced in version 2 of GNU Stow. Previously, the whole
target tree was scanned and stow directories were explicitly omitted. This
became problematic when dealing with very large installations. The only
situation where this is useful is if you accidentally delete a directory in
the package tree, leaving you with a whole bunch of dangling links. Note that
you can enable the old approach with the <samp><span class="option">-p</span></samp> option. Alternatively, you can
use the <samp><span class="option">--badlinks</span></samp> option get stow to search for dangling links in your target tree and remove the offenders manually.</p>
<hr></div>
</body></html>

View File

@ -0,0 +1,97 @@
<html lang="en">
<head>
<title>GNU Emacs - Stow</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Stow">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Compile_002dtime-vs-Install_002dtime.html#Compile_002dtime-vs-Install_002dtime" title="Compile-time vs Install-time">
<link rel="prev" href="Compile_002dtime-vs-Install_002dtime.html#Compile_002dtime-vs-Install_002dtime" title="Compile-time vs Install-time">
<link rel="next" href="Other-FSF-Software.html#Other-FSF-Software" title="Other FSF Software">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual describes GNU Stow version 2.2.2
(9 November 2015), a program for managing the installation of software
packages.
Software and documentation is copyrighted by the following:
(C) 1993, 1994, 1995, 1996 Bob Glickstein <bobg+stow@zanshin.com>
(C) 2000, 2001 Guillaume Morin <gmorin@gnu.org>
(C) 2007 Kahlil (Kal) Hodgson <kahlil@internode.on.net>