Gentoo Archives: gentoo-project

From: Alexis Ballier <aballier@g.o>
To: gentoo-project@l.g.o
Subject: Re: [gentoo-project] Council meeting: Tuesday 11 November 2012, 19:00 UTC
Date: Fri, 09 Nov 2012 21:02:28
Message-Id: 20121109152145.0249fe04@gentoo.org
In Reply to: Re: [gentoo-project] Council meeting: Tuesday 11 November 2012, 19:00 UTC by William Hubbs
1 On Fri, 9 Nov 2012 09:32:47 -0600
2 William Hubbs <williamh@g.o> wrote:
3
4 > On Fri, Nov 09, 2012 at 08:33:55AM -0300, Alexis Ballier wrote:
5 > > On Thu, 8 Nov 2012 23:13:46 -0600
6 > > William Hubbs <williamh@g.o> wrote:
7 > >
8 > > > On Thu, Nov 08, 2012 at 08:46:29PM -0300, Alexis Ballier wrote:
9 > > > > On Thu, 8 Nov 2012 12:53:48 -0600
10 > > > > William Hubbs <williamh@g.o> wrote:
11 > > > >
12 > > > > > On Thu, Nov 08, 2012 at 07:15:57PM +0100, Fabian Groffen
13 > > > > > wrote:
14 > > > > > > On 08-11-2012 11:45:48 -0600, William Hubbs wrote:
15 > > > > > > > > - approve/disapprove removal of gen_usr_ldscript
16 > > > > > > >
17 > > > > > > > A better way to put this is disabling gen_usr_ldscript on
18 > > > > > > > Linux. Some of the alternate platforms still use it, so I
19 > > > > > > > do not advocate killing the function.
20 > > > > > > > If we go forward with the plan, there is no reason the
21 > > > > > > > council should reject disabling gen_usr_ldscript on Linux
22 > > > > > > > that I am aware of.
23 > > > > > > >
24 > > > > > > > This also has to wait until the blockers are resolved on
25 > > > > > > > the tracker.
26 > > > > > >
27 > > > > > > Do you suggest to drop the point from the agenda? I'd love
28 > > > > > > that.
29 > > > > >
30 > > > > > I believe we can drop the gen_usr_ldscript question, yes,
31 > > > > > because if everything else happens, we can just have the
32 > > > > > toolchain guys make it a noop on Linux.
33 > > > >
34 > > > > Something simpler and smoother imho is to just have a profile
35 > > > > variable that will make gen_usr_ldscript a noop, whatever CHOST
36 > > > > or the kernel is. New profiles are added with this variable
37 > > > > set, wide testing can be done without forcing anyone, and
38 > > > > voila. It is also simpler for maintaining the various OSes,
39 > > > > packages that used to install to / can just be changed to
40 > > > > install to /usr when this variable is set.
41 > > >
42 > > > I'm not trying to make packages install in /usr with this change.
43 > >
44 > > You are, since if a package in / needs a shared lib in /usr, there
45 > > is absolutely no point in installing the package in /.
46 > > nooping gen_usr_ldscript should come with a kind of plan for
47 > > the /usr move otherwise it is a bit ugly and somewhat loses its
48 > > point.
49 >
50 > No. All of this discussion about turning off gen_usr_ldscript on linux
51 > applies *after* separate /usr support (either by an initramfs or with
52 > the busybox[sep-usr] option) is implemented.
53
54 Which is the only viable solution, I agree.
55
56 > Once one of these options
57 > is implemented, /usr is always available when / is, so the "barrier"
58 > between / and /usr no longer exists. That just means you don't need
59 > to move shared libraries to / for binaries in / to link to them. It
60 > is the same as if you didn't put /usr on its own partition. To me,
61 > your argument here about disabling gen_usr_ldscript is like saying,
62 > if you put / and /usr on the same partition you should do a /usr move.
63
64 Then why would you put anything in /, besides static binaries, after all
65 this ? This is exactly what happened to udev & friends: after tons of
66 """harmless""" additions that required /usr to be mounted, it has been
67 decided that separate /usr isn't going to work anymore. You're only
68 missing the last step: move it to /usr and at least have some benefits
69 instead of artificially maintaining a non-working /usr barrier for
70 historical reasons.
71
72 Again, what is the point of having a binary in /bin that links to a
73 library in /usr ?
74
75 > > > gen_usr_ldscript was introduced to force shaired libraries that
76 > > > upstream installs into /usr/lib to move to /lib and leave the
77 > > > static libraries in /usr/lib.
78 > >
79 > > It's rather the opposite actually: very few upstream specify their
80 > > install location, most default to /usr/local prefix because that's
81 > > autotools default. econf (ie us) sets the prefix to /usr.
82 > > gen_usr_ldscript is there because we don't need the static lib in /
83 > > (so that setting libdir to /lib is not an option) while the shared
84 > > lib is needed by binaries in /. We could just move the shared lib
85 > > to / but then the linker may link to the static lib if /usr/lib
86 > > comes before /lib in its search order, so we need a .so in the same
87 > > dir as the .a. For example FreeBSD solved that differently: they
88 > > symlink /lib/libfoo.so to /usr/lib/libfoo.so. Years ago we deemed
89 > > symlinks crossing the /usr barrier were bad, and here comes
90 > > gen_usr_ldscript. Note that I don't really see the difference
91 > > between a symlink crossing the /usr barrier and a ldscript
92 > > referencing a file outside of /usr but there must be some argument
93 > > behind.
94 >
95 > I spoke to flameeyes about symlinks crossing the /usr barrier, wrt
96 > another package, and he doesn't have a problem with this. I also have
97 > never seen any policy etc deaming them bad, but that's another
98 > discussion.
99
100 Well, last time I tried this, portage threw out big fat warnings for
101 such symlinks iirc. I'd call that policy :)
102
103 > All I'm saying is that implementing separate /usr support on linux
104 > eliminates the /->/usr barrier since / and /usr are always available
105 > at the same time, thus eliminating the need for gen_usr_ldscript.
106
107 Agreed, and also eliminating the need for separating /bin and /usr/bin
108
109 > > Let's move everything to /usr/local :) there is not really a 'where
110 > > upstream installs them' argument in this discussion, autotools is
111 > > specifically designed so that distributions can tweak the install
112 > > location. The fact that both the static and shared libs go to
113 > > libdir is only a shortcoming of autotools, some other build systems
114 > > make the distinction.
115 >
116 > I'm not familiar with many other build systems, so I can't really
117 > comment specifically to this. But, I wonder why you would need to
118 > separate where static and shared libs are installed.
119
120 Because sometimes you need to call gen_usr_ldscript :)
121
122 > > > Since we can tell we are on linux by looking at the chost/ctarget
123 > > > variables, and there is not an intention to change anything for
124 > > > *bsd or any other O/S, I am not sure I follow the need for a
125 > > > profile variable.
126 > >
127 > > Testing it. Testing the /usr move broadly.
128 > > You want gen_usr_ldscript on non-bootable systems (eg prefix,
129 > > mingw) to be (mostly) a noop too which you can't distinguish from
130 > > only CHOST.
131 >
132 > That has been done already by toolchain a while back. Take a look at
133 > the code in toolchain-funcs.eclass. There are very few platforms
134 > where this function does anything at all these days. It would just be
135 > a matter of removing linux from the platforms it supports.
136
137 Yeah, I remember that, and also when it completely broke freebsd-lib.
138 Maybe that's the reason why I'm reluctant to hardcoding this :)
139
140 [...]
141
142 > > > If they want to discuss the gen_usr_ldscript issue I'm not
143 > > > opposed to that, but that isn't really what I am asking for in
144 > > > this meeting.
145 > >
146 > > IMHO this needs a discussion on -dev before going through the
147 > > council.
148 >
149 > I would send the patch to do this to -dev anyway, so at that time I
150 > guess we could have folks apply it and rebuild their systems and see
151 > what breaks.
152 >
153 > Since applying the patch itself will not force any rebuilds, it
154 > should just end up being a natural migration; as things are rebuilt
155 > the libraries will move from /lib to /usr/lib with no harm being done.
156
157 If you stop there then all what you get is an artificial /usr and /
158 separation. According to Fedora, you gain much more with the /usr move
159 than the few bytes you save without ldscript. Please give me a reason
160 not to do an /usr move once you have covered all the needs to make it
161 possible.