Bug 477753

Summary: Add utempter support to "script"
Product: [Fedora] Fedora Reporter: Olivier Fourdan <ofourdan>
Component: util-linux-ngAssignee: Karel Zak <kzak>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 11CC: kem, kzak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 490693 (view as bug list) Environment:
Last Closed: 2010-04-29 10:43:20 UTC Type: ---
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: 490693, 586942    
Attachments:
Description Flags
Proposed patch [1/2]
none
Patch for the spec file [2/2] none

Description Olivier Fourdan 2008-12-23 10:52:31 UTC
Created attachment 327747 [details]
Proposed patch [1/2]

Description of problem:

"script" does not update utmp logs so "logname" or "who" do not return the expected results when run from a "script" session.

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

util-linux-2.13-0.47

How reproducible:

100% reproducible

Steps to Reproduce:
1. script
2. logname
3. who am i
  
Actual results:

[ofourdan@host ~]$ script
Script started, file is typescript
[ofourdan@host ~]$ logname
logname: no login name
[ofourdan@host ~]$ who am i
[ofourdan@host ~]$ 

Expected results:

[ofourdan@host ~]$ script
Script started, file is typescript
[ofourdan@host ~]$ logname
ofourdan
[ofourdan@host ~]$ who am i
ofourdan pts/25       2008-12-23 10:45 (host)
[ofourdan@host ~]$ 

Additional info:

This is a corollary of BZ#474896. "script" does update the utmp logs, and tools such as "logname" or "who" use the utmp records and therefore fail to return the expected result when run from a "script" session.

The attached patch adds support for libutempter in "script" so that the utmp records are properly updated.

note: the problem is also upstream so this might need to be reported upstream too.

NB: Also requires libutempter >= 1.1.4-4

Comment 1 Olivier Fourdan 2008-12-23 11:03:13 UTC
Created attachment 327749 [details]
Patch for the spec file [2/2]

Also adds BuildRequires for libutempter-devel to the spec file.

Comment 2 Karel Zak 2008-12-23 22:43:36 UTC
Good catch, I'll fix the problem in upstream code. It shouldn't be a problem to backport it to RHEL. Thanks.

Comment 3 Karel Zak 2009-01-13 10:24:00 UTC
Hmm... I'm not sure if we want to add a new dependence on libutempter to the very basic system package. I think the problem should be resolved by upstream and tested on rawhide.

I have doubts about this change on RHEL. It does not seem as an important problem.

Moving to Fedora and util-linux-ng.

Comment 6 Bug Zapper 2009-06-09 10:28:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2010-04-27 12:37:01 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Karel Zak 2010-04-29 10:43:20 UTC
The feature has been added to the upstream code, commit f0bc3fa0cf45f484ea696ef063a10b65d1a45e13.

It'll be available in Fedora in the next version update (util-linux-ng 2.18, probably F-14).