WireGuard Archive on lore.kernel.org
 help / color / Atom feed
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
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

  reply index

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

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git