analysis icon indicating copy to clipboard operation
analysis copied to clipboard

etc/packager: checksum does not seem right

Open affeldt-aist opened this issue 1 year ago • 3 comments

That's the second time that I use etc/packager and this is a great help. Thank you @proux01 . However, it does not seem to generate the right checksum for me (twice I had to fix it by hand to release the opam packages).

First, I thought that I was a victim of macOS sed. Maybe adding a SED=sed variable to packager could mitigate the issue with macOS (so that it is easier to set it to gsed--GNU sed).

However, this did not fix my problem. Second, I thought that it was due to the URL of the archive. As explained in the HOWTORELEASE https://github.com/math-comp/analysis/wiki/HOWTORELEASE we need to download the archive once and put it back so that we do not rely on the URL. As a consequence, what used to be https://github.com/math-comp/analysis/archive/refs/tags/1.8.0.tar.gz is now https://github.com/math-comp/analysis/releases/download/1.8.0/analysis-1.8.0.tar.gz I adjusted packager by changing the variable ARCHIVEURL to ARCHIVEURL="https://github.com/math-comp/analysis/releases/download/$TAG/analysis-$TAG.tar.gz" but for some reason I haven't figured out, the wrong checksum is still computed.

Which leads me to the conclusion that my shell skills are too limited. Do you have a clue of what I did wrong? @proux01

affeldt-aist avatar Dec 19 '24 00:12 affeldt-aist

No idea, what I usually do to get the hash is something like curl -sL <url> | sha512sum

proux01 avatar Dec 19 '24 14:12 proux01

observed when releasing version 1.9.0: etc/packager is downloading https://github.com/math-comp/analysis/archive/1.9.0.tar.gz while it should be https://github.com/math-comp/analysis/archive/analysis-1.9.0.tar.gz

affeldt-aist avatar Feb 20 '25 08:02 affeldt-aist

Another problem is more BSD/MacOS specific: the four occurrences of sed in the script need to be replaced by gsed (I couldn't figure how to globally replace sed (not sure it is a good idea also) and an alias in the shell is not enough apparently).

affeldt-aist avatar Feb 21 '25 04:02 affeldt-aist

for the record: I still have the problem with the archive not correctly named and with sed that I have to replace with manually by gsed at each new release :-(

affeldt-aist avatar Jul 03 '25 16:07 affeldt-aist

@proux01

that should be the solution: try to change the line

  git archive --format=tgz --output=$ARCHIVE \
      --prefix=$PREFIX/ $TAG # reproduce github archive

by a mere download of the right archive

affeldt-aist avatar Sep 24 '25 09:09 affeldt-aist