1 |
Hi folks, |
2 |
|
3 |
This is a summary of how to detect Baselayout-2/OpenRC from within |
4 |
init.d scripts. We raised it in January, without any actual final |
5 |
agreement: |
6 |
http://archives.gentoo.org/gentoo-dev/msg_5959bcfaf3ba566c551823039643f5c5.xml |
7 |
|
8 |
Also, there were some items that weren't raised in the previous |
9 |
discussion: |
10 |
- The Vserver team needs the actual version of OpenRC, AND it must be |
11 |
available without any exec()/fork()/clone() calls. |
12 |
- init.d/sysfs might be removed on some embedded systems. |
13 |
|
14 |
The final solution that everybody agreed on is as follows. |
15 |
1. OpenRC will provide /libexec/rc/version, a text file containing the |
16 |
version (possible including a git ID) of the release. |
17 |
2. Right now, every init.d script that needs to detection should revbump |
18 |
and change to the following: |
19 |
[[ -f /lib/librc.so -o -f /etc/init.d/sysfs -o -f /libexec/rc/version ]] |
20 |
This allows a safe migration. |
21 |
3. Approximately 6 months after OpenRC and Baselayout2 go stable, the |
22 |
detection will drop to: |
23 |
[[ -f /libexec/rc/version ]] |
24 |
4. For vserver and anybody else that needs the version details of |
25 |
OpenRC, you get to read the file, and RDEPEND on the minimal package |
26 |
version you want. |
27 |
|
28 |
GDP team: |
29 |
(I didn't hear from you in the bug) |
30 |
Could you please update: |
31 |
- handbook section "Writing Init scripts" |
32 |
- OpenRC migration guide |
33 |
|
34 |
-- |
35 |
Robin Hugh Johnson |
36 |
Gentoo Linux Developer & Infra Guy |
37 |
E-Mail : robbat2@g.o |
38 |
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85 |