Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 2135418 - rubygem-foreman_hooks scriptlet issues an error message
Summary: rubygem-foreman_hooks scriptlet issues an error message
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Packaging
Version: 6.12.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.13.0
Assignee: Eric Helms
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-17 15:21 UTC by Radek Mynar
Modified: 2023-05-03 13:23 UTC (History)
3 users (show)

Fixed In Version: rubygem-foreman_hooks-0.3.17-3.1.el8sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 13:22:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-14440 0 None None None 2022-12-12 21:18:21 UTC
Red Hat Product Errata RHSA-2023:2097 0 None None None 2023-05-03 13:23:24 UTC

Description Radek Mynar 2022-10-17 15:21:34 UTC
Description of problem:
Following error is shown during disconnected installation of Satellite 6.12
 Error in POSTTRANS scriptlet in rpm package rubygem-foreman_hooks

Version-Release number of selected component (if applicable):
Satellite 6.12, rubygem-foreman_hooks-0.3.17-3.el8sat.noarch

How reproducible:
always

Steps to Reproduce:
1. prepare a clean RHEL machine for Satellite
2. prepare and mount RHEL and Satellite media for disconnected installation
3. go to /media/sat6/
4. launch installer (./install_packages), use "--nogpgsigs" if using nigtly build with unsigned packages

Actual results:
Installation is finished, but error message is shown. Following entry is in /var/log/dnf.rpm.log

 2022-10-17T09:23:24-0400 INFO /var/tmp/rpm-tmp.iYG6nz: line 1: fg: no job control
 warning: %posttrans(rubygem-foreman_hooks-0.3.17-3.el8sat.noarch) scriptlet failed, exit status 1
 
 2022-10-17T09:23:24-0400 ERROR Error in POSTTRANS scriptlet in rpm package rubygem-foreman_hooks

Expected results:
No errors

Additional info:
The error does not appear during connected installation.

Comment 2 Lukas Pramuk 2023-01-25 12:38:56 UTC
# rpm -q --scripts -p rubygem-foreman_hooks-0.3.17-3.el8sat.noarch.rpm
posttrans scriptlet (using /bin/sh):
%{foreman_plugin_log}


# %{foreman_plugin_log}
bash: fg: %{foreman_plugin_log}: no such job


>>> unresolved spec variable

Comment 3 Eric Helms 2023-01-25 12:52:41 UTC
That output does not prove anything as the RPM has dependencies, and without the dependencies you are negating the ability for that macro to exist.

When attempting to test this, I was not able to reproduce it in a live environment. Have you seen the issue pop up again in your environment?

Comment 4 Evgeni Golov 2023-01-26 13:49:37 UTC
%{foreman_plugin_log} is a macro we introduced in Foreman 3.3 (which needs to be present at *build* time, not *install* time).

The build (https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=2055434) however was done with foreman-3.1 (see https://download.eng.bos.redhat.com/brewroot/vol/rhel-8/packages/rubygem-foreman_hooks/0.3.17/3.el8sat/data/logs/noarch/installed_pkgs.log) and thus the macro was never replaced.

Rebuild and be happy.

Comment 5 Lukas Pramuk 2023-02-08 14:05:21 UTC
VERIFIED.

@Satellite 6.13.0 Snap 9
rubygem-foreman_hooks-0.3.17-3.1.el8sat.noarch

by this simple manual step:

# rpm -q --scripts rubygem-foreman_hooks
posttrans scriptlet (using /bin/sh):

echo foreman_hooks >> /usr/share/foreman/tmp/restart_required_changed_plugins || : 
chown foreman:foreman /usr/share/foreman/tmp/restart_required_changed_plugins || :

>>> there are now no errors produced by scriptlet

Comment 9 errata-xmlrpc 2023-05-03 13:22:16 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 (Important: Satellite 6.13 Release), 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/RHSA-2023:2097


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