mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
The packages for 15.0-RELEASE built without the bug fix needed to make files created via @sample get properly listed in METALOG. Fix the cloudware which contain @sample-using packages by adding the necessary files to METALOG manually. This should be reverted after the next full package build, and live on only in releng/15.0. Reviewed by: markj MFC after: immediately (15.0-RC2) Differential Revision: https://reviews.freebsd.org/D53797
72 lines
2.1 KiB
Bash
72 lines
2.1 KiB
Bash
#!/bin/sh
|
|
#
|
|
#
|
|
|
|
# Convention of Linux type VM on Azure is 30G
|
|
export VMSIZE=30g
|
|
|
|
# Set to a list of packages to install.
|
|
export VM_EXTRA_PACKAGES="azure-agent python python3 firstboot-freebsd-update firstboot-pkgs"
|
|
|
|
# Set to a list of third-party software to enable in rc.conf(5).
|
|
export VM_RC_LIST="ntpd sshd waagent firstboot_freebsd_update firstboot_pkgs"
|
|
|
|
# No swap space; waagent will allocate swap space on the resource disk.
|
|
# See ResourceDisk.EnableSwap and ResourceDisk.SwapSizeMB in waagent.conf
|
|
export NOSWAP=YES
|
|
|
|
# https://learn.microsoft.com/en-us/partner-center/marketplace/azure-vm-certification-faq#vm-images-must-have-1-mb-of-free-space
|
|
export VM_BOOTPARTSOFFSET=1M
|
|
|
|
# Hack for FreeBSD 15.0; should go away before 15.1.
|
|
MISSING_METALOGS="
|
|
./usr/local/etc/pam.d/sudo
|
|
./usr/local/etc/ssl/cert.pem
|
|
./usr/local/etc/sudo.conf
|
|
./usr/local/etc/sudo_logsrvd.conf
|
|
./usr/local/etc/sudoers
|
|
./usr/local/etc/waagent.conf
|
|
"
|
|
|
|
vm_extra_pre_umount() {
|
|
# Remove the pkg package and repo databases as they will likely
|
|
# be out of date by the time the image is used. In unprivileged
|
|
# builds this is unnecessary as pkg will not be installed to
|
|
# begin with.
|
|
if [ -z "${NO_ROOT}" ]; then
|
|
mount -t devfs devfs ${DESTDIR}/dev
|
|
|
|
# The firstboot_pkgs rc.d script will download the repository
|
|
# catalogue and install or update pkg when the instance first
|
|
# launches, so these files would just be replaced anyway; removing
|
|
# them from the image allows it to boot faster.
|
|
chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \
|
|
/usr/sbin/pkg delete -f -y pkg
|
|
umount ${DESTDIR}/dev
|
|
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports
|
|
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods
|
|
fi
|
|
|
|
pw -R ${DESTDIR} usermod root -h -
|
|
|
|
cat << EOF >> ${DESTDIR}/etc/rc.conf
|
|
ifconfig_hn0="SYNCDHCP"
|
|
ntpd_sync_on_start="YES"
|
|
EOF
|
|
|
|
cat << EOF >> ${DESTDIR}/boot/loader.conf
|
|
autoboot_delay="-1"
|
|
beastie_disable="YES"
|
|
loader_logo="none"
|
|
hw.memtest.tests="0"
|
|
console="comconsole efi vidconsole"
|
|
comconsole_speed="115200"
|
|
boot_multicons="YES"
|
|
boot_serial="YES"
|
|
mlx4en_load="YES"
|
|
mlx5en_load="YES"
|
|
EOF
|
|
metalog_add_data ./boot/loader.conf
|
|
|
|
return 0
|
|
}
|