Compare commits
24 Commits
2021-06-04
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2480a1e1ae | ||
|
|
bb31bc4758 | ||
|
|
a63c2efbb1 | ||
|
|
0f0ce8ac4a | ||
|
|
92cd8703f0 | ||
|
|
d7119e21be | ||
|
|
3afa802e7b | ||
|
|
109259037b | ||
|
|
ff11ad435d | ||
|
|
5ff691e212 | ||
|
|
a2903688fa | ||
|
|
c898282f3f | ||
|
|
289a0c9938 | ||
|
|
097ca2e025 | ||
|
|
14c8d38bc1 | ||
|
|
17b1d7ee2d | ||
|
|
febbec6b28 | ||
|
|
8216e9655b | ||
|
|
f898970dc7 | ||
|
|
0fd65b0ee4 | ||
|
|
2779e83ac4 | ||
|
|
f9dca48d21 | ||
|
|
26c21ec33f | ||
|
|
dbb542e04b |
@@ -1,13 +1,13 @@
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2016
|
||||
|
||||
COPY ./msys2-base-x86_64-latest.sfx.exe /msys2.exe
|
||||
|
||||
RUN powershell -Command \
|
||||
$ErrorActionPreference = 'Stop'; \
|
||||
$ProgressPreference = 'SilentlyContinue'; \
|
||||
/msys2.exe -y -oC:\; \
|
||||
function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
|
||||
msys ' '; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Scc';
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2022
|
||||
|
||||
COPY ./msys2-base-x86_64-latest.sfx.exe /msys2.exe
|
||||
|
||||
RUN powershell -Command \
|
||||
$ErrorActionPreference = 'Stop'; \
|
||||
$ProgressPreference = 'SilentlyContinue'; \
|
||||
/msys2.exe -y -oC:\; \
|
||||
function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
|
||||
msys ' '; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Scc';
|
||||
163
.github/workflows/build.yml
vendored
163
.github/workflows/build.yml
vendored
@@ -5,11 +5,13 @@ on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 3 * * 1,4'
|
||||
- cron: '0 3 * * *'
|
||||
|
||||
concurrency: nope
|
||||
|
||||
jobs:
|
||||
build-installer:
|
||||
runs-on: windows-latest
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
@@ -24,9 +26,8 @@ jobs:
|
||||
- name: Switch to the main mirror
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
sed -e "s|Include = /etc/pacman.d/mirrorlist.mingw32|Server = http://repo.msys2.org/mingw/i686/|g" -i /etc/pacman.conf
|
||||
sed -e "s|Include = /etc/pacman.d/mirrorlist.mingw64|Server = http://repo.msys2.org/mingw/x86_64/|g" -i /etc/pacman.conf
|
||||
sed -e "s|Include = /etc/pacman.d/mirrorlist.msys|Server = http://repo.msys2.org/msys/\$arch/|g" -i /etc/pacman.conf
|
||||
echo 'Server = https://repo.msys2.org/mingw/$repo/' > /etc/pacman.d/mirrorlist.mingw
|
||||
echo 'Server = https://repo.msys2.org/msys/$arch/' > /etc/pacman.d/mirrorlist.msys
|
||||
pacman-conf.exe
|
||||
|
||||
- name: Update using the main mirror & Check install
|
||||
@@ -39,24 +40,29 @@ jobs:
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
bash make-msys2-installer
|
||||
|
||||
- name: Create 'latest' Variants and Checksums
|
||||
run: |
|
||||
mv msys2-base-x86_64-[0-9]*.sfx.exe msys2-base-x86_64-latest.sfx.exe
|
||||
mv msys2-x86_64-[0-9]*.exe msys2-x86_64-latest.exe
|
||||
mv msys2-*.tar.xz msys2-base-x86_64-latest.tar.xz
|
||||
sha256sum.exe msys2-*
|
||||
sha256sum.exe msys2-* > msys2-checksums.txt
|
||||
|
||||
- name: Create 'latest' Variants
|
||||
run: |
|
||||
cp msys2-base-x86_64-[0-9]*.sfx.exe msys2-base-x86_64-latest.sfx.exe
|
||||
cp msys2-x86_64-[0-9]*.exe msys2-x86_64-latest.exe
|
||||
cp msys2-*.tar.xz msys2-base-x86_64-latest.tar.xz
|
||||
|
||||
- name: Upload Results
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: installer
|
||||
path: msys2-*
|
||||
|
||||
test-installer-2019:
|
||||
test-installer:
|
||||
name: installer-${{ matrix.image }}
|
||||
runs-on: windows-${{ matrix.image }}
|
||||
needs: build-installer
|
||||
runs-on: windows-2019
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [2019, 2022]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
@@ -69,19 +75,63 @@ jobs:
|
||||
run: |
|
||||
./msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys2-install-test
|
||||
|
||||
- name: Test without Login Shell
|
||||
run: |
|
||||
C:\msys2-install-test\usr\bin\pacman.exe -Syy
|
||||
C:\msys2-install-test\usr\bin\pacman.exe --noconfirm -S vim
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --version"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --noconfirm -S git"
|
||||
|
||||
- name: Uninstall
|
||||
run: |
|
||||
C:\msys2-install-test\uninstall.exe pr --confirm-command
|
||||
|
||||
test-installer-2016:
|
||||
test-docker-sfx:
|
||||
name: docker-sfx-${{ matrix.image }}
|
||||
runs-on: windows-${{ matrix.image }}
|
||||
needs: build-installer
|
||||
runs-on: windows-2016
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [2019, 2022]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build -t msys2-base -f ./.ci/Dockerfile.${{ matrix.image }} .
|
||||
|
||||
- name: Test without Login Shell
|
||||
run: |
|
||||
docker run msys2-base C:\msys64\usr\bin\pacman.exe -Syy
|
||||
docker run msys2-base C:\msys64\usr\bin\pacman.exe --noconfirm -S vim
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman --version"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Qkk || true"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm git"
|
||||
|
||||
test-sfx:
|
||||
name: sfx-${{ matrix.image }}
|
||||
runs-on: windows-${{ matrix.image }}
|
||||
needs: build-installer
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [2019, 2022]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
@@ -92,69 +142,31 @@ jobs:
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
./msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys2-install-test
|
||||
./msys2-base-x86_64-latest.sfx.exe -y -oC:/msys2-install-test
|
||||
|
||||
- name: Test without Login Shell
|
||||
run: |
|
||||
$env:Path = 'C:\msys2-install-test\msys64\usr\bin;' + $env:Path
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman-key --init"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman-key --populate"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman -Syy"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman --noconfirm -S vim"
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --version"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
|
||||
- name: Uninstall
|
||||
run: |
|
||||
C:\msys2-install-test\uninstall.exe pr --confirm-command
|
||||
|
||||
test-docker-sfx-2019:
|
||||
needs: build-installer
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build -t msys2-base -f ./.ci/Dockerfile.2019 .
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman --version"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
|
||||
test-docker-sfx-2016:
|
||||
needs: build-installer
|
||||
runs-on: windows-2016
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build -t msys2-base -f ./.ci/Dockerfile.2016 .
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman --version"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman --version"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Qkk || true"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm git"
|
||||
|
||||
upload-nightly:
|
||||
permissions:
|
||||
contents: write
|
||||
needs:
|
||||
- build-installer
|
||||
- test-docker-sfx-2019
|
||||
- test-docker-sfx-2016
|
||||
- test-installer-2016
|
||||
- test-installer-2019
|
||||
- test-docker-sfx
|
||||
- test-installer
|
||||
- test-sfx
|
||||
if: github.ref == 'refs/heads/master'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -162,9 +174,8 @@ jobs:
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- uses: eine/tip@master
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: nightly-x86_64
|
||||
rm: true
|
||||
files: msys2-*
|
||||
- name: Upload Installers
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload nightly-x86_64 msys2-* --clobber -R ${{ github.repository }}
|
||||
|
||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
_cache
|
||||
*.exe
|
||||
*.xz
|
||||
26
LICENSE
Normal file
26
LICENSE
Normal file
@@ -0,0 +1,26 @@
|
||||
Copyright 2021 MSYS2 devs
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
10
README.md
10
README.md
@@ -32,3 +32,13 @@ Installing the self extracting archive to `C:\msys64`:
|
||||
# Run in a MSYS2 environment
|
||||
./make-msys2-installer
|
||||
```
|
||||
|
||||
## New Release TODO List
|
||||
|
||||
* Trigger a new nightly build via https://github.com/msys2/msys2-installer/actions/workflows/build.yml or use an existing one
|
||||
* Get all files with dates in their names, sign them and create checksum files (.sig and .sha256)
|
||||
* Create a new git tag following format: `date -I`
|
||||
* Upload the installer files to the release tag
|
||||
* Update the download link and checksum for the GiHub action and verify that all tests pass: https://github.com/msys2/setup-msys2/blob/master/main.js
|
||||
* Run `msys2-devtools/update-installer "$(date -I)"` on the server to copy the release from GitHub
|
||||
* Update the link, name and checksum on the main website (pointing to GitHub): https://github.com/msys2/msys2.github.io/blob/source/web/index.md
|
||||
|
||||
28
create-sfx.sh
Normal file
28
create-sfx.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# usage: ./create-sfx.sh /some/path/to/msys64 installer.exe
|
||||
|
||||
set -e
|
||||
|
||||
# Download and extract https://github.com/mcmilk/7-Zip-zstd
|
||||
NAME="7z21.03-zstd-x64"
|
||||
CHECKSUM="531b20dfb03d8f30f61ae56a181610bbb6f3cf7cc71dac1d8f95511289de76f3"
|
||||
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
mkdir -p "$DIR/_cache"
|
||||
BASE="$DIR/_cache/$NAME"
|
||||
if [ ! -f "$BASE.exe" ]; then
|
||||
curl --fail -L "https://github.com/mcmilk/7-Zip-zstd/releases/download/v21.03-v1.5.0-R2/$NAME.exe" -o "$BASE.exe"
|
||||
fi
|
||||
echo "$CHECKSUM $BASE.exe" | sha256sum --quiet --check
|
||||
if [ ! -d "$BASE" ]; then
|
||||
7z e -o"$BASE" "$DIR/_cache/$NAME.exe"
|
||||
fi
|
||||
|
||||
# Creat SFX installer
|
||||
INPUT="$1"
|
||||
OUTPUT="$2"
|
||||
TEMP="$OUTPUT.payload"
|
||||
|
||||
rm -f "$TEMP"
|
||||
"$BASE/7z" a "$TEMP" -ms1T -m0=zstd -mx22 "$INPUT"
|
||||
cat "$BASE/7zCon.sfx" "$TEMP" > "$OUTPUT"
|
||||
rm "$TEMP"
|
||||
10
fetch-sfx.sh
10
fetch-sfx.sh
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Fetch 7zCon.sfx from upstream 7-zip
|
||||
curl "https://www.7-zip.org/a/7z1900.exe" -o 7z1900.exe
|
||||
echo "759aa04d5b03ebeee13ba01df554e8c962ca339c74f56627c8bed6984bb7ef80 7z1900.exe" | sha256sum --check
|
||||
7z x -o7zout 7z1900.exe
|
||||
cp 7zout/7zCon.sfx .
|
||||
rm -Rf 7zout 7z1900.exe
|
||||
@@ -74,6 +74,7 @@ create_archives() {
|
||||
popd > /dev/null
|
||||
|
||||
pushd ${_newmsysbase} > /dev/null
|
||||
export XZ_OPT="-e9T0"
|
||||
local _compress_cmd2="/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cJf ${_thisdir}/${_filename2} msys${_bitness}"
|
||||
echo "Run: ${_compress_cmd2} ..." | tee -a ${_log}
|
||||
eval "${_compress_cmd2}" 2>&1 | tee -a ${_log}
|
||||
@@ -85,9 +86,7 @@ create_archives() {
|
||||
fi
|
||||
|
||||
# self extracting cli 7z archive
|
||||
7z a -mx=9 "${_thisdir}/_temp.7z" "msys${_bitness}"
|
||||
cat ${_thisdir}/7zCon.sfx "${_thisdir}/_temp.7z" > "${_thisdir}/${_filename3}"
|
||||
rm "${_thisdir}/_temp.7z"
|
||||
"${_thisdir}/create-sfx.sh" "msys${_bitness}" "${_thisdir}/${_filename3}"
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
@@ -114,6 +113,7 @@ create_chroot_system() {
|
||||
mkdir -p tmp
|
||||
|
||||
eval "pacman -Syu --root \"${_newmsys}\"" | tee -a ${_log}
|
||||
eval "pacman -S filesystem msys2-runtime --noconfirm --root \"${_newmsys}\"" | tee -a ${_log}
|
||||
eval "pacman -S base --noconfirm --root \"${_newmsys}\"" | tee -a ${_log}
|
||||
_result=$?
|
||||
if [ "${_result}" -ne "0" ]; then
|
||||
|
||||
@@ -17,11 +17,11 @@ function createShortcuts()
|
||||
return;
|
||||
}
|
||||
|
||||
var cmdLocation = installer.value("TargetDir") + "\\msys2_shell.cmd";
|
||||
component.addOperation("CreateShortcut", cmdLocation, "@StartMenuDir@/MSYS2 MinGW 32-bit.lnk", "-mingw32", "iconPath=@TargetDir@/mingw32.exe");
|
||||
component.addOperation("CreateShortcut", cmdLocation, "@StartMenuDir@/MSYS2 MinGW 64-bit.lnk", "-mingw64", "iconPath=@TargetDir@/mingw64.exe");
|
||||
component.addOperation("CreateShortcut", cmdLocation, "@StartMenuDir@/MSYS2 MinGW UCRT 64-bit.lnk", "-ucrt64", "iconPath=@TargetDir@/ucrt64.exe");
|
||||
component.addOperation("CreateShortcut", cmdLocation, "@StartMenuDir@/MSYS2 MSYS.lnk", "-msys", "iconPath=@TargetDir@/msys2.exe");
|
||||
component.addOperation("CreateShortcut", "@TargetDir@/mingw32.exe", "@StartMenuDir@/MSYS2 MINGW32.lnk", "iconPath=@TargetDir@/mingw32.exe");
|
||||
component.addOperation("CreateShortcut", "@TargetDir@/mingw64.exe", "@StartMenuDir@/MSYS2 MINGW64.lnk", "iconPath=@TargetDir@/mingw64.exe");
|
||||
component.addOperation("CreateShortcut", "@TargetDir@/ucrt64.exe", "@StartMenuDir@/MSYS2 UCRT64.lnk", "iconPath=@TargetDir@/ucrt64.exe");
|
||||
component.addOperation("CreateShortcut", "@TargetDir@/clang64.exe", "@StartMenuDir@/MSYS2 CLANG64.lnk", "iconPath=@TargetDir@/clang64.exe");
|
||||
component.addOperation("CreateShortcut", "@TargetDir@/msys2.exe", "@StartMenuDir@/MSYS2 MSYS.lnk", "iconPath=@TargetDir@/msys2.exe");
|
||||
|
||||
if ("@BITNESS@bit" === "32bit") {
|
||||
component.addOperation( "Execute",
|
||||
|
||||
Reference in New Issue
Block a user