From 288f1d04f0aebaf51419d11f160ee3bea3f19f5c Mon Sep 17 00:00:00 2001 From: Jeffrey Alan Scudder Date: Sun, 29 Mar 2026 18:53:40 -0700 Subject: [PATCH] fix: streaming upload (-T) + non-fatal ISO to prevent OOM on oven curl --data-binary loads entire file into RAM, OOM on 1GB+ ISO. Switch to -T (streaming upload). Make ISO upload non-fatal so slim kernel + initramfs always get uploaded even if ISO fails. Co-Authored-By: Claude Opus 4.6 (1M context) --- fedac/native/scripts/upload-release.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fedac/native/scripts/upload-release.sh b/fedac/native/scripts/upload-release.sh index a9967a185e..21beacf429 100755 --- a/fedac/native/scripts/upload-release.sh +++ b/fedac/native/scripts/upload-release.sh @@ -124,13 +124,15 @@ do_upload() { "$md5_val" "$content_type" "$date_val" "$acl" "$DO_SPACES_BUCKET" "$dest_key" \ | openssl dgst -sha1 -hmac "$DO_SPACES_SECRET" -binary | base64) + # Use -T (upload-file) for streaming — avoids loading entire file into memory + # (--data-binary loads the whole file into RAM, OOM on 1GB+ files) curl -sf -X PUT \ -H "Date: $date_val" \ -H "Content-Type: $content_type" \ -H "Content-MD5: $md5_val" \ -H "x-amz-acl: $acl" \ -H "Authorization: AWS ${DO_SPACES_KEY}:${sig}" \ - --data-binary "@$src" \ + -T "$src" \ "${BASE_URL}/${dest_key}" \ && echo " uploaded: $dest_key" \ || { echo " ERROR uploading $dest_key" >&2; return 1; } @@ -220,11 +222,11 @@ if [ -f "$INITRAMFS_SIBLING" ]; then do_upload "$INITRAMFS_SIBLING" "os/${CHANNEL_PREFIX}native-notepat-latest.initramfs.cpio.gz" "application/octet-stream" fi -# Also upload ISO if it exists next to vmlinuz +# Also upload ISO if it exists (non-fatal — ISO is optional) ISO_SIBLING="$(dirname "$VMLINUZ")/ac-os.iso" if [ -f "$ISO_SIBLING" ]; then echo " Uploading ISO ($(du -sh "$ISO_SIBLING" | cut -f1))..." - do_upload "$ISO_SIBLING" "os/${CHANNEL_PREFIX}native-notepat-latest.iso" "application/octet-stream" + do_upload "$ISO_SIBLING" "os/${CHANNEL_PREFIX}native-notepat-latest.iso" "application/octet-stream" || echo " ISO upload failed (non-fatal)" fi echo "" -- 2.51.2