Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bib/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,5 @@ require (
google.golang.org/protobuf v1.36.8 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
)

replace github.com/osbuild/images => github.com/mvo5/images v0.0.0-20251007152154-8fd28c715c59
4 changes: 2 additions & 2 deletions bib/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mvo5/images v0.0.0-20251007152154-8fd28c715c59 h1:WwsvhzBKW8sdFXbYq4JydCAw/GdkhDmCcgtTDHSJmV0=
github.com/mvo5/images v0.0.0-20251007152154-8fd28c715c59/go.mod h1:xkXfw5CIy0bVNTNdB6GXiewu/IzBgpofkItDJPAzGA4=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
Expand All @@ -245,8 +247,6 @@ github.com/osbuild/blueprint v1.16.0 h1:f/kHih+xpeJ1v7wtIfzdHPZTsiXsqKeDQ1+rrue6
github.com/osbuild/blueprint v1.16.0/go.mod h1:HPlJzkEl7q5g8hzaGksUk7ifFAy9QFw9LmzhuFOAVm4=
github.com/osbuild/image-builder-cli v0.0.0-20250924085931-15de5139f521 h1:Mo1htXYyEoKrBQD+/RC/kluAWu4+E0oEjPorujVn/K8=
github.com/osbuild/image-builder-cli v0.0.0-20250924085931-15de5139f521/go.mod h1:oTn9T+bV9g/760hM/jX7AV0c4vuVIn6FjAnaVM9RzRo=
github.com/osbuild/images v0.202.0 h1:OPvfmr5RJHcOJgU8Win6kHyoCNQZEiILlgIDI64/YIM=
github.com/osbuild/images v0.202.0/go.mod h1:xkXfw5CIy0bVNTNdB6GXiewu/IzBgpofkItDJPAzGA4=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down
1 change: 1 addition & 0 deletions bib/internal/imagetypes/imagetypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var supportedImageTypes = map[string]imageType{
"vmdk": imageType{Export: "vmdk"},
"vhd": imageType{Export: "vpc"},
"gce": imageType{Export: "gce"},
"ova": imageType{Export: "archive"},
// the iso image types are RPM based and legacy/deprecated
"anaconda-iso": imageType{Export: "bootiso", ISO: true, Legacy: true},
"iso": imageType{Export: "bootiso", ISO: true, Legacy: true},
Expand Down
32 changes: 28 additions & 4 deletions test/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,10 +858,9 @@ def test_manifest_customization_custom_file_smoke(tmp_path, build_container):
def find_stage_options_from(manifest_str, stage_type):
manifest = json.loads(manifest_str)
for pipl in manifest["pipelines"]:
if pipl["name"] == "image":
for st in pipl["stages"]:
if st["type"] == stage_type:
return st["options"]
for st in pipl["stages"]:
if st["type"] == stage_type:
return st["options"]
raise ValueError(f"cannot find {stage_type} stage manifest:\n{manifest_str}")


Expand Down Expand Up @@ -1032,3 +1031,28 @@ def test_manifest_image_disk_yaml(tmp_path, build_container):
], encoding="utf8")
write_device_options = find_stage_options_from(manifest_str, "org.osbuild.write-device")
assert write_device_options["from"] == "input://tree/usr/lib/modules/5.0-x86_64/aboot.img"


@pytest.mark.parametrize("tc", gen_testcases("anaconda-iso"))
def test_ova_manifest_smoke(build_container, tc):
testutil.pull_container(tc.container_ref, tc.target_arch)

output = subprocess.check_output([
*testutil.podman_run_common,
build_container,
"manifest",
*tc.bib_rootfs_args(),
"--type=ova",
f"{tc.container_ref}",
])
manifest = json.loads(output)
# just some basic validation that we generate a ova
assert find_stage_options_from(output, "org.osbuild.tar") == {
"filename": "disk.tar",
"format": "ustar",
"paths": [
"disk.ovf",
"disk.mf",
"disk.vmdk"
]
}
Loading