From e6c7815d412a60d53f50587dcac4d405cb94b40a Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Fri, 30 Sep 2022 17:46:14 +0200 Subject: [PATCH] fedora: use product and os version for discinfo release field Signed-off-by: Achilleas Koutsou --- internal/distro/fedora/images.go | 3 ++- test/data/manifests/fedora_35-aarch64-iot_installer-boot.json | 2 +- .../fedora_35-aarch64-iot_installer_with_users-boot.json | 2 +- test/data/manifests/fedora_35-x86_64-iot_installer-boot.json | 2 +- .../fedora_35-x86_64-iot_installer_with_users-boot.json | 2 +- test/data/manifests/fedora_36-aarch64-iot_installer-boot.json | 2 +- .../fedora_36-aarch64-iot_installer_with_users-boot.json | 2 +- test/data/manifests/fedora_36-x86_64-iot_installer-boot.json | 2 +- .../fedora_36-x86_64-iot_installer_with_users-boot.json | 2 +- test/data/manifests/fedora_37-aarch64-iot_installer-boot.json | 2 +- .../fedora_37-aarch64-iot_installer_with_users-boot.json | 2 +- test/data/manifests/fedora_37-x86_64-iot_installer-boot.json | 2 +- .../fedora_37-x86_64-iot_installer_with_users-boot.json | 2 +- test/data/manifests/fedora_38-aarch64-iot_installer-boot.json | 2 +- .../fedora_38-aarch64-iot_installer_with_users-boot.json | 2 +- test/data/manifests/fedora_38-x86_64-iot_installer-boot.json | 2 +- .../fedora_38-x86_64-iot_installer_with_users-boot.json | 2 +- 17 files changed, 18 insertions(+), 17 deletions(-) diff --git a/internal/distro/fedora/images.go b/internal/distro/fedora/images.go index b5724dbee..b6a145802 100644 --- a/internal/distro/fedora/images.go +++ b/internal/distro/fedora/images.go @@ -1,6 +1,7 @@ package fedora import ( + "fmt" "math/rand" "strings" @@ -262,7 +263,7 @@ func iotInstallerImage(workload workload.Workload, img.Variant = "IoT" img.OSName = "fedora" img.OSVersion = d.osVersion - img.Release = "202010217.n.0" // ??? + img.Release = fmt.Sprintf("%s %s", d.product, d.osVersion) img.Filename = t.Filename() diff --git a/test/data/manifests/fedora_35-aarch64-iot_installer-boot.json b/test/data/manifests/fedora_35-aarch64-iot_installer-boot.json index b936d9b40..730c7705e 100644 --- a/test/data/manifests/fedora_35-aarch64-iot_installer-boot.json +++ b/test/data/manifests/fedora_35-aarch64-iot_installer-boot.json @@ -10291,7 +10291,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "aarch64", - "release": "202010217.n.0" + "release": "Fedora 35" } } ] diff --git a/test/data/manifests/fedora_35-aarch64-iot_installer_with_users-boot.json b/test/data/manifests/fedora_35-aarch64-iot_installer_with_users-boot.json index 5f44d0085..982f7f992 100644 --- a/test/data/manifests/fedora_35-aarch64-iot_installer_with_users-boot.json +++ b/test/data/manifests/fedora_35-aarch64-iot_installer_with_users-boot.json @@ -10343,7 +10343,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "aarch64", - "release": "202010217.n.0" + "release": "Fedora 35" } } ] diff --git a/test/data/manifests/fedora_35-x86_64-iot_installer-boot.json b/test/data/manifests/fedora_35-x86_64-iot_installer-boot.json index 5624ff031..07afd05ee 100644 --- a/test/data/manifests/fedora_35-x86_64-iot_installer-boot.json +++ b/test/data/manifests/fedora_35-x86_64-iot_installer-boot.json @@ -10484,7 +10484,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "x86_64", - "release": "202010217.n.0" + "release": "Fedora 35" } } ] diff --git a/test/data/manifests/fedora_35-x86_64-iot_installer_with_users-boot.json b/test/data/manifests/fedora_35-x86_64-iot_installer_with_users-boot.json index 85bbb6f3f..8f8b7fb3d 100644 --- a/test/data/manifests/fedora_35-x86_64-iot_installer_with_users-boot.json +++ b/test/data/manifests/fedora_35-x86_64-iot_installer_with_users-boot.json @@ -10536,7 +10536,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "x86_64", - "release": "202010217.n.0" + "release": "Fedora 35" } } ] diff --git a/test/data/manifests/fedora_36-aarch64-iot_installer-boot.json b/test/data/manifests/fedora_36-aarch64-iot_installer-boot.json index 2a48fe3a3..7d2f827e0 100644 --- a/test/data/manifests/fedora_36-aarch64-iot_installer-boot.json +++ b/test/data/manifests/fedora_36-aarch64-iot_installer-boot.json @@ -10811,7 +10811,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "aarch64", - "release": "202010217.n.0" + "release": "Fedora 36" } } ] diff --git a/test/data/manifests/fedora_36-aarch64-iot_installer_with_users-boot.json b/test/data/manifests/fedora_36-aarch64-iot_installer_with_users-boot.json index 7af64ee13..10480f5ab 100644 --- a/test/data/manifests/fedora_36-aarch64-iot_installer_with_users-boot.json +++ b/test/data/manifests/fedora_36-aarch64-iot_installer_with_users-boot.json @@ -10863,7 +10863,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "aarch64", - "release": "202010217.n.0" + "release": "Fedora 36" } } ] diff --git a/test/data/manifests/fedora_36-x86_64-iot_installer-boot.json b/test/data/manifests/fedora_36-x86_64-iot_installer-boot.json index 839986c3a..6eb2397ff 100644 --- a/test/data/manifests/fedora_36-x86_64-iot_installer-boot.json +++ b/test/data/manifests/fedora_36-x86_64-iot_installer-boot.json @@ -10996,7 +10996,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "x86_64", - "release": "202010217.n.0" + "release": "Fedora 36" } } ] diff --git a/test/data/manifests/fedora_36-x86_64-iot_installer_with_users-boot.json b/test/data/manifests/fedora_36-x86_64-iot_installer_with_users-boot.json index 1c0f4490f..0ac2bf78d 100644 --- a/test/data/manifests/fedora_36-x86_64-iot_installer_with_users-boot.json +++ b/test/data/manifests/fedora_36-x86_64-iot_installer_with_users-boot.json @@ -11048,7 +11048,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "x86_64", - "release": "202010217.n.0" + "release": "Fedora 36" } } ] diff --git a/test/data/manifests/fedora_37-aarch64-iot_installer-boot.json b/test/data/manifests/fedora_37-aarch64-iot_installer-boot.json index e7c0d4cbb..3bee5698a 100644 --- a/test/data/manifests/fedora_37-aarch64-iot_installer-boot.json +++ b/test/data/manifests/fedora_37-aarch64-iot_installer-boot.json @@ -10921,7 +10921,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "aarch64", - "release": "202010217.n.0" + "release": "Fedora 37" } } ] diff --git a/test/data/manifests/fedora_37-aarch64-iot_installer_with_users-boot.json b/test/data/manifests/fedora_37-aarch64-iot_installer_with_users-boot.json index 9315e5a15..3411758f9 100644 --- a/test/data/manifests/fedora_37-aarch64-iot_installer_with_users-boot.json +++ b/test/data/manifests/fedora_37-aarch64-iot_installer_with_users-boot.json @@ -10973,7 +10973,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "aarch64", - "release": "202010217.n.0" + "release": "Fedora 37" } } ] diff --git a/test/data/manifests/fedora_37-x86_64-iot_installer-boot.json b/test/data/manifests/fedora_37-x86_64-iot_installer-boot.json index 75491da39..51c579f59 100644 --- a/test/data/manifests/fedora_37-x86_64-iot_installer-boot.json +++ b/test/data/manifests/fedora_37-x86_64-iot_installer-boot.json @@ -11114,7 +11114,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "x86_64", - "release": "202010217.n.0" + "release": "Fedora 37" } } ] diff --git a/test/data/manifests/fedora_37-x86_64-iot_installer_with_users-boot.json b/test/data/manifests/fedora_37-x86_64-iot_installer_with_users-boot.json index 6b1142270..83a851a37 100644 --- a/test/data/manifests/fedora_37-x86_64-iot_installer_with_users-boot.json +++ b/test/data/manifests/fedora_37-x86_64-iot_installer_with_users-boot.json @@ -11166,7 +11166,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "x86_64", - "release": "202010217.n.0" + "release": "Fedora 37" } } ] diff --git a/test/data/manifests/fedora_38-aarch64-iot_installer-boot.json b/test/data/manifests/fedora_38-aarch64-iot_installer-boot.json index d3a421793..6561522e6 100644 --- a/test/data/manifests/fedora_38-aarch64-iot_installer-boot.json +++ b/test/data/manifests/fedora_38-aarch64-iot_installer-boot.json @@ -10905,7 +10905,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "aarch64", - "release": "202010217.n.0" + "release": "Fedora 38" } } ] diff --git a/test/data/manifests/fedora_38-aarch64-iot_installer_with_users-boot.json b/test/data/manifests/fedora_38-aarch64-iot_installer_with_users-boot.json index 0d64786e1..614890ca3 100644 --- a/test/data/manifests/fedora_38-aarch64-iot_installer_with_users-boot.json +++ b/test/data/manifests/fedora_38-aarch64-iot_installer_with_users-boot.json @@ -10957,7 +10957,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "aarch64", - "release": "202010217.n.0" + "release": "Fedora 38" } } ] diff --git a/test/data/manifests/fedora_38-x86_64-iot_installer-boot.json b/test/data/manifests/fedora_38-x86_64-iot_installer-boot.json index b6dd005a5..3282197f0 100644 --- a/test/data/manifests/fedora_38-x86_64-iot_installer-boot.json +++ b/test/data/manifests/fedora_38-x86_64-iot_installer-boot.json @@ -11090,7 +11090,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "x86_64", - "release": "202010217.n.0" + "release": "Fedora 38" } } ] diff --git a/test/data/manifests/fedora_38-x86_64-iot_installer_with_users-boot.json b/test/data/manifests/fedora_38-x86_64-iot_installer_with_users-boot.json index 12c770606..8ca906692 100644 --- a/test/data/manifests/fedora_38-x86_64-iot_installer_with_users-boot.json +++ b/test/data/manifests/fedora_38-x86_64-iot_installer_with_users-boot.json @@ -11142,7 +11142,7 @@ "type": "org.osbuild.discinfo", "options": { "basearch": "x86_64", - "release": "202010217.n.0" + "release": "Fedora 38" } } ]