-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[vcpkg-acquire-msys] Install new keyring #12467
Conversation
in my opinion this option is better
|
Better than what? Your commands don't install the new keys (we're starting with a clean 20190524 installation). |
@elieux https://www.msys2.org/news/#2020-06-29-new-packagers
|
Yes, but this makes sense only after the new keyring is installed. It's not either/or, it's "do the first step, then maybe the second one". |
Yes what? what do you mean in General? |
Yes, I wrote those steps. But I don't think you understand when to use them.
No need to delete. Update is taken care of by installing the new keyring (which this PR is about). See also https://github.com/msys2/MSYS2-packages/blob/master/msys2-keyring/msys2-keyring.install. |
good luck to you, you are so smart 😂 |
@voskrese, it wasn't meant as a conversation stopper. If you have reasons to believe nuking the GPG directory is necessary, please state them. @LilyWangL, what kind of discussion is expected ("required") here? |
I think you take a lot on yourself, this error occurred only to you, you may have edited the settings files incorrectly |
Just letting you know we have uploaded a new msys-x86_64 database, signed with a new key. mingw databases will probably follow. |
No … this didn't occur only to him … The exact same error just occurred to me now. Fresh clone of vcpkg, installing packages from scratch. There is no configuration that I could have messed up as I didn't even do anything beyond bootstrapping and installing some packages. I would tone down the attitude, read well, and urge to fix this as fast as possible if I were you. |
Looking forward to this fix myself, I cannot use vcpkg right now either. |
Given I am facing this issue and no solution except the following (mentioned here) is working for me:
With my limited understanding of this sort of work, I have added a workaround here based on this pull request. Feel free to use it if you urgently need to use vcpkg to build packages that rely on MSYS in the meantime. As usual with these sorts of workarounds, I take no responsibility for any consequences arising out of using this. This is strictly temporary. |
@emptyVoid Could you please check, if this PR still fixes the issue? git clone https://github.com/microsoft/vcpkg.git
cd .\vcpkg\
git fetch origin pull/12467/head:PR_12467
git checkout PR_12467
git rebase master
Successfully rebased and updated refs/heads/PR_12467.
.\bootstrap-vcpkg.bat
.\vcpkg.exe install bzip2:x64-windows
...
...
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Fixing pkgconfig
-- Acquiring MSYS2...
-- Downloading https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20190524.tar.xz/download...
-- Downloading http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz...
-- Downloading http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig...
gpg: /etc/pacman.d/gnupg/trustdb.gpg: trustdb created
gpg: no ultimately trusted keys found
gpg: starting migration from earlier GnuPG versions
gpg: porting secret keys from '/etc/pacman.d/gnupg/secring.gpg' to gpg-agent
gpg: migration succeeded
gpg: Generating pacman keyring master key...
gpg: key 5C587674F90CFE24 marked as ultimately trusted
gpg: directory '/etc/pacman.d/gnupg/openpgp-revocs.d' created
gpg: revocation certificate stored as '/etc/pacman.d/gnupg/openpgp-revocs.d/D3436DA32F8C65745315E2165C587674F90CFE24.rev'
gpg: Done
==> Updating trust database...
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
==> Appending keys from msys2.gpg...
==> Locally signing trusted keys in keyring...
-> Locally signing key D55E7A6D7CE9BA1587C0ACACF40D263ECA25678A...
-> Locally signing key 123D4D51A1793859C2BE916BBBE514E53E0D0813...
-> Locally signing key B91BCF3303284BF90CC043CA9F418C233E652008...
-> Locally signing key 9DD0D4217D75A33B896159E6DA7EF2ABAEEA755C...
==> Importing owner trust values...
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: inserting ownertrust of 4
==> Updating trust database...
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 4 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1 valid: 4 signed: 3 trust: 0-, 0q, 0n, 4m, 0f, 0u
gpg: depth: 2 valid: 3 signed: 0 trust: 3-, 0q, 0n, 0m, 0f, 0u
==> Checking vcpkg/downloads/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig...
gpg: assuming signed data in 'vcpkg/downloads/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz'
gpg: Signature made Mon Jun 29 07:36:14 2020 WEDT
gpg: using DSA key AD351C50AE085775EB59333B5F92EFC1A47D45A1
gpg: Good signature from "Alexey Pavlov (Alexpux) <[email protected]>" [full]
loading packages...
resolving dependencies...
looking for conflicting packages...
Packages (1) msys2-keyring-r21.b39fb11-1
Total Installed Size: 0.05 MiB
Net Upgrade Size: 0.03 MiB
:: Proceed with installation? [Y/n] :: Synchronizing package databases...
downloading mingw32.db...
downloading mingw32.db.sig...
downloading mingw64.db...
downloading mingw64.db.sig...
downloading msys.db...
downloading msys.db.sig...
error: msys: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown
error: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" could not be looked up remotely
error: failed to update msys (invalid or corrupted database (PGP signature))
error: failed to synchronize all databases
error: msys: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown
error: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" could not be looked up remotely
checking dependencies...
Packages (2) rebase-4.4.4-1 dash-0.5.10.2-1
Total Removed Size: 1.12 MiB
:: Do you want to remove these packages? [Y/n]
:: Processing package changes...
removing rebase...
removing dash...
error: msys: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown
error: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" could not be looked up remotely
:: Synchronizing package databases...
mingw32 is up to date
mingw64 is up to date
downloading msys.db...
downloading msys.db.sig...
error: msys: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown
error: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" could not be looked up remotely
error: failed to update msys (invalid or corrupted database (PGP signature))
error: failed to synchronize all databases
-- Acquiring MSYS2... OK
-- Acquiring MSYS Packages...
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:72 (message):
Command failed: vcpkg/downloads/tools/msys2/msys64/usr/bin/bash.exe --noprofile --norc -c "pacman -S --noconfirm --needed pkg-config"
Working Directory: vcpkg/downloads/tools/msys2
Error code: 1
See logs for more information:
vcpkg\buildtrees\bzip2\msys-pacman-x64-windows-err.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_acquire_msys.cmake:149 (vcpkg_execute_required_process)
scripts/cmake/vcpkg_fixup_pkgconfig.cmake:281 (vcpkg_acquire_msys)
ports/bzip2/portfile.cmake:51 (vcpkg_fixup_pkgconfig)
scripts/ports.cmake:79 (include) |
@@ -91,6 +104,15 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) | |||
COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman-key --init;pacman-key --populate" | |||
WORKING_DIRECTORY ${TOOLPATH} | |||
) | |||
# install the new keyring | |||
_execute_process( | |||
COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman-key --verify ${KEYRING_SIG_PATH}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the result somehow verified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it checks the error code -- I assume pacman-key
returns some non-zero code if verification fails.
@c72578, thanks for noticing and reporting this. It didn't occur to me to check for this. |
8451f3d
to
94144e9
Compare
@yasamoka |
@c72578, should work now, can you check on your side please? |
and in general it is necessary to MSYS to update and provide all possible variants of errors and fix them in advance in the script |
Thanks for updating the PR. It is OK now. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
It seems that the pipeline test is completely broken... needs to fix it. |
@yasamoka You saved my day, thank you! I used your workaround like this: cd vcpkg
git remote add msys2-hotfix https://github.com/yasamoka/vcpkg.git
git fetch msys2-hotfix
git cherry-pick abc0b6 |
Glad to have helped! Do note that the latest commits to this PR include the fix, so as soon as the PR gets accepted, we should be good to go. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Describe the pull request
Adjusts
vcpkg_acquire_msys
script to install the new keyring (see MSYS2 News).What does your PR fix?
Fixes Update MSYS2 base #12288
Which triplets are supported/not supported? Have you updated the CI baseline?
N/A
Does your PR follow the maintainer guide?
Yes