Devuan bug report logs - #667
rsync: fails to honour a tilde (~) in --log-file option

version graph

Package: rsync; Maintainer for rsync is (unknown); Source for rsync is src:rsync.

Reported by: Dave <rsync-bug-2c04@wsfd.ath.cx>

Date: Fri, 4 Mar 2022 22:58:02 UTC

Severity: normal

Found in version 3.1.3-6

Done: Mark Hindley <mark@hindley.org.uk>

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to devuan-bugs@lists.dyne.org, rsync-bug-2c04-CC@wsfd.ath.cx, devuan-dev@lists.dyne.org:
bug#667; Package rsync. (Fri, 04 Mar 2022 22:58:02 GMT) (full text, mbox, link).


Acknowledgement sent to Dave <rsync-bug-2c04@wsfd.ath.cx>:
New bug report received and forwarded. Copy sent to rsync-bug-2c04-CC@wsfd.ath.cx, devuan-dev@lists.dyne.org. (Fri, 04 Mar 2022 22:58:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.devuan.org (full text, mbox, reply):

From: Dave <rsync-bug-2c04@wsfd.ath.cx>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Cc: Devuan Bug Tracking System <submit@bugs.devuan.org>
Subject: rsync: fails to honour a tilde (~) in --log-file option
Date: Fri, 04 Mar 2022 17:55:52 -0500
Package: rsync
Version: 3.1.3-6
Severity: normal

Dear Maintainer,

   * What led up to the situation?
Normal rsync local system directory copying/archiving using the '--log-file' option

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

1. Executing "rsync -a --verbose --log-file=~/xx/mylog ~/xxxx ~/xx"
Resulted in:
 rsync: failed to open log-file ~/xx/mylog: No such file or directory (2)
 Ignoring "log file" setting.
 sending incremental file list
 xxxx/
 xxxx/20211230171244.mkv
...snip normal output...
 xxxx/xx/20220212123456-mask2.xcf

 sent 2,687,537 bytes  received 222 bytes  5,375,518.00 bytes/sec
 total size is 2,686,183  speedup is 1.00

Note the error output and 'Ignoring "log file" setting.' line when the --logfile option contained a tilde: '--log-file=~/xx/mylog'
Also note that the source and destination directories do contain the tilde (~).
No log file was produced anywhere on the local system. (The directory archive was successful.)

2. Executing "rsync -a --verbose --log-file=xx/mylog ~/xxxx ~/xx" (relative directory)
or with '--log-file=/home/myid/xx/mylog' (fully qualified path) resulted in the expected logging operation. 


If the tilde is honoured in the arguments, shouldn't it also be honoured in the options?


Thanx.

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 3 (beowulf)
Release:	3
Codename:	beowulf
Architecture: x86_64

Kernel: Linux 4.19.0-14-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages rsync depends on:
ii  base-files           10.3+devuan3.5
ii  init-system-helpers  1.56+nmu1+devuan3
ii  libacl1              2.2.53-4
ii  libattr1             1:2.4.48-4
ii  libc6                2.28-10
ii  libpopt0             1.16-12
ii  lsb-base             10.2019051400

rsync recommends no packages.

Versions of packages rsync suggests:
ii  openssh-client  1:7.9p1-10+deb10u2
ii  openssh-server  1:7.9p1-10+deb10u2

-- no debconf information

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#667; Package rsync. (Sun, 06 Mar 2022 07:50:02 GMT) (full text, mbox, link).


Message #8 received at 667@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: Dave <rsync-bug-2c04@wsfd.ath.cx>, 667@bugs.devuan.org
Subject: Re: bug#667: rsync: fails to honour a tilde (~) in --log-file option
Date: Sun, 6 Mar 2022 07:49:34 +0000
Dave,

On Fri, Mar 04, 2022 at 05:55:52PM -0500, Dave wrote:
> Package: rsync
> Version: 3.1.3-6
> Severity: normal
> 
> Dear Maintainer,
> 
>    * What led up to the situation?
> Normal rsync local system directory copying/archiving using the '--log-file' option
> 
>    * What exactly did you do (or not do) that was effective (or
>      ineffective)?

I doubt this is an rsync issue. Tilde expansion on the command line is handled
by your shell before executing the expanded command line. See sh(1).

> 1. Executing "rsync -a --verbose --log-file=~/xx/mylog ~/xxxx ~/xx"

If you are quoting the command, that will prevent tilde expansion.

Mark

Reply sent to Mark Hindley <mark@hindley.org.uk>:
You have taken responsibility. (Tue, 14 Feb 2023 08:30:02 GMT) (full text, mbox, link).


Notification sent to Dave <rsync-bug-2c04@wsfd.ath.cx>:
bug acknowledged by developer. (Tue, 14 Feb 2023 08:30:05 GMT) (full text, mbox, link).


Message #13 received at 667-done@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: Dave <rsync-bug-2c04@wsfd.ath.cx>, 667-done@bugs.devuan.org
Subject: Re: bug#667: rsync: fails to honour a tilde (~) in --log-file option
Date: Tue, 14 Feb 2023 08:27:45 +0000
Closing as this is a user shell quoting issue: tilde expansion is performed by
the shell not rsync.

Mark

Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Wed Apr 24 15:39:06 2024;