diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-10-05 08:57:18 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-10-05 16:58:09 +0300 |
commit | 9dc6278c7b4ef41810b264ca99b597634511bda1 (patch) | |
tree | 3a96db8a7bba4f91fd017618094860d7f82b0381 /libfetch/errlist.sh | |
parent | 8f0938a056b3ccfc5b6971d9637e2188e639d8a3 (diff) | |
download | apk-tools-9dc6278c7b4ef41810b264ca99b597634511bda1.tar.gz apk-tools-9dc6278c7b4ef41810b264ca99b597634511bda1.tar.bz2 apk-tools-9dc6278c7b4ef41810b264ca99b597634511bda1.tar.xz apk-tools-9dc6278c7b4ef41810b264ca99b597634511bda1.zip |
import libfetch-2.38 from NetBSD
ftp://ftp.fu-berlin.de/unix/NetBSD/packages/current-src/pkgsrc/net/libfetch/files
libfetch comes (at least) in netbsd and freebsd flavors which
differing functionality. Alpine and Arch package netbsd one,
but it's not widely packaged across other distributions.
We need NetBSD version as it does not use funopen(3) which is not
supported in musl, and supports connection pooling.
FreeBSD seems to be the orignal and better maintained version
with support for SSL CAs, client certificate authentication,
proxy authentication, and improved http redirect handling.
So this imports NetBSD version, and future commits will pick up
the needed improvements from FreeBSD tree.
Incidentally, this also fixes #7857 and likes for good.
Diffstat (limited to 'libfetch/errlist.sh')
-rwxr-xr-x | libfetch/errlist.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libfetch/errlist.sh b/libfetch/errlist.sh new file mode 100755 index 0000000..84779fe --- /dev/null +++ b/libfetch/errlist.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# $NetBSD: errlist.sh,v 1.2 2008/10/06 12:58:29 joerg Exp $ + +printf "static struct fetcherr $1[] = {\n" +while read code type msg; do + [ "${code}" = "#" ] && continue + printf "\t{ ${code}, FETCH_${type}, \"${msg}\" },\n" +done < $3 + +printf "\t{ -1, FETCH_UNKNOWN, \"Unknown $2 error\" }\n" +printf "};\n" |