Bug 737142

Summary: HISTTIMEFORMAT inherited by environment does not cause timestamps to be written to history file
Product: Red Hat Enterprise Linux 5 Reporter: Richard Brittain <richard.brittain>
Component: bashAssignee: Roman Rakus <rrakus>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.8CC: prc, tsmetana
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: 2013-03-12 14:28:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Richard Brittain 2011-09-09 18:05:03 UTC
Description of problem:
If $HISTTIMEFORMAT is inherited through the environment, instead of being set by .bashrc or manually, then it works as expected for displaying history, but does not cause timestamps to be written into the history file.

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

How reproducible:
completely

Steps to Reproduce:
1. ensure no shell startup files set HISTTIMEFORMAT
2. HISTFILE=testfile HISTTIMEFORMAT="%T %F " bash
3. run some commands, run 'history' and see timestamps
4. exit the subshell and examine testfile

Actual results:
command history stored without timestamps

Expected results:
commands interspersed with timestamps

Additional info:
Seems to have been fixed in RHEL6 (bash 4.1.2).
e.g.
http://groups.google.com/group/gnu.bash.bug/browse_thread/thread/eab1cc050109969d/5fa02785a2f7c48e?lnk=gst&q=HISTTIMEFORMAT#5fa02785a2f7c48e

We use wrapper scripts to start special purpose shells for which we'd like to capture history with timestamps.  A backport of the fix to RHEL5 would be great.

Comment 1 RHEL Program Management 2011-09-23 00:54:04 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 unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 2 RHEL Program Management 2012-06-12 01:30:50 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 unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 3 Roman Rakus 2013-03-12 14:28:12 UTC
RHEL-5.10 (the next RHEL-5 minor release) is going to be the first production phase 2 [1] release of RHEL-5. Since phase 2 we'll be addressing only security and critical issues.

[1] https://access.redhat.com/support/policy/updates/errata/