-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixity field structure #406
Comments
How is it intended to be used? The structure makes sense for |
Two issues with using filepaths as keys that were identified in the issues that @zimeon linked:
I think we didn't know enough about the corner cases in filesystem character encoding and JSON encoding in order to be sure that (1) was really a problem, but given our significant but non-exhaustive research into this issue, it was hard to come up with a reason why we shouldn't worry about it, particularly if the pathnames contain, for example, Windows-1251 encoding and we're not sure if they've been properly mapped to Unicode in any processor. |
Since the
|
The intention of the |
The method you described for checking fixity doesn't work because if the fixity section is used there is no requirement for every file to have an entry in it. So, if a digest is not in the In my implementation, I am not using the
I'm in the middle of processing the issues @zimeon linked to... |
As far as I can tell, the only reliable way to use the
If file paths cannot be trusted, scanning a directory and comparing the digests of the files found to the That does make me wonder though, if a |
I'd like to revisit fixity, too. I've had no trouble in using the block as written in spec to do fixity checks (yes, the I had to flip the hash and expand the filepaths, but that's a common enough operation that I just wrote a method to do it), but I'm wondering if something that gets rid of the file paths completely would make more sense, e.g.:
|
Also, a note on implementation. Because the fixity block is not guaranteed or required to contain a digest for every file listed in the manifest, the best way to verify fixity is to start with the contents in the fixity block. I do:
|
The 'backup plan' is to check the hash, which shouldn't change across filesystems. If you can find the file hash, then you know the path on that system. The hash is the identity of the file; the filepath is a sort of convenience for human readability. |
Editors have discussed this and decided to stay with current layout. Some other issues raised have been spun out separately. |
Currently, the
fixity
field within an inventory looks as follows:This structure is quite unwieldy to work with. Something like the following would be much more useful:
As it stands, that's the map I have to create any time I need to access fixity values anyway. To me, this seems like an unneeded hassle just so multiple files can be associated to the same digest value. Sorry if this has been discussed before. I couldn't find an old issue.
The text was updated successfully, but these errors were encountered: