1 |
On Thu, Jun 17, 2004 at 12:11:37AM +0200, Marius Mauch wrote: |
2 |
> On 06/17/04 pclouds wrote: |
3 |
> |
4 |
> > Hi, |
5 |
> > I have an idea of using something like checkinstall/sandbox to |
6 |
> > automate src_install phase without making patch for it. |
7 |
> > Here it is: |
8 |
> > we do "make install" in chrooted env. |
9 |
> > There is nothing in chrooted env, so it won't work. The |
10 |
> > idea is to make chrooted env as same as the real env. We preload a lib |
11 |
> > to monitor file access before chrooting. The lib is much like |
12 |
> > sandbox/installwatch. When it encounters a file access, it will make a |
13 |
> > link from the original file to DESTDIR so that programs running inside |
14 |
> > chrooted env can see it. |
15 |
> |
16 |
> Why the chroot and linking stuff? This will get extremely annoying. How |
17 |
> about programs the Makefile has to run (cp, make, install, chmod, |
18 |
> ...). |
19 |
|
20 |
I thought it would open /bin/cp and relevant libraries when executing |
21 |
cp, so i could monitor them. I was wrong because it is executed inside |
22 |
execve syscall. new execve in preloaded library have to make sure all |
23 |
relevant librabries are available :P jail or strace sources may help. |
24 |
|
25 |
> |
26 |
> > Another problem is when programs modify/delete a file out of chrooted |
27 |
> > env. In this case, it will fail. It should be handled by hand. The lib |
28 |
> > should ignore (or make it as it's done. the original files don't |
29 |
> > change actually). |
30 |
> > |
31 |
> > The last problem is that links will not be deleted over time. They may |
32 |
> > grow if some programs scan the whole tree such as find. Most |
33 |
> > install scripts won't afaik. |
34 |
> |
35 |
> Well, that's the smallest problem. |
36 |
|
37 |
Well, it's just a thought. Could you show me other problems? I'd like |
38 |
to see how wrong i am ;) |
39 |
|
40 |
> |
41 |
> > Ok, once "make install" is done, we have DESTDIR with all installed |
42 |
> > files and some links. Some works are needed to remove links. |
43 |
> > |
44 |
> > Don't know if it's usable, so post it here :) Any suggestions? |
45 |
> > |
46 |
> > PS. I don't mean to replace src_install. It's for quick, dirty |
47 |
> > ebuilds. It's for guys that want to install/test some programs |
48 |
> > quickly. |
49 |
> |
50 |
> I don't get what problem you're trying to fix in the first place. Whats |
51 |
> wrong with the current sandbox that would be fixed by your |
52 |
> suggestion? |
53 |
|
54 |
The purpose is "make install" copies files to DESTDIR automatically |
55 |
without patching Makefile. |
56 |
|
57 |
> |
58 |
> Marius |
59 |
> |
60 |
|
61 |
-- |
62 |
Bi Cờ Lao |