Bug 154415 - iconvconfig in %post fails when using ia32el on ia64
iconvconfig in %post fails when using ia32el on ia64
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks: 156322
  Show dependency treegraph
 
Reported: 2005-04-11 12:09 EDT by David Lehman
Modified: 2010-10-21 22:52 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2005-678
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-05 12:39:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description David Lehman 2005-04-11 12:09:20 EDT
Description of problem:
/usr/sbin/iconvconfig fails with EXDEV when installing i686 glibc on ia64 with
ia32el service running if /usr is a separate filesystem from /.

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

How reproducible:
Always

Steps to Reproduce:
1. mount /emu directory on different filesystem from /usr
eg.
 /dev/sda4 on / type ext3 (rw)
 /dev/sdb2 on /emul type ext3 (rw)
2. install ia32el and start it
 # rpm -ivh ia32el-1.1-20.ia64.rpm
 Preparing...                ########################################### [100%]
    1:ia32el                 ########################################### [100%]
 # service ia32el start
 Starting Intel IA-32 Execution Layer:                      [  OK  ]
3. install glibc package
 # rpm -ivh glibc-2.3.4-2.7.i686.rpm

Actual results:
Preparing...                ########################################### [100%]
  1:glibc                  ########################################### [100%]
/usr/sbin/iconvconfig: cannot generate output file: Invalid cross-device link
/usr/sbin/glibc_post_upgrade: While trying to execute /usr/sbin/iconvconfig.i686
 child exited with exit code 1
error: %post(glibc-2.3.4-2.7.i686) scriptlet failed, exit status 1


Expected results:
Successful installation

Additional info:
Comment 2 Jakub Jelinek 2005-04-26 11:42:24 EDT
Can you run /usr/sbin/iconvconfig.i686 under strace and attach strace's output
here?  iconvconfig never calls link syscall and only is supposed to call
rename between somefile and somefile.XXXXXX, so both should be in the same
directory (and on the same filesystem).
Comment 7 Jakub Jelinek 2005-06-11 11:01:01 EDT
What iconvconfig.i686 does is a sane thing to do.  It wants to rewrite
/usr/lib/gconv/gconv-modules.cache, but as other programs can be using that
file, it wants to do that atomically, so that no program ends up looking
at crippled /usr/lib/gconv/gconv-modules.cache.
The sequence of operations is essentially:
char temp[] = "/usr/lib/gconv/gconv-modules.cache.XXXXXX";
fd = mkstemp (temp);
write to fd the whole file
close (fd);
rename (temp, "/usr/lib/gconv/gconv-modules.cache");

Unfortunately when run emulated by an emulator using /emul/something scheme
like ia32el this does not work, as new files are never created in /emul/something
tree unless they already exist there, or unless /emul/something/ prefix is used
before the paths explicitely.

It can be worked around in glibc_post_upgrade.i686, but it would be very ugly
hack hardcoding knowledge about /emul/ia32-linux there and I fear there are more
programs that can suffer similarly.

Perhaps if rename(2) in the emulator fails with EXDEV, it could check if both
paths to rename(2) have the same directory and just different basename, it could
copy to a identically named file under /emul/ia32-linux first, then attempt to
rename and afterwards unlink the original file.
Comment 15 Red Hat Bugzilla 2005-10-05 12:39:26 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-678.html

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