Bug 607251

Summary: missing libtermcap.so.2 symlinks
Product: Red Hat Enterprise Linux 6 Reporter: Jeff Bastian <jbastian>
Component: distributionAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: danlocks, jzeleny, mlichvar, notting, ovasik
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: compat-libtermcap-2.0.8-49.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 20:16:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
termcap-demo program none

Description Jeff Bastian 2010-06-23 15:52:23 UTC
Description of problem:
libtermcap has been replaced by ncurses (see bug 606588) in RHEL 6.0.  In order to provide compatibility with applications that were compiled on RHEL 5.x, the ncurses package should provide a libtermcap.so.2 symlink to libtinfo.so.5.

Version-Release number of selected component (if applicable):
ncurses-5.7-3.20090208.el6

How reproducible:
every time

Steps to Reproduce:
1. on a RHEL 5.x system:
     $ gcc -o termcap-demo termcap-demo.c -ltermcap
     $ ./termcap-demo 
     Your terminal is 80x48 characters
2. copy the termcap-demo binary to a RHEL 6.x system
     $ scp termcap-demo rhel6-system:/tmp
3. try to run the program on the RHEL 6.x system
     $ /tmp/termcap-demo 
     /tmp/termcap-demo: error while loading shared libraries: libtermcap.so.2:
     cannot open shared object file: No such file or directory
4. create a symlink to libtinfo.so.5 and try again
     $ sudo ln -s /lib64/libtinfo.so.5 /lib64/libtermcap.so.2
     $ /tmp/termcap-demo
     Your terminal is 80x48 characters

Actual results:
missing libtermcap.so.2 library prevents the program from running properly on a RHEL 6 system

Expected results:
RHEL 6 should allow applications compiled on RHEL 5 to work correctly

Additional info:

Comment 1 Jeff Bastian 2010-06-23 16:03:35 UTC
Created attachment 426302 [details]
termcap-demo program

Comment 2 Miroslav Lichvar 2010-06-23 16:12:05 UTC
The ABI provided by libtinfo is not 100% compatible with libtermpcap, so I'm not sure if creating the symlink is a good fix. It will probably work with most termcap applications, but some might fail.

Is this ok or do we need to resurrect libtermcap with termcap database in a compat package?

Comment 13 releng-rhel@redhat.com 2010-11-10 20:16:59 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Comment 14 Dan Locks 2010-12-02 22:07:50 UTC
Unfortunately, compat-libtermcap-2.0.8-49.el6 does not create the links mentioned above.

[root@foo tmp]# find /usr/lib64 -name "libterm*"
/usr/lib64/libtermcap.so

[root@foo tmp]# yum install compat-libtermcap
Loaded plugins: rhnplugin
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package compat-libtermcap.x86_64 0:2.0.8-49.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================
 Package                               Arch                       Version                             Repository                                Size
=====================================================================================================================================================
Installing:
 compat-libtermcap                     x86_64                     2.0.8-49.el6                        rhel-x86_64-server-6                      16 k

Transaction Summary
=====================================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 16 k
Installed size: 0  
Is this ok [y/N]: y
Downloading Packages:
compat-libtermcap-2.0.8-49.el6.x86_64.rpm                                                                                     |  16 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : compat-libtermcap-2.0.8-49.el6.x86_64                                                                                         1/1 

Installed:
  compat-libtermcap.x86_64 0:2.0.8-49.el6                                                                                                            
Complete!

[root@foo tmp]# find /usr/lib64 -name "libterm*"
/usr/lib64/libtermcap.so
-------------------
[root@foo tmp]# rpm -V compat-libtermcap-2.0.8-49.el6.x86_64.rpm 
package compat-libtermcap-2.0.8-49.el6.x86_64.rpm is not installed
[root@foo tmp]# rpm -i compat-libtermcap-2.0.8-49.el6.x86_64.rpm 
        package compat-libtermcap-2.0.8-49.el6.x86_64 is already installed

That's not right!

Comment 15 Dan Locks 2010-12-02 22:23:48 UTC
opened a new bug, which I think is the correct action.  sorry to create bugspam.

bug 659501