From 96abdaf3a88b1c6df6d0c5c3ff87bdc7c0eb58ef Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Mon, 24 Aug 2020 11:16:11 -0400 Subject: [PATCH 1/2] xbps-src: allow JSON in update_check The `update_check` function restricts content types from sites that provide version lists. Adding `application/json` as an accepted type allows querying sites like https://api.github.com/repos///tags which provide more complete listings of tags than the default locations that return HTML. This can be important for projects that provide a large number of prerelease tarballs, because they can flood the default tag or release pages and prevent proper version detection. --- common/xbps-src/shutils/update_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh index b450c57beea..7112c2de8b4 100644 --- a/common/xbps-src/shutils/update_check.sh +++ b/common/xbps-src/shutils/update_check.sh @@ -161,7 +161,7 @@ update_check() { if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then echo "fetching $url" 1>&2 fi - curl -H 'Accept: text/html,application/xhtml+xml,application/xml,text/plain,application/rss+xml' -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$url" | + curl -H 'Accept: text/html,application/xhtml+xml,application/xml,text/plain,application/rss+xml,application/json' -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$url" | grep -Po -i "$rx" fetchedurls[$url]=yes done | From a0fd88a0ee4d2148288be96fe489dc7e3742c25a Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Mon, 24 Aug 2020 11:19:58 -0400 Subject: [PATCH 2/2] python3-bokeh: use api.github.com for complete version listing --- srcpkgs/python3-bokeh/update | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 srcpkgs/python3-bokeh/update diff --git a/srcpkgs/python3-bokeh/update b/srcpkgs/python3-bokeh/update new file mode 100644 index 00000000000..4d9db4290e9 --- /dev/null +++ b/srcpkgs/python3-bokeh/update @@ -0,0 +1,2 @@ +site="https://api.github.com/repos/bokeh/bokeh/tags" +pattern='"name":\s*"\K[0-9.]+(?=")'