On 2020-05-22, Денис Давыдов <dyna...@gmail.com> wrote:
> P.S. offtopic: I turn to the developers: I tearfully ask you to add python
> to the base installation. This would allow the configuration to be rolled
> automatically using Ansible right after install an OS. It would simplify
> the task of configuring OpenBSD on remote hosts.

It would be hard or perhaps impossible to deal with Python and its
dependencies in base. I suggest adding it via a combination of siteXX.tgz
and rc.firsttime. For example, create install.site containing

echo 'pkg_add python3 >> /etc/rc.firsttime'

Add it to site67.tgz, place that on a local mirror of the main OpenBSD
distribution in the release directory (/pub/OpenBSD/6.7/amd64, etc),
and add it to index.txt.

When you select that mirror in the installer it will then show up in
the list of file sets to install, it is unpacked and install.site runs
at the end, the entry is added to rc.firsttime, and on first boot
Python is installed. (You can't install packages directly from
install.site due to the restricted environment on the ramdisk kernel).

This can also be worked into autoinstall if you're doing PXE boot (or
you can create a modified CD/USB image with autoinstall added to it).
If you're installing on VMs it might be easier to use Packer to create
them and have it automatically enter keyboard commands to run on first
boot.


Reply via email to