Page MenuHomeFreeBSD

Add pkg_bootstrap firstboot script.
AbandonedPublic

Authored by jonathan on Feb 9 2018, 2:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 4:28 AM
Unknown Object (File)
Nov 18 2023, 4:12 PM
Unknown Object (File)
Nov 12 2023, 5:23 PM
Unknown Object (File)
Nov 8 2023, 11:14 AM
Unknown Object (File)
Oct 22 2023, 12:52 PM
Unknown Object (File)
Oct 9 2023, 3:21 PM
Unknown Object (File)
Oct 7 2023, 10:10 AM
Unknown Object (File)
May 28 2023, 9:51 AM
Subscribers

Details

Reviewers
bapt
jmg
cperciva
Summary

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:

pkg_bootstrap_enable="YES"

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:

pkg_bootstrap_env="OSVERSION=1200056"

Diff Detail

Lint
Lint Passed
Unit
No 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.