Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Neal Gompa <ngompa13@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: 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>,
	 WireGuard mailing list <wireguard@lists.zx2c4.com>,
	Carl George <carl@redhat.com>
Subject: Re: Adding Debian, Ubuntu, OpenSUSE, RHEL, CentOS kernels to WireGuard CI: Seeking URLs
Date: Sat, 23 May 2020 20:20:35 -0400	[thread overview]
Message-ID: <CAEg-Je9S3VaTxQSxiCrL_0odK3D1T=MeQ6kcaXBz=ouO4yQK5g@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9rOs221DN_KC4N0MJ+L9grX9Yx1fjypKM9qT-ixgo9oHA@mail.gmail.com>

On Sat, May 23, 2020 at 8:01 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> On Sat, May 23, 2020 at 5:50 AM Neal Gompa <ngompa13@gmail.com> wrote:
> >
> > On Sat, May 23, 2020 at 3:21 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> > >
> > > Hi Neal,
> > >
> > > Thanks for these very helpful instructions. In trying to implement
> > > this, one snag I encountered was that the .src.rpm file has inside of
> > > it the linux-{version}.tar.xz file that I actually want. Is there
> > > anywhere on the internet that hosts these .tar.xz files directly?
> > >
> >
> > There *is*, but that starts getting into using the CentOS Git system
> > more directly. Per your original email, you weren't interested in that
> > path, so I didn't go there.
>
> Well, one trick is that most web git viewers (such as cgit) can
> produce a tarball on the fly from a URL. Something like this exist
> here?

So, CentOS uses a Dist-Git[1] system, which means the part that is
actually tracked in git is the packaging files, and there's an
associated binary repo reference stored in the Git repo for fetching
binary artifacts. Dist-Git is the common ancestor to virtually all
current approaches to storing binaries efficiently alongside a Git
repo (Git-Annex and Git LFS came much later).

It seems it's possible to do this without having to use Git itself
(which is better than with git-annex and git-lfs), but it's a bit
cumbersome...

The way that you'd fetch the tarball in this scenario would be to
something like the following:

1. Get the tags via API, but with commits:

$ curl --silent --header "Content-Type: application/json" \
https://git.centos.org/api/0/rpms/kernel/git/tags?with_commits=true \
| jq '.["tags"] '

This gives you now a JSON dictionary with the tags as keys and the
associated commit as values.

2. Get the corresponding commit and fetch the .kernel.metadata file
containing the lookaside references:

$ curl --silent
https://git.centos.org/rpms/kernel/raw/${kernel_tag_commit}/f/.kernel.metadata \
> kernel_sources

3. Fetch the source matching to your kernel source package:

$ wget https://git.centos.org/sources/kernel/${rel}/${kernel_src_checksum} \
--output-document=${kernel_src_filename}

The $kernel_src_checksum and $kernel_src_filename would be populated
from the entries in the kernel_sources files you downloaded earlier.

Note: $rel is either "c7" or "c8" depending on which one you're trying to get.


[1]: https://github.com/release-engineering/dist-git





--
真実はいつも一つ!/ Always, there's only one truth!

  reply	other threads:[~2020-05-24  2:15 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
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 [this message]
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='CAEg-Je9S3VaTxQSxiCrL_0odK3D1T=MeQ6kcaXBz=ouO4yQK5g@mail.gmail.com' \
    --to=ngompa13@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=apw@canonical.com \
    --cc=carl@redhat.com \
    --cc=dkg@fifthhorseman.net \
    --cc=joe@solidadmin.com \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=mardnh@gmx.de \
    --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).