From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5 0/3] Add tainting support to buildroot
Date: Mon, 10 Sep 2018 22:26:24 +0200 [thread overview]
Message-ID: <20180910202624.GJ2674@scaer> (raw)
In-Reply-To: <CA+_SqVZc_n9N4=eQYT_c2Pio9F30Xw+gGguizq9RKkW3qmgBSw@mail.gmail.com>
Angelo, All,
On 2018-09-10 21:03 +0100, Angelo Compagnucci spake thusly:
> On Mon, Sep 10, 2018 at 8:44 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > $ cat package/foo/Config.in
> > config BR2_PACKAGE_FOO
> > bool "foo"
> > depends on !BR2_REPRODUCIBLE
> > select SOME_PACKAGE
> >
> > $ cat package/foo/foo.mk
> > FOO_VERSION = 1.2.3
> > FOO_DEPENDENCIES = some dependencies on other BR packages
> > $(eval $(npm-package))
> >
> > and that the npm-package infra would do the call and install whatever
> > foo requires? Optionally, if the dependencies are already installed
> > (e.g. because of a FOO_DEPENDENCIES or another previous npm-package
> > already installed), then some dependencies may or may not be downloaded
> > by npm.
>
> I'm not into this honestly. What I want to achieve is that a package
> can call a npm install or a glide install on whatever dependencies
> file the source code distributes. Without the need to open that file,
> understanding the dependency chain and reflect that in buildroot.
>
> I think that the original developer knows better the dependencies of
> his software and we should trust the building infrastructure he
> choose, even more if what he choose is the best practice for that
> programming language.
>
> Exactly As I did for the example I posted before.
And this is exactly what the npm-package (or glide-package, or whatever)
would end up doing: expand to FOO_BUILD_CMDS, FOO_INSTALL_CMDS et al.
that do the job, instead of repeating it in every package, like the
autotools-package infra allows to not repeat the .configure; make; make
install dance in all the autotools-based package.
For example, your watchtower would be writen as:
WATCHTOWER_VERSION = v0.3.0
WATCHTOWER_LICENSE = Apache-2.0
WATCHTOWER_LICENSE_FILES = LICENSE.md
$(eval $(glide-package))
And then the glide-pacakge infra would be defined sdmething like:
define glide-pacakge-inner
$(2)_DEPENDENCIES += host-glide
define $(2)_GLIDE
cd $$($(2)_SRC_PATH); GOPATH=$$($(@)_GOPATH) $$(HOST_DIR)/usr/bin/glide install
endef
$(2)_POST_CONFIIGURE_HOOKS += $(2)_GLIDE
$(call golang-package,$(1),$(2),$(3),$(4))
endef
Or something similar, like we do for the rebar-package infra, for
example, which piggy-backs onto either the generic-package or the
autotools-package infra as needed.
> > That would be fine by me.
> >
> > There is one gotcha though: this won't work for purely off-line builds.
> > This can be a big limitation in some setups, where access to an external
> > network is not always guaranteed, so we should carefully say so in the
> > manual.
>
> Not true. A package can call the package manager in it's post download
> hook, so a make source should do an offline build without troubles.
But then said package manager would do only the download in the download
step?
I.e. I want to be able to do on 'somemachine' which has acces to both
the internal and external networks:
$ export BR2_DL_DIR=/some/location
$ make meh_defconfig
$ make source
$ scp -r /some/location someone at someserver:/somewhere
And on 'someserver' which does not have access to the network at all (by
a firewall that blocks out-going connections):
$ export BR2_DL_DIR=/somewhere
$ make meh_defconfig
$ make
This is what I call an off-line build.
> Yes, if we can agree on a way to add package managers to buildroot!
I don't see any technical limitation to that, given the example you
provided.
Of course, I guess it is just a trivial example, and that real life is
little bit more tricky as usual, but there is nothing (besides my own
stubbornness, that is) standing in the road, is there?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2018-09-10 20:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 22:22 [Buildroot] [PATCH v5 0/3] Add tainting support to buildroot Angelo Compagnucci
2018-09-05 22:22 ` [Buildroot] [PATCH v5 1/3] Makefile: add tainting support Angelo Compagnucci
2018-09-06 7:44 ` Thomas Petazzoni
2018-09-06 7:46 ` Angelo Compagnucci
2018-09-05 22:22 ` [Buildroot] [PATCH v5 2/3] docs/manual: adding infos about tainting Angelo Compagnucci
2018-09-09 8:00 ` Yann E. MORIN
2018-09-05 22:22 ` [Buildroot] [PATCH v5 3/3] package/nodejs: taint the build on external modules Angelo Compagnucci
2018-09-09 7:49 ` Yann E. MORIN
2018-09-09 12:17 ` Angelo Compagnucci
2018-09-09 13:01 ` Yann E. MORIN
2018-09-09 13:29 ` Angelo Compagnucci
2018-09-06 7:42 ` [Buildroot] [PATCH v5 0/3] Add tainting support to buildroot Thomas Petazzoni
2018-09-09 7:36 ` Yann E. MORIN
2018-09-09 12:10 ` Thomas Petazzoni
2018-09-09 12:25 ` Angelo Compagnucci
2018-09-09 13:33 ` Yann E. MORIN
2018-09-09 13:44 ` Angelo Compagnucci
2018-09-09 14:20 ` Yann E. MORIN
2018-09-09 16:58 ` Angelo Compagnucci
2018-09-09 18:55 ` Yann E. MORIN
2018-09-09 20:18 ` Angelo Compagnucci
2018-09-10 7:50 ` Angelo Compagnucci
2018-09-10 15:00 ` Yann E. MORIN
2018-09-10 15:37 ` Yann E. MORIN
2018-09-10 17:10 ` Angelo Compagnucci
2018-09-10 18:07 ` Yann E. MORIN
2018-09-10 19:17 ` Angelo Compagnucci
2018-09-10 19:43 ` Yann E. MORIN
2018-09-10 20:03 ` Angelo Compagnucci
2018-09-10 20:26 ` Yann E. MORIN [this message]
2018-09-11 6:20 ` Angelo Compagnucci
2018-09-10 19:37 ` Thomas Petazzoni
2018-09-10 19:55 ` Angelo Compagnucci
2018-09-10 20:37 ` Yann E. MORIN
2018-09-09 13:27 ` Yann E. MORIN
2018-11-01 12:14 ` Arnout Vandecappelle
2018-11-01 12:25 ` Yann E. MORIN
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=20180910202624.GJ2674@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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