From d4631bf561198bc553eba170143184444e5688ec Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 9 May 2025 13:07:09 +0200 Subject: [PATCH 1/3] git-extra: switch to the new Pacman repo For a couple of months now, to precise: since https://github.com/git-for-windows/build-extra/pull/595 (Let `pacman-helper` deploy also to the GitHub repo `git-for-windows/pacman-repo`), every deployment to Git for Windows' Pacman repository is mirrored to a new location: https://github.com/git-for-windows/pacman-repo/ The idea set forth in one of the commits in that PR, 3fca5c703 (pacman-helper quick_add: start transitioning deployments to GitHub, 2025-02-16), is to switch to the new location eventually, avoiding the dependency on my personal Azure account (where the old location resides). I had meant to transition a lot quicker, but procrastinated on this for such a long time that I forgot. But today is the day! Signed-off-by: Johannes Schindelin --- git-extra/git-extra.install.in | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/git-extra/git-extra.install.in b/git-extra/git-extra.install.in index 8c5d88b320..9e6f713029 100644 --- a/git-extra/git-extra.install.in +++ b/git-extra/git-extra.install.in @@ -65,30 +65,39 @@ GITATTRIBUTES case "$uname_m" in i686) arch=i686 - otherarch=x86-64 + otherarch=x86_64 otherpacman=git-for-windows-mingw64 ;; x86_64) - arch=x86-64 + arch=x86_64 otherarch=i686 otherpacman=git-for-windows-mingw32 ;; esac + ! grep -q '^\[git-for-windows\]$' etc/pacman.conf || + sed -i -e 's/^\(\[git-for-windows\)\(\]\)$/\1-'"$arch"'\2/' etc/pacman.conf + + ! grep -q wingit.blob.core.windows.net etc/pacman.conf || + sed -i -e '/https:\/\/wingit\.blob\.core\.windows\.net\//{ + s|x86-64|x86_64| + s|https://[^/]*|https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads| + }' etc/pacman.conf + grep -q git-for-windows[^-] etc/pacman.conf || - sed -i -e '/^\[mingw32\]/i[git-for-windows]\nServer = https://wingit.blob.core.windows.net/'$arch'\n' etc/pacman.conf + sed -i -e '/^\[mingw32\]/i[git-for-windows-'"$arch"']\nServer = https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/'$arch'\n' etc/pacman.conf ! grep -A2 git-for-windows[^-] etc/pacman.conf | grep -q '^SigLevel = Optional' || - sed -i -e '/\[git-for-windows\]/{N;N;s/\nSigLevel = Optional//}' \ + sed -i -e '/\[git-for-windows-'"$arch"'\]/{N;N;s/\nSigLevel = Optional//}' \ etc/pacman.conf grep -q "$otherpacman" etc/pacman.conf || - sed -i -e '/^\[mingw32\]/i['$otherpacman']\nServer = https://wingit.blob.core.windows.net/'$otherarch'\n' etc/pacman.conf + sed -i -e '/^\[mingw32\]/i['$otherpacman']\nServer = https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/'$otherarch'\n' etc/pacman.conf test -z "$(find /clangarm64 -type f -print -quit 2>/dev/null)" || # if /clangarm64 exists and contains at least one file grep -q "git-for-windows-aarch64" etc/pacman.conf || # then add Git for Windows' aarch64 repository (unless it's already added) - sed -i -e '/^\[clangarm64]/i[git-for-windows-aarch64]\nServer = https://wingit.blob.core.windows.net/aarch64\n' etc/pacman.conf + sed -i -e '/^\[clangarm64]/i[git-for-windows-aarch64]\nServer = https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/aarch64\n' etc/pacman.conf ! grep -q 'https://dl.bintray.com/\$repo/pacman/\$arch' etc/pacman.conf || sed -i -e 's/https:\/\/dl\.bintray\.com\/\$repo\/pacman\/\$arch/https:\/\/wingit.blob.core.windows.net\/'$arch'/g' etc/pacman.conf From 91498a05a95da25c2081374fbd231dc50f5f4ebd Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 9 May 2025 14:10:51 +0200 Subject: [PATCH 2/3] git-extra: commit generated files Signed-off-by: Johannes Schindelin --- git-extra/PKGBUILD | 2 +- git-extra/git-extra.install | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/git-extra/PKGBUILD b/git-extra/PKGBUILD index d2035ce1c6..101afe37a3 100644 --- a/git-extra/PKGBUILD +++ b/git-extra/PKGBUILD @@ -5,7 +5,7 @@ pkgbase="mingw-w64-${_realname}" pkgname=($_realname "${MINGW_PACKAGE_PREFIX}-${_realname}") _ver_base=1.1 -pkgver=1.1.653.48e2403b3 +pkgver=1.1.655.d4631bf56 pkgrel=1 pkgdesc="Git for Windows extra files" arch=('any') diff --git a/git-extra/git-extra.install b/git-extra/git-extra.install index 54d33ecd33..ccdfa7800f 100644 --- a/git-extra/git-extra.install +++ b/git-extra/git-extra.install @@ -99,30 +99,39 @@ GITATTRIBUTES case "$uname_m" in i686) arch=i686 - otherarch=x86-64 + otherarch=x86_64 otherpacman=git-for-windows-mingw64 ;; x86_64) - arch=x86-64 + arch=x86_64 otherarch=i686 otherpacman=git-for-windows-mingw32 ;; esac + ! grep -q '^\[git-for-windows\]$' etc/pacman.conf || + sed -i -e 's/^\(\[git-for-windows\)\(\]\)$/\1-'"$arch"'\2/' etc/pacman.conf + + ! grep -q wingit.blob.core.windows.net etc/pacman.conf || + sed -i -e '/https:\/\/wingit\.blob\.core\.windows\.net\//{ + s|x86-64|x86_64| + s|https://[^/]*|https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads| + }' etc/pacman.conf + grep -q git-for-windows[^-] etc/pacman.conf || - sed -i -e '/^\[mingw32\]/i[git-for-windows]\nServer = https://wingit.blob.core.windows.net/'$arch'\n' etc/pacman.conf + sed -i -e '/^\[mingw32\]/i[git-for-windows-'"$arch"']\nServer = https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/'$arch'\n' etc/pacman.conf ! grep -A2 git-for-windows[^-] etc/pacman.conf | grep -q '^SigLevel = Optional' || - sed -i -e '/\[git-for-windows\]/{N;N;s/\nSigLevel = Optional//}' \ + sed -i -e '/\[git-for-windows-'"$arch"'\]/{N;N;s/\nSigLevel = Optional//}' \ etc/pacman.conf grep -q "$otherpacman" etc/pacman.conf || - sed -i -e '/^\[mingw32\]/i['$otherpacman']\nServer = https://wingit.blob.core.windows.net/'$otherarch'\n' etc/pacman.conf + sed -i -e '/^\[mingw32\]/i['$otherpacman']\nServer = https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/'$otherarch'\n' etc/pacman.conf test -z "$(find /clangarm64 -type f -print -quit 2>/dev/null)" || # if /clangarm64 exists and contains at least one file grep -q "git-for-windows-aarch64" etc/pacman.conf || # then add Git for Windows' aarch64 repository (unless it's already added) - sed -i -e '/^\[clangarm64]/i[git-for-windows-aarch64]\nServer = https://wingit.blob.core.windows.net/aarch64\n' etc/pacman.conf + sed -i -e '/^\[clangarm64]/i[git-for-windows-aarch64]\nServer = https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/aarch64\n' etc/pacman.conf ! grep -q 'https://dl.bintray.com/\$repo/pacman/\$arch' etc/pacman.conf || sed -i -e 's/https:\/\/dl\.bintray\.com\/\$repo\/pacman\/\$arch/https:\/\/wingit.blob.core.windows.net\/'$arch'/g' etc/pacman.conf From f2b7fddfadc3d9d8312607d862c354cb0149d59f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 9 May 2025 14:16:41 +0200 Subject: [PATCH 3/3] please.sh bundle-pdbs: switch to new Pacman repo Signed-off-by: Johannes Schindelin --- please.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/please.sh b/please.sh index c5eaac3d5d..5585c7904c 100755 --- a/please.sh +++ b/please.sh @@ -2792,7 +2792,7 @@ bundle_pdbs () { # [--directory=] [-- "${this_script_path%/*}")/}"cached-source-packages test -n "$unpack" || unpack=$dir/.unpack - url=https://wingit.blob.core.windows.net + url=https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads mkdir -p "$dir" || die "Could not create '%s'\n" "$dir" @@ -2803,7 +2803,7 @@ bundle_pdbs () { # [--directory=] [-- case $arch in x86_64) - oarch=x86-64 + oarch=x86_64 pacman_arch=x86_64 artifact_suffix=64-bit ;;