git: 0f4c3dcd1e07 - releng/15.0 - GCE: Add /usr/src and /usr/ports to METALOG

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Tue, 18 Nov 2025 02:22:40 UTC
The branch releng/15.0 has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=0f4c3dcd1e0761781e5636272caeb5d50fef3e0b

commit 0f4c3dcd1e0761781e5636272caeb5d50fef3e0b
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2025-11-18 01:02:47 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-11-18 02:20:35 +0000

    GCE: Add /usr/src and /usr/ports to METALOG
    
    We ship these in order to comply with GCE Marketplace rules about
    providing source code and licenses for all the software we ship as
    part of images.
    
    Approved by:    re (cperciva)
    Reviewed by:    markj
    MFC after:      immediately (15.0-RC2)
    Differential Revision:  https://reviews.freebsd.org/D53796
    
    (cherry picked from commit 0dbb00733c4a177a9a22d61a627d377d0876ea16)
    (cherry picked from commit 10ef3bf823c5d5db0303eb1552f1faa47cb0e58c)
---
 release/tools/gce.conf | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/release/tools/gce.conf b/release/tools/gce.conf
index 78511dbc66c9..c1e129ba69d6 100644
--- a/release/tools/gce.conf
+++ b/release/tools/gce.conf
@@ -98,6 +98,10 @@ EOF
 	# the image.
 	if [ -e "${DESTDIR}/../ftp/src.txz" ]; then
 		tar fxJ ${DESTDIR}/../ftp/src.txz -C ${DESTDIR}
+		( cd ${DESTDIR} && find ./usr/src ) |
+		    while read P; do
+			metalog_add_data ${P}
+		    done
 	fi
 	if [ -e "${DESTDIR}/../ftp/ports.txz" ]; then
 		tar fxJ ${DESTDIR}/../ftp/ports.txz -C ${DESTDIR}
@@ -108,6 +112,10 @@ EOF
 			    DISABLE_VULNERABILITIES=YES \
 			    I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES
 		done
+		( cd ${DESTDIR} && find ./usr/ports ) |
+		    while read P; do
+			metalog_add_data ${P}
+		    done
 	fi
 
 	## XXX: Verify this is needed.  I do not see this requirement