You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Uwe Schindler (Jira)" <ji...@apache.org> on 2021/03/25 11:41:00 UTC

[jira] [Comment Edited] (LUCENE-9868) Verify checksums on generated files

    [ https://issues.apache.org/jira/browse/LUCENE-9868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17308604#comment-17308604 ] 

Uwe Schindler edited comment on LUCENE-9868 at 3/25/21, 11:40 AM:
------------------------------------------------------------------

I tend to think that all regenerate tasks should maybe add a separate file containing an md5 (that's a valid hash here, because does not need to be bullet-proof; also crc32 would be enough!) next to each regenerated file.

The precommit check task should simply search for such checksum files  in source tree and validate the corrsponding file. The check task then won't even need to know the regeneration task responsible or any other semantics are needed, it just searches for checksums and validates them. Of course somebody could break this by removing the checksum file entirely.

The it is up to all regenerate tasks to know which files they modify and checksum them. We may add a function in the build for reusage.


was (Author: thetaphi):
I tend to think that all regenerate tasks should maybe add a separate file containing an md5 (that's a valid hash here, because does not need to be bullet-proof; also crc32 would be enough!) next to each regenerated file.

The precommit check task should simply search for such checksum files  in source tree and validate the corrsponding file. The check task then won't even need to know the task, it just searches for checksums and validates them.

The it is up to all regenerate tasks to know which files they modify and checksum them. We may add a function in the build for reusage.

> Verify checksums on generated files
> -----------------------------------
>
>                 Key: LUCENE-9868
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9868
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Dawid Weiss
>            Assignee: Dawid Weiss
>            Priority: Minor
>
> This would prevent accidental changes to generated resources/ files.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org