Your message dated Mon, 3 Mar 2008 13:47:16 +0100
with message-id <[EMAIL PROTECTED]>
and subject line Re: Bug#373782: rsync breaks hardlinks to symlinks
has caused the Debian Bug report #373782,
regarding rsync breaks hardlinks to symlinks
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)
--
373782: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=373782
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: rsync
Version: 2.6.4-6.0iwj.0.1 (nearly identical to 2.6.4-6)
-davenant:d> rm -rf src dst
-davenant:d> mkdir src dst
-davenant:d> ln -s target src/l
-davenant:d> ln -s target src/m
-davenant:d> ln src/l src/lh
-davenant:d> date >src/f
-davenant:d> ln src/f src/fh
-davenant:d> ll -i src/
total 11
45818 drwxrwsr-x 2 ian ian 168 Jun 15 15:13 ./
26523 drwxrwsr-x 4 ian ian 96 Jun 15 15:12 ../
291853 -rw-rw-r-- 2 ian ian 29 Jun 15 15:13 f
291853 -rw-rw-r-- 2 ian ian 29 Jun 15 15:13 fh
289727 lrwxrwxrwx 2 ian ian 6 Jun 15 15:12 l -> target
289727 lrwxrwxrwx 2 ian ian 6 Jun 15 15:12 lh -> target
291852 lrwxrwxrwx 1 ian ian 6 Jun 15 15:12 m -> target
-davenant:d> rsync -aH src/. dst/.
-davenant:d> ll -i dst/
total 11
287968 drwxrwsr-x 2 ian ian 168 Jun 15 15:13 ./
26523 drwxrwsr-x 4 ian ian 96 Jun 15 15:12 ../
291859 -rw-rw-r-- 2 ian ian 29 Jun 15 15:13 f
291859 -rw-rw-r-- 2 ian ian 29 Jun 15 15:13 fh
291854 lrwxrwxrwx 1 ian ian 6 Jun 15 15:13 l -> target
291855 lrwxrwxrwx 1 ian ian 6 Jun 15 15:13 lh -> target
291856 lrwxrwxrwx 1 ian ian 6 Jun 15 15:13 m -> target
-davenant:d>
(reiserfs, Linux 2.4.23, system is otherwise pretty much sarge.)
This may seem irrelevant :-), but it causes my backup software to note
that there is a discrepancy between the original and the backup. The
only behavioural distinction I can think of between the two is that
lchown would chowns two hardlinked symlinks in one go.
Note that on some systems, link(2) follows the source symlink, so that
it is impossible to make hardlinks to symlinks, even if the filesystem
structure would be able to represent such a thing. Even worse, with
the increasing prevalence of foreign file system access facilities, it
might be possible to have a situation where a hardlinked symlink is
visible in the filesystem, but no such object can be created there
with the currently running system. And finally of course there are
bugs: at least one version of Linux would attempt to follow the link
source symlink, and fail if it couldn't, but if it succeeded would
then a hardlink to the symlink anyway, rather than to its target !
So there are some tricky portability questions involved in fixing
this. I don't have very clear answers but I thought a bug report here
would be a good way to at least document the situation until we decide
what should be done about it.
For now an entry in the BUGS section of the manpage might be a good
idea.
Regards,
Ian.
--- End Message ---
--- Begin Message ---
On Thu 15 Jun 2006, Ian Jackson wrote:
[snip steps to reproduce]
> total 11
> 45818 drwxrwsr-x 2 ian ian 168 Jun 15 15:13 ./
> 26523 drwxrwsr-x 4 ian ian 96 Jun 15 15:12 ../
> 291853 -rw-rw-r-- 2 ian ian 29 Jun 15 15:13 f
> 291853 -rw-rw-r-- 2 ian ian 29 Jun 15 15:13 fh
> 289727 lrwxrwxrwx 2 ian ian 6 Jun 15 15:12 l -> target
> 289727 lrwxrwxrwx 2 ian ian 6 Jun 15 15:12 lh -> target
> 291852 lrwxrwxrwx 1 ian ian 6 Jun 15 15:12 m -> target
> -davenant:d> rsync -aH src/. dst/.
> -davenant:d> ll -i dst/
> total 11
> 287968 drwxrwsr-x 2 ian ian 168 Jun 15 15:13 ./
> 26523 drwxrwsr-x 4 ian ian 96 Jun 15 15:12 ../
> 291859 -rw-rw-r-- 2 ian ian 29 Jun 15 15:13 f
> 291859 -rw-rw-r-- 2 ian ian 29 Jun 15 15:13 fh
> 291854 lrwxrwxrwx 1 ian ian 6 Jun 15 15:13 l -> target
> 291855 lrwxrwxrwx 1 ian ian 6 Jun 15 15:13 lh -> target
> 291856 lrwxrwxrwx 1 ian ian 6 Jun 15 15:13 m -> target
When I now try that:
567 $ ls -li src
total 8
409409 -rw-r--r-- 2 paul paul 29 2008-03-03 13:44 f
409409 -rw-r--r-- 2 paul paul 29 2008-03-03 13:44 fh
409319 lrwxrwxrwx 2 paul paul 6 2008-03-03 13:44 l -> target
409319 lrwxrwxrwx 2 paul paul 6 2008-03-03 13:44 lh -> target
409408 lrwxrwxrwx 1 paul paul 6 2008-03-03 13:44 m -> target
568 $ ls -li dst
total 0
569 $ rsync -aH src/. dst/.
570 $ ls -li dst
total 8
409676 -rw-r--r-- 2 paul paul 29 2008-03-03 13:44 f
409676 -rw-r--r-- 2 paul paul 29 2008-03-03 13:44 fh
409410 lrwxrwxrwx 2 paul paul 6 2008-03-03 13:44 l -> target
409410 lrwxrwxrwx 2 paul paul 6 2008-03-03 13:44 lh -> target
409675 lrwxrwxrwx 1 paul paul 6 2008-03-03 13:44 m -> target
Hence the current 3.0.0 version gets this right;
now closing this bug report.
Paul Slootman
--- End Message ---