Bug 1144266

Summary: virt-copy-in, virt-copy-out, virt-tar-in, virt-tar-out have the same help message with 'guestfish -V'
Product: Red Hat Enterprise Linux 7 Reporter: Lingfei Kong <lkong>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 7.1CC: leiwang, mbooth, ptoscano, wshi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1144267 (view as bug list) Environment:
Last Closed: 2014-09-24 14:52:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1144267    

Description Lingfei Kong 2014-09-19 06:25:35 UTC
Description of problem:
virt-copy-in, virt-copy-out, virt-tar-in, virt-tar-out have the same help message with 'guestfish -V'


Version-Release number of selected component (if applicable):
libguestfs-1.27.48-1.1.el7


How reproducible:
100%


Steps to Reproduce:
Take virt-copy-in for example:
#virt-copy-in --help
guestfish: guest filesystem shell
guestfish lets you edit virtual machine filesystems
Copyright (C) 2009-2014 Red Hat Inc.
Usage:
  guestfish [--options] cmd [: cmd : cmd ...]
Options:
  -h|--cmd-help        List available commands
  -h|--cmd-help cmd    Display detailed help on 'cmd'
  -a|--add image       Add image
  -c|--connect uri     Specify libvirt URI for -d option
  --csh                Make --listen csh-compatible
  -d|--domain guest    Add disks from libvirt guest
  --echo-keys          Don't turn off echo for passphrases
  -f|--file file       Read commands from file
  --format[=raw|..]    Force disk format for -a option
  -i|--inspector       Automatically mount filesystems
  --keys-from-stdin    Read passphrases from stdin
  --listen             Listen for remote commands
  --live               Connect to a live virtual machine
  -m|--mount dev[:mnt[:opts[:fstype]]]
                                           Mount dev on mnt (if omitted, /)
  --network            Enable network
  -N|--new [filename=]type
                                           Create prepared disk (test<N>.img or filename)
  -n|--no-sync         Don't autosync
  --no-dest-paths      Don't tab-complete paths from guest fs
  --pipe-error         Pipe commands can detect write errors
  --progress-bars      Enable progress bars even when not interactive
  --no-progress-bars   Disable progress bars
  --remote[=pid]       Send commands to remote guestfish
  -r|--ro              Mount read-only
  --selinux            Enable SELinux support
  -v|--verbose         Verbose messages
  -V|--version         Display version and exit
  -w|--rw              Mount read-write
  -x                   Echo each command before executing it

To examine a disk image, ISO, hard disk, filesystem etc:
  guestfish [--ro|--rw] -i -a /path/to/disk.img
or
  guestfish [--ro|--rw] -i -d name-of-libvirt-domain

--ro recommended to avoid any writes to the disk image.  If -i option fails
run again without -i and use 'run' + 'list-filesystems' + 'mount' cmds.

For more information, see the manpage guestfish(1).

Here is 'guestfish --help':
#guestfish --help
guestfish: guest filesystem shell
guestfish lets you edit virtual machine filesystems
Copyright (C) 2009-2014 Red Hat Inc.
Usage:
  guestfish [--options] cmd [: cmd : cmd ...]
Options:
  -h|--cmd-help        List available commands
  -h|--cmd-help cmd    Display detailed help on 'cmd'
  -a|--add image       Add image
  -c|--connect uri     Specify libvirt URI for -d option
  --csh                Make --listen csh-compatible
  -d|--domain guest    Add disks from libvirt guest
  --echo-keys          Don't turn off echo for passphrases
  -f|--file file       Read commands from file
  --format[=raw|..]    Force disk format for -a option
  -i|--inspector       Automatically mount filesystems
  --keys-from-stdin    Read passphrases from stdin
  --listen             Listen for remote commands
  --live               Connect to a live virtual machine
  -m|--mount dev[:mnt[:opts[:fstype]]]
                                           Mount dev on mnt (if omitted, /)
  --network            Enable network
  -N|--new [filename=]type
                                           Create prepared disk (test<N>.img or filename)
  -n|--no-sync         Don't autosync
  --no-dest-paths      Don't tab-complete paths from guest fs
  --pipe-error         Pipe commands can detect write errors
  --progress-bars      Enable progress bars even when not interactive
  --no-progress-bars   Disable progress bars
  --remote[=pid]       Send commands to remote guestfish
  -r|--ro              Mount read-only
  --selinux            Enable SELinux support
  -v|--verbose         Verbose messages
  -V|--version         Display version and exit
  -w|--rw              Mount read-write
  -x                   Echo each command before executing it

To examine a disk image, ISO, hard disk, filesystem etc:
  guestfish [--ro|--rw] -i -a /path/to/disk.img
or
  guestfish [--ro|--rw] -i -d name-of-libvirt-domain

--ro recommended to avoid any writes to the disk image.  If -i option fails
run again without -i and use 'run' + 'list-filesystems' + 'mount' cmds.

For more information, see the manpage guestfish(1).


Actual results:
virt-copy-in, virt-copy-out, virt-tar-in, virt-tar-out have the same help message with 'guestfish -V'. The output is different from its man page, for example i can not find --remote from man virt-copy-in.


Expected results:
virt-copy-in, virt-copy-out, virt-tar-in, virt-tar-out should have their own help message


Additional info:

Comment 1 Richard W.M. Jones 2014-09-19 11:48:44 UTC
As the manual says ...

  JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH
       This command is just a simple shell script wrapper around the
       guestfish(1) "copy-in" command.  For anything more complex than a
       trivial copy, you are probably better off using guestfish directly.

I'm inclined to close this bug and bug 1144267 as CLOSED->NOTABUG.

The alternative is to add command line parsing of some kind, which
would more than likely end up breaking something.  For example it
would be very difficult to parse:

  virt-copy-out -a disk.img -- / -V

(a valid command for copying disk.img to a local directory called '-V')
without the full machinery inside guestfish.

Comment 2 Lingfei Kong 2014-09-24 03:29:16 UTC
(In reply to Richard W.M. Jones from comment #1)
> As the manual says ...
> 
>   JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH
>        This command is just a simple shell script wrapper around the
>        guestfish(1) "copy-in" command.  For anything more complex than a
>        trivial copy, you are probably better off using guestfish directly.
> 
> I'm inclined to close this bug and bug 1144267 as CLOSED->NOTABUG.
> 
I agree to close it and bug 1144267 as NOTABUG as there is already a description in its man page.