Bug 438694

Summary: rsync ignores --no-d option
Product: [Fedora] Fedora Reporter: Jesse Keating <jkeating>
Component: rsyncAssignee: Simo Sorce <ssorce>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: dcantrell
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-27 19:20:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jesse Keating 2008-03-24 15:03:33 UTC
Recently (3.0.0~) rsync changed some behaviour when getting remote file listings.

    - Requesting a remote file-listing without specifying -r (--recursive) now
      sends the -d (--dirs) option to the remote rsync rather than sending -r
      along with an extra exclude of /*/*.  If the remote rsync does not
      understand the -d option (i.e. it is 2.6.3 or older), you will need to
      either turn off -d (--no-d), or specify  -r --exclude='/*/*'  manually.

Sounds fine, except that --no-d doesn't seem to do anything:

$ rsync -vvv rsync://wallace.redhat.com/fedora-enchilada/
opening tcp connection to wallace.redhat.com port 873
sending daemon args: --server --sender -vvvde.L . fedora-enchilada/ 
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600)
[receiver=3.0.0]
_exit_cleanup(code=12, file=io.c, line=600): about to call exit(12)


$ rsync --no-d -vvv rsync://wallace.redhat.com/fedora-enchilada/
opening tcp connection to wallace.redhat.com port 873
sending daemon args: --server --sender -vvvde.L . fedora-enchilada/ 
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600)
[receiver=3.0.0]
_exit_cleanup(code=12, file=io.c, line=600): about to call exit(12)

But using the other suggested method to get listings seems to work:

$ rsync -vvv -r --exclude='/*/*' rsync://wallace.redhat.com/fedora-enchilada/
[client] add_rule(- /*/*)
opening tcp connection to wallace.redhat.com port 873
sending daemon args: --server --sender -vvvre.iL . fedora-enchilada/ 
receiving file list ... 
recv_file_name(.)
recv_file_name(linux)

Comment 1 Simo Sorce 2008-03-27 19:20:08 UTC
Fixed in 3.0.1pre1