[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fetching kernel packages



On Thu, Apr 20, 2017 at 2:26 AM, Paul Wise <pabs@debian.org> wrote:
> On Wed, Apr 19, 2017 at 11:22 PM, John Floren wrote:
>
>> I don't find anything. I'm probably fundamentally missing something;
>
> The API returns JSON so you need something like jq instead of grep, or
> a programming language with native JSON support.

grep should nevertheless be able to discover if the sequence
"linux-image" appears in the output, and since it did not I was
looking for guidance on how to find it.

> The /mr/package/ API is about source packages not binary packages.
>
> The Linux kernel has had a lot of different package names over the years.
>
> There isn't yet an API to list all binary packages AFAICT.
>
>> can anyone help me figure out how to list/fetch every kernel .deb from
>> the repo?
>
> What is your goal here? Just downloading old binary packages doesn't
> sound useful.

I need to determine specific configuration options that were used to
compile the Debian kernels over time, because those determine offsets
within kernel structures, which is important for some experimentation
I'm doing. I wanted to pull /boot/config-<uname> from each package.

> Due to the naming issue and the missing binary package list API, this
> is non-trivial. You will need to get the list of all source packages,
> develop some heuristics/globs (something like this linux linux-*
> kernel-*) to find the Linux ones, manually filter out the ones that
> match but aren't Linux, list all binary packages for each of them,
> match those against the desired architecture and download the results.
>

After some experimentation with Ubuntu kernels, I realized that the
Debian/Ubuntu kernel versioning scheme means I actually want to fetch
the kernel *source* packages, because matching up a Debian kernel
version to a commit on Linus's git tree is Non Trivial.

I've already fetched a mess of Ubuntu kernel source .debs from
archive.ubuntu.com and set up a script to unpack the deb, make a tweak
to the source, and do the early compilation needed to generate the
offsets I need. I will play around with the API some more today and
see if I can get the Debian source packages I need from that,
otherwise I may have to fall back onto scripting curl.


john


Reply to: