[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-hackers] Re: webcvs
From: |
Loic Dachary |
Subject: |
[Savannah-hackers] Re: webcvs |
Date: |
Tue, 14 Aug 2001 17:18:15 +0200 |
Summary: .symlinks files can specify cross directory symbolic links and
checks that no file outside the document root of www.gnu.org is referenced.
Jonas Oberg writes:
> Loic Dachary <address@hidden> writes:
>
> Well, what I suppose that you want to do is avoid symlinks being created
> that points outside of the web root. I suppose what you ought to be doing
> is to follow each link and see if you decide outside of /home/www/html/
> and if so, refuse to create the link.
I did what you suggested. Also I build a simple package around
the command and a manual page. I updated
http://www.gnu.org/server/standards/README.html#SEC01 to be more informative
and explicit.
After running the new version of the symlinks script it appears
that some people were already expecting such a behaviour (cross directory
symlinks):
( cd ./fsfe/siae ; ln -s ../images images ; ln -s ../blue.css blue.css )
( cd ./fsfe/law ; ln -s ../images images ; ln -s ../blue.css blue.css )
( cd ./copyleft ; ln -s ../licenses/fdl.sgml fdl.sgml )
( cd ./software/classpathx ; ln -s jaxp/jaxp.html jaxp.html )
You will now find the package containing the symlink script in
gnudist.gnu.org:/usr/local/src/symlinks-1.1.tar.gz. Here is the manual
page:
SYMLINKS(1) User Contributed Perl Documentation SYMLINKS(1)
NAME
symlinks - build symbolic links from .symlinks specifica-
tions
SYNOPSIS
symlinks [--ext=<extension>] [--top=<dir>] [--fake] [--help]
[--verbose]
DESCRIPTION
The primary goal is to cope with the inability of CVS to
deal with symbolic files. By adding special files (".sym-
links") into the CVS tree that are interpreted as specfi-
ciations to build symbolic links. The "symlinks" script
can be run immediately after a "cvs update" to fix the
symbolic links according to the specifications included in
the ".symlinks" files.
The current directory is searched recursively for ".sym-
links" files. Symbolic links that exist in directory
where there is no .symlinks files will be ignored. Only
directories containing a .symlinks file are handled.
Each symbolic link specification from the ".symlinks" file
is honored, i.e. the symbolic link is created if it does
not exist yet. If a symbolic link is found in the direc-
tory and is not listed in the ".symlinks" file, it is
removed.
Special handling to comply to the GNU webmaster standard
is also applied. If a subdirectory "foo/bar" has no
"foo/bar/index.html" file and a file "foo/bar/bar.html"
exists, then a symbolic link from "index.html" to
"bar.html" is created even if it is not listed in the
.symlinks file. In short, an implicit
cd foo/bar ; ln -s bar.html index.html
is done.
By default symbolic links that point outside the current
working directory are silently ignored. This can be
altered using the "--top" option.
FILE FORMAT
The ".symlinks" files obey to the following format.
Each line starting with a sharp sign ("#") is treated as a
comment and ignored.
Lines that do not contain two strings separated by white
space are silently ignored.
Here is an example of .symlinks file content:
#
# Link foo.html to bar.html.
# Stricly equivalent to ln -s foo.html bar.html
#
foo.html bar.html
On each line the first file name must be a relative path
name to an existing file. The file designated by this path
must not be outside the directory specified by the "--top"
option or the working directory from which the command was
run if no "--top" option was specified. The second file
name may not contain any slash, it is the name of the sym-
bolic link to be created.
OPTIONS
--top dir
No symbolic link are allowed outside the absolute path
specified by "dir".
--fake
print actions and do nothing
--help
print a short usage message.
--verbose
print debugging messages on the stderr file descrip-
tor.
AUTHOR
Loic Dachary (address@hidden)
SEE ALSO
ln(1).
2001-08-14 perl v5.6.1 SYMLINKS(1)
--
Loic Dachary http://www.dachary.org/ address@hidden
24 av Secretan http://www.senga.org/ address@hidden
75019 Paris Tel: 33 1 42 45 09 16 address@hidden
GPG Public Key: http://www.dachary.org/loic/gpg.txt
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Savannah-hackers] Re: webcvs,
Loic Dachary <=