Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 423571 - stage3-amd64-20120621 contains broken usr/local/lib symlink
Summary: stage3-amd64-20120621 contains broken usr/local/lib symlink
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Stages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-26 00:55 UTC by kfm
Modified: 2012-08-23 21:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kfm 2012-06-26 00:55:03 UTC
The current amd64 stage3 tarball has /usr/local/lib resolve to lib64 but no lib64 directory exists.

  # tar xjvf stage3-amd64-20120621.tar.bz2 ./usr/local
  # readlink usr/local/lib
lib64
  # stat usr/local/lib64
stat: cannot stat `usr/local/lib64': No such file or directory
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-06-26 13:17:07 UTC
On my machine, no package owns that directory.
Comment 2 kfm 2012-06-26 14:25:59 UTC
I think that's normal with baselayout-2, isn't it? By contrast, I recall baselayout-1 owning many directories that constitute a normal root filesystem. Presumably, it is now the responsibility of catalyst to ensure that the filesystem structure as it should be, with .keep files preventing portage from doing any damage.

Trivial as this issue may be, the point remains that the stage3 should not ship with a broken link and/or missing directories. The structure used to be as follows:

/usr/local
    lib -> lib64
    lib32
    lib64

I confirmed by checking an older installation ...

  # find /usr/local -regex '.*lib.*'
/usr/local/lib64
/usr/local/lib64/.keep
/usr/local/lib
/usr/local/lib32
/usr/local/lib32/.keep

All of that came from the amd64 stage3 I used at the time (4-5 months ago) and the /usr/local/lib symlink isn't broken.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-06-26 14:30:15 UTC
(In reply to comment #2)

> filesystem. Presumably, it is now the responsibility of catalyst to ensure
> that the filesystem structure as it should be, with .keep files preventing
> portage from doing any damage.

No. Catalyst's job is to build a stage3 as a direct reflection of the gentoo-x86 tree. If no ebuild creates some dir, then that dir should not be present on the stage3.

With that in mind, there still should not be a broken symlink there.
Comment 4 kfm 2012-06-26 14:41:27 UTC
Hmm, I see what you mean. In principle, a basic /usr/local directory hierarchy ought to exist. In the absence of an ebuild that guarantees its existence, I'm not sure what to suggest.
Comment 5 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2012-07-22 13:01:19 UTC
Contents of the stage:

$ ls -l usr/local/
total 8
drwxr-xr-x 2 atlantis atlantis 4096 Jun 21 02:45 bin
lrwxrwxrwx 1 atlantis atlantis    5 Jun 21 01:46 lib -> lib64
drwxr-xr-x 2 atlantis atlantis 4096 Jun 21 02:45 sbin 

But:

$ grep /usr/local var/db/pkg/*/*/CONTENTS 
$ 

I was able to track the /usr/local tree back to the stage1, but no package lists /usr/local on its CONTENTS file.
Comment 6 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2012-08-23 06:06:09 UTC
I noticed the following the other day when doing a catalyst run:

>>> Emerging (1 of 1) sys-apps/baselayout-2.1-r1 for /tmp/stage1root/
>>> Installing (1 of 1) sys-apps/baselayout-2.1-r1 to /tmp/stage1root/
 * Messages for package sys-apps/baselayout-2.1-r1 merged to /tmp/stage1root/:
 * Initializing /tmp/stage1root/lib as a symlink
 * Initializing /tmp/stage1root/usr/lib as a symlink
 * Initializing /tmp/stage1root/usr/local/lib as a symlink
 
So this is caused by baselayout

@base-system:
What do you say?
Comment 7 SpanKY gentoo-dev 2012-08-23 21:47:47 UTC
should be all set now in the tree; thanks for the report!

Commit message: Also create the dir that we symlink lib to when SYMLINK_LIB=yes
http://sources.gentoo.org/sys-apps/baselayout/baselayout-2.1-r1.ebuild?r1=1.10&r2=1.11
http://sources.gentoo.org/sys-apps/baselayout/baselayout-2.2.ebuild?r1=1.1&r2=1.2