Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 921284

Summary: verify-sig.eclass: verify-sig_verify_unsigned_checksums: ERROR when checksum file does not end with a newline character
Product: Gentoo Linux Reporter: firewar.88
Component: EclassesAssignee: Michał Górny <mgorny>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: error log, emerge info, verify-sig fix patch

Description firewar.88 2024-01-03 13:09:42 UTC
Created attachment 881370 [details]
error log, emerge info, verify-sig fix patch

Function `verify-sig_verify_unsigned_checksums' does not work with checksum files that consist of a single line that does not end with a newline character.

For example. In my ebuild i need to check the rpm file with this checksum file: https://github.com/brave/brave-browser/releases/download/v1.61.104/brave-browser-1.61.104-1.x86_64.rpm.sha256

ERROR: www-client/brave-browser-1.61.104::homerepo failed (unpack phase):
verify-sig_verify_unsigned_checksums: checksums for some of the specified files were missing

But if i add a newline character to the end of checksum file everything works perfectly.

I think you need to mention this in the function comment, because it's hard to guess what the problem is. Or fix verify-sig.eclass: line 311: done < "${checksum_file}" with this one: done <<< "$( cat "${checksum_file}" )"