Bug 27030 - brp-compress breaks links on "abnormal" conditons
brp-compress breaks links on "abnormal" conditons
Status: CLOSED UPSTREAM
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-11 02:16 EST by j. alan eldridge
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-29 17:45:54 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)
patch file and new verion of brp-compress fixing bug 27030 (1.48 KB, application/octet-stream)
2001-02-11 02:22 EST, j. alan eldridge
no flags Details

  None (edit)
Description j. alan eldridge 2001-02-11 02:16:03 EST
i just sent this in to the rpm-list as a solution to another list member
who accidentally found two different (but related) bugs in brp-compress. i
will give the synopsis below and then update the bug with a tarball
containing a new version of brp-compress and a patch against
rpmbuild-4.0-4's version of the script.

brp-compress makes bad symlinks under two conditions:

1. link target is an info "dir" file.

2. link target is outside the directories brp-compress processes.

here's a pathological example directory tree:

usr.or
|-- frotz
|   |-- dir
|   +-- quux.info
|-- info
|   |-- dir -> ../frotz/dir [ points "outside" ]
|   +-- quux.info -> ../frotz/quux.info [ points "outside" ]
|-- man
|   |-- burp
|   |   +-- belch.1
|   +-- man1
|       |-- belch.1 -> ../burp/belch.1 [ points "outside" ]
|       |-- dir
|       +-- hiccup.1
+-- share
    +-- info
    |-- dir
    |-- dir.info -> ../../man/man1/dir [ non-"dir" => "dir" ]
    +-- wacko.info

here's the same tree after processing by brp-compress (old version):

usr.old
|-- frotz
|   |-- dir
|   +-- quux.info
|-- info
|   |-- dir.gz -> ../frotz/dir.gz [*BROKEN*]
|   +-- quux.info.gz -> ../frotz/quux.info.gz [*BROKEN*]
|-- man
|   |-- burp
|   |   +-- belch.1
|   +-- man1
|       |-- belch.1.gz -> ../burp/belch.1.gz [*BROKEN*]
|       |-- dir
|       +-- hiccup.1.gz
+-- share
    +-- info
    |-- dir
    |-- dir.info.gz -> ../../man/man1/dir.gz [*BROKEN*]
    +-- wacko.info.gz

Here's the tree after processing by brp-compress (my updated version):

[ well, bugzilla won't give me more room, so see addendum with patch ]
Comment 1 j. alan eldridge 2001-02-11 02:22:25 EST
Created attachment 9640 [details]
patch file and new verion of brp-compress fixing bug 27030
Comment 2 j. alan eldridge 2001-02-11 02:25:13 EST
Here's the tree after the new version of brp-compress:

usr
|-- frotz
|   |-- dir
|   +-- quux.info
|-- info
|   |-- dir -> ../frotz/dir
|   +-- quux.info -> ../frotz/quux.info
|-- man
|   |-- burp
|   |   +-- belch.1
|   +-- man1
|       |-- belch.1 -> ../burp/belch.1
|       |-- dir
|       +-- hiccup.1.gz
+-- share
    +-- info
    |-- dir
    |-- dir.info -> ../../man/man1/dir
    +-- wacko.info.gz

The actual case was building texinfo (i think), where the situation was
something like:

/usr/share/info/dir ==> ../../../etc/info-dir

which brp-compress dutifully mangled into:

/usr/share/info/dir.gz => ../../../etc/info-dir.gz

Not very pretty, is it?

Comment 3 Jeff Johnson 2001-02-21 13:15:29 EST
Changing component.
Comment 4 Bill Nottingham 2005-09-29 17:45:54 EDT
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.

For RPM issues, please try a current release such as Fedora Core 4; if bugs
persist, please open a new issue.

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