Gentoo Archives: gentoo-dev

From: Roy Marples <roy@×××××××.name>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Google SOC 2008
Date: Mon, 03 Mar 2008 15:58:51
Message-Id: 5e985752b1fac3a18077ec0820d9751f@marples.name
In Reply to: Re: [gentoo-dev] Google SOC 2008 by Fabian Groffen
1 On Mon, 3 Mar 2008 15:53:20 +0100, Fabian Groffen <grobian@g.o>
2 wrote:
3 > On 03-03-2008 13:36:25 +0000, Roy Marples wrote:
4 >> On Thursday 28 February 2008 11:22:13 Roy Marples wrote:
5 >> > So the only thing left (aside from bug fixing) is to instruct OpenRC
6 >> > dependency
7 >> > code that it's in a prefix and to respect the noprefix keyword in
8 > services,
9 >> > or
10 >> > to provide dummy services.
11 >>
12 >> This is now done.
13 >>
14 >> I have OpenRC fully working in a prefixed non priviledged install on a
15 > NetBSD
16 >> box.
17 >
18 > Can you define how this is working? Do you just have NetBSD and install
19 > OpenRC in /my/arbitrary/path, or do you have a full set of utilities
20 > under /my/arbitrary/path with OpenRC as one of them?
21
22 I did this in OpenRC source
23 rm -rf /home/roy/pkg
24 make PREFIX=/home/roy/pkg PKG_PREFIX=/usr/pkg install
25 Create Gentoo style init script in /home/roy/pkg/etc/init.d for say boinc
26 export PATH=$PATH:/home/roy/pkg/bin:/home/roy/pkg/sbin
27 rc-update add boinc default
28 rc default
29
30 boinc started
31
32 >
33 >> The only question I have left is what mechanism resets service state, as
34 > the
35 >> prefixed state dir needs will presist between reboots which isn't
36 > desirable.
37 >
38 > startprefix could maybe start some sort of process that lives on,
39 > activated like keychain does, such that multiple startprefix invocations
40 > do not start the system all the time -- if that is desired at all. In
41 > a real scenario it may be just a hook from the host OS's start/stop
42 > mechanism to tell OpenRC in what state it should run.
43 >
44 > If a service such as PostgreSQL is killed (maybe a reboot?) does OpenRC
45 > then know it is not running any more? I guess it does, so that's good
46 > enough, IMO.
47
48 This needs to be done on startup
49
50 rc sysinit
51 rc default
52
53 Which is pretty much what we do in Gentoo anyway. Just ensure that the
54 sysinit
55 runlevel only runs once, as it will remove all state when run again.
56
57 Thanks
58
59 Roy
60
61 --
62 gentoo-dev@l.g.o mailing list