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

windows pacman commands failing #5732

Closed
shayne-fletcher opened this issue May 4, 2022 · 12 comments
Closed

windows pacman commands failing #5732

shayne-fletcher opened this issue May 4, 2022 · 12 comments

Comments

@shayne-fletcher
Copy link

shayne-fletcher commented May 4, 2022

run command

stack --resolver lts-18.23   exec -- pacman -S autoconf automake-wrapper make patch python tar mintty --noconfirm

this normally works ok but as of today,

warning: database file for 'clang32' does not exist (use '-Sy' to download)
warning: mintty-1~3.6.0-1 is up to date -- reinstalling
error: failed to prepare transaction (could not find database)

in case it's relevant, i can reliably produce this sort of behavior too with another build

:: File /var/cache/pacman/pkg/automake1.9-1.9.6-3-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: automake1.10: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: automake1.11: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: automake1.12: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: automake1.13: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: automake1.14: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: automake1.15: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
:: File /var/cache/pacman/pkg/automake1.10-1.10.3-4-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
:: File /var/cache/pacman/pkg/automake1.11-1.11.6-4-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
:: File /var/cache/pacman/pkg/automake1.12-1.12.6-4-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
:: File /var/cache/pacman/pkg/automake1.13-1.13.4-5-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
:: File /var/cache/pacman/pkg/automake1.14-1.14.1-4-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: automake1.16: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: failed to commit transaction (invalid or corrupted package)
:: File /var/cache/pacman/pkg/automake1.15-1.15.1-2-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
:: File /var/cache/pacman/pkg/automake1.16-1.16.3-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
Errors occurred, no packages were upgraded.

long story short, this feature is looking quite broken and has been for some time.

@mpilgrem
Copy link
Member

mpilgrem commented May 4, 2022

I do not know if this will solve your problem, but I see signature from "David Macek <david.macek.0@gmail.com>" is unknown trust in your extract. As a Windows user, I have had problems in the past with the stack-supplied MSYS2 and that message. I found the discussion in this issue of help in resolving that: msys2/MSYS2-packages#2343.

@shayne-fletcher
Copy link
Author

shayne-fletcher commented May 4, 2022

thanks @mpilgrem. i've been down this road before. in the past the "proper" fix was provided by michael snoyman "I've pushed an update to the msys2 version. If you wipe out the old msys2 in your AppData folder, Stack should download a new version which should work."

i think the issue is that some msys binaries associated with stack need to be updated. according to https://www.msys2.org/ the current version is msys2-x86-20220503.exe

also, fyi, i'm not a windows user. the context is azure whereby stack is coming from curl -sSL https://get.haskellstack.org/ | sh

akrmn added a commit to digital-asset/ghc-lib that referenced this issue May 5, 2022
garyverhaegen-da pushed a commit to digital-asset/ghc-lib that referenced this issue May 5, 2022
@mpilgrem
Copy link
Member

mpilgrem commented May 5, 2022

I see. The current version of 64 bit MSYS2 is 2022-05-03. The latest release by @snoyberg on commercialhaskell/stackage-content on 22 June 2021 is version 2021-06-04. That is the release referenced in the msys2: windows64: key in commercialhaskell/stackage-content/stackage-content/stack/stack-setup-2.yaml.

@snoyberg, would it be possible for you or another maintainer (I am not sure who else to approach, and I see you have released the last five versions) to update the MSYS2 version provided with stack? I have seen the guide to upgrading MSYS2 for stack.

@snoyberg
Copy link
Contributor

snoyberg commented May 6, 2022

I'm really not in a position to take responsibility for these updates. The instructions for these updates are available at the link you provided. We really need someone to step up to either make these updates or maybe even automate the release process for new files.

@mpilgrem
Copy link
Member

mpilgrem commented May 6, 2022

@snoyberg, does it have to be a 'member' of commercialhaskell? The instructions for updates seem to be straightforward, but - if I understand correctly - it has to be somebody with permissions to make a 'release' on commercialhaskell\stackage-content. I would be happy to (try to) keep things up to date manually, but I don't have the permissions.

@mpilgrem mpilgrem mentioned this issue May 6, 2022
@snoyberg
Copy link
Contributor

snoyberg commented May 9, 2022

Thanks @mpilgrem! I've just sent you an invite to join that repo.

@mpilgrem
Copy link
Member

mpilgrem commented May 9, 2022

@snoyberg, I've accepted that kind invitation, but I don't think it gives me permission to 'release' the MSYS2 tarballs. On my own GitHub repositories, I have a 'Create a new release' option under the 'Releases' heading to the right of main page. On commercialhaskell/stackage-content, I'm not presented with that option.

@snoyberg
Copy link
Contributor

I just bumped your permissions level, does that fix it?

@mpilgrem
Copy link
Member

@snoyberg, thank you. That did not create a 'Create a new release' option on the main page BUT on the 'releases' page I noticed a 'Draft a new release' button that did work. (I can't say that button was not there before; I was not looking out for it.) I have:
-- made a new release https://github.com/commercialhaskell/stackage-content/releases/tag/msys2-20220503
-- posted a pull request for the update of stack-setup-2.yaml (commercialhaskell/stackage-content#101)
However, I don't know how to follow the instruction test this file [stack-setup-2.yaml] locally first. If you could give me any pointers as to how you can/should test stack-setup-2.yaml locally, I would be grateful.

@mpilgrem
Copy link
Member

@snoyberg, you can ignore my request above. I now understand the use of stack setup --setup-info-yaml option, and have applied it.

@mpilgrem
Copy link
Member

@shayne-fletcher, the 64bit MSYS2 that stack downloads (if a stack-supplied one is not already present) should now be bumped to version 20220503. Does that solve your Azure issue?

@shayne-fletcher
Copy link
Author

@shayne-fletcher, the 64bit MSYS2 that stack downloads (if a stack-supplied one is not already present) should now be bumped to version 20220503. Does that solve your Azure issue?

@mpilgrem i'm very happy to report that it does. very nicely done and thank-you (and you too @snoyberg ) so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants