Skip to content
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

Fix cargo-about Artichoke license checksum errors on Windows #36

Merged
merged 3 commits into from
Oct 1, 2022

Conversation

lopopolo
Copy link
Member

@lopopolo lopopolo commented Oct 1, 2022

On Windows, GitHub Actions's native checkout action @actions/checkout does Windows CRLF normalization. This breaks the SHA256 checksum of the license files used in clarify sections in cargo-about config files embedded in this repository, leading to warnings like this in CI:

2022-10-01 17:18:11.8629067 +00:00:00 [WARN] failed to validate all files specified in clarification for crate artichoke 0.1.0-pre.0: checksum mismatch, expected a7f7d7c7ab9585b1c5e43d592c648d6d3fff7debcf7cfbde301f63b02157444d
2022-10-01 17:18:11.8632725 +00:00:00 [WARN] failed to validate all files specified in clarification for crate artichoke-backend 0.19.0: checksum mismatch, expected a7f7d7c7ab9585b1c5e43d592c648d6d3fff7debcf7cfbde301f63b02157444d

This commit adds an additional step to the composite action to ensure git is configured with LF EOL behavior and does not normalize using autocrlf

See:

On Windows, GitHub Actions's native checkout action `@actions/checkout`
does Windows CRLF normalization. This breaks the SHA256 checksum of the
license files used in `clarify` sections in cargo-about config files
embedded in this repository, leading to warnings like this in CI:

```
2022-10-01 17:18:11.8629067 +00:00:00 [WARN] failed to validate all files specified in clarification for crate artichoke 0.1.0-pre.0: checksum mismatch, expected a7f7d7c7ab9585b1c5e43d592c648d6d3fff7debcf7cfbde301f63b02157444d
2022-10-01 17:18:11.8632725 +00:00:00 [WARN] failed to validate all files specified in clarification for crate artichoke-backend 0.19.0: checksum mismatch, expected a7f7d7c7ab9585b1c5e43d592c648d6d3fff7debcf7cfbde301f63b02157444d
```

This commit adds an additional step to the composite action to ensure
git is configured with LF EOL behavior and does not normalize using
autocrlf

See:

- actions/checkout#135
@lopopolo lopopolo added A-target Area: build support for various target triples. T-i686-pc-windows-gnu Target: 32-bit MinGW (Windows 7+) T-i686-pc-windows-msvc Target: 32-bit MSVC (Windows 7+) T-x86_64-pc-windows-gnu Target: 64-bit MinGW (Windows 7+) T-x86_64-pc-windows-msvc Target: 64-bit MSVC (Windows 7+) A-cargo-about Area: cargo-about installation and configuration. labels Oct 1, 2022
@lopopolo
Copy link
Member Author

lopopolo commented Oct 1, 2022

No warnings on windows in CI. Looks good to merge.

@lopopolo lopopolo merged commit d045be0 into trunk Oct 1, 2022
@lopopolo lopopolo deleted the lopopolo/clarification-checksum-mismatch-windows branch October 1, 2022 17:44
lopopolo added a commit to artichoke/nightly that referenced this pull request Oct 16, 2022
Pull in the fix for clarify checksum mismatch on windows:

- artichoke/generate_third_party#36
lopopolo added a commit to artichoke/docker-artichoke-nightly that referenced this pull request Oct 16, 2022
Pull in the fix for clarify checksum mismatch on windows:

- artichoke/generate_third_party#36

Keep parity with nightly builder:

- artichoke/nightly#107
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cargo-about Area: cargo-about installation and configuration. A-target Area: build support for various target triples. T-i686-pc-windows-gnu Target: 32-bit MinGW (Windows 7+) T-i686-pc-windows-msvc Target: 32-bit MSVC (Windows 7+) T-x86_64-pc-windows-gnu Target: 64-bit MinGW (Windows 7+) T-x86_64-pc-windows-msvc Target: 64-bit MSVC (Windows 7+)
Development

Successfully merging this pull request may close these issues.

1 participant