hitting Assertion !callout_active(&tp->t_callout) failed at /usr/src/sys/netinet/tcp_subr.c:2386 after 62d47d7

2024-02-12 Thread Dave Cottlehuber
On Sat, 10 Feb 2024, at 09:34, Richard Scheffenegger wrote:
> The branch main has been updated by rscheff:
>
> URL: 
> https://cgit.FreeBSD.org/src/commit/?id=62d47d73b7eb01f3b0a37541df5e7aaa36f54335
>
> commit 62d47d73b7eb01f3b0a37541df5e7aaa36f54335
> Author: Richard Scheffenegger 
> AuthorDate: 2024-02-10 09:28:42 +
> Commit: Richard Scheffenegger 
> CommitDate: 2024-02-10 09:30:00 +
>
> tcp: stop timers and clean scoreboard in tcp_close()
>
> Stop timers when in tcp_close() instead of doing that in tcp_discardcb().
> A connection in CLOSED state shall not need any timers. Assert that no
> timer is rescheduled after that in tcp_timer_activate() and verfiy that
> this is also the expected state in tcp_discardcb().
>
> PR: 276761
> Reviewed By:glebius, tuexen, #transport
> Sponsored by:   NetApp, Inc.
> Differential Revision:  https://reviews.freebsd.org/D43792
> ---
>  sys/netinet/tcp_subr.c  | 4 ++--
>  sys/netinet/tcp_timer.c | 1 +
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
> index 6043a3d458e5..90e1496a822c 100644
> --- a/sys/netinet/tcp_subr.c
> +++ b/sys/netinet/tcp_subr.c
> @@ -2383,10 +2383,9 @@ tcp_discardcb(struct tcpcb *tp)
>  #endif
> 
>   INP_WLOCK_ASSERT(inp);
> + MPASS(!callout_active(&tp->t_callout));

I'm repeatedly hitting this assert soon after boot on my ryzen desktop. I've a 
coredump.

Panic String: Assertion !callout_active(&tp->t_callout) failed at 
/usr/src/sys/netinet/tcp_subr.c:2386

I'll apply your latest patch in 
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276761#c16 and report back..

__curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57
57  __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct 
pcpu,
(kgdb) #0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57
#1  doadump (textdump=textdump@entry=0)
at /usr/src/sys/kern/kern_shutdown.c:403
#2  0x804a39da in db_dump (dummy=,
dummy2=, dummy3=, dummy4=)
at /usr/src/sys/ddb/db_command.c:590
#3  0x804a37e0 in db_command (last_cmdp=,
cmd_table=, dopager=false)
at /usr/src/sys/ddb/db_command.c:503
#4  0x804a3926 in db_command_script (
command=command@entry=0x817b9724  "dump")
at /usr/src/sys/ddb/db_command.c:568
#5  0x804a8c88 in db_script_exec (
scriptname=scriptname@entry=0xfe0346e96680 "kdb.enter.panic",
warnifnotfound=warnifnotfound@entry=0) at /usr/src/sys/ddb/db_script.c:301
#6  0x804a8ab2 in db_script_kdbenter (eventname=)
at /usr/src/sys/ddb/db_script.c:323
#7  0x804a6b81 in db_trap (type=, code=)
at /usr/src/sys/ddb/db_main.c:266
#8  0x80ba2aa2 in kdb_trap (type=type@entry=3, code=code@entry=0,
tf=tf@entry=0xfe0346e969c0) at /usr/src/sys/kern/subr_kdb.c:790
#9  0x81057fd6 in trap (frame=0xfe0346e969c0)
at /usr/src/sys/amd64/amd64/trap.c:606
#10 
#11 kdb_enter (why=, msg=)
at /usr/src/sys/kern/subr_kdb.c:556
#12 0x80b532d6 in vpanic (
fmt=0x8120a0cb "Assertion %s failed at %s:%d",
ap=ap@entry=0xfe0346e96bf0) at /usr/src/sys/kern/kern_shutdown.c:961
#13 0x80b53163 in panic (
fmt=0x81980440  "\202\221\024\201\377\377\377\377")
at /usr/src/sys/kern/kern_shutdown.c:889
#14 0x80d585e1 in tcp_discardcb (tp=tp@entry=0xf808d767ca80)
at /usr/src/sys/netinet/tcp_subr.c:2386
#15 0x80d64e81 in tcp_usr_detach (so=0xf8012ccd0780)
at /usr/src/sys/netinet/tcp_usrreq.c:214
#16 0x80c05151 in sofree (so=0xf8012ccd0780)
at /usr/src/sys/kern/uipc_socket.c:1205
#17 sorele_locked (so=so@entry=0xf8012ccd0780)
at /usr/src/sys/kern/uipc_socket.c:1232
#18 0x80c05fad in soclose (so=0xf8012ccd0780)
at /usr/src/sys/kern/uipc_socket.c:1302
#19 0x80aed71b in fo_close (fp=0xf8064b7362d0, td=0x80)
at /usr/src/sys/sys/file.h:390
#20 _fdrop (fp=fp@entry=0xf8064b7362d0, td=0x80,
td@entry=0xf8012cc91000) at /usr/src/sys/kern/kern_descrip.c:3666
#21 0x80af0f83 in closef (fp=fp@entry=0xf8064b7362d0,
td=td@entry=0xf8012cc91000) at /usr/src/sys/kern/kern_descrip.c:2839
#22 0x80af4ea6 in closefp_impl (fdp=0xfe02e1a24430, fd=95,
fp=0xf8064b7362d0, td=0xf8012cc91000, audit=true)
at /usr/src/sys/kern/kern_descrip.c:1315
#23 0x81059473 in syscallenter (td=0xf8012cc91000)
at /usr/src/sys/amd64/amd64/../../kern/subr_syscall.c:186
#24 amd64_syscall (td=0xf8012cc91000, traced=0)
at /usr/src/sys/amd64/amd64/trap.c:1192
#25 
#26 0x3069693b76da in ?? ()
Backtrace stopped: Cannot access memory at address 0x30696c9b9818
(kgdb)
(END)

A+
Dave
———
O for a muse of fire, that would ascend the brightest heaven of invention!



Re: hitting Assertion !callout_active(&tp->t_callout) failed at /usr/src/sys/netinet/tcp_subr.c:2386 after 62d47d7

2024-02-12 Thread Dave Cottlehuber
On Mon, 12 Feb 2024, at 08:31, Dave Cottlehuber wrote:
> I'm repeatedly hitting this assert soon after boot on my ryzen desktop 
> I've a coredump.
>
> Panic String: Assertion !callout_active(&tp->t_callout) failed at 
> /usr/src/sys/netinet/tcp_subr.c:2386
>
> I'll apply your latest patch in 
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276761#c16 and report 
> back..

Reporting back, insta-panic on boot at:

  Panic String: Assertion !tcp_timer_active(tp, TT_REXMT) failed at 
/usr/src/sys/netinet/tcp_subr.c:2387

Does that help any?

A+
Dave
———
O for a muse of fire, that would ascend the brightest heaven of invention!



Re: hitting Assertion !callout_active(&tp->t_callout) failed at /usr/src/sys/netinet/tcp_subr.c:2386 after 62d47d7

2024-02-12 Thread Dave Cottlehuber
On Mon, 12 Feb 2024, at 10:26, tue...@freebsd.org wrote:
>> On Feb 12, 2024, at 09:50, Dave Cottlehuber  wrote:
>> 
>> On Mon, 12 Feb 2024, at 08:31, Dave Cottlehuber wrote:
>>> I'm repeatedly hitting this assert soon after boot on my ryzen desktop 
>>> I've a coredump.
>>> 
>>> Panic String: Assertion !callout_active(&tp->t_callout) failed at 
>>> /usr/src/sys/netinet/tcp_subr.c:2386

This one "just happens" while I'm sitting at the PC hacking in the terminal,
I don't get much incoming data here so it's presumably clean local traffic.

>>> I'll apply your latest patch in 
>>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276761#c16 and report 
>>> back..
>> 
>> Reporting back, insta-panic on boot at:
>> 
>> Panic String: Assertion !tcp_timer_active(tp, TT_REXMT) failed at 
>> /usr/src/sys/netinet/tcp_subr.c:2387
>> 
>> Does that help any?
> Sure! Could you provide any hints how to reproduce it?

this one happens during boot very early, I have a coredump handy if that helps.
I will try with all sysctls disabled, and without zerotier (overlay network)
too, see if that makes a difference.

A+
Dave
———
O for a muse of fire, that would ascend the brightest heaven of invention!



Re: hitting Assertion !callout_active(&tp->t_callout) failed at /usr/src/sys/netinet/tcp_subr.c:2386 after 62d47d7

2024-02-13 Thread Dave Cottlehuber
On Mon, 12 Feb 2024, at 19:53, Cheng Cui wrote:
> I created https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277009. You 
> may add your findings there.
>
> On Mon, Feb 12, 2024 at 6:41 AM Dave Cottlehuber  wrote:
>> On Mon, 12 Feb 2024, at 10:26, tue...@freebsd.org wrote:
>> >> On Feb 12, 2024, at 09:50, Dave Cottlehuber  wrote:
>> >> 
>> >> On Mon, 12 Feb 2024, at 08:31, Dave Cottlehuber wrote:
>> >>> I'm repeatedly hitting this assert soon after boot on my ryzen desktop 
>> >>> I've a coredump.
>> >>> 
>> >>> Panic String: Assertion !callout_active(&tp->t_callout) failed at 
>> >>> /usr/src/sys/netinet/tcp_subr.c:2386
[snip]

>> this one happens during boot very early, I have a coredump handy if that 
>> helps.
>> I will try with all sysctls disabled, and without zerotier (overlay network)
>> too, see if that makes a difference.

Richard's partial revert 57e27ff07aff35289892f79288bebf76a3c31fec fixes this,
thanks. disabling sysctls + zerotier made no difference.

A+
Dave
———
O for a muse of fire, that would ascend the brightest heaven of invention!



Re: git: 94e25b7acba7 - main - flex_spi: Support for FlexSPI Flash controller.

2021-11-30 Thread Dave Cottlehuber
On Tue, 30 Nov 2021, at 05:42, Wojciech Macek wrote:
> The branch main has been updated by wma:
>
> URL: 
> https://cgit.FreeBSD.org/src/commit/?id=94e25b7acba7f929606a1a57f8d193995d8f8920
>
> commit 94e25b7acba7f929606a1a57f8d193995d8f8920
> Author: Wojciech Macek 
> AuthorDate: 2021-11-25 09:36:55 +
> Commit: Wojciech Macek 
> CommitDate: 2021-11-30 05:41:34 +
>
> flex_spi: Support for FlexSPI Flash controller.
>
> NXP FlexSPI is a complex SPI controller which provides
> full offload for accessing NOR Flash.
> Create a Flash driver which attaches to existing FreeBSD
> infrastructure and exports generic READ and WRITE disk commands.
> The Flash has to be identified first to configure controller
> internals. For now, only one NOR Flash chip is supported.
> Future commits shall either increase number of known chips
> or implement SFDP mechanism which can be used by other Flash

Hi Wojciech, 

looks like this may break make release, at least on arm64?

A+
Dave

===> flash (install)
===> flash/flexspi (install)
install: flexspi.ko: No such file or directory
*** Error code 71

Stop.
make[6]: stopped in /usr/src/sys/modules/flash/flexspi
*** Error code 1

Stop.
make[5]: stopped in /usr/src/sys/modules/flash
*** Error code 1

Stop.
make[4]: stopped in /usr/src/sys/modules
*** Error code 1

Stop.
make[3]: stopped in /usr/obj/usr/src/arm64.aarch64/sys/GENERIC
*** Error code 1



Re: git: 94e25b7acba7 - main - flex_spi: Support for FlexSPI Flash controller.

2021-11-30 Thread Dave Cottlehuber
On Tue, 30 Nov 2021, at 12:21, Dave Cottlehuber wrote:
> On Tue, 30 Nov 2021, at 05:42, Wojciech Macek wrote:
>> The branch main has been updated by wma:
>>
>> URL: 
>> https://cgit.FreeBSD.org/src/commit/?id=94e25b7acba7f929606a1a57f8d193995d8f8920
>>
>> commit 94e25b7acba7f929606a1a57f8d193995d8f8920
>> Author: Wojciech Macek 
>> AuthorDate: 2021-11-25 09:36:55 +
>> Commit: Wojciech Macek 
>> CommitDate: 2021-11-30 05:41:34 +
>>
>> flex_spi: Support for FlexSPI Flash controller.
>>
>> NXP FlexSPI is a complex SPI controller which provides
>> full offload for accessing NOR Flash.
>> Create a Flash driver which attaches to existing FreeBSD
>> infrastructure and exports generic READ and WRITE disk commands.
>> The Flash has to be identified first to configure controller
>> internals. For now, only one NOR Flash chip is supported.
>> Future commits shall either increase number of known chips
>> or implement SFDP mechanism which can be used by other Flash
>
> Hi Wojciech, 
>
> looks like this may break make release, at least on arm64?

my bad, I nuked & paved and it's gone away. sorry!

A+
Dave



git: 1be84d745bcc - main - release: move OCI to ORACLE

2024-10-15 Thread Dave Cottlehuber
The branch main has been updated by dch:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=1be84d745bcc11b766ac1fa03afd2c8ea8771737

commit 1be84d745bcc11b766ac1fa03afd2c8ea8771737
Author: Dave Cottlehuber 
AuthorDate: 2024-10-15 09:28:12 +
Commit: Dave Cottlehuber 
CommitDate: 2024-10-15 09:28:12 +

release: move OCI to ORACLE

This allows future releng tooling to use OCI for the industry
standard Open Container Initiative tooling, reducing potential
for confusion.

Approved by:cperciva
Reviewed by:emaste
Differential Revision:  https://reviews.freebsd.org/D46975

MFC after:  3 days
Sponsored by:   SkunkWerks, GmbH
---
 release/Makefile.vm | 8 
 release/release.conf.sample | 2 +-
 release/tools/{oci.conf => oracle.conf} | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/release/Makefile.vm b/release/Makefile.vm
index b4fe6e23ffcd..a78a5f33a285 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -26,7 +26,7 @@ CLOUDWARE_TYPES?= AZURE \
BASIC-CLOUDINIT \
EC2 \
GCE \
-   OCI \
+   ORACLE \
VAGRANT
 AZURE_FORMAT=  vhdf
 AZURE_FSLIST?= ufs zfs
@@ -46,9 +46,9 @@ EC2-SMALL_DESC=   Amazon EC2 small image
 GCE_FORMAT=raw
 GCE_FSLIST?=   ufs zfs
 GCE_DESC=  Google Compute Engine image
-OCI_FORMAT=qcow2
-OCI_FSLIST?=   ufs
-OCI_DESC=  Oracle Cloud Infrastructure image
+ORACLE_FORMAT= qcow2
+ORACLE_FSLIST?=ufs
+ORACLE_DESC=   Oracle Cloud Infrastructure image
 OPENSTACK_FORMAT=qcow2
 OPENSTACK_FSLIST?= ufs
 OPENSTACK_DESC=OpenStack platform image
diff --git a/release/release.conf.sample b/release/release.conf.sample
index 40f8457e8f89..c306efb13b65 100644
--- a/release/release.conf.sample
+++ b/release/release.conf.sample
@@ -113,4 +113,4 @@ PORTBRANCH="main"
 
 ## If WITH_CLOUDWARE is set to a non-empty value, this is a list of providers
 ## to create disk images.
-#CLOUDWARE="EC2 GCE OCI VAGRANT-VIRTUALBOX VAGRANT-VMWARE"
+#CLOUDWARE="EC2 GCE ORACLE VAGRANT-VIRTUALBOX VAGRANT-VMWARE"
diff --git a/release/tools/oci.conf b/release/tools/oracle.conf
similarity index 94%
rename from release/tools/oci.conf
rename to release/tools/oracle.conf
index a4fe54ad3031..d3b4eb351107 100644
--- a/release/tools/oci.conf
+++ b/release/tools/oracle.conf
@@ -68,15 +68,15 @@ EOF
 
 # S14 Root user login must be disabled on serial-over-ssh console
 pw -R ${DESTDIR} usermod root -w no
-# OCI requirements override the default FreeBSD cloud-init settings
-cat <<-'EOF' >> ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_oci.cfg
+# Oracle requirements override the default FreeBSD cloud-init settings
+cat <<-'EOF' >> 
${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_oracle.cfg
disable_root: true
system_info:
   distro: freebsd
   default_user:
 name: freebsd
 lock_passwd: True
-gecos: "OCI Default User"
+gecos: "Oracle Cloud Default User"
 groups: [wheel]
 sudo: ["ALL=(ALL) NOPASSWD:ALL"]
 shell: /bin/sh



git: c61104166084 - main - release: tweak Oracle Cloud settings

2024-10-25 Thread Dave Cottlehuber
The branch main has been updated by dch:

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

commit c611041660845e8ee8bf3009b32327d1f783a47b
Author: Dave Cottlehuber 
AuthorDate: 2024-10-25 15:11:24 +
Commit: Dave Cottlehuber 
CommitDate: 2024-10-25 15:13:20 +

release: tweak Oracle Cloud settings

- use raw image disk type and enable zfs, this yields smaller
  images for upload after using native qcow2 + zstd compression

Reviewed by:lwhsu, emaste
Differential Revision:  https://reviews.freebsd.org/D47055
MFC after:  3 days
Approved by:emaste
---
 release/Makefile.vm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/release/Makefile.vm b/release/Makefile.vm
index a78a5f33a285..5ae603b05983 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -46,8 +46,8 @@ EC2-SMALL_DESC=   Amazon EC2 small image
 GCE_FORMAT=raw
 GCE_FSLIST?=   ufs zfs
 GCE_DESC=  Google Compute Engine image
-ORACLE_FORMAT= qcow2
-ORACLE_FSLIST?=ufs
+ORACLE_FORMAT= raw
+ORACLE_FSLIST?=ufs zfs
 ORACLE_DESC=   Oracle Cloud Infrastructure image
 OPENSTACK_FORMAT=qcow2
 OPENSTACK_FSLIST?= ufs



git: 89311e6f987e - main - release: increase VMSIZE for Oracle images

2024-10-31 Thread Dave Cottlehuber
The branch main has been updated by dch:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=89311e6f987ebb1a968eee6fe594b11bfb91977a

commit 89311e6f987ebb1a968eee6fe594b11bfb91977a
Author: Dave Cottlehuber 
AuthorDate: 2024-10-31 20:47:09 +
Commit: Dave Cottlehuber 
CommitDate: 2024-10-31 20:47:15 +

release: increase VMSIZE for Oracle images

While OK for 14.x, both 13.x and 15.0 are failing in snapshot
builds.

Reported by:cperciva
Sponsored by:   SkunkWerks, GmbH

Reviewed by:emaste
Approved by:cperciva
Differential Revision:  https://reviews.freebsd.org/D47285
---
 release/tools/oracle.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/release/tools/oracle.conf b/release/tools/oracle.conf
index d3b4eb351107..08a9a3a372b0 100644
--- a/release/tools/oracle.conf
+++ b/release/tools/oracle.conf
@@ -27,7 +27,7 @@ export VM_EXTRA_PACKAGES="
 "
 
 # Should be enough for base image, image can be resized in needed
-export VMSIZE=6g
+export VMSIZE=8g
 
 # Set to a list of third-party software to enable in rc.conf(5).
 export VM_RC_LIST="



git: 457d745d90a6 - main - release: ensure default sudo flavor is selected

2025-02-28 Thread Dave Cottlehuber
The branch main has been updated by dch:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=457d745d90a6b63793c9ca17bcd7ec5ff4cd8b93

commit 457d745d90a6b63793c9ca17bcd7ec5ff4cd8b93
Author: Dave Cottlehuber 
AuthorDate: 2025-02-28 22:27:31 +
Commit: Dave Cottlehuber 
CommitDate: 2025-02-28 22:33:46 +

release: ensure default sudo flavor is selected

pkg behaviour selects the non-default flavour, this trims
0,5GiB per cloudware image, by being explicit.

Approved by:cperciva
Differential Revision:  https://reviews.freebsd.org/D48599
Sponsored by:   SkunkWerks, GmbH
PR: 284278
MFC after:  10 days
---
 release/scripts/pkg-stage.sh | 2 +-
 release/tools/oracle.conf| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh
index 495c328e4724..58b6d25fcccf 100755
--- a/release/scripts/pkg-stage.sh
+++ b/release/scripts/pkg-stage.sh
@@ -23,7 +23,7 @@ net/wifi-firmware-kmod@release
 ports-mgmt/pkg
 shells/bash
 shells/zsh
-security/sudo
+security/sudo@default
 sysutils/screen
 sysutils/seatd
 sysutils/tmux
diff --git a/release/tools/oracle.conf b/release/tools/oracle.conf
index 08a9a3a372b0..8a4206c05623 100644
--- a/release/tools/oracle.conf
+++ b/release/tools/oracle.conf
@@ -19,7 +19,7 @@ export VM_EXTRA_PACKAGES="
 net/rsync
 panicmail
 security/ca_root_nss
-security/sudo
+security/sudo@default
 sysutils/firstboot-freebsd-update
 sysutils/firstboot-pkgs
 sysutils/panicmail



git: 0ce9a414adc3 - main - release: add cloudware oracle targets to package and upload .oci files

2025-03-04 Thread Dave Cottlehuber
The branch main has been updated by dch:

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

commit 0ce9a414adc33af29607adbd81e0760e014fcd76
Author: Dave Cottlehuber 
AuthorDate: 2025-03-04 23:56:00 +
Commit: Dave Cottlehuber 
CommitDate: 2025-03-04 23:56:00 +

release: add cloudware oracle targets to package and upload .oci files

- requires base tar & flua, qemu-tools & curl from ports
- set ORACLE_PAR_URL to upload to local file:/// dir or cloud buckets

Reviewed by:emaste
Approved by:cperciva
Differential Revision:  https://reviews.freebsd.org/D48382
Sponsored by:   SkunkWerks, GmbH
---
 release/Makefile.oracle| 101 +
 release/Makefile.vm|   1 +
 .../oracle/arm64_shape_compatibilities.json|  24 +
 .../oracle/default_shape_compatibilities.json  |   1 +
 release/scripts/oracle/generate_metadata.lua   |  74 +++
 release/scripts/oracle/image_capability_data.json  |  96 
 release/scripts/oracle/image_metadata.json |  21 +
 7 files changed, 318 insertions(+)

diff --git a/release/Makefile.oracle b/release/Makefile.oracle
new file mode 100644
index ..b4f3bbdf86f2
--- /dev/null
+++ b/release/Makefile.oracle
@@ -0,0 +1,101 @@
+#D48382
+# Makefile for preparing & uploading Oracle Cloud images from existing
+# .raw files created by cloudware-release.
+#
+# Overview:
+#
+# The base image is already created by cloudware-release.
+#
+# Construct the custom OCI metadata, derived from exported official OCI images.
+# It is architecture-specific but appears mostly stable over time.
+# Compress the raw image and place it in the same directory as the metadata.
+# Make a GNU format tarball of these files.
+# Upload the tarball to Oracle Cloud via a pre-approved curl URI, into
+# the FreeBSD Foundation's Oracle Cloud account.
+#
+# These images go into the "re" bucket in us-ashburn-1 region, which
+# is mounted into the FreeBSD Foundation Oracle Marketplace account.
+# Once uploaded, a manual step is needed to import the images as local
+# custom images. These can then be tested within the us-ashburn-1 region.
+# Once tested, follow the manual Oracle Marketplace import process to
+# create a new FreeBSD version, attach the images, and initiate validation
+# by Oracle. This can take up to 5 working days. Once complete, a final
+# manual step is needed to mark the currently private images, public.
+# Syncing to all sites should take 2-3 hours after this final step.
+
+ORACLE_BASENAME=   ${OSRELEASE}-${BUILDDATE}${GITREV:C/^(.+)/-\1/}
+ORACLE_PORTS_LIST= ftp/curl emulators/qemu@tools
+CLEANFILES+=   cw-oracle-portinstall
+
+cw-oracle-portinstall: .PHONY
+.if !exists(/usr/local/bin/curl) || !exists(/usr/local/bin/qemu-img)
+. if !exists(${PORTSDIR}/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 ${ORACLE_PORTS_LIST}
+. else
+   env UNAME_r=${UNAME_r} make -C \
+   ${PORTSDIR}/ftp/curl \
+   BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \
+   all install clean
+   env UNAME_r=${UNAME_r} FLAVOR=tools make -C \
+   ${PORTSDIR}/emulators/qemu \
+   BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \
+   all install clean
+. endif
+.endif
+
+.for _FS in ${ORACLE_FSLIST}
+ORACLE_OCI_LIST+=  cw-oracle-${_FS}.oci
+ORACLE_UPLOAD_LIST+=   cw-oracle-upload-${_FS}
+CLEANFILES+=   cw-oracle-${_FS}.oci
+ORACLE_TMP_${_FS}= cw-oracle-${_FS}.oci.tmpdir
+CLEANDIRS+=${ORACLE_TMP_${_FS}}
+ORACLE_METADATA=   ${.CURDIR}/scripts/oracle
+ORACLE_CAPABILITY= ${.CURDIR}/scripts/oracle/image_capability_data.json
+ORACLE_TEMPLATE=   ${.CURDIR}/scripts/oracle/image_metadata.json
+ORACLE_OUTPUT_${_FS}=  ${ORACLE_TMP_${_FS}}/image_metadata.json
+.if ${TARGET} == "arm64"
+ORACLE_SHAPES= ${ORACLE_METADATA}/arm64_shape_compatibilities.json
+.else
+ORACLE_SHAPES= ${ORACLE_METADATA}/default_shape_compatibilities.json
+.endif
+
+cw-oracle-${_FS}.oci: cw-oracle-portinstall cw-oracle-${_FS}-raw
+   mkdir -p ${ORACLE_TMP_${_FS}}
+   # create architecture-specific JSON metadata
+   env TYPE="${TYPE}" \
+   OSRELEASE="${OSRELEASE}" \
+   ORACLE_CAPABILITY="${ORACLE_CAPABILITY}" \
+   ORACLE_SHAPES="${ORACLE_SHAPES}" \
+   ORACLE_TEMPLATE="${ORACLE_TEMPLATE}" \
+   ORACLE_OUTPUT="${ORACLE_OUTPUT_${_FS}}" \
+   ${ORACLE_METADATA}/generate_metadata.lua
+
+   # convert raw to native qcow2 for zstd compression, saves ~ 8GiB
+   qemu-img convert -S 51