From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 13/13 v7] core/legal-info: ensure legal-info works in off-line mode
Date: Fri, 24 Jun 2016 17:11:03 +0200 [thread overview]
Message-ID: <20160624171103.220dfecb@free-electrons.com> (raw)
In-Reply-To: <073f2f8f95adc65a29ba10b04ce2072d04731b6c.1462637351.git.yann.morin.1998@free.fr>
Hello,
On Sat, 7 May 2016 18:14:38 +0200, Yann E. MORIN wrote:
> Almost all packages which are saved for legal-info have their source
> archives downloaded as part of 'make source', which makes an off-line
> build completely possible [0].
>
> However, for the pre-configured external toolchains, the source tarball
> is different, as the main tarball is a binary package. And that source
> tarball is only downloaded during the legal-info phase, which makes it
> inconvenient for full off-line builds.
>
> We fix that by adding a new rule, $(1)-legal-source which only
> $(1)-all-source depends on, so that we only download it for a top-level
> 'make source', not as part of the standard download mechanism (i.e. only
> what is really needed to build).
>
> This new rule depends, like the normal download mechanism, on a stamp
> file, so that we do not emit a spurious hash-check message on successive
> runs of 'make source'.
>
> This way, we can do a complete [0] off-line build and are still able to
> generate legal-info, while at the same time we do not incur any download
> overhead during a simple build.
>
> Also, we previously downloaded the _ACTUAL_SOURCE_TARBALL when it was
> not empty. However, since _ACTUAL_SOURCE_TARBALL defaults to the value
> of _SOURCE, it can not be empty when _SOURCE is not. Thus, we'd get a
> spurious report of a missing hash for the tarball, since it was not in
> a standard package rule (configure, build, install..) and thus would
> miss the PKG and PKGDIR variables to find the .hash file.
>
> We fix that in this commit as well, by:
>
> - setting PKG and PKGDIR just for the -legal-source rule;
>
> - only downloading _ACTUAL_SOURCE_TARBALL if it is not empty *and* not
> the same as _SOURCE (to avoid a second report about the hash).
>
> [0] Save for nodejs which invarriably wants to download stuff at build
> time. Sigh... :-( Fixing that is work for another time...
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Peter Korsgaard <jacmet@uclibc.org>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
>
> ---
> Notes: here is a case where one would need to be able to do an off-line
> legal-info:
> - a build farm (e.g. Jenkins slaves) without access to the internet;
> - a single machine (not part of the farm) has access to the internet;
> - that machine runs "make source" to populate a mirror (a "primary
> mirror" or an NFS-mounted directory or anything else) that is
> accessible to the build farm;
> - machines in the build farm need the actual sources to run
> legal-info, doing so off-line.
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-06-24 15:11 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
2016-05-07 16:14 ` [Buildroot] [PATCH 01/13 v7] support/scripts: add helper to hardlink-or-copy Yann E. MORIN
2016-05-07 18:48 ` Arnout Vandecappelle
2016-05-11 21:23 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 02/13 v7] core/legal-info: use the helper to install source archives Yann E. MORIN
2016-05-07 19:54 ` Arnout Vandecappelle
2016-05-11 21:24 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 03/13 v7] core/pkg-generic: add variable to store the package rawname-version Yann E. MORIN
2016-05-11 21:29 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 04/13 v7] core/legal-info: install source archives in their own sub-dir Yann E. MORIN
2016-05-11 21:40 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory Yann E. MORIN
2016-05-07 20:01 ` Arnout Vandecappelle
2016-05-11 21:43 ` Thomas Petazzoni
2016-05-13 20:11 ` Yann E. MORIN
2016-05-14 21:22 ` Arnout Vandecappelle
2016-05-15 9:49 ` Yann E. MORIN
2016-05-15 17:50 ` Yann E. MORIN
2016-05-16 21:31 ` Arnout Vandecappelle
2016-06-24 13:50 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 06/13 v7] core/apply-patches: store full path of applied patches Yann E. MORIN
2016-05-07 20:09 ` Arnout Vandecappelle
2016-06-22 20:59 ` Yann E. MORIN
2016-06-24 14:02 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 07/13 v7] support/apply-patches: bail-out on duplicate patch basenames Yann E. MORIN
2016-05-07 20:16 ` Arnout Vandecappelle
2016-06-22 21:01 ` Yann E. MORIN
2016-06-24 14:09 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 08/13 v7] core/legal-info: also save patches Yann E. MORIN
2016-05-07 20:36 ` Arnout Vandecappelle
2016-06-22 21:03 ` Yann E. MORIN
2016-06-24 14:22 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 09/13 v7] core/legal-info: also save extra downloads Yann E. MORIN
2016-05-07 20:42 ` Arnout Vandecappelle
2016-06-24 14:22 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 10/13 v7] legal-info: explicitly state how patches are licensed Yann E. MORIN
2016-06-24 14:25 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 11/13 v7] core/legal-info: generate a hash of all saved files Yann E. MORIN
2016-06-24 15:08 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 12/13 v7] core/pkg-generic: reorder variables definitions for legal-info Yann E. MORIN
2016-06-24 15:10 ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 13/13 v7] core/legal-info: ensure legal-info works in off-line mode Yann E. MORIN
2016-06-24 15:11 ` Thomas Petazzoni [this message]
2016-06-22 21:12 ` [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
2016-06-24 15:11 ` Thomas Petazzoni
2016-06-24 17:20 ` 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=20160624171103.220dfecb@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--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