Bug 2127940 - save_to_file macro does not work if the thing being saved contains a heredoc terminated with EOF
Summary: save_to_file macro does not work if the thing being saved contains a heredoc ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.12.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.12.0
Assignee: Adam Ruzicka
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-19 12:23 UTC by Peter Ondrejka
Modified: 2022-11-16 13:36 UTC (History)
3 users (show)

Fixed In Version: foreman-3.3.0.17-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:35:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35530 0 Normal Closed save_to_file macro does not work if the thing being saved contains a heredoc terminated with EOF 2022-10-05 07:24:24 UTC
Red Hat Issue Tracker SAT-12984 0 None None None 2022-10-05 08:28:31 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:36:00 UTC

Description Peter Ondrejka 2022-09-19 12:23:50 UTC
Description of problem:

save_to_file does

cat <<EOF >$file
$content
EOF

but if `$content` contains a heredoc terminated with `EOF`, it terminates the heredoc that save_to_file creates.


Version-Release number of selected component (if applicable):

Satellite 6.12 snap 11

How reproducible:
always

Additional info:
First found upstream by aruzicka

Comment 1 Bryan Kearney 2022-09-26 16:04:29 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35530 has been resolved.

Comment 2 Brad Buckingham 2022-10-04 13:53:39 UTC
Based upon discussion with QE and Eng (Adam), this bugzilla is needed in order to support the solution for bug 2127934.  For this reason, we are aligning it to 6.12.

Comment 6 Peter Ondrejka 2022-10-10 14:16:26 UTC
Verified on Sat 6.12 snap 14 using satqe automation.

Comment 10 errata-xmlrpc 2022-11-16 13:35:50 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.12 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-2022:8506


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