commercialhaskell/stack

Please upgrade the msys2 installation

expipiplus1 opened this issue · 10 comments

At the moment msys2-20180531 is installed, which contains a pacman binary too old to read .zst archives, which are how newer packages are being compressed. This means that it's very easy to run pacman -Sy and get into a broken state, because pacman can't read the archive necessary to upgrade pacman. The only way out of this is to either install heaps of packages with -U or just nuke the msys directory and start again.

juhp commented

Are you in the right place?
(This repo is actually for the www.stackage.org website itself.)

I've transferred this issue to the right repo.

@expipiplus1 what would be really nice for this would be automating the creating of these archives via some CI jobs, ideally Github Actions. Would you be interested in taking a crack at that?

Ah I just blindly followed the link from here https://docs.haskellstack.org/en/stable/maintainers/msys/, thanks for moving the issue.

@snoyberg very sorry but I don't think I'm the right person for this as I don't use Windows or Stack for Haskell development and bumping into this was a one-time issue.

Given that it's been 2 years since the last update without anyone complaining this doesn't sound like a job which needs to be done very often, and probably scores quite poorly on this chart https://xkcd.com/1205/ This should probably be updated regularly.

The msys2 installation (and bundled package set index) is now sufficiently old that packages are failing to install because they're no longer present on the package hosts. As mentioned above, it's not trivial to run pacman -Sy to update the package index.

Here's the log where stack exec $ARGS -- pacman --noconfirm -S mingw-w64-x86_64-vulkan mingw-w64-x86_64-pkg-config mingw-w64-x86_64-SDL2 mingw-w64-x86_64-glslang is called: https://github.com/expipiplus1/vulkan/runs/1312565276?check_suite_focus=true

The interesting part of the above linked log:

Preparing to download msys2-20180531 ...
msys2-20180531: download has begun
<snip>
Downloaded msys2-20180531.
Preparing to download 7z.dll ...
Already downloaded.
Preparing to download 7z.exe ...
Already downloaded.
Decompressing msys2-20180531.tar.xz...

7-Zip 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18

Processing archive: C:\Users\runneradmin\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531.tar.xz

Extracting  msys2-20180531.tar

Everything is Ok

Size:       281825280
Compressed: 63974800
Extracting msys2-20180531.tar...
Extracted 101 files
<snip>
Extracted 14569 files
Extracted total of 14569 files from msys2-20180531.tar
resolving dependencies...
looking for conflicting packages...

Packages (10) mingw-w64-x86_64-gcc-libs-7.3.0-2  mingw-w64-x86_64-gmp-6.1.2-1  mingw-w64-x86_64-libiconv-1.15-2  mingw-w64-x86_64-libwinpthread-git-6.0.0.5134.2416de71-1  mingw-w64-x86_64-mpc-1.1.0-1  mingw-w64-x86_64-mpfr-4.0.1-1  mingw-w64-x86_64-SDL2-2.0.8-2  mingw-w64-x86_64-glslang-6.2.2596-1  mingw-w64-x86_64-pkg-config-0.29.2-1  mingw-w64-x86_64-vulkan-1.1.73.0-1

Total Download Size:    5.88 MiB
Total Installed Size:  50.77 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
downloading mingw-w64-x86_64-gmp-6.1.2-1-any.pkg.tar.xz...
error: failed retrieving file 'mingw-w64-x86_64-mpfr-4.0.1-1-any.pkg.tar.xz' from repo.msys2.org : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-mpfr-4.0.1-1-any.pkg.tar.xz' from downloads.sourceforge.net : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-mpfr-4.0.1-1-any.pkg.tar.xz' from www2.futureware.at : The requested URL returned error: 404
warning: failed to retrieve some files
downloading mingw-w64-x86_64-mpc-1.1.0-1-any.pkg.tar.xz...
error: failed retrieving file 'mingw-w64-x86_64-libwinpthread-git-6.0.0.5134.2416de71-1-any.pkg.tar.xz' from repo.msys2.org : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-libwinpthread-git-6.0.0.5134.2416de71-1-any.pkg.tar.xz' from downloads.sourceforge.net : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-libwinpthread-git-6.0.0.5134.2416de71-1-any.pkg.tar.xz' from www2.futureware.at : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed retrieving file 'mingw-w64-x86_64-gcc-libs-7.3.0-2-any.pkg.tar.xz' from repo.msys2.org : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-gcc-libs-7.3.0-2-any.pkg.tar.xz' from downloads.sourceforge.net : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-gcc-libs-7.3.0-2-any.pkg.tar.xz' from www2.futureware.at : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed retrieving file 'mingw-w64-x86_64-vulkan-1.1.73.0-1-any.pkg.tar.xz' from repo.msys2.org : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-vulkan-1.1.73.0-1-any.pkg.tar.xz' from downloads.sourceforge.net : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-vulkan-1.1.73.0-1-any.pkg.tar.xz' from www2.futureware.at : The requested URL returned error: 404
warning: failed to retrieve some files
downloading mingw-w64-x86_64-pkg-config-0.29.2-1-any.pkg.tar.xz...
error: failed retrieving file 'mingw-w64-x86_64-libiconv-1.15-2-any.pkg.tar.xz' from repo.msys2.org : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-libiconv-1.15-2-any.pkg.tar.xz' from downloads.sourceforge.net : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-libiconv-1.15-2-any.pkg.tar.xz' from www2.futureware.at : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed retrieving file 'mingw-w64-x86_64-SDL2-2.0.8-2-any.pkg.tar.xz' from repo.msys2.org : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-SDL2-2.0.8-2-any.pkg.tar.xz' from downloads.sourceforge.net : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-SDL2-2.0.8-2-any.pkg.tar.xz' from www2.futureware.at : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed retrieving file 'mingw-w64-x86_64-glslang-6.2.2596-1-any.pkg.tar.xz' from repo.msys2.org : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-glslang-6.2.2596-1-any.pkg.tar.xz' from downloads.sourceforge.net : The requested URL returned error: 404
error: failed retrieving file 'mingw-w64-x86_64-glslang-6.2.2596-1-any.pkg.tar.xz' from www2.futureware.at : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

One can indeed see that http://repo.msys2.org/mingw/x86_64/ does not contain mingw-w64-x86_64-mpfr-4.0.1-1-any.pkg.tar.xz

It could be that I'm misdiagnosing this error!

Additionally, are there not security implications in not regularly updating this software regularly? Perhaps that automated script is a good idea, @snoyberg

Looks like we're in the same boat as this poor person using Windows XP! msys2/MINGW-packages#7099

The msys2 installation (and bundled package set index) is now sufficiently old
that packages are failing to install because they're no longer present on the
package hosts.

This is currently making the windows CI job for Agda fail. I have been trying to
bump the dependencies but they now all come as .tar.zst which is not a supported
format.

This is just waiting for someone to volunteer to do the work. It's really open to anyone.

I'm in the same boat as @expipiplus1: I use neither windows nor stack
(and none of the other core Agda devs do AFAIK) so I am probably not
the right person to take on that work.

I've pushed an update.

Thank you!