bodleian / ora_ocfl

The ORA OCFL project home, for the interactions between Hyrax/Sword2 and OCFL
MIT License
1 stars 1 forks source link

Generate valid inventory.json.sha512 #22

Closed tomwrobel closed 5 years ago

tomwrobel commented 5 years ago

Currently, Aaron Birkland's code does not generate a valid inventory.json sha512 hash according to https://ocfl.io/0.2/spec/#inventory-digest: the hash is present, but the filename is missing, e.g.

9cc7b2c8958ed9a2d7ec7e8571e2265046f9ce4993295fa42b1fe1d71489e5f97ea21cc36daeabbd43d5c08140f42464ee5c9aba8b0918bc537c9f8d49773107

not

9cc7b2c8958ed9a2d7ec7e8571e2265046f9ce4993295fa42b1fe1d71489e5f97ea21cc36daeabbd43d5c08140f42464ee5c9aba8b0918bc537c9f8d49773107 inventory.json
tomwrobel commented 5 years ago

An additional note, and some cross validation: Simeon Warner's OCFL validator correctly fails this digest format:

$ ./ocfl-object.py --objdir /mnt/hard_disk/ocfl/test_roots/20190409160457/c4/0a/00/11/c40a0011-7855-4502-9077-681093e250c2/ --validate
OCFL object at /mnt/hard_disk/ocfl/test_roots/20190409160457/c4/0a/00/11/c40a0011-7855-4502-9077-681093e250c2/ is INVALID
Unknown error Bad inventory digest file /mnt/hard_disk/ocfl/test_roots/20190409160457/c4/0a/00/11/c40a0011-7855-4502-9077-681093e250c2/inventory.json.sha512, wrong format - params ()
tomwrobel commented 5 years ago

Closed in https://github.com/birkland/ocfl/issues/10