Several modifications to ports support

- ports are only mounted to a build chroot if it uses a buildbase
- added building of a buildbase with jaildk base $name rw
- added a separate internal rcd-function jaildk_rc_ports for
  mounting and umounting ports, which ONLY operates in buld mode
- added som documentation about this in the README
This commit is contained in:
Thomas von Dein
2020-11-27 08:52:58 +01:00
parent fd855c560b
commit e6ab439f0f
2 changed files with 109 additions and 37 deletions

View File

@@ -122,6 +122,42 @@ vi /usr/local/etc/nginx/nginx.conf
Since the build chroot is writable you can install packages and
configure everything as needed.
### Using the ports collection
There might be cases when using pre build binary packages are not your
thing. In such a case you want to use the [FreeBSD Ports Collection](https://www.freebsd.org/ports/).
*jaildk* supports this, here are the steps required:
#### Create a buildbase
A normal base directory cannot be used with the ports collection
because jaildk removes libraries and binaries for security reasons
from normal bases. To create a build base, execute:
`jaildk base 12-RELEASE-build rw`
Next, add the following entry to the configuration of you jail. To
stay with our example, edit `/jail/etc/myjail/jail.conf` and add:
`buildbase=12-RELEASE-build`
Then install the build jail as usual:
`jaildk build myjail`
Finally, install the current ports collection:
`jaildk fetch`
Now you can enter the build jail and install ports the traditional way:
```
jaildk blogin myjail
cd /usr/ports/shells/bash
make config-recursive install clean
```
### When done, install and start the jail
```