easybuild-framework icon indicating copy to clipboard operation
easybuild-framework copied to clipboard

--inject-checksums does not work for extensions

Open mboisson opened this issue 4 years ago • 6 comments

While trying to inject checksums for this recipe : https://github.com/ComputeCanada/easybuild-easyconfigs/blob/computecanada-master/easybuild/easyconfigs/m/MariaDB/MariaDB-10.4.13-GCCcore-9.3.0.eb

I noticed that the checksums were not injected for extensions. They were calculated and displayed on stdout, but not injected into the file. I had to copy them manually.

mboisson avatar Jul 27 '20 21:07 mboisson

This should be working as expected now, for a long time already, see #2293, so I'll close this issue...

boegel avatar Feb 08 '22 19:02 boegel

🤔 How is a PR merged in 2017 supposed to be fixing an issue reported in 2020 ?

mboisson avatar Feb 08 '22 19:02 mboisson

Hmm, good point 😅 I must have been a bit too enthusiastic there, so I'll re-open and try finding time to investigate properly...

boegel avatar Feb 11 '22 17:02 boegel

I ran into this problem yesterday with Easybuild 4.8.2. Neither --inject-checksums nor --inject-checksums=sha256 --force were working although the eb output looked like this:

== Temporary log file in case of crash /tmp/eb-aw5xz7zs/easybuild-mb4yb6zs.log
== resolving dependencies ...
== injecting sha256 checksums in /p/project/cslqip/huanaydedios1/easybuild-repository/Golden_Repo/p/pulser/pulser-0.16.0-GCCcore-12.3.0.eb
== fetching sources & patches for pulser-0.16.0-GCCcore-12.3.0.eb...
== backup of easyconfig file saved to /p/project/cslqip/huanaydedios1/easybuild-repository/Golden_Repo/p/pulser/pulser-0.16.0-GCCcore-12.3.0.eb.bak_20231212151842_21309...
== injecting sha256 checksums for sources & patches in pulser-0.16.0-GCCcore-12.3.0.eb...
== injecting sha256 checksums for extensions in pulser-0.16.0-GCCcore-12.3.0.eb...
==  * rpds_py-0.13.2.tar.gz: f8eae66a1304de7368932b42d801c67969fd090ddb1a7a24f27b435ed4bed68f
==  * PyJWT-2.8.0.tar.gz: 57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de
==  * pydantic-1.10.13.tar.gz: 32c8b48dcd3b2ac4e78b0ba4af3a2c2eb6048cb75202f0ea7b34feb740efc340
==  * backoff-2.2.1.tar.gz: 03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba
==  * referencing-0.31.1.tar.gz: 81a1471c68c9d5e3831c30ad1dd9815c45b558e596653db751a2bfdd17b3b9ec
==  * qutip-4.7.3.tar.gz: abaf8281cacdb31b822456b4732d591939781ab94561f42bc081a64e3fda713d
==  * jsonschema_specifications-2023.11.2.tar.gz: 9472fc4fea474cd74bea4a2b190daeccb5a9e4db2ea80efcf7a1b582fc9a81b8
==  * auth0-python-3.24.1.tar.gz: 62c2e177b9517879bd8632da9eb7668aedd5775fddea87b0e0e1e9a89b9dd096
==  * pulser_core-0.16.0-py3-none-any.whl: e6514e7e5e0ae63777a3d4202a4a6611574a7d718606516f64aef404a3a8a00b
==  * pasqal-cloud-0.4.2.tar.gz: 4e17e01e0e5746019e9a4bb085f34923a991f35981c9ce3a05a41ad59bed9d61
==  * pulser_simulation-0.16.0-py3-none-any.whl: afe48dbc2e0371b6910c9ad902d628711e60dab5d50da00845b1c517e4c48020
==  * pulser_pasqal-0.16.0-py3-none-any.whl: bfefb70e9367234f83662f8d1663a577ad700e78d9fcdbe966ad1ff3d33587f5
==  * pulser-0.16.0-py3-none-any.whl: 111398b925850c41360595e11ef622c080f00aaf974a7d0c38ddb8ce3bca9600
== Temporary log file(s) /tmp/eb-aw5xz7zs/easybuild-mb4yb6zs.log* have been removed.
== Temporary directory /tmp/eb-aw5xz7zs has been removed.

Turns out there was some indentation issue with the list-closing bracket at the end of exts_list looking like this:

...
(name, version, {
        'sources': ['%(name)s-%(version)s-py3-none-any.whl'],})
    ]

After fixing the indentation the checksums were added correctly to the easyconfig just using --inject-checksums.

X Carlos

ccalaza avatar Dec 13 '23 09:12 ccalaza

Thanks @ccalaza for this solution, it works indeed! Strange that EasyBuild silently fails to inject checksums simply because of indentation (and without any error message at that).

akutuzov avatar Jan 14 '24 20:01 akutuzov

EasyBuild isn't smart enough to know that it simply can't do this (add a line, and close the dict value):

...
(name, version, {
        'sources': ['%(name)s-%(version)s-py3-none-any.whl'],})
        'checksums': ['...'],
    },
    ]

--inject-checksums basically assumes that easyconfigs are structured the way they usually are (and that's quite brittle, of course)

boegel avatar Jan 17 '24 15:01 boegel