Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 889491

Summary: introduce parseoctal variable for tcsh-6.17* in RHEL6
Product: Red Hat Enterprise Linux 6 Reporter: BillXu <padkiller>
Component: tcshAssignee: David Kaspar // Dee'Kej <deekej>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: g.tavkelishvili, ovasik, pchavan
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-19 14:25:32 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: 1075802, 1172231    
Attachments:
Description Flags
Proposed man page change
none
Added parseoctal variable none

Description BillXu 2012-12-21 12:32:17 UTC
if you run below small csh script, you will get a error,

#!/bin/csh
if(121016 < 030920) then
  echo "Hello there".
endif

But, if you change a little, it works,
#!/bin/csh
if(121016 < 030720) then
  echo "Hello there".
endif

It works at Fedora7, and SunOS, HP-UX, but it doesn't work at RHEL5.8 or up.

Comment 2 Ondrej Vasik 2012-12-21 16:01:49 UTC
030920 -> leading zero means octal -> there is no 9 in octal - and this leads to an error - so this behaviour may be intentional. However, it is worth to investigate why other systems behave differently and to find the reasons for the change.

Comment 3 Roman Kollár 2012-12-21 16:44:28 UTC
What exact versions of tcsh are you using on those other systems?
Also, I think we should update the manpage in rhel, as changing this or backporting tcsh-6.18.00 behavior(parseoctal variable) would cause problems to users.

Comment 4 BillXu 2012-12-22 13:58:17 UTC
(In reply to comment #3)
> What exact versions of tcsh are you using on those other systems?
Also, I
> think we should update the manpage in rhel, as changing this or backporting
> tcsh-6.18.00 behavior(parseoctal variable) would cause problems to users.

I just know Fedora7, the tcsh version is tcsh-6.14-15.i386.rpm, but for other system, I need to check next time, the workstation in my customer's office.

Comment 5 BillXu 2012-12-22 14:09:57 UTC
Could you please tell me the behavior in next version? whan't the solution?

Comment 6 BillXu 2012-12-26 14:19:42 UTC
I compiled tcsh-6.18-01 from http://www.tcsh.org/, it OK.

Comment 7 Roman Kollár 2013-01-04 16:53:37 UTC
Well, in upstream:
In version up to tcsh-6.14.00(I checked tcsh-6.12.00 and up) the man page says that octal parsing(every string with a leading zero is considered octal number) should work, but it does not.
From tcsh-6.15.00 it's removed from the man page.
From tcsh-6.16.00 octal parsing works again, but it is not mentioned in the man page.
From tcsh-6.17.04 parsing octal numbers is opt-in with the parseoctal variable and this is also in the man page.

In rhel-5.8/tcsh-6.14.00 the octal parsing is fixed and works as expected(see bug 438109). This is probably why the reproducer works in Fedora, but not in rhel.
In rhel-6.3/tcsh-6.17.00 the octal parsing works but it's not documented(same as upstream).

Comment 8 Roman Kollár 2013-01-04 17:44:40 UTC
Created attachment 672500 [details]
Proposed man page change

Comment 9 Fridolín Pokorný 2013-04-09 13:47:32 UTC
Created attachment 733247 [details]
Added parseoctal variable

Upstream way how to fix this issue. Problem is fixed in f17+.

Comment 11 RHEL Program Management 2013-10-14 00:07:18 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 14 Pushpendra Chavan 2014-07-14 14:28:46 UTC
Changed the few parameters in the bugzilla to correctly show the requirements.

The if statements are not working because tcsh is considering the numbers mentioned leading with 0 as octal number. This can be considered using variable parseoctal.

~~~
      parseoctal
               To retain compatibily with older versions numeric variables starting with 0 are not interpreted as octal. Setting this variable enables proper octal parsing.
~~~

Can we get the test packages with the patch?

- Pushpendra

Comment 16 David Kaspar // Dee'Kej 2015-10-19 14:25:32 UTC
I am really sorry, but our customers expect the default behaviour to remain unchanged. Changing it could break some vital scripts they are using.

This new functionality is already present in 'tcsh' of RHEL-7. If you really need this behvaiour, I would politely suggest to consider switching to the current RHEL-7 release.

Comment 17 David Kaspar // Dee'Kej 2015-10-20 10:38:58 UTC
*** Bug 1045961 has been marked as a duplicate of this bug. ***