In this post, I’m going to create a second jail in a FreshPorts ingress node. The first jail (named freshports) is used for running various scripts, typically of the make -V nature, to extract values from a ports tree. It is run in a jail without network connections and without installed packages. This avoids the unintended affects of having a particular port installed which might affect the obtained values.
The filesystems
The ingress jail on a FreshPorts node typically does not have control over ZFS filesystems.
Thus, the following gets started on the host:
[15:04 r730-01 dvl ~] % sudo zfs create data04/freshports/dev-ingress01/jails/index
In the ingress jail, we see:
[15:06 dev-ingress01 dvl /jails] % ls -l total 18 drwxr-xr-x 18 root wheel 32 2026.09.08 18:31 freshports/ drwxr-xr-x 2 root wheel 2 2026.09.24 15:05 index/
Installing the jail
Normally, my preferred tool would be mkjail yet I am not using that here because of the ZFS restrictions mentioned above.
Instead, I’ll be running bsdinstall manually. I’m basing my commands on what we worked on for mkjail, as found in the create pkgbase jail via bsdinstall issue. Specifically, I’m getting the command from this comment.
[15:16 dev-ingress01 dvl ~] % sudo BSDINSTALL_CHROOT=/jails/index bsdinstall pkgbase --jail --non-interactive Updating FreeBSD-base repository catalogue... [dev-ingress01.int.unixathome.org] Fetching meta.conf: 100% 179 B 0.2 kB/s 00:01 [dev-ingress01.int.unixathome.org] Fetching data: 100% 82 KiB 84.0 kB/s 00:01 Processing entries: 100% FreeBSD-base repository update completed. 509 packages processed. All repositories are up to date. The following 215 package(s) will be affected (of 0 checked): New packages to be INSTALLED: FreeBSD-acct: 15.1 FreeBSD-acpi: 15.1 ... FreeBSD-zstd-lib: 15.1 pkg: 2.6.2_1 Number of packages to be installed: 215 The process will require 1 GiB more space. 305 MiB to be downloaded. [dev-ingress01.int.unixathome.org] [ 1/215] Fetching FreeBSD-libmilter-dev-15.1: 100% 86 KiB 87.8 kB/s 00:01 [dev-ingress01.int.unixathome.org] [ 2/215] Fetching FreeBSD-libsqlite3-dev-15.1: 100% 2167 KiB 2.2 MB/s 00:01 ... [dev-ingress01.int.unixathome.org] [215/215] Fetching FreeBSD-ctf-dev-15.1: 100% 138 KiB 141.1 kB/s 00:01 Checking integrity... done (0 conflicting) Checking integrity... done (0 conflicting) The following 215 package(s) will be affected (of 0 checked): New packages to be INSTALLED: FreeBSD-acct: 15.1 FreeBSD-acpi: 15.1 FreeBSD-apm: 15.1 FreeBSD-at: 15.1 ... FreeBSD-zstd-lib: 15.1 pkg: 2.6.2_1 Number of packages to be installed: 215 The process will require 1 GiB more space. [dev-ingress01.int.unixathome.org] [ 1/215] Installing FreeBSD-acct-15.1... [dev-ingress01.int.unixathome.org] [ 1/215] Extracting FreeBSD-acct-15.1: 100% ... [dev-ingress01.int.unixathome.org] [215/215] Installing pkg-2.6.2_1... [dev-ingress01.int.unixathome.org] [215/215] Extracting pkg-2.6.2_1: 100% ==> Running trigger: mandoc.ucl
A ports tree
Installing the ports tree. I could have copied this from the existing jail.
[15:30 dev-ingress01 dvl /jails/index/usr] % sudo git clone https://git.FreeBSD.org/ports.git Cloning into 'ports'... remote: Enumerating objects: 7125373, done. remote: Counting objects: 100% (809307/809307), done. remote: Compressing objects: 100% (599260/599260), done. remote: Total 7125373 (delta 465557), reused 362993 (delta 205240), pack-reused 6316066 (from 1) Receiving objects: 100% (7125373/7125373), 1.56 GiB | 15.41 MiB/s, done. Resolving deltas: 100% (4283524/4283524), done. Updating files: 100% (177838/177838), done. [15:40 dev-ingress01 dvl /jails/index/usr] %
Installing perl
In previous runs, I’ve seen that perl is required for make index.
[%F{cyan}%B%T%b%f %F{magenta}%m%b%f %F{green}%B%n%b%f %F{magenta}%B%~%b%f] %#%b%f ^D
[15:49 dev-ingress01 dvl ~] % sudo pkg -r /jails/index install perl5
Updating FreeBSD-base repository catalogue...
[dev-ingress01.int.unixathome.org] Fetching meta.conf: 100% 179 B 0.2 kB/s 00:01
[dev-ingress01.int.unixathome.org] Fetching data: 100% 82 KiB 84.0 kB/s 00:01
Processing entries: 100%
FreeBSD-base repository update completed. 509 packages processed.
Updating local repository catalogue...
[dev-ingress01.int.unixathome.org] Fetching meta.conf: 100% 168 B 0.2 kB/s 00:01
[dev-ingress01.int.unixathome.org] Fetching data: 100% 360 KiB 368.6 kB/s 00:01
Processing entries: 100%
local repository update completed. 1202 packages processed.
All repositories are up to date.
New version of pkg detected; it needs to be installed first.
The following 1 package(s) will be affected (of 0 checked):
Installed packages to be UPGRADED:
pkg: 2.6.2_1 -> 2.8.4 [local]
Number of packages to be upgraded: 1
The process will require 22 MiB more space.
13 MiB to be downloaded.
Proceed with this action? [y/N]: y
[dev-ingress01.int.unixathome.org] [1/1] Fetching pkg-2.8.4: 100% 13 MiB 13.7 MB/s 00:01
Checking integrity... done (0 conflicting)
[dev-ingress01.int.unixathome.org] [1/1] Upgrading pkg from 2.6.2_1 to 2.8.4...
[dev-ingress01.int.unixathome.org] [1/1] Extracting pkg-2.8.4: 100%
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
Updating local repository catalogue...
local repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
perl5: 5.42.3 [local]
Number of packages to be installed: 1
The process will require 62 MiB more space.
16 MiB to be downloaded.
Proceed with this action? [y/N]: y
[dev-ingress01.int.unixathome.org] [1/1] Fetching perl5-5.42.3: 100% 16 MiB 16.8 MB/s 00:01
Checking integrity... done (0 conflicting)
[dev-ingress01.int.unixathome.org] [1/1] Installing perl5-5.42.3...
[dev-ingress01.int.unixathome.org] [1/1] Extracting perl5-5.42.3: 100%
The jail configuration
This is the configuration of that new jail:
index {
host.hostname = "index";
ip4 = inherit;
persist;
devfs_ruleset=0;
allow.mount=true;
enforce_statfs=1;
allow.mount.devfs;
allow.mount.procfs;
}
Building the index
This takes about 20 minutes.
[15:50 dev-ingress01 dvl ~] % sudo jexec index
[%F{cyan}%B%T%b%f %F{magenta}%m%b%f %F{green}%B%n%b%f %F{magenta}%B%~%b%f] %#%b%f cd /usr/ports
[%F{cyan}%B%T%b%f %F{magenta}%m%b%f %F{green}%B%n%b%f %F{magenta}%B%~%b%f] %#%b%f make index
Generating INDEX-15 - please wait..--- describe.accessibility ---
--- describe.arabic ---
--- describe.archivers ---
--- describe.astro ---
--- describe.audio ---
--- describe.benchmarks ---
--- describe.biology ---
--- describe.cad ---
--- describe.chinese ---
--- describe.comms ---
--- describe.converters ---
--- describe.databases ---
--- describe.deskutils ---
--- describe.devel ---
--- describe.dns ---
--- describe.editors ---
--- describe.emulators ---
--- describe.finance ---
--- describe.french ---
--- describe.filesystems ---
--- describe.ftp ---
--- describe.games ---
--- describe.german ---
--- describe.graphics ---
--- describe.hebrew ---
--- describe.hungarian ---
--- describe.irc ---
--- describe.japanese ---
--- describe.java ---
--- describe.korean ---
--- describe.lang ---
--- describe.mail ---
--- describe.math ---
--- describe.misc ---
--- describe.multimedia ---
--- describe.net ---
--- describe.net-im ---
--- describe.net-mgmt ---
--- describe.net-p2p ---
--- describe.news ---
--- describe.polish ---
--- describe.ports-mgmt ---
--- describe.portuguese ---
--- describe.print ---
--- describe.russian ---
--- describe.science ---
--- describe.security ---
--- describe.shells ---
--- describe.sysutils ---
--- describe.textproc ---
--- describe.ukrainian ---
--- describe.vietnamese ---
--- describe.www ---
--- describe.x11 ---
--- describe.x11-clocks ---
--- describe.x11-drivers ---
--- describe.x11-fm ---
--- describe.x11-fonts ---
--- describe.x11-servers ---
--- describe.x11-themes ---
--- describe.x11-toolkits ---
--- describe.x11-wm ---
When done, we have this:
[%F{cyan}%B%T%b%f %F{magenta}%m%b%f %F{green}%B%n%b%f %F{magenta}%B%~%b%f] %#%b%f ls -lt | head
total 57809
-rw-r--r-- 1 root wheel 51653500 Sep 24 16:04 INDEX-15
drwxr-xr-x 7 root wheel 12 Sep 24 15:40 .git
drwxr-xr-x 713 root wheel 714 Sep 24 15:40 x11
drwxr-xr-x 138 root wheel 139 Sep 24 15:40 x11-wm
drwxr-xr-x 285 root wheel 286 Sep 24 15:40 x11-toolkits
drwxr-xr-x 182 root wheel 183 Sep 24 15:40 x11-themes
drwxr-xr-x 12 root wheel 13 Sep 24 15:40 x11-servers
drwxr-xr-x 444 root wheel 445 Sep 24 15:40 x11-fonts
drwxr-xr-x 32 root wheel 33 Sep 24 15:40 x11-fm
[%F{cyan}%B%T%b%f %F{magenta}%m%b%f %F{green}%B%n%b%f %F{magenta}%B%~%b%f] %#%b%f date
Thu Sep 24 16:04:39 UTC 2026
[%F{cyan}%B%T%b%f %F{magenta}%m%b%f %F{green}%B%n%b%f %F{magenta}%B%~%b%f] %#%b%f
Once more, with -j
Let’s see if we can speed this one up, by adding -j:
[%F{cyan}%B%T%b%f %F{magenta}%m%b%f %F{green}%B%n%b%f %F{magenta}%B%~%b%f] %#%b%f time make -j 30 index
--- /usr/ports/INDEX-15 ---
Generating INDEX-15 - please wait..--- describe.accessibility ---
--- describe.arabic ---
...
--- describe.x11-wm ---
Done.
729.25 real 2666.01 user 1852.71 sys
[%F{cyan}%B%T%b%f %F{magenta}%m%b%f %F{green}%B%n%b%f %F{magenta}%B%~%b%f] %#%b%f date
Thu Sep 24 16:19:58 UTC 2026
[%F{cyan}%B%T%b%f %F{magenta}%m%b%f %F{green}%B%n%b%f %F{magenta}%B%~%b%f] %#%b%f ls -l /usr/ports/INDEX-15
-rw-r--r-- 1 root wheel 51653500 Sep 24 16:17 /usr/ports/INDEX-15
That’s just over 12 minutes. Let’s try more.
make -j 65 took 729.13 seconds, no improvement.











