-
Notifications
You must be signed in to change notification settings - Fork 34
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
Manually Install Pacman Binaries #50
Comments
Was able to get it to work by downloading the binary pacman package & manually installing all its contents to Git/MSYS environment. Then doing the steps above (Note: /usr/share/pacman/keyrings had to be copied from another MSYS2 environment): Initialize keyring: Reload the default keys from /usr/share/pacman/keyrings: Update keys from a keyserver: Force update packages: Now pacman works correctly. But need to use --force parameter to overwrite package files previously installed by Git installer. To make sure correct packages are re-installed, do the following (credit to Mefju in this thread post): |
Thanks @AntumDeluge for your steps! I just used them to install pacman in my Another different thing I did was to download the I also suggested to them to ship This is the script/steps I used for the GitHub Actions: jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Configure environment variables
run: |
echo "::set-env name=pacmanbin::pacman-5.1.1-3-x86_64.pkg.tar.xz"
echo "::set-env name=pacmanmirror::pacman-mirrors-20200307-1-any.pkg.tar.xz"
echo "::set-env name=pacmankeys::msys2-keyring-r9.397a52e-1-any.pkg.tar.xz"
- name: Set up pacman, rsync, rename
shell: cmd
run: |
echo on
curl -LO http://repo.msys2.org/msys/x86_64/%pacmanbin%
curl -LO http://repo.msys2.org/msys/x86_64/%pacmanmirror%
curl -LO http://repo.msys2.org/msys/x86_64/%pacmankeys%
:: https://stackoverflow.com/questions/1359793/programmatically-extract-tar-gz
7z x "%pacmanbin%" -so | 7z x -aoa -si -ttar -o"%programfiles%\Git"
7z x "%pacmanmirror%" -so | 7z x -aoa -si -ttar -o"%programfiles%\Git"
7z x "%pacmankeys%" -so | 7z x -aoa -si -ttar -o"%programfiles%\Git"
set "PATH=%programfiles%\Git\usr\bin"
bash pacman-key --init
bash pacman-key --populate msys2
bash pacman-key --refresh-keys
pacman -Tv
pacman -Syuv --overwrite='*'
:: We must install bash first, otherwise we will have bash fork errors:
:: https://github.com/evandroforks/anki/runs/524857054?check_suite_focus=true
:: 0 [main] pacman 748 dofork: child -1 - forked process 2896 died unexpectedly
pacman --version
pacman -Sv --noconfirm --overwrite='*' bash
pacman -Sv --noconfirm --overwrite='*' rsync
pacman -Sv --noconfirm --overwrite='*' util-linux
:: clean all packages to decrease image size
pacman -Sccv --noconfirm Here are the relevant log results from a clean/working installation https://github.com/evandroforks/anki/runs/524866924?check_suite_focus=true#step:5:199
UpdateAfter seeing (actions/runner-images#585 - Install MSYS2 to Windows), now I am using Update 2021-10-22It seems that now pacman uses the format zst:
Fix the error
Installing tmux:
Example of
|
I'm sorry that this may not be directly related to the MSYS2 project. But I'm hoping I can get some insight here since I am working with an MSYS/MinGW environment.
I have installed Git for Windows on Windows 10 64-bit, & I'm trying to figure out if it's possible to use pacman from MSYS2 project with it. Turns out, Git for Windows comes with a MinGW/MSYS environment, but no package manager. I'd prefer to only have one MSYS environment on my system. If worse comes worst, I'll just uninstall Git for Windows & create a regular MSYS2 environment. But if I can, I'd like the try & use pacman with my current Git/MinGW/MSYS environment.
I downloaded the latest 64-bit MSYS2 tarball package & extracted its contents. I've copied the /usr/bin/pacman.exe executable, /var & /etc/pacman.d directories, & /etc/pacman.conf file to the Git/MSYS environment.
I turned off my firewall & opened the MinTTY/Bash terminal that came with Git using administrative privileges. I ran pacman & got some complaints. I don't remember what the original complaints were, but I ended up doing the following to try & add the MSYS2 public PGP key as trusted:
Not sure how to get it to accept the key. Something is missing or not set up right. I may ask for help over at the Git project as well.
EDIT: It was suggested to me to use pacman-key for adding the public key because pacman uses its own keyring. So, I did the following but am still getting the same error:
EDIT: Found a little more info here. I deleted /etc/pacman.d/gnupg & copied /usr/share/pacman directory from extracted MSYS2 package to Git/MSYS environment, then ran the following:
Error persists, but now all keys for MSYS2 are added to keyring:
The text was updated successfully, but these errors were encountered: