Bug 1254837
Summary: | typo in /etc/profile.d/less.sh | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Frank Hirtz <fhirtz> | ||||
Component: | less | Assignee: | Pavel Raiskup <praiskup> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Miroslav Hradílek <mhradile> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.7 | CC: | fhirtz, hhorak, mhradile, omerusta, praiskup, sardella | ||||
Target Milestone: | rc | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-11-09 05:20:49 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1269194 | ||||||
Attachments: |
|
Description
Frank Hirtz
2015-08-19 01:54:58 UTC
This was apparently introduced specifically as a fix in: https://rhn.redhat.com/errata/RHBA-2014-0755.html <snip> * Previously, the lesspipe script returned incorrect exit status codes. As a consequence, the less utility failed to decompress empty files that had been compressed with the gzip utility, and an unwanted message was displayed. With this update, a pipe character ("|") has been added in front of the LESSOPEN environment variable to enforce a new default behavior of lesspipe. For backward compatibility, lesspipe has the same behavior if LESSOPEN remains unchanged. As a result, the less utility now detects and displays empty files correctly. (BZ#615303) </snip> ...but as a side-effect, now this breaks any environment where there's more than one version of 'less' present. The double '||' is not a bug. It modifies the way less handles exit statuses from LESSOPEN scripts. Specifically, it maintains the original behavior (prior a change) for backwards compatibility with older LESSOPEN scripts. As the bug is reported against RHEL 6.7, I don't think we should modify this behavior, as many currently running RHEL 6.7 could be using old LESSOPEN scripts. I did however make the change in F22 and up. (In reply to Viktor Jancik from comment #2) > > I did however make the change in F22 and up. Nope after trying to fix bug in less.sh in Fedora Rawhide made another typo. Now we need to apply following patch which i will upload here Created attachment 1069748 [details]
Patch for less.sh for Fedora Rawhide
This is fixing the """ /etc/profile.d/less.sh:[:2: too many arguments
""" bug
Yes, I fixed that yesterday as the first report appeared. Sorry for the typo. Is this bug still exist ? The upstream fix works fine (tested on F23), is this something that'd be possible to change in RHEL? I know that there were concerns with behavioral changes in the area previously. The '||' syntax is used intentionally. The $LESSOPEN variable points to script which might exit with non-zero exit status -- and using the '||' syntax guarantees that less will react on the status correctly. If there is installed non-default 'less' program reacting on the same configuration (environment variable) - the non-default 'less' program should be updated to newer version >= v451. If it is somehow important to run older less program, feel free to install additional profile.d script which will set the LESSOPEN variable unconditionally, or use the '~/.bash_profile' or equivalent shell init script. less-481-5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9a937faae1 less-481-5.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ff70f6b6a3 less-481-5.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9a937faae1 less-481-5.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ff70f6b6a3 less-481-5.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. less-481-5.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report. |