Bug 254718

Summary: sysutils/ec2-scripts missing dependecies
Product: Ports & Packages Reporter: Natalino Picone <natalino.picone>
Component: Individual Port(s)Assignee: Colin Percival <cperciva>
Status: New ---    
Severity: Affects Only Me CC: emaste, natalino.picone
Priority: --- Flags: bugzilla: maintainer-feedback? (cperciva)
Version: Latest   
Hardware: Any   
OS: Any   

Description Natalino Picone 2021-04-02 11:54:21 UTC
This package should declare it's dependency from `sysutils/firstboot-pkgs` and `sysutils/firstboot-freebsd-update` otherwise at boot it'll show these warnings:

rcorder: file `/usr/local/etc/rc.d/ec2_configinit` is before unknown provision `firstboot_pkgs`
rcorder: file `/usr/local/etc/rc.d/ec2_configinit` is before unknown provision `firstboot_freebsd_update`
Comment 1 Colin Percival freebsd_committer 2021-04-02 16:31:50 UTC
Sounds right to me.  In EC2 instance builds we have all of those packages so it has never been an issue -- Natalino, I'd be interested to hear about the use case which led you to trip over this.

I'm a bit busy right now but I'll see if I can get someone else to commit a fix.
Comment 2 Natalino Picone 2021-04-06 09:20:03 UTC
(In reply to Colin Percival from comment #1)

I build some custom purpose images using nanobsd, and I don't install those packages.
Are these boot order directives really needed?
Comment 3 Colin Percival freebsd_committer 2021-04-06 15:58:14 UTC
Ah, are you using configinit there?

Yes, we need the boot order directives -- in EC2 at least -- so that it's possible for someone to provide user-data at instance launch time which overrides the firstboot_pkgs and firstboot_freebsd_update settings, e.g. if they want to bring up a system and be able to SSH in ASAP without waiting for it to reboot to apply security patches.

The ordering could have been provided by having firstboot_pkgs and firstboot_freebsd_update REQUIRE ec2_configinit... but that would cause the same problem since there are people using those scripts who don't have ec2-scripts installed. :-/