From 0a09bd74a376fb5bda9142d3da1ee10b7b34a2f3 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Mon, 12 Jun 2023 14:17:26 -0400 Subject: [PATCH] Revert "cmd-build: Conditionally change the packing structure of container-image" This is breaking CI and blocking this week's FCOS releases: https://github.com/coreos/fedora-coreos-config/pull/2463#issuecomment-1587841160 Let's revert while we investigate. This reverts commit a2e5edb25e1ec4e291fc5ad8f4884cf9f1b13417. --- pkg/builds/cosa_v1.go | 3 +-- pkg/builds/schema_doc.go | 11 ++--------- src/cmd-build | 27 --------------------------- src/v1.json | 9 +-------- 4 files changed, 4 insertions(+), 46 deletions(-) diff --git a/pkg/builds/cosa_v1.go b/pkg/builds/cosa_v1.go index 85f251d4fa..595b9b8e72 100644 --- a/pkg/builds/cosa_v1.go +++ b/pkg/builds/cosa_v1.go @@ -1,7 +1,7 @@ package builds // generated by 'make schema' -// source hash: a5fec50536bd4c2eed006dfb897b3b40fdf50393a0e3e32edf874b4e200e4e4d +// source hash: 2cd4fe2a0c72e389ee6cb2b906653cdfd33f87b87d7e2e261fce4615a8c0272a type AdvisoryDiff []AdvisoryDiffItems @@ -106,7 +106,6 @@ type BuildArtifacts struct { Metal *Artifact `json:"metal,omitempty"` Metal4KNative *Artifact `json:"metal4k,omitempty"` Nutanix *Artifact `json:"nutanix,omitempty"` - OciManifest *Artifact `json:"oci-manifest,omitempty"` OpenStack *Artifact `json:"openstack,omitempty"` Ostree Artifact `json:"ostree"` PowerVirtualServer *Artifact `json:"powervs,omitempty"` diff --git a/pkg/builds/schema_doc.go b/pkg/builds/schema_doc.go index cda4acdadf..2716cf3395 100644 --- a/pkg/builds/schema_doc.go +++ b/pkg/builds/schema_doc.go @@ -1,5 +1,5 @@ // Generated by ./generate-schema.sh -// Source hash: a5fec50536bd4c2eed006dfb897b3b40fdf50393a0e3e32edf874b4e200e4e4d +// Source hash: 2cd4fe2a0c72e389ee6cb2b906653cdfd33f87b87d7e2e261fce4615a8c0272a // DO NOT EDIT package builds @@ -479,8 +479,7 @@ var generatedSchemaJSON = `{ "vmware", "vultr", "qemu-secex", - "ignition-gpg-key", - "oci-manifest" + "ignition-gpg-key" ], "properties": { "ostree": { @@ -489,12 +488,6 @@ var generatedSchemaJSON = `{ "title": "OSTree", "$ref": "#/definitions/artifact" }, - "oci-manifest": { - "$id": "#/properties/images/properties/oci-manifest", - "type": "object", - "title": "OCI Manifest", - "$ref": "#/definitions/artifact" - }, "dasd": { "$id": "#/properties/images/properties/dasd", "type": "object", diff --git a/src/cmd-build b/src/cmd-build index 1ef9a1e0a2..fd375997c6 100755 --- a/src/cmd-build +++ b/src/cmd-build @@ -427,13 +427,6 @@ if [ "${commit}" == "${previous_commit}" ] && \ ostree_tarfile_path=$(jq -r '.images.ostree.path' < "${previous_builddir}/meta.json") cp-reflink "${previous_builddir}/${previous_ostree_tarfile_path}" "${ostree_tarfile_path}" ostree_tarfile_sha256=$(jq -r '.images.ostree.sha256' < "${previous_builddir}/meta.json") - - ostree_oci_manifest_path="${name}-${buildid}-ostree.${basearch}-manifest.json" - skopeo inspect --raw oci-archive:"${ostree_tarfile_path}" > tmp/manifest.json - /usr/lib/coreos-assembler/finalize-artifact tmp/manifest.json "${ostree_oci_manifest_path}" - ostree_oci_manifest_sha256=$(sha256sum "${ostree_oci_manifest_path}" | awk '{print$1}') - ostree_oci_manifest_size=$(stat --format=%s "${ostree_oci_manifest_path}") - # backcompat: allow older build without this field if [ "${ostree_tarfile_sha256}" = "null" ]; then ostree_tarfile_sha256= @@ -459,15 +452,6 @@ else "--label=io.openshift.build.versions=machine-os=${buildid}" ) fi - - last_build_manifest=() - # Use the last stable release if buildfetch used - if [ -n "${PARENT_BUILD}" ]; then - last_build_manifest+=("--previous-build-manifest=${parent_builddir}/${name}-${PARENT_BUILD}-ostree.${basearch}-manifest.json") - # Use the previous local build - elif [ -n "${previous_build}" ]; then - last_build_manifest+=("--previous-build-manifest=${previous_builddir}/${name}-${previous_build}-ostree.${basearch}-manifest.json") - fi runv rpm-ostree compose container-encapsulate --max-layers="$MAX_OSTREECONTAINER_LAYERS" --format-version=1 \ --repo="${tmprepo}" \ --label="coreos-assembler.image-config-checksum=${image_config_checksum}" \ @@ -475,17 +459,11 @@ else --label="org.opencontainers.image.source=${gitsrc}" \ --label="org.opencontainers.image.revision=${config_gitrev}" \ --copymeta-opt=fedora-coreos.stream \ - "${last_build_manifest[@]}" \ "${labels[@]}" \ "${buildid}" \ oci-archive:"${ostree_tarfile_path}".tmp:latest /usr/lib/coreos-assembler/finalize-artifact "${ostree_tarfile_path}"{.tmp,} ostree_tarfile_sha256=$(sha256sum "${ostree_tarfile_path}" | awk '{print$1}') - ostree_oci_manifest_path="${name}-${buildid}-ostree.${basearch}-manifest.json" - skopeo inspect --raw oci-archive:"${ostree_tarfile_path}" > tmp/manifest.json - /usr/lib/coreos-assembler/finalize-artifact tmp/manifest.json "${ostree_oci_manifest_path}" - ostree_oci_manifest_sha256=$(sha256sum "${ostree_oci_manifest_path}" | awk '{print$1}') - ostree_oci_manifest_size=$(stat --format=%s "${ostree_oci_manifest_path}") fi # The base metadata, plus locations for code sources. @@ -529,11 +507,6 @@ cat > tmp/images.json <