1 |
On Thu, Nov 27, 2008 at 10:07 AM, Duncan <1i5t5.duncan@×××.net> wrote: |
2 |
> Tonko Mulder <tonko.mulder@×××××.com> posted |
3 |
> 1227764120.6272.13.camel@Gaius, excerpted below, on Thu, 27 Nov 2008 |
4 |
> 06:35:20 +0100: |
5 |
> |
6 |
>> tonko@Gaius ~ $ ls -dl /lib /lib64 |
7 |
>> drwxr-xr-x 4 root root 46 nov 26 21:32 /lib |
8 |
>> drwxr-xr-x 10 root root 8192 nov 27 06:08 /lib64 |
9 |
> |
10 |
> OK, that's the problem, I believe. I too tried separate dirs, just to |
11 |
> see how it would go, and had problems. |
12 |
> |
13 |
> It seems a few packages, probably lvm2 among them, use /lib some of the |
14 |
> time and /${LIBDIR} (which on amd64 equals /lib64) some of the time. In |
15 |
> particular, a couple packages I looked at (and lvm2 was probably one of |
16 |
> them but I've forgotten by this point) would install to one but the |
17 |
> initscripts would try to use the other. |
18 |
> |
19 |
> Basically, they expect the usual Gentoo config which has a symlink one |
20 |
> way or the other (it doesn't particularly matter which way, various |
21 |
> Gentoo/amd64 stage releases have reversed each other). If each one is |
22 |
> its own dir, they fail, because they install to one and try to use the |
23 |
> other, at least part of the time. |
24 |
> |
25 |
> So, preferably from single-user-mode or elsewise when there's nothing |
26 |
> that might crash due to their files temporarily moving out from under |
27 |
> them, move everything from one into the other, then delete the empty one |
28 |
> and create a symlink from it to the other. |
29 |
> |
30 |
This seemed to have worked, as my lvm2 script starts nicely :) |
31 |
I thought there a warning during boot-time but can't find in my rc.log |
32 |
|
33 |
So.. cheers :) |
34 |
> As I said, which way you go shouldn't really matter. To some extent, it |
35 |
> depends on which one you think is the "proper" $LIBDIR in a 64-bit-only |
36 |
> system. If you think it's /lib because that's what you're used to using |
37 |
> on 32-bit or simply because it's shorter to type, make /lib64 the symlink |
38 |
> pointing at /lib. If you (like me) like the 64 specified, even in the |
39 |
> absence of any 32-bit, or if you want to stick closest to the LSB/FHS |
40 |
> standard [1] for amd64/x86_64, you'll make /lib the symlink pointed at / |
41 |
> lib64. In either case, if you ever decide you need to, you can always |
42 |
> reverse yourself later. |
43 |
> |
44 |
> Technically, those rcscript/addons/*.sh do indeed belong in /lib since |
45 |
> they're shell scripts and as such are bitness independent [1, again]. |
46 |
> However, I expect what's happening is that the initscripts are using |
47 |
> /${LIBDIR} for some of the calls, and on amd64 that's /lib64, so that's |
48 |
> where the initscripts are trying to find them at least for those calls. |
49 |
> As long as /lib and /lib64 ultimately resolve to the same place, it |
50 |
> doesn't matter, but if they are both real directories, BAD THINGS (tm) |
51 |
> happen. |
52 |
> |
53 |
> --- |
54 |
> [1] As I understand it, the FHS, File Hierarchy Standard, part of the |
55 |
> LSB, is arguably inconsistent with itself in regard to $LIBDIR. Non- |
56 |
> native-code such as scripts and bytecode compiled stuff (python/perl/ |
57 |
> java), where every arch gets the same files, pretty consistently belongs |
58 |
> in /lib and /usr/lib. But there's an inconsistency with where 64-bit |
59 |
> native-binary-code libraries go. On ia64 (itanic/itanium), 64-bit really |
60 |
> is seriously dominant and was intended to fully supplant 32-bit |
61 |
> immediately. It gets /lib. 32-bit is a distant also-ran that must be |
62 |
> content with (IIRC) /lib32. |
63 |
> |
64 |
> On amd64/x86_64, the considerations were much different. Unlike ia64, |
65 |
> amd64 is real hardware dual-bitness and it was apparent even before it |
66 |
> came out (due to the flatlining of itanic, compared to predictions and |
67 |
> hype, at least) that many/most people wanted to be able to run both 32- |
68 |
> bit and 64-bit code on the same system at the same time. Due to the |
69 |
> dominance of existing 32-bit code, it was far easier to let it take /lib |
70 |
> so 32-bit packages wouldn't need any changes at all. Since the process |
71 |
> of making 64-bit packages already included porting the code, making sure |
72 |
> it was 64-bit safe, etc, adding the comparatively trivial task of having |
73 |
> it use /lib64 by default wasn't that big a deal, especially compared to |
74 |
> being forced to update all those otherwise perfectly fine 32-bit packages |
75 |
> to use something other than /lib. So unlike ia64, amd64/x86_64 let 32- |
76 |
> bit have /lib and standardized on /lib64 for 64-bit code. While this was |
77 |
> designed to let 32-bit and 64-bit exist at least semi-happily |
78 |
> side-by-side, once the standard was established it made little sense to |
79 |
> change it for 64-bit-only systems, so /lib64 it remains. |
80 |
> |
81 |
> Of course then there's the whole (/usr)/libexec thing. The idea there is |
82 |
> that $LIBDIR (whether just lib or lib32/lib64) is for libraries and |
83 |
> $BINDIR is for executables designed to be run directly, but where are |
84 |
> executables really only designed to be called from other executables to |
85 |
> be placed? You don't want them in $BINDIR, since that's in $PATH and |
86 |
> thus users will see it with tab-completion and the like, and these |
87 |
> executables aren't designed to be run from the command line or otherwise |
88 |
> (from a WM menu) directly invoked by the user. Traditionally these went |
89 |
> in lib as well, generally in package level subdirs thereof, but some |
90 |
> people weren't happy with that and with the FHS standard, they decided |
91 |
> libexec was a more suitable standard location. So most systems now have |
92 |
> a libexec, but this bit of the standard isn't so well known and many |
93 |
> packages were already using lib by the time the standard came about and |
94 |
> didn't want to hassle the change, so only a relatively few packages |
95 |
> actually use libexec, despite what the standard says. Also, I've never |
96 |
> seen a root level /libexec, only /usr/libexec, so apparently it's only |
97 |
> for binaries not needed during early boot, only after /usr is mounted. |
98 |
> |
99 |
> That's the story as I understand it for x86, ia64, and amd64/x86_64. I |
100 |
> really have no idea how the other archs, ppc and sparc at least of which |
101 |
> I know have both 32-bit and 64-bit variants, handle it, or what their FHS |
102 |
> spec might be. |
103 |
> |
104 |
> -- |
105 |
> Duncan - List replies preferred. No HTML msgs. |
106 |
> "Every nonfree program has a lord, a master -- |
107 |
> and if you use the program, he is your master." Richard Stallman |
108 |
> |
109 |
> |
110 |
> |
111 |
|
112 |
|
113 |
|
114 |
-- |
115 |
Tonko |