Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
baselayout Converting /usr/local/lib from a dir to a symlink
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Tue Dec 18, 2018 5:26 pm    Post subject: baselayout Converting /usr/local/lib from a dir to a symlink Reply with quote

It isn't optional.

Is it just me, or should baselayout not touch /usr/local?
FHS wrote:
The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr.
Emphasis added. FHS versions 3.0 and 2.3 have the same text.

And, yes I'm aware that Gentoo does not consider the Filesystem Hierarchy Standard to be an authoritative standard, although much of our policy coincides with it.. And to further quote two sections:
Quote:
/usr/local: Non-portage applications. Ebuilds must not install here.
Quote:
The /usr/local hierarchy is for non-portage software. Ebuilds must not attempt to put anything in here.


Code:
 * Package:    sys-apps/baselayout-2.6-r1
 * Repository: gentoo
 * Maintainer: williamh@gentoo.org base-system@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux split-usr userland_GNU
 * FEATURES:   compressdebug network-sandbox preserve-libs sandbox splitdebug userpriv usersandbox
 * Converting /usr/local/lib from a dir to a symlink
 * ERROR: sys-apps/baselayout-2.6-r1::gentoo failed (setup phase):
 *   non-empty dir found where we needed a symlink: /usr/local/lib
 *
 * Call stack:
 *                  ebuild.sh, line 124:  Called pkg_setup
 *   baselayout-2.6-r1.ebuild, line  23:  Called multilib_layout
 *   baselayout-2.6-r1.ebuild, line 108:  Called die
 * The specific snippet of code:
 *                                      die "non-empty dir found where we needed a symlink: ${prefix}lib"
 *
 * If you need support, post the output of `emerge --info '=sys-apps/baselayout-2.6-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/baselayout-2.6-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-apps/baselayout-2.6-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/baselayout-2.6-r1/temp/die.env'.
 * Working directory: '/var/tmp/portage/sys-apps/baselayout-2.6-r1/homedir'
 * S: '/var/tmp/portage/sys-apps/baselayout-2.6-r1/work/baselayout-2.6'

_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Tue Dec 18, 2018 5:57 pm    Post subject: Reply with quote

My /usr/local/lib is a symlink to /usr/local/lib64, just like /lib and /usr/lib ... but ... my system was originally a multilib (date on symlink is 2011)

I've got a lock on baselayout, as I don't trust the devs to do the right thing anymore though.
/etc/portage/package.mask:>sys-apps/baselayout-2.4.1-r2

Edit to add: I can see it as a link to lib64 in /usr/local but it shouldn't point to outside of /usr/local
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland


Last edited by Anon-E-moose on Tue Dec 18, 2018 6:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue Dec 18, 2018 6:24 pm    Post subject: Reply with quote

Yes, here it is starts going wrong: "Converting /usr/local/lib from a dir to a symlink", does not make any sense, I use /usr/local occasionally to try out software, that's the whole purpose of it.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue Dec 18, 2018 6:39 pm    Post subject: Reply with quote

On my machine:
Code:
# ls -la /lib /usr/lib /usr/local/lib
lrwxrwxrwx 1 root root 5 Oct 20 20:49 /lib -> lib64
lrwxrwxrwx 1 root root 5 Aug 11  2017 /usr/lib -> lib64
lrwxrwxrwx 1 root root 5 May 13  2011 /usr/local/lib -> lib64

It seems that /usr/local/lib has always been a link on my machine - and it makes sense to have the same structure in /usr/local as in / and /usr.

But it does NOT make sense that baselayout assumes or changes anything in /usr/local. baselayout should stay out of /usr/local. I believe that this is a serious bug. Please open a bug in Bugzilla.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Tue Dec 18, 2018 6:53 pm    Post subject: Reply with quote

I agree that baselayout shouldn't be changing things in /usr/local.
Of course I wouldn't be too happy if it started changing symlinks to non and vice-versa in either / or /usr.

Leave my directory structure alone, maybe put a news advisory or some warning, but quit changing things.
I don't want to log into my system one day and have stuff not work and me wonder why.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland


Last edited by Anon-E-moose on Tue Dec 18, 2018 9:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Tue Dec 18, 2018 8:15 pm    Post subject: Reply with quote

To be clear, it hasn't changed anything and it appears that it would only have done so if the directories were empty.

@Anon-E-moose:

I don't believe it is trying to make any links from within /usr/local to outside /usr/local.


@mike155:

My "affected" system is no-multilib, so maybe this is new to those systems. Although I thought I had manually configured the /usr/local lib -> lib64 link on my oldest system.

I'll file a bug (if I don't find one).

EDIT:

I didn't find a bug related to /usr/local, but I did find one which made me verify my multilib setup. For some reason, FEATURES has multilib-strict. Looking into that now.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
miket
Guru
Guru


Joined: 28 Apr 2007
Posts: 488
Location: Gainesville, FL, USA

PostPosted: Wed Dec 19, 2018 4:37 am    Post subject: Reply with quote

I was really worried about this when I first saw the posting, thinking that /usr/local was turning into a symlink. When I saw what emerging baselayout actually did I thought it was pretty benign--for a first-time installation. After all, something has to set up the initial directory structure. Linking /usr/local/lib to /usr/local/lib64 is a decent way to set up a multilib system.

That said, I think it would be better if baselayout would stick to doing
Code:
mkdir -p /usr/local/{bin,lib64,sbin}; ln -sr /usr/local/lib /usr/local/lib64
only at initial creation, i.e. when /usr/local is absent. If there's anything at /usr/local, be it a directory, a file, a symlink, a FIFO--whatever! just leave it alone and move on. Printing a message would be OK, an error would not be.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Dec 19, 2018 5:14 am    Post subject: Reply with quote

Sorry if I my description wasn't clear.

I understand creating /usr/local, but not anything under it.

At any rate, I believe I have found the "multilib-strict" source:
man 5 make.conf, multilib-strict:
Many  Makefiles  assume  that their libraries should go to /usr/lib, or $(prefix)/lib. This assumption can cause a serious mess if /usr/lib isn't a symlink to /usr/lib64. To find the  bad  packages,  we  have  a  portage  feature  called  multi‐lib-strict. It will prevent emerge from putting 64bit libraries into anything other than (/usr)/lib64.
The FILES section of the man page references /usr/share/portage/config/make.globals.
/usr/share/portage/config/make.globals:
FEATURES="assume-digests binpkg-logs
          config-protect-if-modified distlocks ebuild-locks
          fixlafiles merge-sync multilib-strict news
          parallel-fetch preserve-libs protect-owned
          sandbox sfperms strict unknown-features-warn unmerge-logs
          unmerge-orphans userfetch userpriv usersandbox usersync"

_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum