Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
checksum for soft link is wrong, the soft link have no checksum value output.
Both md5sum and sha*sum can give checksum value for soft link. So the best way is also provide checksum value for soft link.
Version-Release number of selected component (if applicable):
libguestfs-1.27.62-1.1.el7
How reproducible:
100%
Steps to Reproduce:
#virt-ls -a rhel.img /etc -lR --checksum
Actual results:
.....
- 0644 447 dbc1e6da7574717bd3f7a02f98252c4c /etc/selinux/config
...
l 0777 17 /etc/sysconfig/selinux -> ../selinux/config
....
Expected results:
.....
- 0644 447 dbc1e6da7574717bd3f7a02f98252c4c /etc/selinux/config
...
l 0777 17 dbc1e6da7574717bd3f7a02f98252c4c /etc/sysconfig/selinux -> ../selinux/config
....
Additional info:
Checksum is currently done only for regular files, and symlinks are not regular files.
I do not think we should dereference them, since
a) if the symlink target exists in the guest, its checksum would be calculated more than once (once for the file itself, plus once for every symlink pointing to it)
b) if the symlink target does not exists, then there would be a mismatch in the output (one field less) between such kind of symlink and those pointing to existing files
Another case is that you might list just a subdirectory of a guest, with a symlink in it pointing to a file outside that subdirectory; say:
$ virt-ls ... /etc
[...]
l 0777 10 /etc/vmlinuz -> ../vmlinuz
then I think it still might be correct to not look at anything outout the subdirectory requested.
(In reply to Pino Toscano from comment #1)
> Checksum is currently done only for regular files, and symlinks are not
> regular files.
>
> I do not think we should dereference them, since
> a) if the symlink target exists in the guest, its checksum would be
> calculated more than once (once for the file itself, plus once for every
> symlink pointing to it)
> b) if the symlink target does not exists, then there would be a mismatch in
> the output (one field less) between such kind of symlink and those pointing
> to existing files
>
> Another case is that you might list just a subdirectory of a guest, with a
> symlink in it pointing to a file outside that subdirectory; say:
> $ virt-ls ... /etc
> [...]
> l 0777 10 /etc/vmlinuz -> ../vmlinuz
> then I think it still might be correct to not look at anything outout the
> subdirectory requested.
Thanks for your explanation. I agree with you to close it as NOTABUG.
Comment 3Richard W.M. Jones
2014-10-20 09:32:41 UTC