freebsd-src/release/Makefile.oci
Doug Rabson d03c82c28d
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, arm64, aarch64) (push) Waiting to run
release: add optional OCI images
This adds three OCI archive format files to the release containing
FreeBSD base images suitable for static linked, dynamic linked and shell
workloads. The shell image also contains pkg-bootstrap and can be easily
extended by installing packages (including pkgbase packages).

Reviewed by: dch, cpersiva, jlduran, zlei
Differential Revision: https://reviews.freebsd.org/D46759
MFC after: 2 days
2024-11-08 13:23:08 +00:00

35 lines
1.0 KiB
Makefile

#
#
#
# Makefile for building OCI container images.
#
.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES)
OCI_IMAGES= static dynamic minimal
.endif
oci-install:
.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES)
mkdir -p ${DESTDIR}/ociimages
. for _IMG in ${OCI_IMAGES}
cp -p ${.OBJDIR}/container-image-${_IMG}.txz ${DESTDIR}/ociimages
. endfor
.endif
OCI_TARGETS=
OCI_DEPS_static=
OCI_DEPS_dynamic= container-image-static.txz
OCI_DEPS_minimal= container-image-dynamic.txz
.for _IMG in ${OCI_IMAGES}
OCI_TARGETS+= container-image-${_IMG}.txz
container-image-${_IMG}.txz: ${OCI_DEPS_${_IMG}}
sh ${.CURDIR}/scripts/make-oci-image.sh ${.CURDIR} ${REVISION} ${BRANCH} ${TARGET_ARCH} ${_IMG}
skopeo copy \
containers-storage:localhost/freebsd${REVISION:R}-${_IMG}:latest \
oci-archive:${.OBJDIR}/container-image-${_IMG}.tar:freebsd${REVISION:R}-${_IMG}:${REVISION}-${BRANCH}-${TARGET_ARCH}
${XZ_CMD} < ${.OBJDIR}/container-image-${_IMG}.tar > ${.OBJDIR}/container-image-${_IMG}.txz
.endfor
oci-release: ${OCI_TARGETS}