public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Quentin Schulz" <quentin.schulz@cherry.de>,
	<docs@lists.yoctoproject.org>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [docs] [yocto-docs PATCH] ref-manual: classes: bin_package: fix SRC_URI example
Date: Tue, 19 Nov 2024 17:23:55 +0100	[thread overview]
Message-ID: <D5QALZQ41WNU.3DHEEMS149GUY@bootlin.com> (raw)
In-Reply-To: <82c3cacd-edcc-4385-8403-3e997e2650fd@cherry.de>

Hi Quentin,

On Tue Nov 19, 2024 at 4:15 PM CET, Quentin Schulz wrote:
[...]
>>>> -      SRC_URI = "git://example.com/downloads/somepackage.rpm;branch=main;subpath=${BP}"
>>>> +      SRC_URI = "git://example.com/downloads/somepackage.rpm;branch=main;subdir=${BP}"
>>>>    
>>>
>>> This is not enough, subpath is mentioned in the note admonition just
>>> above a few times, those need to be fixed as well.
>>>
>>> Additionally the wording is weird for the bin_package class.
>>>
>>> "class is a helper class for recipes that extract the contents of a
>>> binary package (e.g. an RPM)"
>>> [...]
>>> "For RPMs and other packages that do not contain a subdirectory,"
>>>
>>> Maybe we should use another example of a binary package (e.g. a .deb
>>> package) in the first sentence?
>>>
>>> Also I am not entirely sure what this example is supposed to show.
>>>
>>> SRC_URI =
>>> "git://example.com/downloads/somepackage.rpm;branch=main;subpath=${BP}"
>>>
>>> This is very confusing to me, is this really a somepackage.rpm **git**
>>> repo? or was this a mix between fetching via git and unpacking an RPM?
>>>
>>> I'm wondering what we were supposed to show with this example. Is it
>>> about fetching an RPM from a git repo and only extracting a part of that
>>> RPM? Is that even possible? If so, we probably want a combination of
>>> subpath and subdir? subdir for the path internal to the repo to the RPM
>>> and subpath for the path internal to the RPM to extract?
>> 
>> Actually I think I missed the point of the class description at first. It seems
>> to document how to fetch a subpath of a git repository containing rpm files…
>
> Would the content of the rpm files be extracted if they are fetched by 
> the git fetcher?

Actually, no! I just tried. You can't just pass a path to a file inside a git
repo to the git fetcher. You can pass the git repo URL, but the content of the
git repo won't be extracted, the git fetcher won't do that by itself.

The bin_package class expects content of the rpm/tarball/else to already be
extracted in S before installing it in D.

So the fetcher should be selected with that in mind.

>> Which makes me wonder: how often do you need to fetch binary from git
>> repositories? Probably not often.
>> 
>
> Probably not, but not THAT uncommon. For example Rockchip provides the 
> libmali binaries mostly via deb packages (they provide "sources" but I 
> was unable to compile them into something that works, so....).

I would expect most git hosting service to provide HTTP link to files, so using
https://...<file>.rpm is probably possible in most cases?


Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


      reply	other threads:[~2024-11-19 16:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18  8:46 [yocto-docs PATCH] ref-manual: classes: bin_package: fix SRC_URI example Antonin Godard
2024-11-19  9:38 ` [docs] " Quentin Schulz
2024-11-19 15:05   ` Antonin Godard
2024-11-19 15:15     ` Quentin Schulz
2024-11-19 16:23       ` Antonin Godard [this message]

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=D5QALZQ41WNU.3DHEEMS149GUY@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=quentin.schulz@cherry.de \
    --cc=thomas.petazzoni@bootlin.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