From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: unit193@ubuntu.com, Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
Andy Whitcroft <apw@canonical.com>,
Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>,
Martin Hauke <mardnh@gmx.de>, Joe Doss <joe@solidadmin.com>,
Neal Gompa <ngompa@fedoraproject.org>,
WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Adding Debian, Ubuntu, OpenSUSE, RHEL, CentOS kernels to WireGuard CI: Seeking URLs
Date: Fri, 22 May 2020 02:44:17 -0600 [thread overview]
Message-ID: <20200522084417.GA1311327@zx2c4.com> (raw)
In-Reply-To: <CAHmME9oX+8HoK_wAoc5oR9rWenYz4ki8EK+NebQEV2ALZDSrdg@mail.gmail.com>
On Fri, May 22, 2020 at 02:04:58AM -0600, Jason A. Donenfeld wrote:
> I'd like to put these on build.wireguard.com to mitigate breakage. In
> order to make this happen, I'll need two things:
> - A URL I can scape that will give me the latest kernel versions for
> relevant distros.
> - A URL I can construct using a selected version to download a boring
> kernel source tarball.
> I would prefer to not involve git, if possible, and for these URLs to
> point to the sources for actual kernels that are shipping as the
> standard latest-kernel for each of the above releases.
Here's a bash example that achieves part 1, to give a more concrete
idea of what I'm after:
declare -A UBUNTU_SERIES_KERNELS
while read -r line; do
[[ $line =~ ^\ *linux\ +\|\ ([0-9.-]+)\ +\|\ ([a-z]+)(-[a-z]+)?\ +\|\ source$ ]] || continue
version="${BASH_REMATCH[1]}" series="${BASH_REMATCH[2]}" repo="${BASH_REMATCH[3]}"
[[ $repo != -proposed ]] || continue
read -r smaller < <(printf '%s\n3.10\n' "$version" | sort -V)
[[ $smaller == 3.10 ]] || continue
UBUNTU_SERIES_KERNELS[$series]+="$version "
done < <(curl -Ls https://people.canonical.com/~ubuntu-archive/madison.cgi?package=linux&a=&c=&s=)
UBUNTU_KERNELS=( )
for series in "${!UBUNTU_SERIES_KERNELS[@]}"; do
read -r kernel < <(sort -Vur <<<"${UBUNTU_SERIES_KERNELS[$series]// /$'\n'}")
[[ -n $kernel ]] && UBUNTU_KERNELS+=( "$kernel" )
done
printf -- '- %s\n' "${UBUNTU_KERNELS[@]}"
The output of this script is something like:
- 4.15.0-101.102
- 5.4.0-26.30
- 5.4.0-31.35
- 4.4.0-179.209
- 3.13.0-170.220
- 5.3.0-53.47
- 5.0.0-38.41
The next step would be turning these version numbers into URLs to the
tarballs. Hopefully the team at Canonical can assist with providing
that.
Jason
next prev parent reply other threads:[~2020-05-22 8:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-22 8:04 Jason A. Donenfeld
2020-05-22 8:44 ` Jason A. Donenfeld [this message]
2020-05-23 5:59 ` Jason A. Donenfeld
2020-05-22 12:43 ` Georg Faerber
2020-05-23 12:31 ` Georg Faerber
2020-05-23 7:07 ` Neal Gompa
2020-05-23 7:21 ` Jason A. Donenfeld
2020-05-23 11:49 ` Neal Gompa
2020-05-24 0:01 ` Jason A. Donenfeld
2020-05-24 0:20 ` Neal Gompa
2020-05-24 1:10 ` Jason A. Donenfeld
2020-05-24 1:41 ` Jason A. Donenfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200522084417.GA1311327@zx2c4.com \
--to=jason@zx2c4.com \
--cc=apw@canonical.com \
--cc=dkg@fifthhorseman.net \
--cc=joe@solidadmin.com \
--cc=kernel-team@lists.ubuntu.com \
--cc=mardnh@gmx.de \
--cc=ngompa@fedoraproject.org \
--cc=unit193@ubuntu.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).