bugGNU Stow - Bugs: bug #36466, Stow fails on absolute symlinks


bug #36466: Stow fails on absolute symlinks

Submitted by:  Aljosha Papsch <alip2890>
Submitted on:  Mon 14 May 2012 03:09:15 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 15 May 2012 01:05:38 PM UTC, comment #2: 

I'm using Stow 2.2.0 and tried to install e2fsprogs 1.41.14. I'm building in a halfly installed LFS environment, using Stow as the package manager. I configure packages with --prefix=/usr and install them in a subdirectory in /pkg. These are the steps I did to stow e2fsprogs (being in the distribution directory):

mkdir build ; cd build
PKG_CONFIG=/tools/bin/true LDFLAGS=-lblkid ../configure --prefix=/usr --with-root-prefix="" --enable-elf-shlibs --disable-libblkid --disable-libuuid --disable-uuidd --disable-fsck
DESTDIR=/pkg/e2fsprogs make install
DESTDIR=/pkg/e2fsprogs make install-libs
cd /pkg
stow -t / e2fsprogs

PKG_CONFIG was needed because at that point pkg-config was not installed. After running the stow command it reported the absolute links and aborted, so I removed them and replaced them with relative ones:

cd /pkg/e2fsprogs/usr/lib
rm libext2fs.so
ln -s ../../lib/libext2fs.so.2 libext2fs.so

I repeated this with the other symlinks Stow reported. Then I reran the stow command, this time with success.

Aljosha Papsch <alip2890>
Tue 15 May 2012 11:21:32 AM UTC, comment #1: 

Thanks for the report.  It seems that this issue was already raised back in 2009.  However, I cannot reproduce your problem.  Even though line 415 of lib/Stow.pm.in says:

     # Don't try to stow absolute symlinks (they can't be unstowed)

... it still works fine for me.  Please can you confirm which Stow version you are using, and provide exact steps to reproduce?  Thanks.

Adam Spiers <aspiers>
Project Administrator
Mon 14 May 2012 03:09:15 PM UTC, original submission:  

Stow currently checks for absolute symlinks and stops stowing if it finds some. This behaviour clashes with some packages such as e2fsprogs and with the Debian Policy for symbolic links (section 10.5).

Example: I recently tried to install e2fsprogs.  I made an 'DESTDIR=/pkg/e2fsprogs make install' and then tried to run 'cd /pkg ; stow -t / e2fsprogs'.  Stow then denied operation complaining about absolute symlinks in the package to stow (in case of e2fsprogs /usr/lib/libext2fs.so => /lib/libext2fs.so.2 amongst others).  I made Stow to run successful by removing the symlink and making a relative one from libext2fs.so in /pkg/e2fsprogs/usr/lib to ../../lib/libext2fs.so.2.  It is however legitimate (according to Debian policy) for packages to create absolute symlinks as long as the symlink points to another top-level directory.

I'd suggest fixing Stow in this regard, so Stow would only complain if the absolute symlink points to a file in the same top-level directory (e.g. from /usr/... to /usr/...).

Aljosha Papsch <alip2890>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by aspiers (Updated the item)
  • -email is unavailable- added by alip2890 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-05-15 aspiers StatusConfirmed => Works For Me
    2012-05-15 aspiers StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.5