Bug 2080957 - "Ambiguous output redirect" warning with csh or tcsh
Summary: "Ambiguous output redirect" warning with csh or tcsh
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: elfutils
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Mark Wielaard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-02 13:16 UTC by Marc Dionne
Modified: 2022-05-07 04:38 UTC (History)
6 users (show)

Fixed In Version: elfutils-0.187-2.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-07 04:38:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marc Dionne 2022-05-02 13:16:46 UTC
Description of problem:

The redirection in /etc/profile.d/debuginfod.csh, which is delivered by the elfutils-debuginfod-client rpm, causes the following warning to appear at login or whenever csh or tcsh are started:

Ambiguous output redirect.

The offending line is:

set debuginfod_urls=`sh -c "cat /etc/debuginfod/*.urls 2>/dev/null" | tr '\n' ' '`

... which was introduced with elfutils-debuginfod-client-0.187-1.fc36.  The warning did not occur with elfutils-debuginfod-client-0.186-3.fc36.


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

elfutils-debuginfod-client-0.187-1.fc36


How reproducible:

Warning occurs at every login or csh/tcsh startup that processes startup files.


Steps to Reproduce:
1. Login to affected system (any shell)
2. tcsh

Warning would occur at step 1 if the user's shell is csh or tcsh.


Actual results:


Expected results:


Additional info:

Comment 1 Mark Wielaard 2022-05-02 13:44:56 UTC
Sorry, I am travelling and don't have [t]csh installed locally at the moment. So I cannot easily replicate.

The odd thing is that the line that apparently reports the issue is explcitly using sh -c "..." precisely to work around the redirection limitations in [t]csh.

Comment 2 Marc Dionne 2022-05-02 14:10:17 UTC
It uses sh -c, but as there is no quoting around the redirection symbols (> and |), seems to me those would be handled by the shell handling the backticks, i.e. csh or tcsh.

Maybe some additional quoting could make things work, or this just need to be rewritten in a more csh/tcsh friendly way.

Comment 3 Mark Wielaard 2022-05-03 15:57:08 UTC
(In reply to Marc Dionne from comment #2)
> It uses sh -c, but as there is no quoting around the redirection symbols (>
> and |), seems to me those would be handled by the shell handling the
> backticks, i.e. csh or tcsh.

You are right. I am not sure how we missed this. It is fixed upstream now:
https://sourceware.org/pipermail/elfutils-devel/2022q2/005000.html

I'll prepare new elfutils packages.

Comment 4 Fedora Update System 2022-05-03 17:15:22 UTC
FEDORA-2022-287a6c3913 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-287a6c3913

Comment 5 Fedora Update System 2022-05-04 12:42:08 UTC
FEDORA-2022-287a6c3913 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-287a6c3913`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-287a6c3913

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

Comment 6 Fedora Update System 2022-05-07 04:38:00 UTC
FEDORA-2022-287a6c3913 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


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