Page MenuHomeFreeBSD

Add pkg_bootstrap firstboot script.

Authored by jonathan on Feb 9 2018, 2:32 AM.



This script allows a system to bootstrap the package system and a set of
initial packages on first boot. To enable pkg(8) bootstrapping, add the
following to /etc/rc.conf:


A list of packages to be installed at bootstrap time can be specified with:

pkg_bootstrap_list="sudo tmux git kyua"

The environment for the pkg(8) bootstrap commands can be influenced using
the pkg_bootstrap_env variable. This can be helpful for overriding
environment variables such as ABI or OSVERSION:


Diff Detail

Lint OK
No Unit Test Coverage
Build Status
Buildable 14890
Build 15002: arc lint + arc unit

Event Timeline

You're aware of sysutils/firstboot-pkgs in the ports tree, right? Wouldn't it make sense to migrate that into the base system rather than adding a new script?

I wasn't aware of that port, no... thanks for pointing it out! I'll definitely take a look at that and see if it might make more sense to pull that into base than to duplicate the work.

So, @cperciva , do you mind if I pull your firstboot-pkgs work into the base system? This would help tidy up a VM-building workflow that I'm using in which I can't run pkg(8) on the VM-building host.

Absolutely fine with me. When I wrote this (and also firstboot-freebsd-update) I was anticipating that it might end up in the base system if people found it useful -- I have a long history of using the ports tree as a staging area like this. :-)

If you go ahead with importing this to the base system, we will need to (a) bump __FreeBSD_version, (b) mark the port as IGNORE for relevant values, and (c) update the EC2 build to not install the port any more. Feel free to do as many or as few of these as you're comfortable with, but please send me an email when you're done so I can do the rest (if any) and make sure everything looks right.