From e772d0d612aa250af0026f7bb8d409a06288b8b7 Mon Sep 17 00:00:00 2001 From: Jeff Hostetler Date: Tue, 26 Mar 2024 10:14:55 -0400 Subject: [PATCH 1/2] macos-installer/Makefile: debug dump linkage of build targets Run `otool -L` on each of the major executables and print the name of the CPU architecture(s) and the name and version of the referenced dynamic libraries. In a later commit, we might want to verify that certain minimim versions were linked or that there are no unexpected third-party libraries in the linkage (such as an unexpected homebrew). Signed-off-by: Jeff Hostetler --- .github/macos-installer/Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/macos-installer/Makefile b/.github/macos-installer/Makefile index 9c5de0b5ddec7e..1a06f6200e62dc 100644 --- a/.github/macos-installer/Makefile +++ b/.github/macos-installer/Makefile @@ -45,6 +45,20 @@ $(BUILD_DIR)/git-$(VERSION)/osx-built-keychain: $(BUILD_DIR)/git-$(VERSION)/osx-built: [ -d $(DESTDIR)$(GIT_PREFIX) ] && $(SUDO) rm -rf $(DESTDIR) || echo ok cd $(BUILD_DIR)/git-$(VERSION); $(SUBMAKE) -j $(CORES) all strip + echo "================" + echo "Dumping Linkage" + cd $(BUILD_DIR)/git-$(VERSION); ./git version + echo "====" + cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git + echo "====" + cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-http-fetch + echo "====" + cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-http-push + echo "====" + cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-remote-http + echo "====" + cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-gvfs-helper + echo "================" touch $@ $(BUILD_DIR)/git-$(VERSION)/osx-installed-bin: $(BUILD_DIR)/git-$(VERSION)/osx-built $(BUILD_DIR)/git-$(VERSION)/osx-built-keychain From f4d3ebee5efaaf5f738babe03dabf811e1743b79 Mon Sep 17 00:00:00 2001 From: Jeff Hostetler Date: Tue, 26 Mar 2024 10:43:46 -0400 Subject: [PATCH 2/2] workflow/build-git-installer: use OS supplied libcurl Stop building custom universal libcurl dylib and let Git binaries use the version installed on the OS, like we do for other libraries. Signed-off-by: Jeff Hostetler --- .github/workflows/build-git-installers.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-git-installers.yml b/.github/workflows/build-git-installers.yml index fbcd49d7477636..cfcb220f4d4766 100644 --- a/.github/workflows/build-git-installers.yml +++ b/.github/workflows/build-git-installers.yml @@ -325,15 +325,14 @@ jobs: # Install x86_64 packages arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - arch -x86_64 /usr/local/bin/brew install gettext curl + arch -x86_64 /usr/local/bin/brew install gettext # Install arm64 packages brew install automake asciidoc xmlto docbook brew link --force gettext - # Make universal gettext and curl library + # Make universal gettext library lipo -create -output libintl.a /usr/local/opt/gettext/lib/libintl.a /opt/homebrew/opt/gettext/lib/libintl.a - lipo -create -output libcurl.dylib /opt/homebrew/opt/curl/lib/libcurl.4.dylib /usr/local/opt/curl/lib/libcurl.4.dylib - name: Set up signing/notarization infrastructure env: @@ -412,9 +411,9 @@ jobs: LDFLAGS = -L"$(pwd)" EOF - # Configure the Git build to pick up the universal `libcurl.dylib` + # Configure the Git to use the OS supplied libcurl. cat >>git/config.mak <