All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier-oss@weidmueller.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	Jasper Orschulko <Jasper.Orschulko@iris-sensing.com>,
	"jeanmarie.lemetayer@gmail.com" <jeanmarie.lemetayer@gmail.com>
Cc: "bitbake-devel@lists.openembedded.org"
	<bitbake-devel@lists.openembedded.org>,
	"martin@mko.dev" <martin@mko.dev>,
	Daniel Baumgart <Daniel.Baumgart@iris-sensing.com>
Subject: Re: [bitbake-devel] Improving npm(sw) fetcher & integration within Bitbake
Date: Mon, 8 Nov 2021 08:41:13 +0100	[thread overview]
Message-ID: <6c13452e-77cc-6cd5-8d3d-0e2128663286@weidmueller.com> (raw)
In-Reply-To: <5fb67154d576b74629e4836a86dcb5e479b73e67.camel@linuxfoundation.org>

Am 06.11.2021 um 11:06 schrieb Richard Purdie:
> On Fri, 2021-11-05 at 16:02 +0000, Jasper Orschulko wrote:
>> Thanks @all for your input.
>>
>> It seems like there is a lot to be considered. When it comes to under-
>> the-hood development, the yocto project is fairly new to Martin and
>> myself. The term "bitbake requirements" has been used more than once in
>> this conversation, yet I am currently not aware of any formal
>> requirements. You wouldn't happen to have some documentation on this by
>> any chance? A common understanding of this and the actual usecases for
>> npm would be great, before we go into further details on how a possible
>> solution might look like.
> 
> We've used that term as there is a set of things which the bitbake fetcher is
> expected to provide in terms of workflows and user experiences, effectively what
> is it's API. Sadly there isn't a formal document, just a long understanding of
> what this looks like. It isn't a piece of the project that people have wanted to
> change too often so writing such documentation hasn't been a priority.
> 
> I can try and briefly summarise the expectations I can think of in the list
> below and we should perhaps just put this as a text file in the fetcher
> directory of the codebase. If others see anything I'm missing please add to the
> list.
> 
> Just to be clear, we're not trying to be awkward about making changes, there is
> just a long history with this codebase and end users tend to get upset if we
> break the API. Different users do have very different use cases from the code.
> 
> 
> a) network access for sources is only expected to happen in the do_fetch step.
> This is not enforced or tested but is required so that we can:
> 
>    i) audit the sources used (i.e. for license/manifest reasons)
>    ii) support offline builds with a suitable cache
>    iii) allow work to continue even with downtime upstream
>    iv) allow for changes upstream in incompatible ways
>    v) allow rebuilding of the software in X years time
> 
> b) network access is not expected in do_unpack
> 
> c) you can take DL_DIR and use it as a mirror for offline builds
> 
> d) access to the network is only made when explicitly configured in recipes
>     (e.g. use of AUTOREV, or use of git tags which change revision)
> 
> e) fetcher output is deterministic
>     (i.e. if you fetch configuration XXX now it will match in future exactly in
>      a clean build with a new DL_DIR)
> 
> f) network access is expected to work with the standard linux proxy variables
>     so that access behind firewalls works (the fetcher sets these in the
>     environment but only in the do_fetch tasks)
> 
> g) access during parsing has to be minimal, a "git ls-remote" for an AUTOREV
>     git recipe might be ok but you can't expect to checkout a git tree
> 
> h) we need to provide revision information during parsing such that a version
>     for the recipe can be constructed.
> 
> i) versions are expected to be able to increase in a way which sorts allowing
>     package feeds to operate (see PR server required for git revisions to sort)
> 
> j) API to query for possible version upgrades of a url is highly desireable to
>     allow out automated upgrage code to function (it is implied this does always
>     have network access)
> 
> k) Where fixes or changes to behaviour in the fetcher are made, we ask that
>     test cases are added (run with "bitbake-selftest bb.tests.fetch"). We do
>     have fairly extensive test coverage of the fetcher as it is the only way
>     to track all of it's corner cases, it still doesn't give entire coverage
>     though sadly.
> 
> Not all fetchers support all features, autorev is optional and doesn't make
> sense for some. Upgrade detection means different things in different contexts
> too.

Thanks for the list and I would like to see that as part of the bitbake 
source tree.

> Also, I did realise the npm fetcher tests simply don't work anymore. They're not
> run as standard as our infrastructure didn't have npm on it to run the tests so
> they have bitrotted :(.

Is it possible to add the nodejs recipe to the core?



  parent reply	other threads:[~2021-11-08  7:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 12:29 Improving npm(sw) fetcher & integration within Bitbake Jasper Orschulko
2021-11-04 13:09 ` [bitbake-devel] " Alexander Kanavin
2021-11-06 16:58   ` Mike Crowe
2021-11-08  8:01     ` Stefan Herbrechtsmeier
2021-11-08 12:44       ` Jasper Orschulko
2021-11-11  7:51         ` Stefan Herbrechtsmeier
2021-11-04 23:15 ` Richard Purdie
2021-11-05  9:07   ` Stefan Herbrechtsmeier
2021-11-05 11:24     ` Jean-Marie Lemetayer
2021-11-05 16:02       ` Jasper Orschulko
2021-11-05 17:42         ` Alexander Kanavin
     [not found]         ` <5fb67154d576b74629e4836a86dcb5e479b73e67.camel@linuxfoundation.org>
2021-11-06 10:30           ` Konrad Weihmann
2021-11-08  7:41           ` Stefan Herbrechtsmeier [this message]
2021-11-08  7:59             ` Alexander Kanavin
     [not found]     ` <4106f9ef-5b2e-5276-f1bb-c80a989d7fdf@mko.dev>
2021-11-05 11:12       ` Martin Koppehel
2021-11-05 13:16       ` Stefan Herbrechtsmeier

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=6c13452e-77cc-6cd5-8d3d-0e2128663286@weidmueller.com \
    --to=stefan.herbrechtsmeier-oss@weidmueller.com \
    --cc=Daniel.Baumgart@iris-sensing.com \
    --cc=Jasper.Orschulko@iris-sensing.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=jeanmarie.lemetayer@gmail.com \
    --cc=martin@mko.dev \
    --cc=richard.purdie@linuxfoundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.