<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes-global/package_rpm.bbclass, branch walnascar</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=walnascar</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=walnascar'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2025-07-04T14:50:16+00:00</updated>
<entry>
<title>package_rpm.bbclass: Remove empty build directory</title>
<updated>2025-07-04T14:50:16+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2025-06-24T07:07:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c1c31b2aeef0ca160b53784e764e23e3c66eb17e'/>
<id>urn:sha1:c1c31b2aeef0ca160b53784e764e23e3c66eb17e</id>
<content type='text'>
Fixed:
$ bitbake acl
$ ls tmp/work/core2-64-poky-linux/acl/2.3.2/build/acl-2.3.2-build/

This empty directory is created by rpmbuild, just remove it like others above.

Note, master branch doesn't have this problem after upgrade to rpm 4.20.1, but
it's not easy to find which patch(es) fixed the problem, and the issues haven't
been fixed completely, there is still an empty SRPMS directory, so just remove
the build directory as others above.

If we don't fix this, there might be warnings when a recipe uses:

install -m 0644 ${B}/* ${DEPLOYDIR}/boot.bin-extracted/

install: omitting directory '${B}/xilinx-bootbin-1.0-build'

(From OE-Core rev: c4f95abacdb7376f8f299679f3f0b2dd1dc28c27)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>package_rpm: set a timestamp handling policy with the new macro %build_mtime_policy</title>
<updated>2025-01-04T12:34:04+00:00</updated>
<author>
<name>Bin Lan</name>
<email>bin.lan.cn@windriver.com</email>
</author>
<published>2025-01-03T08:53:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e71a52a528b7737ef0939466c1b7359349dd0118'/>
<id>urn:sha1:e71a52a528b7737ef0939466c1b7359349dd0118</id>
<content type='text'>
There is the following warning when the do_package_write_rpm task is executed
when bitbake linux-yocto:
  warning: %clamp_mtime_to_source_date_epoch is deprecated, please use %build_mtime_policy

After RPM is upgraded to 4.20.0, the %clamp_mtime_to_source_date_epoch macro is
now deprecated in favor of %build_mtime_policy set to clamp_to_source_date_epoch.

(From OE-Core rev: fa9b9e599bbf3ac73c7a9b1d15ccb0e0bbbe4c11)

Signed-off-by: Bin Lan &lt;bin.lan.cn@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rpm: update 4.19.1.1 -&gt; 4.20.0</title>
<updated>2024-12-12T13:22:08+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex@linutronix.de</email>
</author>
<published>2024-12-04T06:49:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ea9c2cfb6901251b95e07e052616a512b91ea0c7'/>
<id>urn:sha1:ea9c2cfb6901251b95e07e052616a512b91ea0c7</id>
<content type='text'>
With this release, as expected, deprecated openpgp support
has been fully removed and replaced with sequoia:
https://github.com/rpm-software-management/rpm-sequoia/

Alas, it's written in rust, and has no recipe, so for now
signing rpm packages has to be disabled.

Remove package name parameter to %prep in source archiving, as it's
been dropped in the new rpm, and wasn't needed to begin with.

Drop 0001-perl-disable-auto-reqs.patch
(files removed upstream).

(From OE-Core rev: 8c15b4577d5e554cc2dd5adfb88b816894b05a9a)

Signed-off-by: Alexander Kanavin &lt;alex@linutronix.de&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package_rpm: restrict rpm to 4 threads</title>
<updated>2024-11-21T12:16:28+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex@linutronix.de</email>
</author>
<published>2024-11-20T15:32:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=697eeef71be0b2fb97cbfa943f9de04371247fc4'/>
<id>urn:sha1:697eeef71be0b2fb97cbfa943f9de04371247fc4</id>
<content type='text'>
TL;DR version:

with this, and the previous compression level changes
I am seeing drastic speedups in package_write_rpm completion times:

webkitgtk goes from 78 seconds to 37 seconds
glibc-locale goes from 399 seconds to 58 seconds (!)

The long version:

rpm uses multithreading for two purposes:

- spawning compressors (which are nowadays themselves
multi-threaded, so the feature is not as useful as it once
was)
- parallel file classification

While the former behaves well on massively parallel CPUs
(it was written and verified here :), the latter was then added
by upstream and only benchmarked on their very old, slow laptop,
apparently:
https://github.com/rpm-software-management/rpm/commit/41f0e214f2266f02d6185ba11f797716de8125d4

On anything more capable it starts showing pathologic behavior,
presumably from spawning massive amount of very short-lived threads,
and then having to synchronize them. For example classifying glibc-locale
takes
5m20s with 256 threads (default on my machine!)
1m49s with 64 threads
59s with 16 threads
48s with 8 threads

Even a more typical recipe like webkitgtk is affected:
47s with 256 threads
32s with 64 threads
27s with 16 or 8 threads

I have found that the optimal amount is actually four: this also
means that only four compressors are running at a time, but
as they're themselves using threads, and typical recipes are dominated
by just two or three large packages, this does not affect overall
completion time.

(From OE-Core rev: 286d456e71ee2730c197ce394d6be2c7eeced18d)

Signed-off-by: Alexander Kanavin &lt;alex@linutronix.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package_rpm: use zstd's default compression level</title>
<updated>2024-11-21T12:16:28+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex@linutronix.de</email>
</author>
<published>2024-11-20T15:32:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=badb62ad010fdb95efe9cc0034822a64f5ebf4cc'/>
<id>urn:sha1:badb62ad010fdb95efe9cc0034822a64f5ebf4cc</id>
<content type='text'>
zstd uses 3 by default (and ZSTD_COMPRESSION_LEVEL is set to that),
while 19 is the highest and slowest.

It's not clear why 19 was picked to begin with, possibly
I copy-pasted it from rpm's examples without thinking:
https://git.yoctoproject.org/poky/commit/?h=master-next&amp;id=4a4d5f78a6962dda5f63e9891825c80a8a87bf66

This brings significant speedups in rpm's compression step:
for example compressing webkitgtk takes 11s instead of 36s.

The rpm size increases from 175648k to 234860k. I think it's
a worthy default tradeoff.

(From OE-Core rev: f1c7d76361425c85d68ad1f61be1e7ff05df4bab)

Signed-off-by: Alexander Kanavin &lt;alex@linutronix.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package_rpm: Check if file exists before open()</title>
<updated>2024-10-11T11:17:03+00:00</updated>
<author>
<name>Pavel Zhukov</name>
<email>pavel@zhukoff.net</email>
</author>
<published>2024-10-10T17:45:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0d564b3ad1e8f0db3909eeaa6afed636a57f31f6'/>
<id>urn:sha1:0d564b3ad1e8f0db3909eeaa6afed636a57f31f6</id>
<content type='text'>
Exception handler tries to read() /etc/passwd file in sysroot
and if file doesn't exist for any reason then it raises FileNotFoundError
exception which mask the original source of the problem and makes
debugging of the issue more difficult.

Fixes:
Exception: FileNotFoundError: [Errno 2] No such file or directory:
'/codebuild/output/src1899304708/src/build/tmp-container/work/core2-64-oe-linux/emqx-bin/4.3.12/recipe-sysroot/etc/passwd'

(From OE-Core rev: 4ad9a0e0b11eb7bc5a3dd45fc8945e094ea949e9)

Signed-off-by: Pavel Zhukov &lt;pavel@zhukoff.net&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lib: package: Add file_reverse_translate</title>
<updated>2024-06-03T06:47:04+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2024-05-23T18:26:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=242be0888c80df082c7f19f2bce6afaaac095d7d'/>
<id>urn:sha1:242be0888c80df082c7f19f2bce6afaaac095d7d</id>
<content type='text'>
Adds API to reverse the removal of special characters from file names so
it can be correctly done in multiple places without open-coding it.

Replace the translation done in the package_rpm.bbclass with the new API

(From OE-Core rev: 4cb7e93c624987d146aaf626ce8e99568e938a70)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package_rpm: remove support for DIRFILES</title>
<updated>2024-04-23T12:40:24+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex.kanavin@gmail.com</email>
</author>
<published>2024-04-19T12:19:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f7f4d9d5c07b42908aa06501d188947b35ef02b2'/>
<id>urn:sha1:f7f4d9d5c07b42908aa06501d188947b35ef02b2</id>
<content type='text'>
This was added here:
https://git.yoctoproject.org/poky/commit/?id=2f42ef8d8fb1febf28252b98884cebabc931f720

It's undocumented, untested, rpm-specific, and currently
broken, and to begin with looks like a workaround for
Tizen/smack security label conflicts elsewhere.

(From OE-Core rev: ea8af19bb909c7e3633d82bec9d925c8f42ec860)

Signed-off-by: Alexander Kanavin &lt;alex@linutronix.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>package_rpm: add RPMBUILD_EXTRA_PARAMS variable</title>
<updated>2024-02-08T10:53:13+00:00</updated>
<author>
<name>Martin Jansa</name>
<email>martin.jansa@gmail.com</email>
</author>
<published>2024-02-02T18:57:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=81d90fc81c093ecdd99a00382b2c85a3a4c429f2'/>
<id>urn:sha1:81d90fc81c093ecdd99a00382b2c85a3a4c429f2</id>
<content type='text'>
* e.g. for DISTROs which define extra user-defined fields with
  PACKAGE_ADD_METADATA/PACKAGE_ADD_METADATA_RPM
  as undefined fields in packagedata are fatal error for rpmbuild:
  "error: line 9: Unknown tag: Author: Unspecified"
  as shown in:
  http://errors.yoctoproject.org/Errors/Details/751706/
  with "Author" field added with:

  PACKAGE_CLASSES = "package_rpm"
  PACKAGE_ADD_AUTHOR_METADATA = "test-author"
  PACKAGE_ADD_METADATA = "Author: ${PACKAGE_ADD_AUTHOR_METADATA}"

  to fix rpm build you can use:
  RPMBUILD_EXTRA_PARAMS = " --define '_Author Author'"
  keep in mind that this doesn't cause this Author field to be
  added in .rpm, it just avoids the BUILDSPEC failure.

  and for ipk build:
  OPKG_MAKE_INDEX_EXTRA_PARAMS = "-f"

  alternatively you can avoid additional packagedata fields ending
  in the package manager (if you use them only with buildhistory
  or packagedata) with:
  PACKAGE_ADD_METADATA_RPM = ""
  PACKAGE_ADD_METADATA_IPK = ""
  PACKAGE_ADD_METADATA_DEP = ""

(From OE-Core rev: 31030e7a19a27ad424b997fad36ee4f633ce0d63)

Signed-off-by: Martin Jansa &lt;martin.jansa@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/package_rpm: streamline the logic in one of the condition blocks</title>
<updated>2024-02-08T10:53:13+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex.kanavin@gmail.com</email>
</author>
<published>2024-02-01T09:15:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=57d82f92c1060c5f15072f5d266dbac11665ae26'/>
<id>urn:sha1:57d82f92c1060c5f15072f5d266dbac11665ae26</id>
<content type='text'>
(From OE-Core rev: e6a8ca554509c0edf9fd36ced88165dc3caf0e87)

Signed-off-by: Alexander Kanavin &lt;alex@linutronix.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
