[prev in list] [next in list] [prev in thread] [next in thread] 

List:       e-smith-devinfo
Subject:    FAQ: my RPM contains symlinks which shouldn't be there.
From:       Charlie Brady <charlieb () e-smith ! com>
Date:       2000-08-30 21:46:31
[Download RAW message or body]


A: The symlinks are probably in your tar file. So even though you don't
create them using the "createlinks" script, they end up in your binary
RPM.

How did they get there? You (or someone before you) probably made the tar
file using the left over directory from the BUILD directory, after an RPM
was made. Like this for instance:

[charlieb BUILD]$ rpm -ba ../SPECS/e-smith-pkgs.spec
...
[charlieb BUILD]$ mv e-smith-pkg-0.1 e-smith-pkgs-0.2
[charlieb BUILD]$ tar zcf ../SOURCES/e-smith-pkgs-0.2-tar.gz \ 
 e-smith-pkgs-0.2
...

The new tar file will contain all the symlinks from the e-smith-pkg-0.1
rather than none. It will also contain a file that shouldn't be there:
e-smith-pkgs-filelist.

Here's two ways to solve the problem:

1. Don't use a leftover direectory, but make a fresh one using "rpm -bp".

...
[charlieb BUILD]$ rpm -bp ../SPECS/e-smith-pkgs.spec
...
[charlieb BUILD]$ mv e-smith-pkg-0.1 e-smith-pkgs-0.2
[charlieb BUILD]$ tar zcf ../SOURCES/e-smith-pkgs-0.2-tar.gz \
 e-smith-pkgs-0.2
...

This doesn't help you though if you have inherited somebody else's broken
tar file. So you need the next technique:

2. Clean up the tar file.

[charlieb BUILD]$ tar zxf ../SOURCES/e-smith-pkgs-0.1-tar.gz
[charlieb BUILD]$ find e-smith-pkgs-0.1 -type l | xargs rm \
  e-smith-pkgs-0.1/e-smith-pkgs-filelist
[charlieb BUILD]$ mv e-smith-pkg-0.1 e-smith-pkgs-0.2
[charlieb BUILD]$ tar zcf ../SOURCES/e-smith-pkgs-0.2-tar.gz \
 e-smith-pkgs-0.2

I hope this information is useful to some of you.

-- 

  Charlie Brady                         charlieb@e-smith.com
  http://www.e-smith.org (development)  http://www.e-smith.com (corporate)
  Phone: +1 (613) 368 4376 or 564 8000  Fax: +1 (613) 564 7739
  e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic