Bug 17488 - Failed installation on automounted dir
Summary: Failed installation on automounted dir
Keywords:
Status: CLOSED DUPLICATE of bug 19666
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-09-14 03:06 UTC by Enrico Scholz
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-09-14 19:48:59 UTC
Embargoed:


Attachments (Terms of Use)

Description Enrico Scholz 2000-09-14 03:06:26 UTC
I'm using am-utils to manage the /usr/src/redhat directory:

| # amq
| ...
| /usr/src/redhat        toplvl  /etc/amd/amd.rpm              
/usr/src/redhat

To let RPM ignore this path, I have included /usr/src into %_netsharedpath.
When trying to install rpm-4.0-4 I get:
| # LANG=C rpm -U /usr/src/redhat/RPMS/i686/rpm-4.0-4.i686.rpm
| installing package rpm-4.0-4 needs 21Kb on the /usr/src/redhat filesystem

This message seems to be a little bit senseless... Trying again produces:
| # LANG=C rpm -U /usr/src/redhat/RPMS/i686/rpm-4.0-4.i686.rpm 
--ignoresize                       
| unpacking of archive failed on file /usr/src/redhat/SRPMS: cpio: chown
failed - Operation not permitted

I have tried '--excludepath=/usr/src' but rpm tried to unpack it
nevertheless. With some hacking (removing /usr/src/redhat from amd.conf) I
was able to install it and the directory had the correct status:

| # LANG=C rpm -qs rpm
| net shared    /usr/src/redhat
| net shared    /usr/src/redhat/BUILD
| ...

but when trying to update, I get again:
| # LANG=C rpm -U /tmp/rpm-4.0-4.i686.rpm --force
| unpacking of archive failed on file /usr/src/redhat: cpio: chown failed -
Read-only file system


trying an explicit exludepath coredumps:
| # rpmu -U /tmp/rpm-4.0-4.i686.rpm --force --excludepath=/usr/src/redhat
| Segmentation fault (core dumped)
|
| # gdb rpmu core
| ...
| (gdb) bt
| #0  0x401c5dc3 in strlen () from /lib/libc.so.6
| #1  0x400805d7 in relocateFileList () from /usr/lib/librpm.so.0
| #2  0x400835eb in rpmRunTransactions () from /usr/lib/librpm.so.0
| #3  0x4007995c in rpmInstall () from /usr/lib/librpm.so.0
| #4  0x804b095 in poptResetContext ()
| #5  0x40160b65 in __libc_start_main (...)

Comment 1 Enrico Scholz 2000-09-14 19:48:55 UTC
Some more information about the last coredump:

# gdb .libs/rpmi
(gdb) r -U /usr/src/redhat/RPMS/noarch/filesystem-2.0.7-1.noarch.rpm --force
--test --excludepath=/var/spool/mail
Program received signal SIGSEGV, Segmentation fault.
0x401c5dc3 in strlen () from /lib/libc.so.6
(gdb) bt
#0  0x401c5dc3 in strlen () from /lib/libc.so.6
#1  0x400805d7 in relocateFileList (alp=0x805c380, probs=0x8079b80,
origH=0x8087340, actions=0x0, allowBadRelocate=1) at transaction.c:448
#2  0x400835eb in rpmRunTransactions (ts=0x805c2f0, notify=0x40078b70
<showProgress>, notifyData=0x20, okProbs=0x0, newProbs=0xbffff488, transFlags=1,
ignoreSet=116)
    at transaction.c:1686
#3  0x4007995c in rpmInstall (rootdir=0x804b1e0 "/", fileArgv=0x80510a0,
transFlags=1, interfaceFlags=32, probFilter=116, relocations=0x80557c0) at
rpminstall.c:370
#4  0x804b095 in main (argc=6, argv=0xbffff604) at rpmqv.c:1410
#5  0x40160b65 in __libc_start_main (main=0x804a150 <main>, argc=6,
ubp_av=0xbffff604, init=0x8049018 <_init>, fini=0x804b19c <_fini>,
rtld_fini=0x4000df24 <_dl_fini>, 
    stack_end=0xbffff5fc) at ../sysdeps/generic/libc-start.c:111
(gdb) up
#1  0x400805d7 in relocateFileList (alp=0x805c380, probs=0x8079b80,
origH=0x8087340, actions=0x0, allowBadRelocate=1) at transaction.c:448
448             len = strlen(relocations[j].newPath);

(gdb) up
#1  0x400805d7 in relocateFileList (alp=0x805c380, probs=0x8079b80,
origH=0x8087340, actions=0x0, allowBadRelocate=1) at transaction.c:448
448             len = strlen(relocations[j].newPath);
(gdb) p relocations
$3 = (rpmRelocation *) 0xbfffef70
(gdb) p *relocations
$4 = {oldPath = 0xbfffef60 "/var/spool/mail", newPath = 0x0}
(gdb) p j
$5 = 0


You are runnung strlen() with a null-ptr as argument

Comment 2 Jeff Johnson 2001-01-08 15:43:22 UTC
Again, netsharedpath ignored problems, --exclude broken as well. 

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


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