1 |
Am Donnerstag, 8. November 2007 schrieb ext Fabian Groffen: |
2 |
> On 08-11-2007 14:18:54 +0200, Dirk Heinrichs wrote: |
3 |
> > Am Mittwoch, 7. November 2007 schrieb ext Fabian Groffen: |
4 |
> > > On 07-11-2007 17:28:04 +0200, Dirk Heinrichs wrote: |
5 |
> > > > Hi, |
6 |
> > > > |
7 |
> > > > I just found out about the prefixed portage project. Looks like it |
8 |
> > > > finally implements functionality I requested already two years ago. |
9 |
> > > > That's good news. |
10 |
> > > |
11 |
> > > My memory is bad, what in particular were/are you looking for? |
12 |
> > |
13 |
> > See background below. |
14 |
> > |
15 |
> > > > What I would like to know is the following: Would it be possible to |
16 |
> > > > build for one prefix, but install into another? |
17 |
> > > |
18 |
> > > I'm not sure if I get what exactly it is that you want, and I'm not |
19 |
> > > familiar with AFS (sorry Stefaan ;) ), but it looks a bit like |
20 |
> > > automounted stuff, and in particular the BSD automounter's scheme. |
21 |
> > |
22 |
> > No, it's far superior than that. It creates a global directory tree |
23 |
> > under /afs. The clients only mount /afs, the tree is assembled on the |
24 |
> > servers. Volumes are created on the servers and mounted into the tree |
25 |
> > somewhere, making them instantly visible on the clients. Volumes can be |
26 |
> > replicated (ro) for higher availability. However, if a ro replica of a |
27 |
> > volume exist, the client always prefers it over the rw replica, unless |
28 |
> > the path to the rw replica is used explicitely. |
29 |
> > |
30 |
> > And that's the problem I want to solve. Install software into a |
31 |
> > different path than it was compiled for, automatically. Plus, after |
32 |
> > installation of each package, release the volume (replicate the changes |
33 |
> > to all ro replicas). |
34 |
> |
35 |
> In a way what you ask for is impossible, and can only be hacked around. |
36 |
|
37 |
Hmm, is it? In the end, what I ask for is the portage equivalent of: |
38 |
|
39 |
configure --prefix /afs/mydomain.com/software |
40 |
make |
41 |
make prefix=/afs/.mydomain.com/software install |
42 |
vos release |
43 |
|
44 |
I admit the last one is the tricky one, which paludis could be able to solve |
45 |
with a user defined post-install hook. |
46 |
|
47 |
> The actual problem you have, is that your afs setup basically prevents |
48 |
> you from "doing things right". The path of the ro replicas, which is |
49 |
> the path your clients use, should match your EPREFIX, for the simple |
50 |
> reason that things like library deps are looked for in EPREFIX. |
51 |
|
52 |
Yes, that's clear to me. |
53 |
|
54 |
> Installing into another location basically means a sort of what portage |
55 |
> does before it merges the package, in $D the image dir. If you apply my |
56 |
> binpkg trick I wrote about before, you run into trouble as the EPREFIX |
57 |
> is actually changed, making the software useless for the ro replica |
58 |
> clients. |
59 |
|
60 |
Hmm, maybe not, that would depend on wether a particular package has |
61 |
the --prefix compiled in somewhere. To my knowledge only GCC itself does |
62 |
this (in its specs). |
63 |
|
64 |
> I looks like you can either hack with ROOT support a symlink pointing to |
65 |
> your rw location. This however, has some side effects, because ebuilds |
66 |
> in general consider certain tasks not to be performed when $ROOT != "/". |
67 |
> Additionally, this assumes that EPREFIX is set up in such a way that the |
68 |
> rw mount point can actually have a full EPREFIX in it. This is not the |
69 |
> case with the example you gave (a dot in the second dir from the root). |
70 |
> |
71 |
> Since I don't feel like hacking afs release volume support in Portage -- |
72 |
> it feels way to specific, and far beyond the task of the package |
73 |
> manager, I think it is much better to have a special build machine, |
74 |
|
75 |
Which is the reason why I didn't ask for this, but only for the possibility |
76 |
to define different paths for configure and make install. |
77 |
|
78 |
> which some special setup, that basically does something like this: |
79 |
> |
80 |
> (I have no clue if something like this was implemented: |
81 |
> http://osdir.com/ml/linux.gentoo.portage.devel/2004-12/msg00047.html |
82 |
|
83 |
Looks like what paludis provides with its hooks. |
84 |
|
85 |
> You might, however, be able to trigger some stuff via |
86 |
> etc/portage/bashrc) |
87 |
> |
88 |
> a) modify the image before installing (this will upset portage a lot) |
89 |
> b) create a binpkg, extract it, copy to the path for the rw volume, run |
90 |
> release script |
91 |
> |
92 |
> Portage can also --buildpkgonly which means you can just emerge with |
93 |
> EPREFIX on the ro volume, but Portage never trying to install the |
94 |
> package, instead leaving the binpkg behind. I guess some clever |
95 |
> scripting around this with option b) in mind would be able to do most of |
96 |
> the stuff you want. I could even imagine when you set PKGDIR to a rw |
97 |
> volume and have one server periodically look for new files installed |
98 |
> there, that you can "autodeploy" anything emerged by any client this |
99 |
> way. There would only be a little delay between the actuall merge |
100 |
> completion and the deployment of the package. |
101 |
> |
102 |
> Does this help? |
103 |
|
104 |
Have to think about it and try out. Thanks. |
105 |
|
106 |
Bye... |
107 |
|
108 |
Dirk |
109 |
-- |
110 |
Dirk Heinrichs | Tel: +49 (0)162 234 3408 |
111 |
Configuration Manager | Fax: +49 (0)211 47068 111 |
112 |
Capgemini Deutschland | Mail: dirk.heinrichs@×××××××××.com |
113 |
Wanheimerstraße 68 | Web: http://www.capgemini.com |
114 |
D-40468 Düsseldorf | ICQ#: 110037733 |
115 |
GPG Public Key C2E467BB | Keyserver: www.keyserver.net |