|
| 1 | +# MSYS2 Installer & Archives |
| 2 | + |
| 3 | +The MSYS2 installer can be used to set up an initial MSYS2 environment. For |
| 4 | +further updating pacman is used. See [the updating guide](./updating.md) for |
| 5 | +more information. |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +The installer is based on the Qt Installer Framework and built using the |
| 10 | +[following scripts](https://github.com/msys2/msys2-installer). In addition to |
| 11 | +the GUI installer we provide a self extracting archive and a XZ compressed |
| 12 | +archive with the same content. |
| 13 | + |
| 14 | +The installer executables and tarballs are hosted on [GitHub](https://github.com/msys2/msys2-installer/releases) as well as on the [repo server](https://repo.msys2.org/distrib). We also provide [nightly builds](https://github.com/msys2/msys2-installer/releases/tag/nightly-x86_64). |
| 15 | + |
| 16 | +## CLI Usage Examples |
| 17 | + |
| 18 | +Installing the GUI installer via the CLI to `C:\msys64`: |
| 19 | + |
| 20 | +```powershell |
| 21 | +.\msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys64 |
| 22 | +``` |
| 23 | + |
| 24 | +Uninstalling an existing installation in `C:\msys64` via the CLI: |
| 25 | + |
| 26 | +```powershell |
| 27 | +C:\msys64\uninstall.exe pr --confirm-command |
| 28 | +``` |
| 29 | + |
| 30 | +Installing the self extracting archive to `C:\msys64`: |
| 31 | + |
| 32 | +```powershell |
| 33 | +.\msys2-base-x86_64-latest.sfx.exe -y -oC:\ |
| 34 | +``` |
| 35 | + |
| 36 | +## FAQ |
| 37 | + |
| 38 | +### What's the difference between the installer and the archives? |
| 39 | + |
| 40 | +The installer provides some additional features such as installing shortcuts, registering an uninstaller, a GUI for selecting the installation path and automatically running a login shell at the end to initialize the MSYS2 environment. |
| 41 | + |
| 42 | +If you unpack the archives and run a login shell once, you will get a functionally equivalent MSYS2 installation. |
| 43 | + |
| 44 | +### What is contained in the installer/archives? |
| 45 | + |
| 46 | +It contains the [base](https://packages.msys2.org/package/base) package and all its dependencies. You can list the contained packages using: `pactree base -lu | sort` |
| 47 | + |
| 48 | +### How can I verify the basic integrity of the downloaded files? |
| 49 | + |
| 50 | +You can download the expected checksum by appending `.sha256` to each download URL. You can verify that the downloaded file matches the checksum by computing the checksum either with Powershell: |
| 51 | + |
| 52 | +```powershell |
| 53 | +(Get-FileHash -Algorithm SHA256 -Path .\msys2-x86_64-20230526.exe).Hash.toLower() |
| 54 | +432dcc8b5cc7d5104a85b52df8b1e77cdf91018e102ac7aa998248637d636229 |
| 55 | +``` |
| 56 | + |
| 57 | +or with 7-Zip, if you have it installed: |
| 58 | + |
| 59 | +* Right clicking on `msys2-x86_64-20230526.exe` |
| 60 | +* Go into the "7-Zip" and then "CRC SHA" sub menu, and finally click on "SHA-256" |
| 61 | +* 7-Zip will pop up a window containing the checksum |
| 62 | + |
| 63 | +Compare the result with the content of "https://github.com/msys2/msys2-installer/releases/download/2023-05-26/msys2-x86_64-20230526.exe.sha256" to verify that your local file matches the checksum. |
| 64 | + |
| 65 | +### How can I verify that the downloaded files were generated by MSYS2 developers? |
| 66 | + |
| 67 | +The installer is signed using the following key: |
| 68 | + |
| 69 | +[`0EBF 782C 5D53 F7E5 FB02 A667 46BD 761F 7A49 B0EC`](http://keyserver.ubuntu.com/pks/lookup?search=0x0ebf782c5d53f7e5fb02a66746bd761f7a49b0ec&fingerprint=on&op=vindex) |
| 70 | + |
| 71 | +You can download the signature by appending a `.sig` to all download URLs. |
| 72 | + |
| 73 | +Verification example: |
| 74 | + |
| 75 | +```console |
| 76 | +$ gpg --keyserver keyserver.ubuntu.com --recv "0EBF 782C 5D53 F7E5 FB02 A667 46BD 761F 7A49 B0EC" |
| 77 | +gpg: key 46BD761F7A49B0EC: public key "Christoph Reiter <[email protected]>" imported |
| 78 | +gpg: Total number processed: 1 |
| 79 | +gpg: imported: 1 |
| 80 | +$ ls |
| 81 | +msys2-x86_64-20230526.exe msys2-x86_64-20230526.exe.sig |
| 82 | +$ gpg --verify msys2-x86_64-20230526.exe.sig |
| 83 | +gpg: assuming signed data in 'msys2-x86_64-20230526.exe' |
| 84 | +gpg: Signature made Fr 26 Mai 2023 11:46:54 CEST |
| 85 | +gpg: using RSA key E0AA0F031DBD80FFBA57B06D5A62D0CAB6264964 |
| 86 | +gpg: Good signature from "Christoph Reiter <[email protected]>" [unknown] |
| 87 | +gpg: WARNING: This key is not certified with a trusted signature! |
| 88 | +gpg: There is no indication that the signature belongs to the owner. |
| 89 | +Primary key fingerprint: 0EBF 782C 5D53 F7E5 FB02 A667 46BD 761F 7A49 B0EC |
| 90 | + Subkey fingerprint: E0AA 0F03 1DBD 80FF BA57 B06D 5A62 D0CA B626 4964 |
| 91 | +``` |
| 92 | + |
| 93 | +For the signature to be valid, gnupg has to print "Good signature" **and** the primary fingerprint shown has to match `0EBF 782C 5D53 F7E5 FB02 A667 46BD 761F 7A49 B0EC`. |
0 commit comments