Skip to content

Commit

Permalink
Bump git 2.45.2 → 2.47.0 (#1708)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut authored Nov 12, 2024
1 parent 97c8b6d commit 0f80307
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 4 deletions.
9 changes: 7 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,14 @@ RUN manylinux-entrypoint /build_scripts/install-build-packages.sh


FROM build_base AS build_git
COPY build_scripts/build-curl.sh /build_scripts/
RUN export CURL_ROOT=curl-8.11.0 && \
export CURL_HASH=264537d90e58d2b09dddc50944baf3c38e7089151c8986715e2aaeaaf2b8118f && \
export CURL_DOWNLOAD_URL=https://curl.haxx.se/download && \
manylinux-entrypoint /build_scripts/build-curl.sh
COPY build_scripts/build-git.sh /build_scripts/
RUN export GIT_ROOT=git-2.45.2 && \
export GIT_HASH=98b26090ed667099a3691b93698d1e213e1ded73d36a2fde7e9125fce28ba234 && \
RUN export GIT_ROOT=git-2.47.0 && \
export GIT_HASH=a84a7917e0ab608312834413f01fc01edc7844f9f9002ba69f3b4f4bcb8d937a && \
export GIT_DOWNLOAD_URL=https://www.kernel.org/pub/software/scm/git && \
manylinux-entrypoint /build_scripts/build-git.sh

Expand Down
55 changes: 55 additions & 0 deletions docker/build_scripts/build-curl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash
# Top-level build script called from Dockerfile

# Stop at any error, show all commands
set -exuo pipefail

# Get script directory
MY_DIR=$(dirname "${BASH_SOURCE[0]}")

# Get build utilities
source $MY_DIR/build_utils.sh

# Install a more recent curl
check_var ${CURL_ROOT}
check_var ${CURL_HASH}
check_var ${CURL_DOWNLOAD_URL}

# Only needed on manylinux2014
if [ "${AUDITWHEEL_POLICY}" != "manylinux2014" ]; then
echo "skipping installation of ${CURL_ROOT}"
exit 0
fi

if which yum; then
yum erase -y curl-devel
else
apk del curl-dev
fi

SO_COMPAT=4
PREFIX=/opt/_internal/curl-${SO_COMPAT}

fetch_source ${CURL_ROOT}.tar.gz ${CURL_DOWNLOAD_URL}
check_sha256sum ${CURL_ROOT}.tar.gz ${CURL_HASH}
tar -xzf ${CURL_ROOT}.tar.gz
pushd ${CURL_ROOT}
./configure --prefix=${PREFIX} --disable-static --without-libpsl --with-openssl CPPFLAGS="${MANYLINUX_CPPFLAGS}" CFLAGS="${MANYLINUX_CFLAGS}" CXXFLAGS="${MANYLINUX_CXXFLAGS}" LDFLAGS="${MANYLINUX_LDFLAGS} -Wl,-rpath=\$(LIBRPATH)" > /dev/null
make > /dev/null
make install > /dev/null
popd
rm -rf ${CURL_ROOT} ${CURL_ROOT}.tar.gz ${PREFIX}/share/man

if [ ! -f ${PREFIX}/lib/libcurl.so.${SO_COMPAT} ]; then
echo "please update SO_COMPAT"
ls -al ${PREFIX}/lib
exit 1
fi

strip_ ${PREFIX}

${PREFIX}/bin/curl --version
${PREFIX}/bin/curl-config --features

mkdir -p /manylinux-rootfs/${PREFIX}/lib
cp -f ${PREFIX}/lib/libcurl.so.${SO_COMPAT} /manylinux-rootfs/${PREFIX}/lib/
8 changes: 8 additions & 0 deletions docker/build_scripts/build-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
export NO_UNCOMPRESS2=1
fi

if [ -d /opt/_internal ]; then
CURL_PREFIX=$(find /opt/_internal -maxdepth 1 -name 'curl-*')
if [ "${CURL_PREFIX}" != "" ]; then
export CURLDIR=${CURL_PREFIX}
export CURL_LDFLAGS="-Wl,-rpath=${CURL_PREFIX}/lib $(${CURL_PREFIX}/bin/curl-config --libs)"
fi
fi

# Install newest git
check_var ${GIT_ROOT}
check_var ${GIT_HASH}
Expand Down
4 changes: 2 additions & 2 deletions tools/update_native_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ def _update_with_root(tool, dry_run):
"libtool": "autotools-mirror/libtool",
"git": "git/git",
"openssl": "openssl/openssl",
"curl": "curl/curl",
}
major = {
"openssl": "3.0",
"git": "2.45", # 2.46+ can't build on CentOS 7
}
only = {
"autoconf": r"~v?[0-9]+\.[0-9]+(\.[0-9]+)?$",
Expand Down Expand Up @@ -196,7 +196,7 @@ def main():
_update_cpython(args.dry_run)
_update_sqlite(args.dry_run)
_update_tcltk(args.dry_run)
for tool in ["autoconf", "automake", "libtool", "git", "openssl"]:
for tool in ["autoconf", "automake", "libtool", "git", "openssl", "curl"]:
_update_with_root(tool, args.dry_run)
for tool in ["libxcrypt"]:
_update_with_gh(tool, args.dry_run)
Expand Down

0 comments on commit 0f80307

Please sign in to comment.