OpenRC/Prefix

This work is a reponse to

The following guideline applies to a Gentoo Prefix on RHEL-5.6 amd64, for other setups it should be similar. Feel free to documents corners cases here. = USING heroxbd's openrc-prefix overlay = This is a temperary overlay only for OpenRC/Prefix testing. The changes will be reviewed and included in the official tree gradually. As of May 12, 2012. The overlay includes portage (for keeping /etc/{init,conf}.d dirs), openrc (for adding back Prefix support) and baselayout (for prefix dir).

Get to a dir where you intend to put the overlay, say, ${HOME}/openrc.

Populate this directory to portage,

Replace the directory to yours. Details for playing with overlay can be found at Overlay.

= GETTING openrc-9999 emerged on prefix =

openrc is not out of box now, first attempt gives

Let's eliminate the blocks.

glibc and sysvinit
In Gentoo Prefix, glibc and sysvinit are supposed to be provided outside Prefix by host OS. Let's tell portage that we have any version of glibc and sysvinit she wants:

now it becomes,

Finally emerge baselayout-2 and openrc-9999,

Unmask openrc-9999 as guided. (This is just a temperary solution, will be integraded into openrc soon.)

OpenRC config
Use the prefix feature set in openrc,

remove dmesg from sysinit, because we don't manange dmesg from Preifx

= USING a patched portage not to remove initd and confd from ebulds = Default portage in prefix removes /etc/{init,conf}.d directories with prompts like

Let's emerge portage from heroxbd's overlay to disable this behavior

= EXAMPLE: tinc = tinc is a decentralized VPN. A tinc started from Gentoo Prefix can serve as a relay node in the VPN, if tun/tap is not available for normal user.

emerge tinc, or re-emerge to get its initd and confd files back with our new portage

prefixify init script
fix shebang in the init script,

fire up tincd from OpenRC
Make necessary changes in ${EPREFIX}/etc/conf.d/tinc.networks and ${EPREFIX}/etc/tinc according to your specific setup.

Add tincd into default runlevel

Finally we are done with

= EXAMPLE: nginx = nginx is a lightweight efficient http server.

emerge nginx, or re-emerge to get its initd and confd files back with our new portage