Skip to content

Commit

Permalink
mingw-w64-curl: update to 8.11.1
Browse files Browse the repository at this point in the history
drop the two backported regression fixes for ~/.netrc parsing as they're
part of curl 8.11.1. Backport another regression fix that restores the
fallback to ~/_netrc on Windows.

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
  • Loading branch information
rimrul committed Dec 16, 2024
1 parent 4f83a26 commit 6ebb895
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
26 changes: 26 additions & 0 deletions mingw-w64-curl/0003-netrc-regression.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 0439499170b4e5ad4d4b4679ad284b4aa4df16f1 Mon Sep 17 00:00:00 2001
From: Kevin Sun <kevin.sun@intel.com>
Date: Thu, 12 Dec 2024 17:35:12 -0800
Subject: [PATCH] netrc: restore _netrc fallback logic

Regression from 05977f4f75fd08837a877, shipped in 8.11.0

Fixes #15734
Closes #15735
---
lib/netrc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/netrc.c b/lib/netrc.c
index d5ee3c0fd564a8..056ea96a7c8010 100644
--- a/lib/netrc.c
+++ b/lib/netrc.c
@@ -390,7 +390,7 @@ int Curl_parsenetrc(struct store_netrc *store, const char *host,
retcode = parsenetrc(store, host, loginp, passwordp, filealloc);
free(filealloc);
#ifdef _WIN32
- if(retcode == NETRC_FILE_MISSING) {
+ if((retcode == NETRC_FILE_MISSING) || (retcode == NETRC_FAILED)) {
/* fallback to the old-style "_netrc" file */
filealloc = aprintf("%s%s_netrc", home, DIR_CHAR);
if(!filealloc) {
19 changes: 6 additions & 13 deletions mingw-w64-curl/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-${_realname}-gnutls"
"${MINGW_PACKAGE_PREFIX}-${_realname}-winssl")
pkgver=8.11.0
pkgrel=2
pkgver=8.11.1
pkgrel=1
pkgdesc="Command line tool and library for transferring data with URLs (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand Down Expand Up @@ -36,16 +36,14 @@ source=("https://github.com/curl/curl/releases/download/${_realname}-${pkgver//.
"pathtools.h"
"0001-Make-cURL-relocatable.patch"
"0002-Hack-make-relocation-work-inside-libexec-git-core-an.patch"
"netrc-regression-1.patch::https://github.com/curl/curl/commit/f5c616930b5cf148b1b2632da4f5963ff48bdf88.patch"
"netrc-regression-2.patch::https://github.com/curl/curl/commit/0cdde0fdfbeb8c35420f6d03fa4b77ed73497694.patch")
sha256sums=('c95d5a1368803729345a632ce42cceeefd5f09c3b4d9582f858f6779f4b8b254'
"0003-netrc-regression.patch")
sha256sums=('e9773ad1dfa21aedbfe8e1ef24c9478fa780b1b3d4f763c98dd04629b5e43485'
'SKIP'
'08209cbf1633fa92eae7e5d28f95f8df9d6184cc20fa878c99aec4709bb257fd'
'965d3921ec4fdeec94a2718bc2c85ce5e1a00ea0e499330a554074a7ae15dfc6'
'd34c9474a0b54d36497e58b4792699ef37cc8b043a4cd5daf287e1e33f660207'
'418b5619b924d17ac71066323b5540d86d4e8055cabab925ece185770e9d1906'
'708429a4e0b387dc9addc1f9166e07e5db22da42221887ddab9533c9e2bd1ca8'
'd817dd3746476bc513edd24a4f9a32674c3d5a04484bf80d894c1d2add67e8e2')
'19af1ecce5f14e6bb5e58f2dce07c94c1c8cfc23772a066e5f89f92e0dfd11c2')
validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg

if test -z "$WITHOUT_ALTERNATES"
Expand Down Expand Up @@ -90,18 +88,13 @@ prepare() {
cmp "${startdir}/../mingw-w64-pathtools/pathtools.h" "${srcdir}/pathtools.h"
} || exit 1

test ! -f "${srcdir}/netrc-regression-1.patch" ||
rm -f ${_realname}-${pkgver}/tests/data/test2309 \
${_realname}-${pkgver}/tests/libtest/lib2309.c

cd "${srcdir}/${_realname}-${pkgver}"
cp -fHv "${srcdir}"/pathtools.[ch] lib/

apply_patch_with_msg \
0001-Make-cURL-relocatable.patch \
0002-Hack-make-relocation-work-inside-libexec-git-core-an.patch \
netrc-regression-1.patch \
netrc-regression-2.patch
0003-netrc-regression.patch

autoreconf -vfi
}
Expand Down

0 comments on commit 6ebb895

Please sign in to comment.