summaryrefslogtreecommitdiff
path: root/release
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2025-11-17 17:04:55 -0800
committerColin Percival <cperciva@FreeBSD.org>2025-11-17 18:18:27 -0800
commitf6e9474ebdd53de5cf487c7bc9e0fa6743881c23 (patch)
tree5f63c04237df0bcd97093952db8784d3f23f55ac /release
parent0dbb00733c4a177a9a22d61a627d377d0876ea16 (diff)
release: Add a MISSING_METALOGS hack to VMs
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
Diffstat (limited to 'release')
-rw-r--r--release/tools/azure.conf10
-rw-r--r--release/tools/ec2-cloud-init.conf12
-rw-r--r--release/tools/gce.conf10
-rw-r--r--release/tools/oracle.conf13
-rw-r--r--release/tools/vmimage.subr10
5 files changed, 55 insertions, 0 deletions
diff --git a/release/tools/azure.conf b/release/tools/azure.conf
index 7975e1db0822..981e40566a1c 100644
--- a/release/tools/azure.conf
+++ b/release/tools/azure.conf
@@ -18,6 +18,16 @@ 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
diff --git a/release/tools/ec2-cloud-init.conf b/release/tools/ec2-cloud-init.conf
index 2a15ae5c57d8..8ad86a082260 100644
--- a/release/tools/ec2-cloud-init.conf
+++ b/release/tools/ec2-cloud-init.conf
@@ -9,6 +9,18 @@ export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} amazon-ssm-agent net/cloud-init"
# Services to enable in rc.conf(5).
export VM_RC_LIST="${VM_RC_LIST} cloudinit sshd"
+# Hack for FreeBSD 15.0; should go away before 15.1.
+MISSING_METALOGS="
+./usr/local/etc/cloud/cloud.cfg
+./usr/local/etc/cloud/cloud.cfg.d/05_logging.cfg
+./usr/local/etc/cloud/cloud.cfg.d/99_freebsd.cfg
+./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
+"
+
vm_extra_pre_umount() {
# Configuration common to all EC2 AMIs
ec2_common
diff --git a/release/tools/gce.conf b/release/tools/gce.conf
index c1e129ba69d6..558641821b16 100644
--- a/release/tools/gce.conf
+++ b/release/tools/gce.conf
@@ -17,6 +17,16 @@ export VM_RC_LIST="ntpd sshd growfs \
google_accounts_daemon google_clock_skew_daemon \
google_instance_setup google_network_daemon"
+# Hack for FreeBSD 15.0; should go away before 15.1.
+MISSING_METALOGS="
+./usr/local/etc/instance_configs.cfg.distro
+./usr/local/etc/pam.d/sudo
+./usr/local/etc/sudo.conf
+./usr/local/etc/sudo_logsrvd.conf
+./usr/local/etc/sudoers
+./usr/local/etc/syslog.d/90-google.conf
+"
+
vm_extra_install_base() {
echo 'search google.internal' > ${DESTDIR}/etc/resolv.conf
echo 'nameserver 169.254.169.254' >> ${DESTDIR}/etc/resolv.conf
diff --git a/release/tools/oracle.conf b/release/tools/oracle.conf
index ebda3b3d6e61..152c48af1829 100644
--- a/release/tools/oracle.conf
+++ b/release/tools/oracle.conf
@@ -39,6 +39,19 @@ export VM_RC_LIST="
sshd
zfs"
+# Hack for FreeBSD 15.0; should go away before 15.1.
+MISSING_METALOGS="
+./usr/local/etc/cloud/cloud.cfg
+./usr/local/etc/cloud/cloud.cfg.d/05_logging.cfg
+./usr/local/etc/cloud/cloud.cfg.d/99_freebsd.cfg
+./usr/local/etc/pam.d/sudo
+./usr/local/etc/rsync/rsyncd.conf
+./usr/local/etc/ssl/cert.pem
+./usr/local/etc/sudo.conf
+./usr/local/etc/sudo_logsrvd.conf
+./usr/local/etc/sudoers
+"
+
vm_extra_pre_umount() {
cat <<-'EOF' >> ${DESTDIR}/etc/rc.conf
dumpdev=AUTO
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index d718150d8767..0ca9ba267ce0 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -334,6 +334,16 @@ buildfs() {
metalog_add_data ./var/db/services.db
fi
+ if [ -n "${MISSING_METALOGS}" ]; then
+ # Hack to allow VM configurations to add files which
+ # weren't being added to METALOG appropriately. This
+ # is mainly a workaround for the @sample bug and it
+ # should go away before FreeBSD 15.1 ships.
+ for P in ${MISSING_METALOGS}; do
+ metalog_add_data ${P}
+ done
+ fi
+
# Sort METALOG file; makefs produces directories with 000 permissions
# if their contents are seen before the directories themselves.
env -i LC_COLLATE=C sort -u ${DESTDIR}/METALOG > ${DESTDIR}/METALOG.sorted