Bug#1141576: /usr/bin/hokey: hokey canonicalize output depends on version of libghc-hashable-dev
Clément Le Goffic
clegoffic at baylibre.com
Mon Jul 6 20:15:13 BST 2026
On 7/6/26 4:54 PM, Clint Adams wrote:
> On Mon, Jul 06, 2026 at 04:36:49PM +0200, Uwe Kleine-König wrote:
>> Packet ordering bases on comparing hashes
>> (Codec/Encryption/OpenPGP/Types.hs, `instance Ord Pkt`) and canonicalize
>
> So technically the bug is in (or also in) hOpenPGP, but that's not
> important for this discussion.
>
>> sorts using that Ord instance. Now hashable changed byte hashing in
>> https://github.com/haskell-unordered-containers/hashable/pull/301 and
>> thus canonicalization changed.
>>
>> IMHO canonicalization shouldn't depend on an (unstable) hashing
>> algorithm. It should at least be documented that canonicalization is
>> unstable, or better, canonicalization should be fixed to be independent
>> of hashing.
>
> I agree, and there's a FIXME comment about it in hOpenPGP's
> Codec/Encryption/OpenPGP/Types/Internal/Pkt.hs , but I don't have a good
> solution. Do you have an idea for a stable mechanism that would do
> the right thing?
While guided with claude (with the Fable 5 model) to find the issue, it
also suggested me a way to fix it and implemented it with its . I don't
speak haskell so I let you judge it as I'm unable to do it.
I don't want to contribute to the AI slop things without the help of the
tool to fix the issue so you'll find the patch and a script to test it
in the attachements.
The patchs land in hopenpgp-tools on top of master 21d80c8e40cd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-hokey-canonicalize-make-output-independent-of-the-ha.patch
Type: text/x-patch
Size: 4548 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-maintainers/attachments/20260706/abd73b15/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-container-based-validation-script-for-canonicali.patch
Type: text/x-patch
Size: 7073 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-maintainers/attachments/20260706/abd73b15/attachment-0003.bin>
More information about the Pkg-haskell-maintainers
mailing list