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

Failure due to templating in checksums of extension #22090

Closed
lexming opened this issue Dec 21, 2024 · 4 comments
Closed

Failure due to templating in checksums of extension #22090

lexming opened this issue Dec 21, 2024 · 4 comments
Labels
Milestone

Comments

@lexming
Copy link
Contributor

lexming commented Dec 21, 2024

Test are failing in #22088 for Perl-bundle-CPAN-5.36.1-GCCcore-12.3.0.eb due to the usage of a %(version)s template in the checksum specification of an extension:

== 2024-12-21 00:31:11,868 easyblock.py:871 INFO Found file Sys-Info-Driver-Linux-0.7905.tar.gz at /project/def-maintainers/boegelbot/sources/p/Perl-bundle-CPAN/extensions/Sys-Info-Driver-Linux-0.7905.tar.gz
== 2024-12-21 00:31:11,868 filetools.py:1265 DEBUG Using blocksize 16777216 for calculating the checksum
== 2024-12-21 00:31:11,869 easyblock.py:692 INFO sha256 checksum for /project/def-maintainers/boegelbot/sources/p/Perl-bundle-CPAN/extensions/Sys-Info-Driver-Linux-0.7905.tar.gz: 899c329bd3508ec5849ad0e5dadfa7c3679bbacaea9dda12404a7893032e8b7b
== 2024-12-21 00:31:11,869 easyblock.py:695 DEBUG Verifying checksums for extension source...
== 2024-12-21 00:31:12,039 build_log.py:226 ERROR EasyBuild encountered an error (at easybuild/5.0.x/easybuild-framework/easybuild/base/exceptions.py:126 in __init__): Missing checksum for Sys-Info-Driver-Linux-0.7905.tar.gz in {'Sys-Info-Driver-Linux-%(version)s.tar.gz': '899c329bd3508ec5849ad0e5dadfa7c3679bbacaea9dda12404a7893032e8b7b'} (at easybuild/5.0.x/easybuild-framework/easybuild/tools/filetools.py:1307 in verify_checksum)

This is the easyconfig code related to this error:

('Sys::Info::Driver::Linux', '0.7905', {
'source_tmpl': 'Sys-Info-Driver-Linux-%(version)s.tar.gz',
'source_urls': ['https://cpan.metacpan.org/authors/id/B/BU/BURAK'],
'patches': [
('Perl-bundle-5.36.1-debian-release.patch'),
('Perl-bundle-5.36.1-pod.patch'),
],
'checksums': [
{'Sys-Info-Driver-Linux-%(version)s.tar.gz':
'899c329bd3508ec5849ad0e5dadfa7c3679bbacaea9dda12404a7893032e8b7b'},
{'Perl-bundle-5.36.1-debian-release.patch':
'18b8d876db5b3abe7e5a1bb8c6abf8b5fef481b56294472fcf9f96f974c56c48'},
{'Perl-bundle-5.36.1-pod.patch':
'7c70bd91a06c256a8d85845e011e53a1a9d4f8a250d9f06bd06f5004596f271a'},
],
}),

@lexming lexming added this to the 5.0 milestone Dec 21, 2024
@Micket
Copy link
Contributor

Micket commented Dec 21, 2024

Is that checksum even right? We normally don't use templates in the checksum dicts. This must have been incorrectly written out by hand in that commit 4dab87b

I'm not sure checksum dicts are even expanded with templates, so i'm surprised this isn't an error when building, but maybe the actual string format. It doesn't make sense dictionary keys to have templates, so the CI is correct to complain.
So i think you should just fix that mistake in 5.36.1 (you wrote 5.38.0 but linked 5.36.1)

@lexming
Copy link
Contributor Author

lexming commented Dec 21, 2024

Indeed, I agree that checksum keys should not use templating. Then the issue is that this template went through our CI in the first place. Not sure how this managed to pass the test originally.

I'll fix this easyconfig then and see if we can have a test for templates in checksums.

@boegel boegel changed the title Failure due to templating in cheksums of extension Failure due to templating in checksums of extension Dec 21, 2024
@boegel
Copy link
Member

boegel commented Dec 21, 2024

This is fallout from easybuilders/easybuild-framework#4516, which only got merged recently.

That explains why CI hasn't caught this, because some checks are only run for easyconfigs touched in PRs...

@boegel
Copy link
Member

boegel commented Dec 21, 2024

fixed in #22091

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Changed default
Development

No branches or pull requests

3 participants