[Bug 2933] regression with hardlinked devices
samba-bugs at samba.org
samba-bugs at samba.org
Mon Aug 1 02:42:55 GMT 2005
https://bugzilla.samba.org/show_bug.cgi?id=2933
noreply at cpe-24-95-90-2.columbus.res.rr.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
------- Additional Comments From noreply at cpe-24-95-90-2.columbus.res.rr.com 2005-07-31 19:42 -------
patch works. dated...
cvs co -D '2005-08-01 00:00:00-0000'
very cool, thanks!
about the last part...
chmod of a socket/fifo/device in src causes the dst to use new inodes
for them whether the src types are hardlinked or not.
the idea is to have...
find <dst> -ls > pre
twiddle some <src> modes for the above types
rsync -Haxv --delete <src> <dst>
find <dst> -ls > post
diff pre post, be the same except for mode.
create/delete/chown/chgrp/mtime are already ok per below.
referring only to fifo/sock/dev here, slink/regfile tested ok.
HERE OK...
ls -liT srcdir
240854 lrw-rw---x 1 root wheel 1 Jul 31 05:07:23 2005 a -> b
240848 -rw-rw---x 1 root wheel 0 Jul 31 05:07:23 2005 b
240860 prw-rw---x 1 www www 0 Jul 31 22:08:27 2005 fifo0
242281 prw-rw---x 2 www www 0 Jul 31 22:08:27 2005 fifohard1
242281 prw-rw---x 2 www www 0 Jul 31 22:08:27 2005 fifohard2
240853 -rw-rw---x 1 root wheel 0 Jul 31 21:54:04 2005 file0
240852 -rw-rw---x 2 root wheel 0 Jul 31 21:55:05 2005 filehard1
240852 -rw-rw---x 2 root wheel 0 Jul 31 21:55:05 2005 filehard2
242266 crw-rw---x 1 www www 2, 2 Jul 31 22:08:27 2005 null0
242484 crw-rw---x 2 www www 2, 2 Jul 31 22:08:27 2005 nullhard1
242484 crw-rw---x 2 www www 2, 2 Jul 31 22:08:27 2005 nullhard2
240846 srw-rw---x 1 www www 0 Jul 31 22:08:27 2005 socket0
242485 srw-rw---x 2 www www 0 Jul 31 22:08:27 2005 sockethard1
242485 srw-rw---x 2 www www 0 Jul 31 22:08:27 2005 sockethard2
ls -liT dstdir
241072 lrw-rw---x 1 root wheel 1 Jul 31 05:07:23 2005 a -> b
241199 -rw-rw---x 1 root wheel 0 Jul 31 05:07:23 2005 b
241193 prw-rw---x 1 www www 0 Jul 31 22:08:27 2005 fifo0
241194 prw-rw---x 2 www www 0 Jul 31 22:08:27 2005 fifohard1
241194 prw-rw---x 2 www www 0 Jul 31 22:08:27 2005 fifohard2
241202 -rw-rw---x 1 root wheel 0 Jul 31 21:54:04 2005 file0
241200 -rw-rw---x 2 root wheel 0 Jul 31 21:55:05 2005 filehard1
241200 -rw-rw---x 2 root wheel 0 Jul 31 21:55:05 2005 filehard2
241195 crw-rw---x 1 www www 2, 2 Jul 31 22:08:27 2005 null0
241196 crw-rw---x 2 www www 2, 2 Jul 31 22:08:27 2005 nullhard1
241196 crw-rw---x 2 www www 2, 2 Jul 31 22:08:27 2005 nullhard2
241197 srw-rw---x 1 www www 0 Jul 31 22:08:27 2005 socket0
241198 srw-rw---x 2 www www 0 Jul 31 22:08:27 2005 sockethard1
241198 srw-rw---x 2 www www 0 Jul 31 22:08:27 2005 sockethard2
chown -h ftp:bind {fifo,socket,null}{hard?,0}
touch {fifo,socket,null}{hard?,0}
rsync -Haxv --delete ./srcdir/ ./dstdir/
ls -liT dstdir
241072 lrw-rw---x 1 root wheel 1 Jul 31 05:07:23 2005 a -> b
241199 -rw-rw---x 1 root wheel 0 Jul 31 05:07:23 2005 b
241193 prw-rw---x 1 ftp bind 0 Jul 31 22:10:36 2005 fifo0
241194 prw-rw---x 2 ftp bind 0 Jul 31 22:10:36 2005 fifohard1
241194 prw-rw---x 2 ftp bind 0 Jul 31 22:10:36 2005 fifohard2
241202 -rw-rw---x 1 root wheel 0 Jul 31 21:54:04 2005 file0
241200 -rw-rw---x 2 root wheel 0 Jul 31 21:55:05 2005 filehard1
241200 -rw-rw---x 2 root wheel 0 Jul 31 21:55:05 2005 filehard2
241195 crw-rw---x 1 ftp bind 2, 2 Jul 31 22:10:36 2005 null0
241196 crw-rw---x 2 ftp bind 2, 2 Jul 31 22:10:36 2005 nullhard1
241196 crw-rw---x 2 ftp bind 2, 2 Jul 31 22:10:36 2005 nullhard2
241197 srw-rw---x 1 ftp bind 0 Jul 31 22:10:36 2005 socket0
241198 srw-rw---x 2 ftp bind 0 Jul 31 22:10:36 2005 sockethard1
241198 srw-rw---x 2 ftp bind 0 Jul 31 22:10:36 2005 sockethard2
HERE NOT OK...
chmod -h 0660 {fifo,socket,null}{hard?,0}
rsync -Haxv --delete ./srcdir/ ./dstdir/
fifo0
fifohard2
fifohard1 => fifohard2
null0
nullhard2
nullhard1 => nullhard2
socket0
sockethard2
sockethard1 => sockethard2
ls -liT dstdir
241072 lrw-rw---x 1 root wheel 1 Jul 31 05:07:23 2005 a -> b
241199 -rw-rw---x 1 root wheel 0 Jul 31 05:07:23 2005 b
241201 prw-rw---- 1 ftp bind 0 Jul 31 22:10:36 2005 fifo0
241203 prw-rw---- 2 ftp bind 0 Jul 31 22:10:36 2005 fifohard1
241203 prw-rw---- 2 ftp bind 0 Jul 31 22:10:36 2005 fifohard2
241202 -rw-rw---x 1 root wheel 0 Jul 31 21:54:04 2005 file0
241200 -rw-rw---x 2 root wheel 0 Jul 31 21:55:05 2005 filehard1
241200 -rw-rw---x 2 root wheel 0 Jul 31 21:55:05 2005 filehard2
241204 crw-rw---- 1 ftp bind 2, 2 Jul 31 22:10:36 2005 null0
241205 crw-rw---- 2 ftp bind 2, 2 Jul 31 22:10:36 2005 nullhard1
241205 crw-rw---- 2 ftp bind 2, 2 Jul 31 22:10:36 2005 nullhard2
241206 srw-rw---- 1 ftp bind 0 Jul 31 22:10:36 2005 socket0
241207 srw-rw---- 2 ftp bind 0 Jul 31 22:10:36 2005 sockethard1
241207 srw-rw---- 2 ftp bind 0 Jul 31 22:10:36 2005 sockethard2
note that none of this is tested with -H --link-dest yet.
not sure whether this should be reopen or new. thx.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the rsync
mailing list