1 |
Richard Freeman <rich@××××××××××××××.net> posted |
2 |
462CEC63.2030705@××××××××××××××.net, excerpted below, on Mon, 23 Apr 2007 |
3 |
13:26:59 -0400: |
4 |
|
5 |
> Regis Decamps wrote: |
6 |
>> |
7 |
>> What do you mean by "expand" the tarball? If I merge the tarball in the |
8 |
>> / of my main amd64 system, then I'll lose my amd64 lib, won't I? On my |
9 |
>> system /use/lib points to /usr/lib64. |
10 |
> |
11 |
> Yup. I was thinking about stuff that just doesn't work at all 64-bit. |
12 |
> This wouldn't work for multilib. It really is a bit of a hack that |
13 |
> isn't the kind of fix I'd package up for anybody but myself... |
14 |
|
15 |
Both of you are aware that portage binpkgs are simply bz2'ed tarballs |
16 |
(thus the tbz2 extention) of the various files composing the installed |
17 |
package, with the ebuild and a bit of additional metadata tacked onto the |
18 |
end, right? |
19 |
|
20 |
Thus, one can simply extract the package tarball as one would a normal |
21 |
tarball, using the appropriate tar switches (or the equivalent GUI |
22 |
functionality) to ensure that it doesn't extract directly over /, thus |
23 |
overwriting a 64-bit version. tar will warn about extra data on the end |
24 |
-- the ebuild and metadata tacked on -- but it still extracts just fine. |
25 |
|
26 |
In fact, that's basically what the emergency rescue procedure is for |
27 |
getting a working portage if it breaks. You procure a binpkg (they used |
28 |
to have one for download, but quickpkg-ing up the latest Gentoo release |
29 |
version out of a stage tarball works as well, and I'm not sure if they |
30 |
maintain the emergency portage download itself any more, since it could |
31 |
just as easily be python or some other portage dependency that's broken), |
32 |
then extract it over the "dead" version on the normal filesystem. |
33 |
(Please backup config files it'll overwrite first, or simply don't |
34 |
replace them if you are extracting and placing files manually.) After |
35 |
that, you should have a working portage, but its database will still |
36 |
think it has the version that broke merged, so you then merge a known |
37 |
working version again, thus getting the database in sync with what's |
38 |
actually merged once again. |
39 |
|
40 |
Since I use FEATURES=buildpkg and have for some time, I have a basically |
41 |
complete history of packages, often several versions (using eclean, from |
42 |
gentoolkit, once in awhile to clean out the old ones), stored in my |
43 |
$PKGDIR. Thus, if something breaks, I either use portage itself to roll |
44 |
back to an earlier version, or extract the tarball manually, if necessary. |
45 |
|
46 |
Actually, it's also quite useful to have the packages around otherwise as |
47 |
well. If I want to extract a single file from an older version, for |
48 |
whatever reason, it's easy to do, as it is to simply compare how configs |
49 |
or included files might have changed from version to version. Both are |
50 |
occasionally quite useful indeed for bug tracing, in addition to the |
51 |
standard sysadmin role package rollback feature. FEATURES=buildpkg is |
52 |
therefore one of my favorite "Gentoo poweradmin" tricks, almost a secret, |
53 |
as IMO the handbook (last I checked anyway) doesn't say /nearly/ enough |
54 |
about how truly useful this feature can be, and how one can really make |
55 |
use of it! |
56 |
|
57 |
>> Should /usr/lib point to /usr/lib32 instead? I think it should in the |
58 |
>> future, but I was not aware the Gentoo layout was LSB (Linux standard |
59 |
>> base) compliant already. Is it? |
60 |
>> |
61 |
>> |
62 |
> You must be new here... :) It used to point to lib32 and a lot of |
63 |
> sweat and tears went into changing it to the way it is now... I don't |
64 |
> profess to be an LSB expert... |
65 |
|
66 |
Actually... AFAIK the LSB says for AMD64, lib should be 32-bit (plus arch- |
67 |
neutral stuff), while lib64 is 64-bit. However, Gentoo/amd64 made its |
68 |
original choice before that standard existed, and was originally |
69 |
implemented more like ia64 (Itanium), where lib is 64-bit, and lib32 is |
70 |
32-bit. The LSB reasoning being that on ia64, 64-bit is the only true |
71 |
native bitness, 32-bit being emulated, so lib gets the native. On x86_64 |
72 |
aka amd64, both bitnesses are truly hardware-native, so the new bitness, |
73 |
64-bit, gets the new location, lib64, while the old 32-bit gets to keep |
74 |
lib for legacy reasons. The original Gentoo reasoning being that 64-bit |
75 |
will ultimately be the emphasized bitness, with legacy 32-bit being less |
76 |
of an issue as time goes on, so 64-bit should get the native bitness |
77 |
location in lib. (Gentoo 32-bit was originally in emul/lib32, or some |
78 |
such, I've forgotten.) |
79 |
|
80 |
However, when LSB went the other way, since there was no serious Gentoo |
81 |
reason to do otherwise, Gentoo/amd64 started trying to move toward the |
82 |
standard. Basically, we've moved 64-bit to lib64, while keeping 32-bit |
83 |
in lib32. On Gentoo/amd64, lib is now normally a symlink to lib64, but |
84 |
the only stuff that's supposed to be installed directly to lib is arch- |
85 |
independent stuff. FEATURES=multilib-strict causes portage to do some |
86 |
checks and die if the wrong thing gets installed to lib. There are not |
87 |
regularly supported testing-only profiles that do away with the symlink, |
88 |
but that's exactly what they are, not normally/regularly supported, as |
89 |
it's not unusual at all for particularly new packages, but also |
90 |
occasionally updates from upstream where they played an unexpected trick, |
91 |
to put stuff in lib that doesn't belong there. |
92 |
|
93 |
Some day, probably after portage (or pkgcore or paludis or another |
94 |
successor) gets full multi-arch support, and can thus properly track 32- |
95 |
bit vs 64-bit in a single instance, Gentoo may in fact switch to a 32-bit |
96 |
lib in accordance with the LSB. However, as time rolls on, that becomes |
97 |
less and less of an issue, as more and more stuff, even the proprietary |
98 |
aka slaveryware that caused the problem to be so big in the first place, |
99 |
either gets dumped for newer stuff, or gets native 64-bit versions. |
100 |
Thus, as time goes on, there's gradually less and less reason to even |
101 |
have 32-bit on the system at all, even for those who have no ethical/ |
102 |
legal/freedom/practical compunctions about running proprietaryware. |
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 |
gentoo-amd64@g.o mailing list |