Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142638348
D47339.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D47339.diff
View Options
diff --git a/release/Makefile.oracle b/release/Makefile.oracle
new file mode 100644
--- /dev/null
+++ b/release/Makefile.oracle
@@ -0,0 +1,53 @@
+#
+# Makefile for creating an Oracle Cloud Infrastructure image from a disk image.
+#
+
+.if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE"
+OCI_NAMESUFFIX!= date +-${BUILDDATE}
+.endif
+.if ${TARGET_ARCH} != "amd64"
+OCI_ARCH= --${TARGET_ARCH:S/aarch64/arm64/}
+.endif
+
+CLEANFILES+= ociimage
+
+.if !exists(/usr/local/bin/curl) || !exists(/usr/local/bin/qemu-img)
+CW_OCI_PORTINSTALL= cw-oci-portinstall
+CLEANFILES+= ${CW_OCI_PORTINSTALL}
+.else
+CW_OCI_PORTINSTALL=
+.endif
+
+cw-oci-portinstall:
+.if !exists(/usr/local/bin/curl) || !exists(/usr/local/bin/qemu-img)
+. if !exists(${PORTSDIR}/ftp/curl/Makefile)
+. if !exists(/usr/local/sbin/pkg-static)
+ env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf
+. endif
+ env ASSUME_ALWAYS_YES=yes pkg install -y ftp/curl emulators/qemu@nox11
+. endif
+.endif
+ @touch ${.TARGET}
+
+.for _FS in ${OCI_FSLIST}
+.for _FL in ${OCI_FLAVOURS:tl}
+OCI_IMGLIST+= ociimage-${_FL}-${_FS}
+CLEANFILES+= ociimage-${_FL}-${_FS}
+ociimage-${_FL}-${_FS}: cw-oci-${_FL}-${_FS} ${CW_OCI_PORTINSTALL}
+.if !defined(OCI_PAR)
+ @echo "--------------------------------------------------------------"
+ @echo ">>> OCI_PAR must be defined for image upload"
+ @echo "--------------------------------------------------------------"
+ @false
+.endif
+ echo /usr/local/bin/curl -4vsS ${OCI_PAR} \
+ ${.OBJDIR}/${OCI-${_FL:tu}${_FS:tu}IMAGE} \
+ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${OCINAMESUFFIX} ${_FL} ${_FS:tu}" \
+ "${TYPE}/${TARGET} ${GITBRANCH}@${GITREV}" \
+ ${OCIREGION} ${OCICOMPARTMENT} ${OCIKEYFILE}
+ @touch ${.TARGET}
+.endfor
+.endfor
+
+ociimage: ociimage-base-${VMFS}
+ociimages: ${OCI_IMGLIST}
diff --git a/release/Makefile.vm b/release/Makefile.vm
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -282,5 +282,6 @@
.include "${.CURDIR}/Makefile.ec2"
.include "${.CURDIR}/Makefile.firecracker"
.include "${.CURDIR}/Makefile.gce"
+.include "${.CURDIR}/Makefile.oracle"
.include "${.CURDIR}/Makefile.vagrant"
.include "${.CURDIR}/Makefile.inc1"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 22, 6:09 PM (3 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27858362
Default Alt Text
D47339.diff (2 KB)
Attached To
Mode
D47339: release: automate oracle image conversion and upload
Attached
Detach File
Event Timeline
Log In to Comment