Skip to content

Commit

Permalink
Merge pull request #88 from lwthiker/use_curl_7_84
Browse files Browse the repository at this point in the history
Upgrade upstream curl version to 7.84.0
  • Loading branch information
lwthiker authored Jul 22, 2022
2 parents 9788522 + a8c0d14 commit 87fa6ca
Show file tree
Hide file tree
Showing 8 changed files with 427 additions and 449 deletions.
8 changes: 5 additions & 3 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ RUN cd ${NGHTTP2_VERSION} && \
make && make install

# Download curl.
ARG CURL_VERSION=curl-7.81.0
ARG CURL_VERSION=curl-7.84.0
RUN curl -o ${CURL_VERSION}.tar.xz https://curl.se/download/${CURL_VERSION}.tar.xz
RUN tar xf ${CURL_VERSION}.tar.xz

Expand All @@ -142,6 +142,7 @@ RUN cd ${CURL_VERSION} && \
--with-brotli=/build/brotli-${BROTLI_VERSION}/build/installed \
{{#firefox}}
--with-nss=/build/${NSS_VERSION}/dist/Release \
--with-nss-deprecated \
CFLAGS="-I/build/${NSS_VERSION}/dist/public/nss -I/build/${NSS_VERSION}/dist/Release/include/nspr" \
{{/firefox}}
{{#chrome}}
Expand Down Expand Up @@ -181,6 +182,7 @@ RUN cd ${CURL_VERSION} && \
--with-brotli=/build/brotli-${BROTLI_VERSION}/build/installed \
{{#firefox}}
--with-nss=/build/${NSS_VERSION}/dist/Release \
--with-nss-deprecated \
CFLAGS="-I/build/${NSS_VERSION}/dist/public/nss -I/build/${NSS_VERSION}/dist/Release/include/nspr" \
{{/firefox}}
{{#chrome}}
Expand All @@ -195,12 +197,12 @@ RUN cd ${CURL_VERSION} && \
RUN cp -d /build/install/lib/libcurl-impersonate* /build/out

{{#firefox}}
RUN ver=$(readlink -f curl-7.81.0/lib/.libs/libcurl-impersonate-ff.so | sed 's/.*so\.//') && \
RUN ver=$(readlink -f ${CURL_VERSION}/lib/.libs/libcurl-impersonate-ff.so | sed 's/.*so\.//') && \
major=$(echo -n $ver | cut -d'.' -f1) && \
ln -s "libcurl-impersonate-ff.so.$ver" "out/libcurl-impersonate.so.$ver" && \
{{/firefox}}
{{#chrome}}
RUN ver=$(readlink -f curl-7.81.0/lib/.libs/libcurl-impersonate-chrome.so | sed 's/.*so\.//') && \
RUN ver=$(readlink -f ${CURL_VERSION}/lib/.libs/libcurl-impersonate-chrome.so | sed 's/.*so\.//') && \
major=$(echo -n $ver | cut -d'.' -f1) && \
ln -s "libcurl-impersonate-chrome.so.$ver" "out/libcurl-impersonate.so.$ver" && \
{{/chrome}}
Expand Down
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NSS_URL := https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_77_RTM/src/ns
BORING_SSL_COMMIT := 3a667d10e94186fd503966f5638e134fe9fb4080
NGHTTP2_VERSION := nghttp2-1.46.0
NGHTTP2_URL := https://github.com/nghttp2/nghttp2/releases/download/v1.46.0/nghttp2-1.46.0.tar.bz2
CURL_VERSION := curl-7.81.0
CURL_VERSION := curl-7.84.0

brotli_install_dir := $(abspath brotli-$(BROTLI_VERSION)/out/installed)
brotli_static_libs := $(brotli_install_dir)/lib/libbrotlicommon-static.a $(brotli_install_dir)/lib/libbrotlidec-static.a
Expand Down Expand Up @@ -362,7 +362,7 @@ $(CURL_VERSION)/.firefox: $(firefox_libs) $(CURL_VERSION).tar.xz $(CURL_VERSION)
config_flags="--prefix=@prefix@"; \
config_flags+=" --with-nghttp2=$(nghttp2_install_dir)"; \
config_flags+=" --with-brotli=$(brotli_install_dir)"; \
config_flags+=" --with-nss=$(nss_install_dir)"; \
config_flags+=" --with-nss=$(nss_install_dir) --with-nss-deprecated"; \
config_flags+=" USE_CURL_SSLKEYLOGFILE=true"; \
if test "$(static_build)" = "yes"; then \
config_flags+=" --enable-static --disable-shared"; \
Expand Down
4 changes: 2 additions & 2 deletions chrome/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN cd ${NGHTTP2_VERSION} && \
make && make install

# Download curl.
ARG CURL_VERSION=curl-7.81.0
ARG CURL_VERSION=curl-7.84.0
RUN curl -o ${CURL_VERSION}.tar.xz https://curl.se/download/${CURL_VERSION}.tar.xz
RUN tar xf ${CURL_VERSION}.tar.xz

Expand Down Expand Up @@ -121,7 +121,7 @@ RUN cd ${CURL_VERSION} && \
# Copy libcurl-impersonate and symbolic links
RUN cp -d /build/install/lib/libcurl-impersonate* /build/out

RUN ver=$(readlink -f curl-7.81.0/lib/.libs/libcurl-impersonate-chrome.so | sed 's/.*so\.//') && \
RUN ver=$(readlink -f ${CURL_VERSION}/lib/.libs/libcurl-impersonate-chrome.so | sed 's/.*so\.//') && \
major=$(echo -n $ver | cut -d'.' -f1) && \
ln -s "libcurl-impersonate-chrome.so.$ver" "out/libcurl-impersonate.so.$ver" && \
ln -s "libcurl-impersonate.so.$ver" "out/libcurl-impersonate.so" && \
Expand Down
4 changes: 2 additions & 2 deletions chrome/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ RUN cd ${NGHTTP2_VERSION} && \
make && make install

# Download curl.
ARG CURL_VERSION=curl-7.81.0
ARG CURL_VERSION=curl-7.84.0
RUN curl -o ${CURL_VERSION}.tar.xz https://curl.se/download/${CURL_VERSION}.tar.xz
RUN tar xf ${CURL_VERSION}.tar.xz

Expand Down Expand Up @@ -118,7 +118,7 @@ RUN cd ${CURL_VERSION} && \
# Copy libcurl-impersonate and symbolic links
RUN cp -d /build/install/lib/libcurl-impersonate* /build/out

RUN ver=$(readlink -f curl-7.81.0/lib/.libs/libcurl-impersonate-chrome.so | sed 's/.*so\.//') && \
RUN ver=$(readlink -f ${CURL_VERSION}/lib/.libs/libcurl-impersonate-chrome.so | sed 's/.*so\.//') && \
major=$(echo -n $ver | cut -d'.' -f1) && \
ln -s "libcurl-impersonate-chrome.so.$ver" "out/libcurl-impersonate.so.$ver" && \
ln -s "libcurl-impersonate.so.$ver" "out/libcurl-impersonate.so" && \
Expand Down
Loading

0 comments on commit 87fa6ca

Please sign in to comment.