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 1045961 - Handling of octal numbers (since tcsh v6.14) causes script breakage
Summary: Handling of octal numbers (since tcsh v6.14) causes script breakage
Keywords:
Status: CLOSED DUPLICATE of bug 889491
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tcsh
Version: 6.5
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: David Kaspar // Dee'Kej
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-23 03:28 UTC by Giorgi Tavkelishvili
Modified: 2015-10-20 10:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-20 10:38:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Giorgi Tavkelishvili 2013-12-23 03:28:20 UTC
Since v6.14 up until v6.17 (2010-05-12) tcsh interpreted strings with leading zeros as octal numbers, causing script breakage in our environment. Several users have reported this. See one example:

http://mx.gw.com/pipermail/tcsh/2010-January/004047.html

Simple test to illustrate the problem:

$ lsb_release -d
Description:    CentOS release 5.10 (Final)
$ tcsh --version
tcsh 6.14.00 (Astron) 2005-03-25 (x86_64-unknown-linux) options wide,nls,dl,al,kan,sm,rh,color,filec
$ tcsh
$ echo $0
tcsh
$ @ x = 5 + 08
@: Badly formed number.
$

$ lsb_release -d
Description:	Red Hat Enterprise Linux Server release 6.5 (Santiago)
$ tcsh --version
tcsh 6.17.00 (Astron) 2009-07-10 (x86_64-unknown-linux) options wide,nls,dl,al,kan,sm,rh,color,filec
$ tcsh
$ echo $0
tcsh
$ @ x = 5 + 08
@: Badly formed number.
$ 

An upstream patch to retain backwards compatibility has been added to v6.17 on 2010-05-12.

http://bugs.gw.com/print_bug_page.php?bug_id=97

tcsh 6.17 release 24 shipped in RHEL 6.5 is apparently based on the code from 2009-07-10 and doesn’t include this patch:

$ ls
tcsh-6.17-24.el6.src.rpm
$ rpm -qip tcsh-6.17-24.el6.src.rpm 
Name        : tcsh                         Relocations: (not relocatable)
Version     : 6.17                              Vendor: Red Hat, Inc.
Release     : 24.el6                        Build Date: Tue 18 Dec 2012 08:23:44 AM NZDT
Install Date: (not installed)               Build Host: ppc7.build.bos.redhat.com
Group       : System Environment/Shells     Source RPM: (none)
Size        : 949907                           License: BSD
Signature   : RSA/8, Wed 23 Jan 2013 05:19:15 AM NZDT, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.tcsh.org/
Summary     : An enhanced version of csh, the C shell
Description :
Tcsh is an enhanced but completely compatible version of csh, the C
shell.  Tcsh is a command language interpreter which can be used both
as an interactive login shell and as a shell script command processor.
Tcsh includes a command line editor, programmable word completion,
spelling correction, a history mechanism, job control and a C language
like syntax.
$ mkdir tcsh-6.17 && cd tcsh-6.17 && rpm2cpio ../tcsh-6.17-24.el6.src.rpm | cpio -id && tar -xzf *.tar.gz && { grep -Ri parseoctal * || echo "no match"; }
1864 blocks
no match
$ 

Was this done intentionally (e.g. to retain consistency in tcsh behavior between RHEL 5 and 6) or are you planning to include this particular upstream patch in the next release of tcsh for EL6?

tcsh 6.18.01 shipped with RHEL 7.0 Beta clearly includes this patch:

$ cat /etc/redhat-release 
Red Hat Enterprise Linux Everything release 7.0 Beta (Maipo)
$ tcsh --version
tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-unknown-linux) options wide,nls,dl,al,kan,rh,color,filec
$ tcsh 
$ echo $0
tcsh
$ @ x = 5 + 08
$ echo $x
13
$

Comment 2 Ondrej Vasik 2013-12-26 17:39:44 UTC
Last update of tcsh in RHEL-6 was in RHEL-6.4. We tend to not change the default behaviour within one major release of the RHEL product. It might be possible to add it via some optional settings (probably parseoctal as is used by upstream in 6.18.01).
However, priorities are set based on the customer request, so if you are Red Hat customer, please submit this request via product support at access.redhat.com . Please inform them about existing bugzilla for this request. Without such request, adding this functionality into future updates of RHEL-6 is unlikely.

Comment 4 David Kaspar // Dee'Kej 2015-10-20 10:38:58 UTC
Hello Giorgi!

> Was this done intentionally (e.g. to retain consistency in tcsh behavior
> between RHEL 5 and 6) or are you planning to include this particular
> upstream patch in the next release of tcsh for EL6?

I really can't tell you if there was any decision like this before, since I am the new maintainer of the 'tcsh' package. But we will definitely not include the change to this behaviour in RHEL6. Our customers expect the packages to behave the same if possible during the whole life cycle of the each RHEL major version. Changes to default behaviour are generally not justifiable nor accepted/implemented.

> tcsh 6.18.01 shipped with RHEL 7.0 Beta clearly includes this patch:
> ...

Yes, because the package in RHEL7 was taken from the Fedora version current at that time. That new version of the 'tcsh' (6.18.01) already contained the patch about parsing the octal numbers.

> An upstream patch to retain backwards compatibility has been added to v6.17
> on 2010-05-12.
> 
> http://bugs.gw.com/print_bug_page.php?bug_id=97

Well, actually it was added in the version tcsh-6.17.02, please see:
https://github.com/tcsh-org/tcsh/commit/44d72d15229e054141cef73a5c92ab5e8541772b

> tcsh 6.17 release 24 shipped in RHEL 6.5 is apparently based on the code
> from 2009-07-10 and doesn’t include this patch:

I will not be able to tell you exactly the dates, but the RHEL6 version of 'tcsh' is based on 6.17.00 version. As you can see above, the patch to change the default behaviour when parsing octal numbers was added *after* the 6.17.00 base for RHEL6 was established.

Therefore, I'm sorry, but we will not change the default behaviour for 'tcsh' when parsing octal numbers, because it might have lead to regressions.

*** This bug has been marked as a duplicate of bug 889491 ***


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