<feed xmlns='http://www.w3.org/2005/Atom'>
<title>buildroot/package/pkg-generic.mk, branch 2015.11.1</title>
<subtitle>OpenPOWER buildroot sources</subtitle>
<id>https://git.raptorcs.com/git/buildroot/atom?h=2015.11.1</id>
<link rel='self' href='https://git.raptorcs.com/git/buildroot/atom?h=2015.11.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/'/>
<updated>2015-11-18T21:47:10+00:00</updated>
<entry>
<title>core: check host executables have appropriate RPATH</title>
<updated>2015-11-18T21:47:10+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2015-11-13T21:48:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=5c0c38522605413170a10c45ac08d46c4ed076af'/>
<id>urn:sha1:5c0c38522605413170a10c45ac08d46c4ed076af</id>
<content type='text'>
When we build our host programs, and they depend on a host library we
also build, we want to ensure that program actually uses that library at
runtime, and not the one from the system.

We currently ensure that in two ways:
  - we add a RPATH tag that points to our host library directory,
  - we export LD_LIBRARY_PATH to point to that same directory.

With these two in place, we're pretty much confident that our host
libraries will be used by our host programs.

However, it turns our that not all the host programs we build end up
with an RPATH tag:
  - some packages do not use our $(HOST_LDFLAGS)
  - some packages' build system are oblivious to those LDFLAGS

In this case, there are two situations:
  - the program is not linked to one of our host libraries: it in fact
    does not need an RPATH tag [0]
  - the program actually uses one of our host libraries: in that case it
    should have had an RPATH tag pointing to the host directory.

For libraries, they only need an RPATH if they depend on another library
that is not installed in the standard library path. However, any system
library will already be in the standard library path, and any library we
install ourselves is in $(HOST_DIR)/usr/lib so already in RPATH.

We add a new support script that checks that all ELF executables have
a proper DT_RPATH (or DT_RUNPATH) tag when they link to our host
libraries, and reports those file that are missing an RPATH. If a file
missing an RPATH is an executable, the script aborts; if only libraries
are are missing an RPATH, the script does not abort.

[0] Except if it were to dlopen() it, of course, but the only program
I'm aware of that does that is openssl, and it has a correct RPATH tag.

[Peter: reworded as suggested by Arnout, fix HOT_DIR typo in comment]
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Arnout Vandecappelle &lt;arnout@mind.be&gt;
Cc: Peter Korsgaard &lt;jacmet@uclibc.org&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>core/legal-info: fix missing double-$</title>
<updated>2015-11-17T16:03:28+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2015-11-16T22:46:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=a3c7b5274d7dfbf60b357f7c0e42bf9d2d2e5fdc'/>
<id>urn:sha1:a3c7b5274d7dfbf60b357f7c0e42bf9d2d2e5fdc</id>
<content type='text'>
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Reviewed-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Tested-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/pkg-generic: allow step hooks to fail a step</title>
<updated>2015-11-04T13:10:45+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2015-11-03T19:06:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=e76467031e226aa348570c00c7e4a5ad60ae6c75'/>
<id>urn:sha1:e76467031e226aa348570c00c7e4a5ad60ae6c75</id>
<content type='text'>
Currently, we touch our stamp files before we call the step hooks.
This means a step hook can not properly fail a step, since the stamp
file exists even if the hook exits in error, thus a subsequent 'make'
would not try to redo that step.

Fix that by calling the hooks before we touch the stamp files.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Gustavo Zacarias &lt;gustavo@zacarias.com.ar&gt;
Cc: Peter Seiderer &lt;ps.report@gmx.net&gt;
Cc: Romain Naour &lt;romain.naour@openwide.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;
</content>
</entry>
<entry>
<title>core: do not accept multiple definitions of a package</title>
<updated>2015-11-03T22:41:11+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2015-10-22T20:33:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=0ea851c0c0f9783894e9469806d0e25c2bf5d55b'/>
<id>urn:sha1:0ea851c0c0f9783894e9469806d0e25c2bf5d55b</id>
<content type='text'>
One of the selling points for br2-external is to provide a mean to add
new packages. However, it is not supported that a package be defined by
Buildroot and then redefined in a br2-external tree.

This situation may occur without the user noticing or even willing to
redefine the package, for example:
  - br2-external is first created against a version of Buildroot
  - a package (missing in Buildroot) is added to that br2-external tree
  - upstream Buildroot adds this package
  - user updates to the new Buildroot

In this case, the result in undefined, and we can't make any guarantee
on the result (working or not).

Add a sanity check so that a package redefinition gets caught.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Peter Korsgaard &lt;jacmet@uclibc.org&gt;
Cc: Arnout Vandecappelle &lt;arnout@mind.be&gt;
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Reviewed-by: Samuel Martin &lt;s.martin49@gmail.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>core/pkg-generic: allow packages to exclude files when extracting</title>
<updated>2015-11-03T21:20:30+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2015-10-24T12:48:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=07e5641339800b75109cbc72f8e13a7b4f16d039'/>
<id>urn:sha1:07e5641339800b75109cbc72f8e13a7b4f16d039</id>
<content type='text'>
Currently, packages that need to exclude parts of the archives when
extracting (e.g. to gain space), like gcc or toolchain-external, have to
provide custom extract commands, just for the sake of adding a bunch of
--exclude directives when calling tar.

Add a new variable that packages may set, to provide a space-separated
list of patterns to exclude.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Vicente Olivert Riera &lt;Vincent.Riera@imgtec.com&gt;
Reviewed-by: Romain Naour &lt;romain.naour@openwide.fr&gt;
Reviewed-by: Vicente Olivert Riera &lt;Vincent.Riera@imgtec.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>pkg-generic: add step_pkg_size global instrumentation hook</title>
<updated>2015-10-17T14:12:54+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2015-10-17T13:33:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=99aca138c20e1259ac8c23252c223e150d460482'/>
<id>urn:sha1:99aca138c20e1259ac8c23252c223e150d460482</id>
<content type='text'>
This patch adds a global instrumentation hook that collects the list
of files installed in $(TARGET_DIR) by each package, and stores this
list into a file called $(BUILD_DIR)/packages-file-list.txt. It can
later be used to determine the size contribution of each package to
the target root filesystem.

Note that in order to detect if a file installed by one package is
later overriden by another package, we calculate the md5 of installed
files and compare them at each installation of a new package.

Collecting the list of files installed by each package is done
unconditionally, as tests have shown that the performance impact of
doing this is negligible.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Reviewed-by: Ryan Barnett &lt;ryanbarnett3@gmail.com&gt;
Tested-by: Ryan Barnett &lt;ryanbarnett3@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;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>legal-info: allow to declare the actual sources for binary packages</title>
<updated>2015-10-04T15:59:05+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca@lucaceresoli.net</email>
</author>
<published>2015-10-03T21:18:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=b9f4727ff4d512868352494f5209fff4da147473'/>
<id>urn:sha1:b9f4727ff4d512868352494f5209fff4da147473</id>
<content type='text'>
The FOO_SITE/FOO_SOURCE variables usually point to a tarball containing
source code.

For the downloaded external toolchains this is not true, the "source"
tarball actually contains binaries. This is fine for making Buildroot
work, but for legal-info we really want to ship real source code, not
binaries.

Luckily, some (hopefully all) toolchain vendors publish a downloadable
tarball containing the source code counterpart for their binary
packages.

Here we allow the user to declare the URL of this other tarball in the
pair of variables FOO_ACTUAL_SOURCE_TARBALL (by default equal to
FOO_SOURCE) and FOO_ACTUAL_SOURCE_SITE (by default equal to FOO_SITE).
If the "actual source" package can be downloaded from the same
directory as the binary package, then only FOO_ACTUAL_SOURCE_TARBALL
needs to be set.

Note this change is not strictly toolchain-specific: it might be useful
for other packages that happen to ship binaries in the same way.

[Thomas:
  - remove "the source code has not been saved" warning that could
    never be triggered due to how the conditions were
    organized. Discussed with Luca live during the meeting.]

Signed-off-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Cc: Thomas De Schampheleire &lt;patrickdepinguin@gmail.com&gt;
Cc: Arnout Vandecappelle &lt;arnout@mind.be&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>download: get rid of trailing slash removal hack for FOO_SITE</title>
<updated>2015-10-04T14:46:40+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca@lucaceresoli.net</email>
</author>
<published>2015-10-03T17:22:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=bf82f70fb69ba5db0e584cd4c8c001763bb39bd4'/>
<id>urn:sha1:bf82f70fb69ba5db0e584cd4c8c001763bb39bd4</id>
<content type='text'>
Not needed anymore since the URLs have been cleared, the manual states
they are illegal and a check has been introduced to notice future
mistakes.

Signed-off-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>pkg-generic: prevent _SITE URLs with a trailing slash</title>
<updated>2015-10-04T14:46:29+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca@lucaceresoli.net</email>
</author>
<published>2015-10-03T17:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=fa711c7e2daec4bdc80d865e45a5691ec4ac96d5'/>
<id>urn:sha1:fa711c7e2daec4bdc80d865e45a5691ec4ac96d5</id>
<content type='text'>
A trailing slash in FOO_SITE is useless, since Buildroot automatically adds
a slash between FOO_SITE and the filename as appropriate.

Moreover it is potentially harmful, which led to introducing a workaround
to strip them:

    commit 1cbffbd015106ea90fe49e27433375769dc1035b
    Author: Shawn J. Goff &lt;shawn7400@gmail.com&gt;
    Date:   Fri Apr 12 09:40:30 2013 +0000

        eliminate double slashes caused by FOO_SITE ending in a slash

        When a FOO_SITE variable ends in a slash and gets joined with a
        FOO_SOURCE variable like $(FOO_SITE)/$(FOO_SOURCE), the resulting URI
        has a double slash. While double-slashes are fine in unix paths, they
        are reserved in URIs - the part following '//' must be an authority.

So let's ban trailing slashes entirely. They have all been removed in
a 7b0e757fb85fd, now add a check to error out loudly in case a new one
is added.

Example commands to test this check:

  $ make busybox-dirclean busybox-source
  rm -Rf /home/murray/devel/buildroot/output/build/busybox-1.23.2
  busybox-1.23.2.tar.bz2: OK (md5: 7925683d7dd105aabe9b6b618d48cc73)
  busybox-1.23.2.tar.bz2: OK (sha1: 7f37193cb249f27630e0b2a2c6c9bbb7b1d24c16)
  $
  $ make BUSYBOX_SITE=http://www.busybox.net/downloads/ busybox-dirclean busybox-source
  rm -Rf /home/murray/devel/buildroot/output/build/busybox-1.23.2
  BUSYBOX_SITE (http://www.busybox.net/downloads/) cannot have a trailing slash
  make[1]: *** [/home/murray/devel/buildroot/output/build/busybox-1.23.2/.stamp_downloaded] Error 1
  make: *** [_all] Error 2
  $

Signed-off-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Cc: Arnout Vandecappelle &lt;arnout@mind.be&gt;
Cc: Baruch Siach &lt;baruch@tkos.co.il&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>core/pkg-generic: use tabs, not spaces</title>
<updated>2015-09-27T17:35:13+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2015-09-27T11:34:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=9940a83d7de6f88aaf83f83a4f6edde78f6c8b21'/>
<id>urn:sha1:9940a83d7de6f88aaf83f83a4f6edde78f6c8b21</id>
<content type='text'>
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
</feed>
