From a10ddf8e144d6354131e1b3612743834702854df Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Thu, 16 May 2024 19:13:08 +0200 Subject: [PATCH 1/3] git: switch from GfW's asciidoctor-extensions to MSYS2's asciidoctor While enabling clangarm64 support on GfW's `mingw-w64-asciidoctor-extensions` package, we realized that the extensions are likely not needed anymore, because the Git project added its own `Documentation/asciidoctor-extensions.rb` back in 2017. Let's switch to the MSYS2-maintaned `mingw-w64-asciidoctor` instead, so we don't have to maintain our own package anymore. Ref: https://github.com/git-for-windows/MINGW-packages/pull/118 Ref: https://github.com/git/git/commit/55d2d812e49aece049b73682ad5980ea84e23839 Signed-off-by: Dennis Ameling --- mingw-w64-git/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mingw-w64-git/PKGBUILD b/mingw-w64-git/PKGBUILD index 26ba88fd2bd21..67f21d864e273 100644 --- a/mingw-w64-git/PKGBUILD +++ b/mingw-w64-git/PKGBUILD @@ -17,7 +17,7 @@ license=('GPL2') options=() makedepends=('python' 'less' 'openssh' 'patch' 'make' 'tar' 'diffutils' - 'ca-certificates' 'xmlto' "${MINGW_PACKAGE_PREFIX}-asciidoctor-extensions") + 'ca-certificates' 'xmlto' "${MINGW_PACKAGE_PREFIX}-asciidoctor") install=git.install case "$(printf "%s\n%s\n" "$pkgver" "2.18.0" | sort -V)" in @@ -101,7 +101,7 @@ fi if test CLANGARM64 = "$MSYSTEM" then # Asciidoctor depends on Ruby which is not available for CLANGARM64 yet - makedepends=("${makedepends[@]/${MINGW_PACKAGE_PREFIX}-asciidoctor-extensions}") + makedepends=("${makedepends[@]/${MINGW_PACKAGE_PREFIX}-asciidoctor}") USE_ASCIIDOCTOR= fi From e51348ad1ab1563b30b4443b824c6d2976d33720 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Thu, 16 May 2024 19:15:24 +0200 Subject: [PATCH 2/3] mingw-w64-git: enable asciidoctor on arm64 Ruby support was added to clangarm64 in November 2023, so we can now enable asciidoctor on ARM64 as well. Ref: https://github.com/msys2/MINGW-packages/pull/19179 Ref: https://github.com/git-for-windows/MINGW-packages/pull/118 Signed-off-by: Dennis Ameling --- mingw-w64-git/PKGBUILD | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/mingw-w64-git/PKGBUILD b/mingw-w64-git/PKGBUILD index 67f21d864e273..9a3ea670d53da 100644 --- a/mingw-w64-git/PKGBUILD +++ b/mingw-w64-git/PKGBUILD @@ -74,7 +74,6 @@ sha256sums=('SKIP' '7413506c59d25621e475aa45447993748332c72cfbb4cf94cce6bee6f1218a09' '6d83e1cb1acdb6eb1f2d5cb9299298e57680f5ca43d43c3e67c9da17f21b9b01') -USE_ASCIIDOCTOR="YesPlease" COMPAT_CFLAGS= STRIP= STRIP_OPTS= @@ -98,13 +97,6 @@ else options+=('strip') fi -if test CLANGARM64 = "$MSYSTEM" -then - # Asciidoctor depends on Ruby which is not available for CLANGARM64 yet - makedepends=("${makedepends[@]/${MINGW_PACKAGE_PREFIX}-asciidoctor}") - USE_ASCIIDOCTOR= -fi - pkgver() { cd "$srcdir/git" basever=${tag%.windows.*} @@ -130,7 +122,7 @@ prepare () { cd "$srcdir/git" && cat >config.mak <<-EOF -USE_ASCIIDOCTOR = $USE_ASCIIDOCTOR +USE_ASCIIDOCTOR = YesPlease COMPAT_CFLAGS += $COMPAT_CFLAGS LDFLAGS = $LDFLAGS EOF From 0546109428e866c5ff1bfd1482e03f80a55b58b8 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 12 Jun 2024 17:41:01 +0200 Subject: [PATCH 3/3] ci: implement a (temporary) workaround to help switching to `asciidoctor` We want to switch from using `asciidoctor-extensions` to using regular `asciidoctor` instead (the custom macros are no longer needed). To that end, we want to install `mingw-w64-asciidoctor`, but that would fail due to a conflict with the `mingw-w64-asciidoctor-extensions` package: error: failed to commit transaction (conflicting files) mingw-w64-x86_64-asciidoctor: /mingw64/bin/asciidoctor exists in filesystem Let's work around that by explicitly removing the latter package as needed. Signed-off-by: Johannes Schindelin --- .github/workflows/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd3194118bd51..7502b1a967bac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,6 +59,24 @@ jobs: # reduce time required to install packages by disabling pacman's disk space checking sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf && + # help git-sdk-arm64 switch from `asciidoc` to `asciidoctor` + if test mingw-w64-git = '${{ matrix.directory }}' + then + packages=$(ls -d /var/lib/pacman/local/mingw-w64-*-asciidoctor-extensions-* 2>/dev/null | + sed -e 's|-[0-9].*||' -e 's|.*/||') + if test -n "$packages" + then + pacman -R --noconfirm $packages + fi && + for prefix in /mingw32 /mingw64 /clangarm64 + do + if test -x $prefix/bin/gem + then + PATH=$prefix/bin:$PATH gem uninstall asciidoctor + fi + done + fi && + top_dir=$PWD && cd "${{ matrix.directory }}" && MAKEFLAGS=-j8 makepkg-mingw -s --noconfirm &&