From nobody Wed Nov 13 06:42:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XpDGn1rFlz5dGpX; Wed, 13 Nov 2024 06:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpDGn1Pgzz4DSM; Wed, 13 Nov 2024 06:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731480129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWdOR2McKwCiMDNiHwvIQB9K0Afh4EkgR1pNpncjM5o=; b=hZ5HwaOEL/jZMj6aMFImJJ5IAqyZ1paWG86ELPoMFuuxXXAEqrWrklGwwNh17xUr1yx+DL 2Pf65JB61gX99FcfQaLF78mY8iPEDZfvu3xCcejMGGkjeMSk32ZN7NiKEufHaMGn4IGL9b pZ8b8ouhlZ6PCerzMrSYHPNPD7WoaxR0UnnVS+Sz2KRyGZs22H+m958q8esN+EKpuHwC6C hct3rs6fKvhsdJij8eUut84Ny+zLNTDC76/GcB0j32k8fCCQKSdOcEIXG4oFmqp7TAwVID nXwMo3QBHYMGYu2WQARaCmt+KXrmmeBq7oAHJpq3S+YZV9yryOK2EWavtQahJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731480129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWdOR2McKwCiMDNiHwvIQB9K0Afh4EkgR1pNpncjM5o=; b=ZOo62VzF8BIpL6bPe20uRZ65Zb6Yeap3up6gxN3Xus+MwewVYmUhAPXDgmh0iVPmwlMfoB 0oLTwtURg+Y9G1OpQV7Vm7OsRDg4cVaj5EOT70P6h/chH0L/LM+GdAam2eALnsCtUen0ib tW6B0nApOeuPLRFHS4PqUZb+ijvw9DyO2d/2Kvb3TDyb0iyesEn1QS5iKLEBLXok8jzVqR tIBBxV6QCXwvJStndKss5b1zrEjbEHW768rR5s6iAzJGZNJRLrNn4T/ovncdnsXXmSqQ4z qcXzWl4dDTh6v6ZOSJt30/4WNydiu7DL2GfgexyKiiATLDT1UcNLd3z7tDBGXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731480129; a=rsa-sha256; cv=none; b=Q/dZAtgNkCkKOvNfqjFMFYyUhkmrSX59Wlvj4RnJEI8hAdeM142zrjprf+yxo40GAJAMpq n55c8TIAkf58rUx/EkIdp0V1N5JhcZF55/L0+aHcat5BS5AAnPuUT/xwDetThbcdtfVaEH q/8/aUt1wKaUFUs3iLurc4lpJdnhNAoHvqrcck1XG9uhGTa2dhSw7WB9zmloTsbCP8m7PA QYimbKxi02y38yJNjm9L3svSxs1ggTcz6hb2ikhiHJoWunOVkYTDFUKg+dRjeAWF/kCm5i P+pVj/w7jR5+gfbRIkIWrzHhUGJEP/Y8vnr4lqmuSaiA397byAP51Gs56koGfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XpDGn118dzkLS; Wed, 13 Nov 2024 06:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AD6g9on017129; Wed, 13 Nov 2024 06:42:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AD6g9R7017126; Wed, 13 Nov 2024 06:42:09 GMT (envelope-from git) Date: Wed, 13 Nov 2024 06:42:09 GMT Message-Id: <202411130642.4AD6g9R7017126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: e8c5d6f6b89f - stable/14 - release: Publish OCI images on "ftp" mirrors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e8c5d6f6b89f38ed7c20ad5537fc82092106d378 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e8c5d6f6b89f38ed7c20ad5537fc82092106d378 commit e8c5d6f6b89f38ed7c20ad5537fc82092106d378 Author: Colin Percival AuthorDate: 2024-11-13 06:36:14 +0000 Commit: Colin Percival CommitDate: 2024-11-13 06:42:04 +0000 release: Publish OCI images on "ftp" mirrors If WITH_OCIIMAGES is set, "make ftp-stage" will now publish those bits into a directory under /OCI-IMAGES/, similar to how we publish CI and VM images. MFC after: 1 minute (cherry picked from commit e95e3e6eb7ef723aa5dd08de48a9ad3fec647c7d) --- release/Makefile.mirrors | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index 1888f86d3002..8af614d9a9bb 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -58,6 +58,11 @@ STAGE_TARGETS+= ci-images-stage CI_DIR= ${TLD}/CI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} .endif +.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES) +STAGE_TARGETS+= oci-images-stage +OCI_DIR= ${TLD}/OCI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} +.endif + CLEANFILES+= ${STAGE_TARGETS} CHECKSUM_FILES?= SHA512 SHA256 SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' @@ -333,5 +338,53 @@ ci-images-stage: . endfor .endif +oci-images-stage: + mkdir -p ${OCI_DIR} +.if defined(SNAPSHOT) && !empty(SNAPSHOT) +. if exists(${OCI_DIR}/Latest) + rm -rf ${OCI_DIR}/Latest +. endif + mkdir -p ${OCI_DIR}/Latest + mkdir -p ${OCI_DIR}/${BUILDDATE} +. for _IMG in ${OCI_IMAGES} + cd ${RELEASEDIR}/ociimages && \ + mv container-image-${_IMG}.txz \ + ${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz + cp ${RELEASEDIR}/ociimages/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz \ + ${OCI_DIR}/${BUILDDATE}/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz + cd ${OCI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz \ + ${OSRELEASE}-container-image-${_IMG}.txz +. endfor + cd ${RELEASEDIR}/ociimages && rm -f CHECKSUM.* +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/ociimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${OCI_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cd ${OCI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + CHECKSUM.${CHECKSUM} +. endfor +.else # not snapshot +. if exists(${OCI_DIR}/Latest) + rm -rf ${OCI_DIR}/Latest +. endif + mkdir -p ${OCI_DIR}/Latest +. for _IMG in ${OCI_IMAGES} + cd ${RELEASEDIR}/ociimages && \ + mv container-image-${_IMG}.txz \ + ${OSRELEASE}-container-image-${_IMG}.txz + cp ${RELEASEDIR}/ociimages/${OSRELEASE}-container-image-${_IMG}.txz \ + ${OCI_DIR}/Latest/${OSRELEASE}-container-image-${_IMG}.txz +. endfor +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/ociimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${OCI_DIR}/Latest/CHECKSUM.${CHECKSUM} +. endfor +.endif + ftp-stage: remove-old-bits ${STAGE_TARGETS}