Bug 1001875
Summary: | Argument 'excludes' of tar-out does not work | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | bfan |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | leiwang, wshi |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libguestfs-1.22.6-5.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-06-13 10:04:29 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: |
Description
bfan
2013-08-28 02:53:34 UTC
This is actually user error (it wasn't obvious, even to me). If you write: ><fs> tar-out / /tmp/excludes1 excludes:"hello*" then the list of strings passed to libguestfs is: [ "\"hello*\"" ] ie. the quotes are included in the string. libguestfs correctly passes this, quoting and everything, to the tar command. The correct command is: ><fs> tar-out / /tmp/excludes1 "excludes:hello*" or you can omit the quotes (in this case). Nevertheless, I've make the use of the optional excludes pattern more robust, and also added a regression test: https://github.com/libguestfs/libguestfs/commit/91c162586cc2170ea224016307016153f3d081b5 https://github.com/libguestfs/libguestfs/commit/1b34d6171bb4aaa1134a9d867918d7163cc7e069 Fix also included in libguestfs-1.20.10-4.el6 (note there is no separate bug for RHEL 6, I just included the fix in the routine build). Verified with libguestfs-1.22.6-16.el7.x86_64 ><fs> ll / total 4 drwxr-xr-x 2 root root 53 Dec 4 13:36 . drwxr-xr-x 23 root root 4096 Dec 4 13:35 .. -rw-r--r-- 1 root root 0 Dec 4 13:36 hello.c -rw-r--r-- 1 root root 0 Dec 4 13:36 helloworld.c -rw-r--r-- 1 root root 0 Dec 4 13:36 world.c ><fs> tar-out / /tmp/excludes1 excludes:hello* ><fs> tar-out / /tmp/excludes2 "excludes:hello*" [root@]# tar tvf /tmp/excludes1 drwxr-xr-x root/root 0 2013-12-04 13:36 ./ -rw-r--r-- root/root 0 2013-12-04 13:36 ./world.c [root@]# tar tvf /tmp/excludes2 drwxr-xr-x root/root 0 2013-12-04 13:36 ./ -rw-r--r-- root/root 0 2013-12-04 13:36 ./world.c It works with two ways This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |