<feed xmlns='http://www.w3.org/2005/Atom'>
<title>buildroot/package/pkg-generic.mk, branch 2016.08</title>
<subtitle>OpenPOWER buildroot sources</subtitle>
<id>https://git.raptorcs.com/git/buildroot/atom?h=2016.08</id>
<link rel='self' href='https://git.raptorcs.com/git/buildroot/atom?h=2016.08'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/'/>
<updated>2016-07-05T13:48:48+00:00</updated>
<entry>
<title>core/pkg-generic: allow packages to declare target-finalize hooks</title>
<updated>2016-07-05T13:48:48+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2016-06-22T19:07:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=624dbec7e1f971519be9a165b09c0b95a8ee282b'/>
<id>urn:sha1:624dbec7e1f971519be9a165b09c0b95a8ee282b</id>
<content type='text'>
Currently, packages using target finalize hooks must remember that they
need to register their hook in TARGET_FINALIZE_HOOKS
conditionally (otherwise their hook will be triggered even if the
package is disabled).

In order to avoid this potential mistake, this commit introduces a
per-package target-finalize hook variable, in which packages can
register their target-finalize hooks, with the guarantee that they will
only be triggered if the package is enabled.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Reviewed-by: Romain Naour &lt;romain.naour@gmail.com&gt;
[Thomas: rework commit log.]
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>pkg-generic: check that SITE has a value when SOURCE</title>
<updated>2016-07-03T11:00:53+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2016-07-03T09:50:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=235ac0cc185b453c475cfde32f0ba00da0137e36'/>
<id>urn:sha1:235ac0cc185b453c475cfde32f0ba00da0137e36</id>
<content type='text'>
Currently, when an user forgets to define a SITE, he gets some fairly
weird download failure. In order to make things easier to diagnose, this
commit adds a check in the package infrastructure that verifies that if
SOURCE has a value, SITE is not empty.

Cc: Thomas De Schampheleire &lt;thomas.de.schampheleire@gmail.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>core: do not attempt downloads with no _VERSION set</title>
<updated>2016-07-03T10:46:10+00:00</updated>
<author>
<name>Alex Suykov</name>
<email>alex.suykov@gmail.com</email>
</author>
<published>2016-07-03T09:49:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=75630eba22b20d6140a5b58a6d1e35598fb3c0d3'/>
<id>urn:sha1:75630eba22b20d6140a5b58a6d1e35598fb3c0d3</id>
<content type='text'>
Currently, when the package defines no _SOURCE and no _VERSION
variables, we end up trying to download &lt;PACKAGE&gt;-undefined.tar.gz.

This is utterly pointless.

Change the logic to not attempt a download when neither _SOURCE
nor _VERSION is set:
  - do not set an undefined _VERSION to "undefined"
  - do not append an empty (or "undefined") version to the package
    rawname

Consequently, for packages that have no _VERSION, the build
directory will be just the package name (which to some may look
nicer than the current "package-undefined").

Furthermore, the message trace is also a bit leaner (to the same
people that find "package" nicer than "package-undefined").

Signed-off-by: Alex Suykov &lt;alex.suykov@gmail.com&gt;
Tested-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Reviewed-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>infra: remove auto derivation of host dependencies</title>
<updated>2016-07-03T08:24:02+00:00</updated>
<author>
<name>Julien Floret</name>
<email>julien.floret@6wind.com</email>
</author>
<published>2016-07-02T22:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=4bdb067e380e72c3a6cb9c6ccf3791a6cf8661e0'/>
<id>urn:sha1:4bdb067e380e72c3a6cb9c6ccf3791a6cf8661e0</id>
<content type='text'>
This feature consists in automatically deducing dependencies of a host
package from the dependencies of the target variant.

However, it causes some issues, and many host packages need different
dependencies than their target variants.

Now that host dependencies are explicitly set for all packages, we can
remove it.

Signed-off-by: Julien Floret &lt;julien.floret@6wind.com&gt;
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>core/pkg-infra: download git submodules if the package wants them</title>
<updated>2016-07-02T17:11:14+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2016-07-01T09:01:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=ec3e057f79117d851c37f19316a3b9b5e2470550'/>
<id>urn:sha1:ec3e057f79117d851c37f19316a3b9b5e2470550</id>
<content type='text'>
Add a new package variable that packages can set to specify that they
need git submodules.

Only accept this option if the download method is git, as we can not get
submodules via an http download (via wget).

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Aleksandar Simeonov &lt;aleksandar@barix.com&gt;
Tested-by: Matt Weber &lt;matt@thewebers.ws&gt;
Reviewed-by: Matt Weber &lt;matt@thewebers.ws&gt;
Tested-By: Nicolas Cavallari &lt;nicolas.cavallari@green-communications.fr&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>core/legal-info: ensure legal-info works in off-line mode</title>
<updated>2016-06-24T15:09:38+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2016-05-07T16:14:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=eace9d6133b94c77647eee944fbde3dcdf901768'/>
<id>urn:sha1:eace9d6133b94c77647eee944fbde3dcdf901768</id>
<content type='text'>
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" &lt;yann.morin.1998@free.fr&gt;
Cc: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Peter Korsgaard &lt;jacmet@uclibc.org&gt;
Tested-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>core/pkg-generic: reorder variables definitions for legal-info</title>
<updated>2016-06-24T15:09:32+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2016-05-07T16:14:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=2474868057e1c01de6ceff3c8d8b74b7317317b7'/>
<id>urn:sha1:2474868057e1c01de6ceff3c8d8b74b7317317b7</id>
<content type='text'>
Move the declarations of _ACTUAL_SOURCE and _ACTUAL_SITE earlier, so
that they are close to where _SOURCE and _SITE are handled.

This looks so far like a purely cosmetic change, but makes more sense
with the follow-up patch, where we'll need them earlier in the file.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Arnout Vandecappelle &lt;arnout@mind.be&gt;
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Reviewed-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Tested-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>core/legal-info: also save extra downloads</title>
<updated>2016-06-24T14:22:36+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2016-05-07T16:14:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=1686c58e63032cacd3cb05bc255f87b44a5f12c8'/>
<id>urn:sha1:1686c58e63032cacd3cb05bc255f87b44a5f12c8</id>
<content type='text'>
Some packages, like perl, download extra files that end up as part of
the source that Buildroot builds. Up until now, those files were not
saved in the legal-info output.

Add those files to the legal-info output.

The unfortunate side-effect is that we will also save the secondary
archive for the external blackfin toolchains; however, we already do
save the binary release of some external toolchains when they do not
provide actual source archives.

This is inherently bad, as those are not source archives, but solving
this is a bigger concern, for another series...

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Reviewed-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Tested-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>core/legal-info: also save patches</title>
<updated>2016-06-24T14:18:16+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2016-05-07T16:14:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=1273636fc686cd788b6de87be75dd0726cf8676c'/>
<id>urn:sha1:1273636fc686cd788b6de87be75dd0726cf8676c</id>
<content type='text'>
Currently, the legal-info infra only saves the source archive of a
package. However, that's not enough as we may apply some patches on
packages sources.

We do suggest users to also redistribute the Buildroot sources as part
of their compliance distribution, so the patches bundled in Buildroot
would indeed be included in the compliance distribution.

However, that's still not enough, since we may download some patches, or
the user may use a global patch directory. Patches in there might not
end up in the compliance distribution, and there are risks of
non-conformity.

So, always include patches alongside the source archive.

To ensure reproducibility, we also generate a series file, so patches
can be re-applied in the correct order.

We get the list of patches to include from the list of patches that were
applied by the package infrastructure (via the apply-patches support
script). So, we need to get packages properly extracted and patched
before we can save their legal-info, not just in the case they define
_LICENSE_FILES.

Update the legal-info header accordingly.

Note: this means that, when a package is not patched and defines no
LICENSE_FILES, we will extract and patch it for nothing. There is no
easy way to know whether we have to patch a package or not. We can only
either duplicate the logic to detect patches (bad) or rely on the infra
actually patching the package. Also, a vast majority of packages are
either patched, or define _LICENSE_FILES, so it is best and easiest to
always extract and patch them prior to legal-info.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Tested-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Reviewed-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>core/legal-info: add package version to license directory</title>
<updated>2016-06-24T13:49:38+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2016-05-07T16:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=4ebd6ffbd691ec08021fee89dc55df5e377d8513'/>
<id>urn:sha1:4ebd6ffbd691ec08021fee89dc55df5e377d8513</id>
<content type='text'>
Now that we save the source archives in a directory named after the
package and its version, do the same for the license files, for
consistency.

It has a not-so-bad side-effect of also saving the version string in
the all-licenses list.

The only (small) side-effect, is that the warnings about undefined
_LICENSE_FILES now contains the version string, too. That's unavoidable,
since that's what is stored in the legal report.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Acked-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Tested-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
</feed>
