<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/package.bbclass, branch gatesgarth</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=gatesgarth</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=gatesgarth'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-02-11T17:46:12+00:00</updated>
<entry>
<title>package: Ensure do_packagedata is cleaned correctly</title>
<updated>2021-02-11T17:46:12+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-02-03T14:22:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0003ed2b1c286f16bbe171c2e28ab5777f82d251'/>
<id>urn:sha1:0003ed2b1c286f16bbe171c2e28ab5777f82d251</id>
<content type='text'>
In an earlier commit, libprocps was split into a separate package leaving
no shlibs in the main package. A bug was seen where igt-gpu-tools wouldn't
build correctly in some cases as it thought the librbary was still in the
main package, throwing qa errors as a result.

The issue was due to an extra file being left in the sstate output of
the do_packagedata task in the shlibs2/ folder which contained the bad
shlibs information.

The reason for this was that the temporary directory used in this
task wasn't being cleaned so files which were deleted were not handled
correctly. Add a missing cleandirs entry to fix this.

(From OE-Core rev: 68e17e21f59fcf763877b350cc2a1494b5f1bd91)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 50f17d0a655a3a2556f9fcad67259101c2814a36)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fs-perms: Ensure /usr/src/debug/ file modes are correct</title>
<updated>2020-12-03T23:02:08+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2020-11-21T14:39:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cbd023e0db766ca30ab640274db3a7801ab19e04'/>
<id>urn:sha1:cbd023e0db766ca30ab640274db3a7801ab19e04</id>
<content type='text'>
If files are copied into /usr/src/debug directly from WORKDIR (e.g. makedevs)
we'd get the permissions from the checkout which would depend on the host umask.

Avoid this and be deterministic by setting the file modes consistently. Core
code copies the files in so we're responsible for the permissions.

Unfortunately to force this change to apply we need to invalidate both
the package tasks and the hash equivalance mappings since file mode
'corruption' already made it into the output hashes (both input options
were mapped to the output hashes).

(From OE-Core rev: 1f807da38b9d9aebdd86b3b5839305e03d9930e1)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 1f958bcd6c9cd12ec76d80586cba15f4d6ed17a7)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package.bbclass: hash equivalency and pr service</title>
<updated>2020-09-03T08:44:30+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@kernel.crashing.org</email>
</author>
<published>2020-09-02T15:33:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=39c1accf9054e863d543df7584eb48e2b0797cea'/>
<id>urn:sha1:39c1accf9054e863d543df7584eb48e2b0797cea</id>
<content type='text'>
When the PR service is enabled a number of small changes may happen
to variables.  In the do_package step a call to package_get_auto_pr
will end up setting PRAUTO and modifying PKGV (if AUTOINC is there).

PRAUTO is then used by EXTENDPRAUTO, which is then used to generate
PKGR.

Since this behavior typically happens BEFORE the BB_UNIHASH is
calculated for do_package, we need a way to defer the expansion
until after we have the unihash value.

Writing out the pkgdata files w/o AUTOPR and PKGV (AUTOINC) expanded
to placeholder values is the easiest way to deal with this.  All other
variables are expanded as expected.

In the next task, typically do_packagedata, we will then use the
UNIHASH from the do_package to get the PR (AUTOPR) as well as
generate the AUTOINC replacement value (now PRSERV_PV_AUTOINC).

The do_packagedata then translates the placeholders to the final values
when copying the data from pkgdata to pkgdata-pdata-input.

Also update the prservice test case.  With unihash, just changing the
do_package (via a _append) will not change the PR.  So write the date
to a specific file that is incorporated into the unihash to ensure it
is always different for the test.  Various assert messages were also
updated to make it easier to figure out where/why a problem occured.

(From OE-Core rev: 2e32f37b0e4abc438c8f60e673cd18a5cc110768)

Signed-off-by: Mark Hatle &lt;mark.hatle@kernel.crashing.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package.bbclass: explode the RPROVIDES so we don't think the versions are provides</title>
<updated>2020-08-28T06:08:37+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@arm.com</email>
</author>
<published>2020-08-27T15:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c278eaf0c5bd5a2fb180f9c4916a6b68b5335356'/>
<id>urn:sha1:c278eaf0c5bd5a2fb180f9c4916a6b68b5335356</id>
<content type='text'>
emit_pkgdata() creates symlinks for each of the RPROVIDES in
pkgdata/MACHINE/runtime-rprovides.  However this string can contain
versions which results in directories called (=2.32), so pass the
RPROVIDES string through bb.utils.explode_deps() to strip the versions
out.

Helps mitigate - but not solve - #13999.

(From OE-Core rev: 6a5395dec34192db233bfb2a060e5ccc99708f03)

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package.bbclass: Sort shlib2 output for hash equivalency</title>
<updated>2020-08-20T14:30:07+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@kernel.crashing.org</email>
</author>
<published>2020-08-19T16:16:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=85869d615bb7a01083904af978e220997ef74a6c'/>
<id>urn:sha1:85869d615bb7a01083904af978e220997ef74a6c</id>
<content type='text'>
The output was unsorted, so different versions of python, different input
ordering could have have changed the files, and thus changed the hashes
making the system think the output was different, even when unmodified.

(From OE-Core rev: 23cc846c92219c5cbe3fc6a0024579195d3cbd78)

Signed-off-by: Mark Hatle &lt;mark.hatle@kernel.crashing.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/package: Use HOST_OS for runtime dependencies</title>
<updated>2020-07-22T11:45:56+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2020-07-21T17:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0f5ae7e79b87c6d903ca57cb695d802deb8d61d8'/>
<id>urn:sha1:0f5ae7e79b87c6d903ca57cb695d802deb8d61d8</id>
<content type='text'>
The code was using TARGET_OS to try and detect what type of OS the
packages would be running on, but this is incorrect. TARGET_OS is the OS
for which the package will generate output (e.g. GCC output target or
GDB debugging target). The OS where the package will run is the HOST_OS.
Note that HOST_OS only differs from TARGET_OS when doing a
canadian cross compile, and even then in our case only when doing so for
a non-Linux host (e.g. MinGW).

Fix the code to use HOST_OS instead.

(From OE-Core rev: f284c5b2df220b520b025a59874e04ef4becd829)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package.bbclass: add PACKAGE_ADD_METADATA to sstate variables</title>
<updated>2020-05-25T21:25:53+00:00</updated>
<author>
<name>Michael Ho</name>
<email>Michael.Ho@bmw.de</email>
</author>
<published>2020-05-25T08:22:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1dfd6dad27c0dea1ec6bb20e4bee8f42ae20c525'/>
<id>urn:sha1:1dfd6dad27c0dea1ec6bb20e4bee8f42ae20c525</id>
<content type='text'>
The PACKAGE_ADD_METADATA can be used to define additional metadata for
packages. Changes to this variable should affect the packaging sstate hash
so packages are re-generated when this variable changes.

This variable is added to both PKGDATA_VARS and PACKAGEVARS. It is needed
in PACKAGEVARS to ensure changes invoke do_package to re-run. It is needed
in PKGDATA_VARS to ensure changes are written into the pkgdata so that the
hash equiv reports a change and does not skip over the package_write tasks.

(From OE-Core rev: de871a51cc450e3f90c923c5d80155453e5c241d)

Signed-off-by: Michael Ho &lt;Michael.Ho@bmw.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package: get_package_mapping: avoid dependency mapping if renamed package provides original name</title>
<updated>2020-04-26T13:00:50+00:00</updated>
<author>
<name>Yann Dirson</name>
<email>yann@blade-group.com</email>
</author>
<published>2020-04-07T20:02:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d645fe38d38a9fe499c2c79b1b2dced3bed01a89'/>
<id>urn:sha1:d645fe38d38a9fe499c2c79b1b2dced3bed01a89</id>
<content type='text'>
Packages with a runtime dependency on a target package whose name is
changed by the PKG_* mechanism must rebuild when that mapping changes,
but we have no way of tracking this today, so
eg. packagegroup-machine-base ends up with a relationship on a
versioned kernel-image, and does not get rebuilt when that version
changes, leading to unsatisfiable dependency and reproducibility
issue.

OTOH there is no reason for the dependency to get rewritten if the
renamed package already has a RPROVIDES on the non-rewritten package
name, and if the dependency relationship is an unversionned one.  This
is what this patch prevents.

Note that this may not cover all cases of rewritten package names.

Notably I had to let the rewrite be done in the case of versionned
dependencies, as package managers usually can follow "Provides" in
such case; this includes many dependencies against shared-lib packages
renamed to their soname, and those at least are OK, since the
dependent recipe should explicitly depend on the target recipe.

(From OE-Core rev: 920beaaeef62b558e046f32c8ef0332250969ef1)

Signed-off-by: Yann Dirson &lt;yann@blade-group.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package.bbclass: inject "minidebuginfo" into packaged binaries</title>
<updated>2020-04-26T13:00:50+00:00</updated>
<author>
<name>Dan Callaghan</name>
<email>dan.callaghan@opengear.com</email>
</author>
<published>2020-04-19T08:16:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6efa038c01e42af7602f805b9035df7ab4e0df73'/>
<id>urn:sha1:6efa038c01e42af7602f805b9035df7ab4e0df73</id>
<content type='text'>
"Mini debuginfo" is a special section in ELF executables containing
minimal compressed debuginfo for non-exported symbols:

https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html

It lets debugging tools produce better stack traces, including local
function names, without incurring the space overhead of full debuginfo.
The feature was originally developed for Fedora:

https://fedoraproject.org/wiki/Features/MiniDebugInfo

but nowadays it is widely supported in the ecosystem, including in gdb
and elfutils (and therefore also in tools which use elfutils, such as
systemd-coredump).

This patch adds an optional extra step in package.bbclass to inject
minidebuginfo while stripping and splitting out debuginfo. It can be
enabled by setting PACKAGE_MINIDEBUGINFO=1. In my testing, this
increases the size of resulting binaries by roughly 5%.

The code for producing and re-injecting the minidebuginfo is my own
Python implementation but corresponds directly to the shell
implementation that RPM uses for doing the same:

https://github.com/rpm-software-management/rpm/blob/rpm-4.15.1-release/scripts/find-debuginfo.sh#L261

(From OE-Core rev: 4df992ce50c2d12e356b6d9fe7b23a6320c8b4df)

Signed-off-by: Dan Callaghan &lt;dan.callaghan@opengear.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package: Correct variable dependecies</title>
<updated>2020-02-23T23:33:48+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2020-02-23T10:03:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5281e3f10121771f26f944caeb83cd3789bd7be0'/>
<id>urn:sha1:5281e3f10121771f26f944caeb83cd3789bd7be0</id>
<content type='text'>
Ensure that the plain variable X is also added to the dependencies
as well as X_&lt;pkg&gt;.

Allow the funciton to be called with a different variable list too.

(From OE-Core rev: c392401e10ff43d10b7e57c9d552522a02c91878)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
