Bug 2291869 - Warnings in RPM scriptlets: posix.wait(): .fork(), .exec(), .wait() and .redirect2null() are deprecated
Summary: Warnings in RPM scriptlets: posix.wait(): .fork(), .exec(), .wait() and .redi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 41
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Florian Weimer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2293022 2295340 2316442 2318024 2319139 2321923 2323102 2323123 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-06-12 11:28 UTC by Mark E. Fuller
Modified: 2025-02-11 16:21 UTC (History)
40 users (show)

Fixed In Version: glibc-2.40.9000-15.fc42 glibc-2.40-9.fc41
Clone Of:
Environment:
Last Closed: 2024-11-02 11:22:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark E. Fuller 2024-06-12 11:28:29 UTC
Terminal output:

Running trigger-post-uninstall scriptlet: glibc-common-0:2.39.9000-18.fc41.x86_64warning: posix.fork(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead
warning: posix.wait(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead

Reproducible: Always

Comment 1 Carlos O'Donell 2024-06-14 13:20:03 UTC
Thanks for submitting the report, we'll look at improving what we do in the spec file and likely add a conditional to check for rpm.execute() availaiblity.

The change was made recently last year to ease the transition burden for downstream builds that were still deploying with RPM 4.14.

Comment 2 Carlos O'Donell 2024-06-19 15:31:18 UTC
*** Bug 2293022 has been marked as a duplicate of this bug. ***

Comment 3 Carlos O'Donell 2024-06-28 13:19:26 UTC
We discussed this issue recently and we think we can detect rpm.execute availability in the Lua code and use that instead.

Just duplicating what I said in 2293022 here:

The rpm 4.14 version requirement comes from the CentOS Stream 10 and RHEL10 bootstrap effort.

See https://issues.redhat.com/browse/RHEL-19045

We expect that to be able to clean this up for Rawhide and Fedora 41 in short order.

Comment 4 Carlos O'Donell 2024-07-03 13:37:56 UTC
*** Bug 2295340 has been marked as a duplicate of this bug. ***

Comment 5 Carlos O'Donell 2024-07-19 13:30:06 UTC
The work is blocked on having support for a non-deprecated way to redirect a stream.

https://github.com/rpm-software-management/rpm/issues/3192

We might be able to come up with a workaround, but we don't know.

Comment 6 Panu Matilainen 2024-08-09 08:27:47 UTC
For an action that only happens on upgrade, I think you could just as well use os.execute() and let shell handle the redirect.

Comment 7 Jens Petersen 2024-09-23 10:59:22 UTC
(In reply to Carlos O'Donell from comment #5)
> https://github.com/rpm-software-management/rpm/issues/3192

This was addressed upstream at the end of last month in
https://github.com/rpm-software-management/rpm/pull/3241
which according to the 4.20 draft release-notes should be
rawhide at least now (and also f41 updates-testing).
So I guess the new lua rpm.spawn() could be tested now in Rawhide.

There is also https://github.com/rpm-software-management/rpm/pull/3270

Comment 8 Carlos O'Donell 2024-10-04 13:16:18 UTC
*** Bug 2316442 has been marked as a duplicate of this bug. ***

Comment 9 Petr Pisar 2024-10-15 11:36:57 UTC
*** Bug 2318024 has been marked as a duplicate of this bug. ***

Comment 10 Christian Stadelmann 2024-10-20 14:24:05 UTC
(In reply to Jens Petersen from comment #7)
> (In reply to Carlos O'Donell from comment #5)
> > https://github.com/rpm-software-management/rpm/issues/3192
> 
> This was addressed upstream at the end of last month in
> https://github.com/rpm-software-management/rpm/pull/3241
> which according to the 4.20 draft release-notes should be
> rawhide at least now (and also f41 updates-testing).
> So I guess the new lua rpm.spawn() could be tested now in Rawhide.
> 
> There is also https://github.com/rpm-software-management/rpm/pull/3270

Does this mean that the issue _should_ be gone in RPM 4.20 (release) on F41?

I'm still getting the warning with the following software on F41 with updates-testing enabled:
```
dnf5-5.2.6.2-1.fc41.x86_64
glibc-common-2.40-3.fc41.x86_64
rpm-4.20.0-1.fc41.x86_64
```

Comment 11 Fabio Valentini 2024-10-20 14:29:02 UTC
The linked RPM pull request makes it sound as if the deprecation warnings are only suppressed for packages built with old RPM versions on which those functions were not deprecated yet. But everything in Fedora 41+ is built with RPM version where those *are* deprecated ...

Comment 12 Michal Domonkos 2024-10-23 15:49:52 UTC
*** Bug 2319139 has been marked as a duplicate of this bug. ***

Comment 13 amatej 2024-10-29 05:26:19 UTC
*** Bug 2321923 has been marked as a duplicate of this bug. ***

Comment 14 Fedora Update System 2024-10-31 06:16:47 UTC
FEDORA-2024-6aaddaedd3 (glibc-2.40-9.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-6aaddaedd3

Comment 15 MicMor 2024-10-31 10:15:02 UTC
@micmor

Comment 16 Fedora Update System 2024-11-01 01:35:04 UTC
FEDORA-2024-6aaddaedd3 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-6aaddaedd3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-6aaddaedd3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Florian Weimer 2024-11-01 09:18:41 UTC
*** Bug 2323102 has been marked as a duplicate of this bug. ***

Comment 18 Florian Weimer 2024-11-01 09:22:31 UTC
*** Bug 2323123 has been marked as a duplicate of this bug. ***

Comment 19 Fedora Update System 2024-11-02 02:24:16 UTC
FEDORA-2024-6aaddaedd3 (glibc-2.40-9.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 20 Jeffrey Walton 2024-11-18 19:29:13 UTC
This probably warrants another bug report, but the scriplets got noisy again:

$ sudo dnf update
...
[1/7] java-17-openjdk-1:17.0.13.0.11-3. 100% |   1.1 MiB/s | 425.0 KiB |  00m00s
[2/7] java-17-openjdk-devel-1:17.0.13.0 100% |   7.4 MiB/s |   4.7 MiB |  00m01s
[3/7] policycoreutils-0:3.7-5.fc41.x86_ 100% |   4.3 MiB/s | 212.2 KiB |  00m00s
[4/7] python3-policycoreutils-0:3.7-5.f 100% |   9.3 MiB/s |   2.2 MiB |  00m00s
[5/7] policycoreutils-python-utils-0:3. 100% |   1.4 MiB/s |  50.2 KiB |  00m00s
[6/7] kdepim-addons-0:24.08.3-2.fc41.x8 100% |   2.1 MiB/s |   3.3 MiB |  00m02s
[7/7] java-17-openjdk-headless-1:17.0.1 100% |   4.3 MiB/s |  44.3 MiB |  00m10s
--------------------------------------------------------------------------------
[7/7] Total                             100% |   5.2 MiB/s |  55.2 MiB |  00m11s
Running transaction
[ 1/16] Verify package files            100% |  17.0   B/s |   7.0   B | -00m00s
>>> Running pre-transaction scriptlet: java-17-openjdk-headless-1:17.0.13.0.11-3dnf 5 is printing lua only to stdout, but may skip first and last line
The java-17-openjdk package is deprecated and may no longer receive updates. Since f42 install adoptium-temurin-java-repository and install temurin-17-jre
https://fedoraproject.org/wiki/Changes/ThirdPartyLegacyJdks#adoptium-temurin-java-repository
It currently lacks rpm-based debuginfo, fastdebugs and slowdebugs and headless subpackage. It also lacks offline javadocs and jdk duplicates jre
[ 1/16] Verify package files            100% |  17.0   B/s |   7.0   B | -00m00s
>>> Running pre-transaction scriptlet: java-17-openjdk-devel-1:17.0.13.0.11-3.fcdnf 5 is printing lua only to stdout, but may skip first and last line
The java-17-openjdk-devel package is deprecated and may no longer receive updates. Since f42 install adoptium-temurin-java-repository and install temurin-17-jdk
https://fedoraproject.org/wiki/Changes/ThirdPartyLegacyJdks#adoptium-temurin-java-repository
It currently lacks rpm-based debuginfo, fastdebugs and slowdebugs and headless subpackage. It also lacks offline javadocs and jdk duplicates jre
[ 1/16] Verify package files            100% |  42.0   B/s |   7.0   B |  00m00s
[ 2/16] Prepare transaction             100% |  33.0   B/s |  14.0   B |  00m00s
[ 3/16] Upgrading java-17-openjdk-headl 100% |  71.8 MiB/s | 185.6 MiB |  00m03s
>>> Running post-install scriptlet: java-17-openjdk-headless-1:17.0.13.0.11-3.fc
>>> Finished post-install scriptlet: java-17-openjdk-headless-1:17.0.13.0.11-3.f
>>> Scriptlet output:
>>> dnf 5 is printing bash only to logs
>>> The java-17-openjdk package is deprecated and may no longer receive updates.
>>> https://fedoraproject.org/wiki/Changes/ThirdPartyLegacyJdks#adoptium-temurin
>>> It currently lacks rpm-based debuginfo, fastdebugs and slowdebugs and headle
>>> 
[ 4/16] Upgrading java-17-openjdk-1:17. 100% |  19.9 MiB/s |   1.1 MiB |  00m00s
[ 5/16] Upgrading policycoreutils-0:3.7 100% |   9.8 MiB/s | 745.1 KiB |  00m00s
[ 6/16] Upgrading python3-policycoreuti 100% |  44.9 MiB/s |   5.9 MiB |  00m00s
[ 7/16] Upgrading policycoreutils-pytho 100% |   9.6 MiB/s |  97.8 KiB |  00m00s
[ 8/16] Upgrading java-17-openjdk-devel 100% | 151.0 MiB/s |   8.9 MiB |  00m00s
>>> Running post-install scriptlet: java-17-openjdk-devel-1:17.0.13.0.11-3.fc41.
>>> Finished post-install scriptlet: java-17-openjdk-devel-1:17.0.13.0.11-3.fc41
>>> Scriptlet output:
>>> dnf 5 is printing bash only to logs
>>> The java-17-openjdk-devel package is deprecated and may no longer receive up
>>> https://fedoraproject.org/wiki/Changes/ThirdPartyLegacyJdks#adoptium-temurin
>>> It currently lacks rpm-based debuginfo, fastdebugs and slowdebugs and headle
>>> 
[ 9/16] Upgrading kdepim-addons-0:24.08 100% |  27.3 MiB/s |  12.8 MiB |  00m00s
[10/16] Removing java-17-openjdk-devel- 100% |   2.0 KiB/s | 114.0   B |  00m00s
[11/16] Removing policycoreutils-python 100% |  11.7 KiB/s |  24.0   B |  00m00s
[12/16] Removing java-17-openjdk-1:17.0 100% | 560.0   B/s |  14.0   B |  00m00s
[13/16] Removing python3-policycoreutil 100% |  16.7 KiB/s | 307.0   B |  00m00s
[14/16] Removing policycoreutils-0:3.7- 100% |  17.4 KiB/s | 178.0   B |  00m00s
[15/16] Removing java-17-openjdk-headle 100% |   8.7 KiB/s | 510.0   B |  00m00s
[16/16] Removing kdepim-addons-0:24.08. 100% |   1.0 KiB/s |   1.4 KiB |  00m01s
Complete!ng trigger-post-uninstall scriptlet: systemd-0:256.8-1.fc41.x86_64c41.x
Nothing to do.
Removed 20 files, 10 directories. 0 errors occurred.

Comment 21 Fabio Valentini 2024-11-18 19:31:19 UTC
This looks like it's from a different package (java-17-openjdk vs. glibc), and for a totally unrelated reason.

Comment 22 Fabio Valentini 2024-11-18 20:15:50 UTC
(To clarify: Please report this against the java-17-openjdk package instead. It shouldn't print user-facing stuff in its scriptlets.)

Comment 23 Jeffrey Walton 2025-02-11 15:46:48 UTC
This issue is still present as of February 11, 2025, which includes glibc-common-0:2.40-3:

>>> Running trigger-install scriptlet: glibc-common-0:2.40-3.fc41.x86_64warning: posix.fork(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.spawn() or rpm.execute() instead

Comment 24 Florian Weimer 2025-02-11 16:21:17 UTC
(In reply to Jeffrey Walton from comment #23)
> This issue is still present as of February 11, 2025, which includes
> glibc-common-0:2.40-3:
> 
> >>> Running trigger-install scriptlet: glibc-common-0:2.40-3.fc41.x86_64warning: posix.fork(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.spawn() or rpm.execute() instead

2.40-3 is an old version which does not have this fix yet, so this is expected. You get the warnings once when upgrading from an older version, but not the newer version you are upgrading to.


Note You need to log in before you can comment on or make changes to this bug.