From 09b9f6ee71ee6668ba8ac1d78309cb0831bfcb30 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 2 Dec 2021 14:51:53 +0100 Subject: [PATCH 1/2] .github: Try to get a lwn link for kernel release --- .../.github/workflows/kernel-apply-patch.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh index 9481ddc664..e11e8c5620 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh @@ -36,7 +36,17 @@ done popd >/dev/null || exit -URL="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tag/?h=v${VERSION_NEW}" +if ! curl -sA 'Chrome' -L 'http://www.google.com/search?hl=en&q=site%3Alwn.net+linux+'"${VERSION_NEW}" -o search.html; then + echo 'curl failed' + touch search.html +fi +# can't use grep -m 1 -o … to replace head -n 1, because all the links +# seem to happen in one line, so grep prints all the links in the line +URL=$({ grep -o 'https://lwn.net/Articles/[0-9]\+' search.html || true ; } | head -n 1) +if [[ ! "${URL}" ]]; then + URL="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tag/?h=v${VERSION_NEW}" +fi +rm search.html generate_update_changelog 'Linux' "${VERSION_NEW}" "${URL}" 'linux' From ac0c89da4535c336ed14f1df4ac3e5cbd480188e Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 3 Dec 2021 08:52:09 +0100 Subject: [PATCH 2/2] .github: Fail curl in kernel job on server errors too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Kai Lüke --- .../coreos-overlay/.github/workflows/kernel-apply-patch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh index e11e8c5620..e093acae88 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/kernel-apply-patch.sh @@ -36,7 +36,7 @@ done popd >/dev/null || exit -if ! curl -sA 'Chrome' -L 'http://www.google.com/search?hl=en&q=site%3Alwn.net+linux+'"${VERSION_NEW}" -o search.html; then +if ! curl -sfA 'Chrome' -L 'http://www.google.com/search?hl=en&q=site%3Alwn.net+linux+'"${VERSION_NEW}" -o search.html; then echo 'curl failed' touch search.html fi