Browse Source

add support for OCI images and note file name issue w/ 14.2-R

main
John-Mark Gurney 2 weeks ago
parent
commit
717fdb5111
Signed by: jmg GPG Key ID: 205F0B33DD006ADA
2 changed files with 34 additions and 0 deletions
  1. +5
    -0
      NOTES.txt
  2. +29
    -0
      mksnapidx.awk

+ 5
- 0
NOTES.txt View File

@@ -24,3 +24,8 @@ Copy them up to freefall:
scp snapshot.* freefall:public_html/FreeBSD-snap

(cd ~; tar -cf - public_html/FreeBSD-snap/snapshot.*) | ssh freefall tar -xf -


FreeBSD 14.2-R has a mismatch between the announcement file name,
and the download file name for BASIC-CI. So two lines are manually
created for both file names, but both pointing to the same URL.

+ 29
- 0
mksnapidx.awk View File

@@ -28,10 +28,12 @@

BEGIN {
vmroot = "https://download.freebsd.org/ftp/snapshots/VM-IMAGES/"
ociroot = "https://download.freebsd.org/ftp/snapshots/OCI-IMAGES/"
isoroot = "https://download.freebsd.org/ftp/snapshots/ISO-IMAGES/"
bciroot = "https://download.freebsd.org/ftp/snapshots/CI-IMAGES/"

relvmroot = "https://download.freebsd.org/ftp/releases/VM-IMAGES/"
relociroot = "https://download.freebsd.org/ftp/releases/OCI-IMAGES/"
relisoroot = "https://download.freebsd.org/ftp/releases/ISO-IMAGES/"
relbciroot = "https://download.freebsd.org/ftp/releases/CI-IMAGES/"

@@ -136,6 +138,15 @@ function run_tests() {
typeres[10] = "iso"
parseres[10] = "iso 13.0-CURRENT sparc64 xxx 20181026 r339752 bootonly FreeBSD-13.0-CURRENT-sparc64-20181026-r339752-bootonly.iso https://download.freebsd.org/ftp/snapshots/ISO-IMAGES/13.0/FreeBSD-13.0-CURRENT-sparc64-20181026-r339752-bootonly.iso custommid"

fnametst[11] = "FreeBSD-14.2-RELEASE-riscv-riscv64-container-image-static.txz"
typeres[11] = "oci"
parseres[11] = "oci 14.2-RELEASE riscv-riscv64 xxx xxx unspec txz FreeBSD-14.2-RELEASE-riscv-riscv64-container-image-static.txz https://download.freebsd.org/ftp/releases/OCI-IMAGES/14.2-RELEASE/riscv64/Latest/FreeBSD-14.2-RELEASE-riscv-riscv64-container-image-static.txz custommid"
#res = sprintf("%s %s %s %s %s %s %s %s %s %s", type, parts[2] "-" parts[3], arch, platform, date, rev, vers, fname, url, MID)

fnametst[12] = "FreeBSD-15.0-CURRENT-riscv-riscv64-container-image-20241128-edfccce309a6-273911-static.txz"
typeres[12] = "oci"
parseres[12] = "oci 15.0-CURRENT riscv-riscv64 xxx 20241128 edfccce309a6-c273911 txz FreeBSD-15.0-CURRENT-riscv-riscv64-container-image-20241128-edfccce309a6-273911-static.txz https://download.freebsd.org/ftp/snapshots/OCI-IMAGES/15.0-CURRENT/riscv64/20241128/FreeBSD-15.0-CURRENT-riscv-riscv64-container-image-20241128-edfccce309a6-273911-static.txz custommid"


for (tstidx in fnametst) {
type = typeres[tstidx]
@@ -263,6 +274,10 @@ $0 == "Virtual Machine Disk Image Checksums" {
type = "vm"
}

$0 == "OCI Container Checksums" {
type = "oci"
}

function isdate(date) {
m = match(date, "[0-9]+")
if (m && RLENGTH == 8)
@@ -346,6 +361,9 @@ function parse_fname(fname) {
# FreeBSD-12.1-RC1-powerpc-powerpcspe-dvd1.iso
platform = parts[nextidx]
nextidx += 1
} else if (type == "oci") {
platform = "xxx"
nextidx += 2
} else {
# FreeBSD-12.1-BETA3-amd64-mini-memstick.img.xz
platform = parts[nextidx] "-" parts[nextidx + 1]
@@ -357,6 +375,11 @@ function parse_fname(fname) {
platform = "xxx"
date = parts[nextidx]
nextidx += 1
} else if (type == "oci") {
platform = "xxx"
nextidx += 2
date = parts[nextidx]
nextidx += 1
} else {
# FreeBSD-13.0-CURRENT-arm64-aarch64-PINE64-LTS-20181026-r339752.img.xz
platform = parts[nextidx]
@@ -408,6 +431,9 @@ function parse_fname(fname) {
} else if (type == "vm") {
vers = dotparts[3]
url = relvmroot parts[2] "-" parts[3] "/" basearch "/Latest/" fname
} else if (type == "oci") {
vers = dotparts[3]
url = relociroot parts[2] "-" parts[3] "/" basearch "/Latest/" fname
} else
url = relisoroot parts[2] "/" fname
} else {
@@ -417,6 +443,9 @@ function parse_fname(fname) {
} else if (type == "vm") {
vers = dotparts[3]
url = vmroot parts[2] "-" parts[3] "/" basearch "/" date "/" fname
} else if (type == "oci") {
vers = dotparts[3]
url = ociroot parts[2] "-" parts[3] "/" basearch "/" date "/" fname
} else
url = isoroot parts[2] "/" fname
}


Loading…
Cancel
Save