Bug 1583174 - [RFE] engine-backup should support tilde expansion
Summary: [RFE] engine-backup should support tilde expansion
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backup-Restore.Engine
Version: 4.2.3.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Yedidyah Bar David
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-28 12:01 UTC by Jiri Belka
Modified: 2018-06-03 07:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-03 07:29:53 UTC
oVirt Team: Integration
Embargoed:
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)

Description Jiri Belka 2018-05-28 12:01:15 UTC
Description of problem:

# strace -f -o /tmp/out.strace  -e trace=file engine-backup --mode=verify --file=~/backup/brq-setup-engine-201805271705 --log=/tmp/out.log                                                                                                     
Verifying:
- Unpacking file '~/backup/brq-setup-engine-201805271705'
tar: ~/backup/brq-setup-engine-201805271705: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
FATAL: cannot open /tmp/engine-backup.8ZmkN5xKFD

# ls -l ~/backup/brq-setup-engine-201805271705
-rw-r--r--. 1 root root 172877307 May 27 17:07 /root/backup/brq-setup-engine-201805271705

* strace part

...
19976 getcwd("/root/backup", 4096)      = 13
19976 open("~/backup/brq-setup-engine-201805271705", O_RDONLY) = -1 ENOENT (No such file or directory)
19976 +++ exited with 2 +++
19916 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=19976, si_uid=0, si_status=2, si_utime=0, si_stime=0} ---
19977 stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
...

Version-Release number of selected component (if applicable):
ovirt-engine-tools-backup-4.2.3.5-0.1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. engine-backup ... and use tilda as part of file path for file argument
2.
3.

Actual results:
engine-backup fails

Expected results:
should work, file exists

Additional info:

Comment 2 Jiri Belka 2018-05-28 12:02:43 UTC
full path works, so something with tilda expansion

Comment 3 Yedidyah Bar David 2018-05-30 07:01:13 UTC
IMHO tilde expansion is the shell's job, not each program's.

E.g.:

This works:

tar -C ~/bin -cf - . > /dev/null

This fails:

tar --directory=~/bin -cf - . > /dev/null

So would you open a bug on 'tar' to support tilde expansion? I do not think so. It's not its job.

You might say that engine-backup should also have short options which do not require '=' but ' ', which will fix your problem, but then we'd have to start fighting how to shorten options and struggle adding new ones with short versions. So I think we'd rather not. It's not used so much that you can't always use the long versions.

That said, we did fix this in otopi (bug 1529474), so not closing...

Comment 4 Yaniv Kaul 2018-06-03 07:29:53 UTC
(In reply to Yedidyah Bar David from comment #3)
> IMHO tilde expansion is the shell's job, not each program's.
> 
> E.g.:
> 
> This works:
> 
> tar -C ~/bin -cf - . > /dev/null
> 
> This fails:
> 
> tar --directory=~/bin -cf - . > /dev/null
> 
> So would you open a bug on 'tar' to support tilde expansion? I do not think
> so. It's not its job.
> 
> You might say that engine-backup should also have short options which do not
> require '=' but ' ', which will fix your problem, but then we'd have to
> start fighting how to shorten options and struggle adding new ones with
> short versions. So I think we'd rather not. It's not used so much that you
> can't always use the long versions.
> 
> That said, we did fix this in otopi (bug 1529474), so not closing...

I'm afraid we don't have the bw to handle this right now. Close-Deferred for the time being.


Note You need to log in before you can comment on or make changes to this bug.