make installjail maybe?

Kris Kennaway kris at obsecurity.org
Thu Oct 16 10:30:02 PDT 2003


On Thu, Oct 16, 2003 at 02:28:00AM -0500, John wrote:
> Is anyone working on someway to install ports into a jail?

You've already discovered most of what is necessary:

> What i do most of
> the time for a small port (like bind or something) is i redefine PREFIX to
> be /usr/jail/$ip, but there are a few problems with this.

> 1. named now looks for /usr/jail/$ip/etc/named.conf by default. Not that that
> is hard to get around, but just a fyi.

What might actually be required is DESTDIR support for the ports
collection.  There's a PR about this, but I suspect that most ports
(those which use the vendor's install target) won't respect this
without changes.

> 2. You can't install the port more then once without messing around with 
>  the package install info (the stuff in /var/db/pkg). I've just been moving
> the package name from say bind-8.3.6 to bind-8.3.6-jail-path-to-jail-root, but 
> that is a little ugly ;).

PKG_DBDIR

> 3. libs, passwd files, group (basicly userland). Most of the time i just cheat
> and staticly link the port ( setenv CLFAGS "-static"). This works fine for bind
> , but i haven't tested other apps. Then i copy the other userland bits.
> maybe if there was a port that would just install a mini user land, based off
> /usr/src or something like that i wouldn't need to staticly link everything.

"mini user land" doesn't have well-defined meaning, because everyone's
needs are different.  If you're not happy with installing an entire
world into your jail, you probably need to make your own script.

I've thought about making a tool that attempts to discover the files
needed by a port so they can be copied into the jail, but this isn't
really easy to do.

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20031016/32d27eee/attachment.bin


More information about the freebsd-ports mailing list