Bug 399
Summary: | Upgrade does not work with absolute symbolic links | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | ppe |
Component: | installer | Assignee: | Matt Wilson <msw> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5.2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 1999-03-31 23:12:42 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
ppe
1998-12-12 18:31:20 UTC
This has been assigned to a developer for further review. Fixing this would be very hard - involving walking trees and resolving symlinks. I never use absolute symlinks to avoid problems with chroot()'ed operations. Actually the big problem was that `rpm' could not find the rpm database. Maybe it is possible to use the `--root' switch for this? An absolute link should than point to the right place. For doing this, you probably just have to change in the file upgrade.c: :::line 395::: int ugFindUpgradePackages(struct pkgSet *psp, char *installRoot) { rpmdb db; struct hash_table *hashTable; logDebugMessage(("ugFindUpgradePackages() ...")); rpmReadConfigFiles(NULL, NULL, NULL, 0); [[[ here you should insert something to find out what `installRoot' should be, e.g. by reading the possible symbolic link info of var, lib, and rpm to construct a new unsymbolic path ]]] if (rpmdbOpen(installRoot, &db, O_CREAT | O_RDWR, 0644)) { logMessage("failed opening %s/var/lib/rpm/packages.rpm", installRoot); [[[ here you could add a comment, that this error may be caused by an absolute link in the path /var/lib/rpm ]]] return(INST_ERROR); } ---------------------Just a comment: BTW, there are some rpm files which do not install with relative links. One simple example is `xbill'. It installs symbolic links like: cd /var/lib/games/xbill ln -s ../../../../usr/lib/xbill/bitmaps bitmaps Now, if /var/lib is a relative symbolic link, e.g.: cd /var ln -s ../usr/links/var/lib lib (say a user wants to keep all modifications at a special place /usr/links) than the xbill.rpm installs without errors but the bitmaps link is dangling. It works, however, if the /var/lib link is in the same depth, e.g.: cd /var ln -s ../usr/varlib lib ---------------------- Best Wishes, Peter. /var/lib and /tmp must be relative links; fixing this would be quite involved and isn't worth the trouble |