Skip to content

Switch to the new Pacman repository #615

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

Merged
merged 3 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion git-extra/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
21 changes: 15 additions & 6 deletions git-extra/git-extra.install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 15 additions & 6 deletions git-extra/git-extra.install.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions please.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2792,7 +2792,7 @@ bundle_pdbs () { # [--directory=<artifacts-directory] [--unpack=<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"
Expand All @@ -2803,7 +2803,7 @@ bundle_pdbs () { # [--directory=<artifacts-directory] [--unpack=<directory>] [--

case $arch in
x86_64)
oarch=x86-64
oarch=x86_64
pacman_arch=x86_64
artifact_suffix=64-bit
;;
Expand Down