Symlinks are removed when listed as %_netsharedpath
Bug #651438 reported by
Jeff Johnson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
RPM |
Confirmed
|
Wishlist
|
Jeff Johnson | ||
Fedora |
Fix Released
|
Medium
|
Bug Description
tracker
tags: | added: install netsharedpath symlink |
Changed in fedora: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
To post a comment you must log in.
Created attachment 338536
Proposed patch
Description of problem:
Specifying a directory as %_netsharedpath in /etc/rpm/macros.nfs can avoid breaking the upgrade of a package that accesses that path, but if the path is replaced by a symlink, the symlink is removed during the upgrade which is not expected either.
Version-Release number of selected component (if applicable):
rpm-4.4.2.3
How reproducible:
100% reproducible
Steps to Reproduce:
1. install the test package provided, that wil lcreate the following directories: myfs/dir{ 1,2,3,4, 5} 0.0-2.i386. rpm
/opt/
2. replace one of the direcotries by a symlink to an NFS mounted directory
mv /opt/myfs/dir1 /opt/myfs/dir1.orig && ln -s /test /opt/myfs/dir1
3. Add /opt/myfs/dir1 among to the list of netsharedpath in /etc/rpm/macros.nfs
echo '%_netsharedpath /opt/myfs/dir1' > /etc/rpm/macros.nfs
4. Upgrade the test package myfs
rpm -Uvh myfs-1.
Actual results:
The link /opt/myfs/dir1 has been removed
Expected results:
The link /opt/myfs/dir1 is left untouched
Additional info:
The link is removed in lib/fsm.c by fsmStage().
The proposed patch checks if the link is actually listed as netsharedpath and skip its removal if listed. Please note that even if this patch works, it may have other side effects that I might not have overseen :)