Bug 97525 - rpm -U don't handle correctly symbolic links
rpm -U don't handle correctly symbolic links
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
9
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-17 04:00 EDT by Féliciano Matias
Modified: 2007-04-18 12:54 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-19 08:57:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Féliciano Matias 2003-06-17 04:00:11 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030131

Description of problem:
"rpm -U", don't replace symbolic links ou directories.

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

How reproducible:
Always

Steps to Reproduce:
Example :
# rpm -q -l -v -p alsa-driver-0.9.3a-fr2.i386.rpm | grep /dev/snd
lrwxrwxrwx    1 root    root               16 mai 16 00:57 /dev/snd ->
/proc/asound/dev
# rpm -q -l -v -p alsa-driver-0.9.4-mat1.athlon.rpm | grep /dev/snd
drwxr-xr-x    2 root    root                0 jun 17 09:47 /dev/snd
crw-------    2 root    root       116,   0 jun 17 09:47 /dev/snd/controlC0
[...]


# rpm -q -l -v alsa-driver-0.9.3a-fr2 | grep /dev/snd
lrwxrwxrwx    1 root    root               16 mai 16 00:57 /dev/snd ->
/proc/asound/dev
# ll /dev/snd
lrwxrwxrwx    1 root     root           16 jun 17 09:40 /dev/snd -> /proc/asound/dev

# rpm -U alsa-driver-0.9.4-mat1.athlon.rpm
kernel-module-alsa-0.9.4-mat1_2.4.20_13.9custom.athlon.rpm
error: unpacking of archive failed on file /dev/snd/controlC0;3eeec893: cpio:
mknod failed - No such file or directory
# ll /dev/snd
lrwxrwxrwx    1 root     root           16 jun 17 09:40 /dev/snd -> /proc/asound/dev

# rpm -e --nodeps alsa-driver
# rpm -i alsa-driver-0.9.4-mat1.athlon.rpm
# ll -d /dev/snd
drwxr-xr-x    2 root     root         4096 jun 17 09:53 /dev/snd
# rpm -U --oldpackage alsa-driver-0.9.3a-fr2.athlon.rpm
kernel-module-alsa-0.9.3a-fr2_2.4.20_13.9custom.athlon.rpm
error: unpacking of archive failed on file /dev/snd: cpio: rename failed - Is a
directory
#

Actual Results:  The package is not updated.

Expected Results:  Update of the package.

Additional info:
Comment 1 Jeff Johnson 2003-06-19 08:57:12 EDT
Yes, rpm has never permitted directories to be replaced
with symlinks in packaging. tar/cpio have similar problems.

The bigger problem is that you are trying to create a device
using mknod(2) in /proc. That isn't gonna work afaik, /proc
does not support mknod operations afaik.
Comment 2 Féliciano Matias 2003-06-19 13:44:11 EDT
> Yes, rpm has never permitted directories to be replaced
> with symlinks in packaging. tar/cpio have similar problems.

I don't see anything about thit in the documentation (Maximum rpm). Perhaps i am
wrong.
rsync can handle such situation.

> The bigger problem is that you are trying to create a device
> using mknod(2) in /proc.

No no.
$ rpm2cpio alsa-driver-0.9.3a-fr2.i386.rpm | cpio -tv | grep proc
lrwxrwxrwx   1 root     root           16 May 16 00:57 ./dev/snd -> /proc/asound/dev
1983 blocks
$

There is a symbolic link to /proc but nothing in /proc. My previous message is
not clear (the bugzilla form add <CR>).

For people who experiement this problem this is a work arround for the .spec
file (thanks Matthias Saou) :
%pre
test -L /dev/snd && rm -f /dev/snd 2>/dev/null 2>&1 || :


Thank you for your reply.
Comment 3 Féliciano Matias 2003-06-19 18:08:01 EDT
> The bigger problem is that you are trying to create a device
> using mknod(2) in /proc.

Yes yes.
You are right Jeff Johnson.

I'm really sorry.

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