RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2023692 - rpm seems to be calling wrong transfiletriggers
Summary: rpm seems to be calling wrong transfiletriggers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rpm
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Domonkos
QA Contact: Jan Blazek
URL:
Whiteboard:
Depends On: 2023311 2023693
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-16 11:25 UTC by Panu Matilainen
Modified: 2022-05-17 16:35 UTC (History)
10 users (show)

Fixed In Version: rpm-4.16.1.3-11.el9
Doc Type: No Doc Update
Doc Text:
Clone Of: 2023311
Environment:
Last Closed: 2022-05-17 16:01:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-102915 0 None None None 2021-11-16 11:32:29 UTC
Red Hat Product Errata RHBA-2022:4021 0 None None None 2022-05-17 16:01:36 UTC

Description Panu Matilainen 2021-11-16 11:25:19 UTC
+++ This bug was initially created as a clone of Bug #2023311 +++

Description of problem:

I have various transfiletrigger in systemd, but the one that is relevant is this:

$ rpm -q --filetriggers systemd|grep -B2 'user-reload '
transfiletriggerpostun scriptlet (using /bin/sh) -- /etc/systemd/user, /usr/lib/systemd/user
# Execute daemon-reload in user managers.
/usr/lib/systemd/systemd-update-helper user-reload || :
--
transfiletriggerpostun scriptlet (using /bin/sh) -- /etc/systemd/user, /usr/lib/systemd/user
# We restart remaining user services that should be restarted here.
/usr/lib/systemd/systemd-update-helper user-restart || :

As you can see, they should trigger on /etc/systemd/user and /usr/lib/systemd/user.

When I install systemd-resolved, they trigger unexpectedly:

$ sudo dnf reinstall -y --rpmverbosity=debug https://kojipkgs.fedoraproject.org//packages/systemd/249.7/1.fc35/x86_64/systemd-resolved-249.7-1.fc35.x86_64.rpm
...
D: %transfiletriggerpostun(systemd-249.7-1.fc35.x86_64): scriptlet start
D: %transfiletriggerpostun(systemd-249.7-1.fc35.x86_64): execv(/bin/sh) pid 4516
D: Plugin: calling hook scriptlet_fork_post in selinux plugin
D: setexecfilecon: (/bin/sh, rpm_script_t) 
+ /usr/lib/systemd/systemd-update-helper user-reload
Failed to start transient service unit: Connection reset by peer
Failed to reload daemon: Transport endpoint is not connected
D: %transfiletriggerpostun(systemd-249.7-1.fc35.x86_64): waitpid(4516) rc 4516 status 0
...
D: %transfiletriggerpostun(systemd-249.7-1.fc35.x86_64): scriptlet start
D: %transfiletriggerpostun(systemd-249.7-1.fc35.x86_64): execv(/bin/sh) pid 4529
D: Plugin: calling hook scriptlet_fork_post in selinux plugin
D: setexecfilecon: (/bin/sh, rpm_script_t) 
+ /usr/lib/systemd/systemd-update-helper user-restart
Failed to start transient service unit: Connection reset by peer
Failed to start jobs: Transport endpoint is not connected
D: %transfiletriggerpostun(systemd-249.7-1.fc35.x86_64): waitpid(4529) rc 4529 status 0

The scriptlets fail because of some bug, I'm now investigating that. But the fact the the trigger fires at all seems to be a bug too. The package that is being installed has no files that would match those patterns:

$ rpm -ql systemd-resolved|grep user|wc -l
0

Version-Release number of selected component (if applicable):
systemd-249.7-1.fc35.x86_64
systemd-resolved-249.7-1.fc35.x86_64
rpm-4.17.0-1.fc35.x86_64
dnf-4.9.0-1.fc35.noarch

How reproducible:
Deterministic

Steps to Reproduce:
See above.

Actual results:
%transfiletriggerpostun fires, even though no files under the specified paths have been touched.

Expected results:
The trigger does not fire.

--- Additional comment from Panu Matilainen on 2021-11-15 13:23:16 UTC ---

Easily reproduced, seems like a bug indeed. Thanks for reporting.

Comment 2 Michal Domonkos 2022-02-14 11:16:20 UTC
Fixed upstream, commits:

b3d672a5523dfec033160e5cc866432a0e808649
0988ccb53abf426587d228df5c60c4042da71999 (fix-up)

Comment 13 errata-xmlrpc 2022-05-17 16:01:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: rpm), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:4021


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