Commit Graph

8205 Commits

Author SHA1 Message Date
Dave Cottlehuber
1be84d745b release: move OCI to ORACLE
This allows future releng tooling to use OCI for the industry
standard Open Container Initiative tooling, reducing potential
for confusion.

Approved by:	cperciva
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D46975

MFC after:	3 days
Sponsored by:	SkunkWerks, GmbH
2024-10-15 09:28:12 +00:00
James Wright
a0018c65a7 EC2: Disable floppy and parallel port devices
PR:	233861
Reviewed by:	lwhsu, imp
Differential Revision:	https://reviews.freebsd.org/D18482
2024-10-12 22:43:33 -07:00
Baptiste Daroussin
b22be3bbb2 release: basic-cloudinit disable rsa key 2024-10-09 15:50:25 +02:00
Jose Luis Duran
120740221f release: basic-cloudinit improve default image
- Add the firstboot-freebsd-update package, as long as we do not have
  pkgbase, this is needed
- Support SLAAC by default to complement DHCPv4 (use SYNCDHP instead)

Signed-off-by: Jose Luis Duran <jlduran@gmail.com>
2024-09-26 13:01:03 +02:00
Colin Percival
714a6d4368 EC2: Set entropy_efi_seed_size to 64
This dramatically improves boot speeds on Graviton 2 instances.

MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46636
2024-09-22 00:35:48 -07:00
Ahmad Khalifa
599273f942 Copy the new ia32 loader
This handles copying in install-boot.sh and bsdinstall's bootconfig.

install-boot.sh:
make_esp_file now optionally takes extra arguments so it can copy
multiple files. This is used by the amd64 release scripts.
make_esp_device also takes an extra optional argument for efibootname.
This is currently unused, but it can be used in the future to do
something like:
make_esp_device loader.efi bootx64
make_esp_device loader_ia32.efi bootia32

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
2024-09-20 08:45:10 -06:00
Colin Percival
0aabcd75db EC2: Disable RSA host key generation for sshd
These are largely obsolete, and generating them is responsible for
over 10% of the total boot time of EC2 instances.

Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46638
2024-09-17 23:47:58 -07:00
Colin Percival
647299caa0 EC2: Add new "small" AMIs
These are the same as the standard "base" images except:

* They don't have kernel or world debug symbols,
* They don't have FreeBSD tests,
* They don't have 32-bit libraries,
* They don't have LLDB,
* They don't have the Amazon SSM Agent pre-installed,
* They don't default to installing the awscli at first boot.

This reduces the amount of disk space in use when the EC2 instance
finishes booting from ~5 GB to ~1 GB.

Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46509
2024-09-03 22:57:06 -07:00
Colin Percival
40ff0753ab EC2: Make amazon-ssm-agent optional
Move it from VM_EXTRA_PACKAGES in ec2.conf to VM_EXTRA_PACKAGES in
ec2-{base,cloud-init}.conf

Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46508
2024-09-03 22:57:06 -07:00
Colin Percival
f961ddb28d EC2: Move network config into a separate function
Having the "base" FreeBSD network configuration (aka. what is used
when not using cloud-init) in ec2.conf will allow us to reuse it in
other AMIs.

Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46507
2024-09-03 22:57:06 -07:00
Colin Percival
81d3df02bc vmimage.subr: Pass $INSTALLOPTS to install*
This makes it possible for a VM build configuration file to pass
options to make installworld/installkernel/distribution, e.g.
WITHOUT_DEBUG_FILES=YES in order to produce smaller images.

Note that these options are only applied at install time, not at
build time (since the same build is installed into many different
VM images), so not all src.conf options are usable here.

Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46506
2024-09-03 22:57:06 -07:00
Mark Johnston
b4dd5ff5f4 pkgbase: Avoid hard-coding the package prefix in generate-ucl.sh
MFC after:	1 week
Sponsored by:	Innovate UK
2024-08-26 20:49:50 +00:00
Gordon Tetlow
e972e408d1
release: Redirect etcupdate logfile to /dev/null.
Stop shipping a log file for etcupdate. This is a source of
non-reproducability as it uses mktemp thereby guaranteeing the output is
different each run.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46317
2024-08-23 22:35:07 -07:00
Colin Percival
c482d65cd1 EC2: Drop UEFI-PREFERRED from AMI names
Starting in September 2021 EC2 AMI names have included the boot method:
"BIOS", "UEFI", or "UEFI-PREFERRED".  The third option became available
in June 2023 and allows AMIs to boot via UEFI on EC2 instance types
which support that, but fall back to (much slower) BIOS booting on the
instance types which don't support UEFI.

Since UEFI-PREFERRED is basically a best-of-both-worlds option and is
now the default, there's no point mentioning it in the AMI names.  If
for some reason an AMI is built with the boot method forced to BIOS or
UEFI, that will still be included in the AMI name.

This will not be MFCed, in case anyone has scripts which look at the AMI
names on 13.x/14.x.

Sponsored by:	Amazon
2024-08-19 11:11:17 -07:00
Colin Percival
2dac89aee3 EC2: Bump AMI size to 8 GB
8 GB root disk images make FreeBSD/EC2 boot much faster than 6 GB
root disk images.

MFC after:	2 days
Sponsored by:	Amazon
2024-08-19 11:11:04 -07:00
Colin Percival
e06022e1bf Makefile.ec2: Add missing CLEANFILES entry
Without this, "make clean ec2ami" won't build a new AMI.

MFC after:	3 days
Sponsored by:	Amazon
2024-08-19 11:10:52 -07:00
Colin Percival
54a543d5ea EC2: Set dhclient_arpwait="NO"
The DHCP server in EC2 knows exactly which system should be using
which IP address (and in fact EC2 has source IP filtering on by
default) so there's no point ARPing an address before using it.

The preceding commits (changing the ARP wait time from 2 s to 250 ms)
and this one (eliminating the wait entirely in EC2) reduce the time
required for a newly launched FreeBSD/EC2 instance to launch by 2
seconds.

Discussed with:	icattard
MFC after:	10 days
Sponsored by:	Amazon
2024-08-09 16:55:30 -07:00
Colin Percival
ed807f7bca release.sh: Pass ARCH_FLAGS when setting VMSIZE
The default VM size may depend on the architecture.  In particular,
it is currently larged on riscv64 due to a toolchain issue which
results in bloated binaries.

MFC after:	3 days
Fixes:	59c21ed6e8 "release: Bump default VM size for riscv64 to 6 GB"
Sponsored by:	Amazon
2024-07-06 10:18:03 -07:00
Colin Percival
59c21ed6e8 release: Bump default VM size for riscv64 to 6 GB
Due to issues with the riscv64 toolchain, some binaries end up
significantly larger on riscv64 than they should be.  This results
in riscv64 VM images -- and at present *only* riscv64 images -- not
fitting within the default 5 GB filesystem size.

Bump the default size for riscv64 to 6 GB until the toolchain issues
can be resolved.

MFC after:	1 week
Sponsored by:	Amazon
2024-06-28 15:47:11 -07:00
Colin Percival
45846afcb7 release: Stop publishing non-FS-tagged VM images
VM, BASIC-CI, and BASIC-CLOUDWARE images are published with the
filesystem type (UFS or ZFS) in the file name.  For backwards
compatibility we have published the UFS images with no filesystem
in the filename (aka with the same file names as we used before we
supported building ZFS VM images); those are going away now.

This will not be MFCed.
2024-06-21 14:42:10 -07:00
Colin Percival
836f00ebb9 release: Don't publish CW if !WITH_CLOUDWARE
If WITH_CLOUDWARE is not set, we didn't build BASIC-CLOUDWARE; don't try
to install it into the /VM-IMAGES/ directory as part of ftp-stage.

Fixes:	4771c2e9d1 "release: Publish non-uploaded cloudware bits"
MFC after:	6 days
2024-06-20 17:41:14 -07:00
Colin Percival
4771c2e9d1 release: Publish non-uploaded cloudware bits
While most "cloudware" (AWS, Azure, GCP, Vagrant) images get uploaded
to their respective clouds, we have two images -- BASIC-CI and
BASIC-CLOUDINIT -- which are published via the FTP mirrors.  We have
been handling these using a manual and error-prone process of copying
them from the internal build directories into the FTP staging tree,
but they should be handled using the "make install ftp-stage"
mechanism which is used for all the other published images.

This commit 1. Adds a new 'make cloud-install' target which is run as
part of 'make install' and installs BASIC-CI and BASIC-CLOUDINIT images,
and 2. Extends 'make ftp-stage' in Makefile.mirrors to copy those bits
into the FTP staging area.

As a side benefit, this will also make BASIC-CI and BASIC-CLOUDINIT
images available for arm64; until now they have only been available
for amd64.

MFC after:	1 week
2024-06-19 12:36:44 -07:00
Ed Maste
2d6094615a release: Remove mergemaster mm-mtree.sh script
It is unused after 8ee478dfd4 ("release: stop generating mergemaster
databases").

Sponsored by:	The FreeBSD Foundation
2024-06-17 14:37:46 -04:00
Colin Percival
e50fec56bf Revert "release/Makefile.vm: Use qemu-user-static-devel"
This breaks the weekly snapshot builds.  We'll try again once Warner has
some time to debug the qemu-user-static-devel port.

This reverts commit a04ecddfc7.
2024-06-02 07:07:52 -07:00
Colin Percival
a04ecddfc7 release/Makefile.vm: Use qemu-user-static-devel
This is a newer version of the qemu-user-static code, which is very
much out of date.

Requested by:	imp
2024-05-30 10:00:42 -07:00
Colin Percival
f81c0904f7 Add rtw88 firmware to DVD package set
Add net/wifi-firmware-rtw88-kmod since it is no longer included in
the base system on 15.x.  (It is present in 14.x, so this change will
not be MFCed.)
2024-05-23 17:02:40 -07:00
Colin Percival
d31ed58b9f Modernize DVD package set in preparation for 14.1
Remove archivers/unzip (now in base) and emulators/linux_base-c7 (old
and unlikely to be useful without other linux packages being installed),
ports-mgmt/portmaster (now largely obsolete and discouraged in favour
of using pkg and binary packages) and x11-drivers/xf86-video-vmware
(questionably useful).

Replace devel/git with devel/git@lite (sufficient for most purposes),
and adjust the "ensure the ports exist to sanitize the list" code to
ignore the @lite part when checking that /usr/ports/devel/git exists.

Add sysutils/seatd and x11-wm/sway for wayland support.

MFC after:	1 minute
Differential Revision:	https://reviews.freebsd.org/D45278
2024-05-23 17:01:59 -07:00
Colin Percival
ce7756fdca release: make dependencies, not recursive make
For historical reasons, the vm-release and cloudware-release targets
were written as recursive makes of ${VMTARGETS} and ${CLOUDTARGETS};
this worked fine until we started running `make release -jN` and
had both VM and cloud targets depending on ${QEMUTGT}, at which
point things exploded when we tried to build the port twice at the
same time.

Switch vm-release and cloudware-release to have make dependencies on
their individual components; this way a single make process runs and
is aware of the duplicate dependency (and only runs it once).

MFC after:	5 days
2024-05-09 00:52:25 -07:00
Colin Percival
0b1c5628c7 release: Rework vm_extra_pre_umount
The vm_extra_pre_umount function in vmimage.subr served two purposes:
It removed /etc/resolv.conf and /qemu (if cross-building), and it
provided a function for cloudware to override in order to make cloud
specific changes to the filesystem before constructing a disk image.

This resulted in a number of bugs:
1. When cross-building, the emulator binary was left as /qemu in the
Azure, GCE, Openstack and Vagrant images.
2. The build host's resolv.conf was left as /etc/resolv.conf in the
basic-ci and basic-cloudinit images.
3. When building GCE images, a Google-specific resolv.conf file was
constructed, and then deleted before the disk image was created.

Move the bits needed for running code inside a VM staging directory
from vm_install_base into a new vm_emulation_setup routine, and move
the corresponding cleanup bits from vm_extra_pre_umount to a new
vm_emulation_cleanup routine.

Remove the /qemu and /etc/resolv.conf cleanups from the cloudware
configuration files (where they exist) since we will now be running
vm_emulation_cleanup to remove those even when vm_extra_pre_umount
has been overridden.

Override vm_emulation_cleanup in gce.conf since in that one case (and
*only* that one case) we don't want to clean up resolv.conf (since it
was constructed for the VM image rather than copied from the host).

releng/14.1 candidate.

MFC after:	1 week
Sponsored by:	https://www.patreon.com/cperciva
2024-05-06 13:40:47 -07:00
Colin Percival
9287d1853c release: Use qemu when cross-building vm images
For a bit over 5 years, we have used qemu when cross-building cloudware
images; in particular, it's necessary when installing packages which
might include post-install scripts.

Use qemu in the vm-images target too; while "generic" vm images don't
install packages, they still run newaliases and /etc/rc.d/ldconfig,
both of which fail without appropriate emulation.

MFC after:	1 week
2024-05-04 23:59:29 -07:00
Lexi Winter
2f9966ff63 packages: add package for NTP
Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1193
2024-05-04 07:41:54 -06:00
Colin Percival
f4b08097d8 release: Stage non-UFS images in vm-images-stage
When the VM image building code was updated to support building
non-UFS images, the vm-images-stage target was not updated to
install those newly built images to the FTP site.  As a result, we
have been sending weekly snapshot announcements since August claiming
that ZFS VM images are available when they are not in fact present
anywhere publicly accessible.

Fixes:	32ae9a6b39 "release: Build UFS and ZFS VM images"
Reported by:	Michael Dexter
MFC after:	5 days
2024-05-01 11:02:49 -07:00
Lexi Winter
e05b6502f9 package: fix dependency generation
A bug in release/packages/generate-ucl.sh causes package dependencies
(other than shlib depends) to not be generated correctly, meaning
packages are missing their dependencies.

generate-ucl.sh creates the UCL file by:

1. copying ${uclsource} (template.ucl) to ${uclfile}
2. appending dependencies to ${uclfile}
3. calling generate-ucl.lua on ${uclsource} to create ${uclfile}

This breaks because the dependencies added in step 2 are overwritten in
step 3.

Fix this by calling generate-ucl.lua with ${uclfile} as both the input
and output file, so anything we added to ${uclfile} is preserved.

Reviewed by: des, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1203
2024-04-29 08:31:36 -06:00
Lexi Winter
2ef5a8624a package: FreeBSD-periodic should depend on FreeBSD-cron
Reported by: des
Reviewed by: imp, des
Pull Request: https://github.com/freebsd/freebsd-src/pull/1204
2024-04-29 08:29:20 -06:00
Lexi Winter
1b3c07bed6 package: move OpenBSM auditing into its own package
Move auditing runtime (auditd, etc.) into the new FreeBSD-audit package.
Also move the runtime OpenBSM manual pages from libbsm into auditd so
they get installed with the right package.

Add an UPDATING entry noting the new packages.

Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1197
2024-04-28 22:33:06 -06:00
Kyle Evans
9245ced9c8 release: remove the RPI CM4s .dtb
This isn't actually packaged by the sysutils/rpi-firmware port, so we
cannot include it in the image.  Fix the RPI release build until an
interested party adds it to the port and packages are available.

Reported by:	cperciva
2024-04-25 17:10:32 -05:00
Jose Luis Duran
4f223e0da7 release: Change vmimage EFI GPT label
This matches the default bsdinstall nomenclature.

PR: 278480
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1188
2024-04-23 15:13:40 -06:00
Lexi Winter
c3dd71ab4c share/examples: move examples into appropriate packages
Allow a new variable SE_xxxPACKAGE to be used to place an example group
into a package.

Move the following examples into existing appropriate packages:

- bhyve examples into FreeBSD-bhyve
- bootforth examples into FreeBSD-bootloader
- csh examples into FreeBSD-csh
- ipfw examples into FreeBSD-ipfw
- jail examples into FreeBSD-jail
- pf examples into FreeBSD-pf
- ppp examples into FreeBSD-ppp
- printing examples into FreeBSD-lp
- uefisign examples into FreeBSD-efi-tools
- ypldap examples into FreeBSD-yp
- hast examples into FreeBSD-hast

Move all other examples into the new 'FreeBSD-examples' package.

This removes a significant number of files from the FreeBSD-utilities
package.

Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1176
2024-04-22 22:36:35 -06:00
Lexi Winter
8aaa58ada4 package: add DESC and COMMENT for cron package
Reviewed by: imp, manu, Mina Galic
Pull Request: https://github.com/freebsd/freebsd-src/pull/1172
2024-04-22 22:36:35 -06:00
Klaus Küchemann
1bd4f769ca add dtb support for RPI CM4, CM4s, CM4_ioBoard
Signed-off-by: Klaus Küchemann <maciphone2@googlemail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1182
2024-04-19 16:54:32 -06:00
Lexi Winter
dbd0366f34 package: move lpr into its own package
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1171
2024-04-19 16:54:31 -06:00
Colin Percival
567cbd8ff1 release: Build dvd image before staging pkgs
This missing dependency is only visible with -jN (which was otherwise
broken until recently) and only when building DVD images (which aren't
included in weekly snapshots and thereby slipped past testing).

MFC after:	3 days
2024-04-14 16:45:40 -07:00
Colin Percival
7ffa1f14e3 Makefile.vm: Set CLEANDIRS correctly for vm-image
With multiple filesystems and disk image formats, we now use different
staging directories; we need to include them all in CLEANDIRS.

Fixes:	97bd53ef4d "Makefile.vm: Fix duplicate rc.conf files"
MFC after:	3 days
2024-04-14 16:45:40 -07:00
John Baldwin
ea2663040d release: Use the ABI of the target release to fetch packages
- Point --rootdir at the installed destdir in the dvd tree.  This
  causes pkg to determine the ABI from the installed destdir instead
  of the host's binaries.  Previously the result was that packages
  for the host's ABI were always downloaded breaking cross-releases
  (e.g. arm64 releases built on an amd64 host included amd64
  packages on the DVD ISO image rather than arm64 packages).  This
  also handles version mismatches, and I tested this by cross-building
  a 15.x arm64 release on a 14.x amd64 host.

- As a result, pkg now does a chdir(3) to the rootdir before running,
  so the -o argument to fetch needs to be updated to be relative to
  rootdir instead of the CWD as make runs.

- Add a new ROOTDIR variable to limit references to "dvd" to one
  place.  Ideally ROOTDIR would be an argument to this script so
  that it didn't really know about the dvd layout at all.

- While here, simplify creation of symlinks by just using a longer
  path to the link name instead of using 'cd' in the shell before
  invoking ln(1).  Also use ln -sf to create the pkg.pkg symlink
  rather than rm + ln.

PR:		278273
Reported by:	gatekeeper <tiago.gasiba@gmail.com>
Reviewed by:	imp, delphij
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D44749
2024-04-14 16:45:40 -07:00
Colin Percival
5c213bf01a cloudware: allow disk format to be a list
Make basic-cloudinit available both in qcow2 and raw formats

MFC After:	3 days
Co-Authored-By:	bapt
Sponsored by:	OVHCloud (original patch from bapt)
Differential Revision:	https://reviews.freebsd.org/D44747
2024-04-14 16:45:40 -07:00
Colin Percival
4d7174b1d9 release: Fix powerpc boot block uudecoding
Confusingly, uuencode writes to stdout by default, but uudecode does not.

Fixes:	6c3e01bf85 "release: Randomize powerpc boot block file name"
MFC after:	3 days
2024-04-12 17:52:28 -07:00
Colin Percival
6c3e01bf85 release: Randomize powerpc boot block file name
With parallel builds enabled, we can end up building multiple ISOs at
once, which causes problems if mkisoimages.sh uses a consistent file
name "/tmp/hfs-boot-block".

MFC after:	3 days
2024-04-12 10:58:09 -07:00
Colin Percival
6c87aed39c release: Support r/o /usr/ports for cloudware
Set WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles when building tools
needed for uploading cloudware images.

While I'm here, adjust the bsdec2-image-upload build target to match
the style used by the Azure/GCE/Vagrant Makefiles.

MFC after:	3 days
2024-04-12 10:58:09 -07:00
Mina Galić
2039437c76 ec2: homedir bug fixed in 24.1.4
This bug fix is due to be released in Quarterly:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275896

While here, overwrite the `doas` stanza, which needs to correspond to
the user that we are creating.

MFC after:	5 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1163
2024-04-11 14:12:16 -07:00
Colin Percival
6f454c211b release/Makefile.vm: Support read-only ports tree
Build qemu (if needed) with WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles
so that we can have a read-only /usr/ports and don't contaminate it.  This
became an issue when I enabled parallel release building, since one image
might be creating its ports.txz file at the same time as we're building
qemu as a prerequisite for building another image.

MFC after:	5 days
2024-04-11 09:28:05 -07:00