Bug 1430184

Summary: virt-dib should generate sha256 checksum instead of sha512
Product: Red Hat Enterprise Linux 7 Reporter: Xianghua Chen <xchen>
Component: libguestfsAssignee: Pino Toscano <ptoscano>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.4CC: ptoscano, wshi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.36.2-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 22:13:55 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: 1359086    
Bug Blocks:    

Description Xianghua Chen 2017-03-08 01:34:51 UTC
Description of problem:
Typo error in virt-dib man page:
manual page  | wrong word                                    | correct word
-------------+-----------------------------------------------+-------------
virt-dib     | The supported checksums are MD5, and SHA256.  |  The supported checksums are MD5, and SHA512. 

The word "SHA256" should be replaced with "SHA512" in this sentence because it actually output the sha512 checksum file.  
It's under the --checksum part.


Version-Release number of selected component (if applicable):
virt-dib-1.36.1-1.el7.x86_64

How reproducible:
100%

Steps:


Actual results:


Expected results:


Additional info:

Comment 1 Pino Toscano 2017-03-08 08:57:32 UTC
Actually, the documentation is correct, but I made a typo in the list of checksums to generate: diskimage-builder generates SHA256 (in addition to MD5), so that is what virt-dib should generate as well as result of --checksum.

Fixed upstream with
https://github.com/libguestfs/libguestfs/commit/ba52e0a217e3d78c9a0e4d51240674e832a22619

Comment 3 Xianghua Chen 2017-03-09 02:48:59 UTC
Verified with package:
 virt-dib-1.36.2-1.el7.x86_64

Steps:
1. Build fedora22 with --checksum:
# virt-dib -B /usr/share/diskimage-builder/lib -p /usr/share/diskimage-builder/elements --envvar DIB_RELEASE=22 --name fedora22  fedora vm --checksum
2. Check the sha256 file has been generated successfully:
# ls
fedora22.d  fedora22.qcow2  fedora22.qcow2.md5  fedora22.qcow2.sha256
# cat fedora22.qcow2.sha256
6fc4ce325dddbaa8de0fa08a2b603d3be70910e0d5d7c9b8c0050fc1b6213993  fedora22.qcow2


So verified.

Comment 4 errata-xmlrpc 2017-08-01 22:13:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2023