Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libimage: normalize platform #867

Conversation

vrothberg
Copy link
Member

@vrothberg vrothberg commented Dec 22, 2021

Buildah, containers and probably other container engines are normalizing
the platform parameters to support common values. For instance, "x86_64"
is normalized to the OCI conformant "amd64".

Use the same normalization when copying images and looking up local
images. Also add some debug logs to facilitate future debugging.

Fixes: containers/podman/issues/12680
Signed-off-by: Valentin Rothberg [email protected]

@containers/podman-maintainers PTAL
@rhatdan PTAL

@nalind FYI

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 22, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhatdan
Copy link
Member

rhatdan commented Dec 22, 2021

LGTM

@vrothberg
Copy link
Member Author

How did that sneak in?

make build-cross
[...]
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -tags "containers_image_openpgp,systemd,exclude_graphdriver_devicemapper" ./...
# github.com/containers/common/libnetwork/netavark
libnetwork/netavark/exec.go:76:10: undefined: netavarkNetwork
libnetwork/netavark/ipam.go:58:10: undefined: netavarkNetwork
libnetwork/netavark/ipam.go:71:10: undefined: netavarkNetwork
libnetwork/netavark/ipam.go:236:10: undefined: netavarkNetwork
libnetwork/netavark/ipam.go:293:10: undefined: netavarkNetwork

@vrothberg
Copy link
Member Author

Fixed

@TomSweeneyRedHat
Copy link
Member

Changes LGTM, but would like a head nod from @nalind . CI still hates you @vrothberg , what did you ever do to it?

@rhatdan
Copy link
Member

rhatdan commented Dec 23, 2021

Cross builds were not run on each PR until recently.

@rhatdan
Copy link
Member

rhatdan commented Dec 23, 2021

LGTM

@vrothberg vrothberg force-pushed the libimage-platform-normalization branch from bcad9ff to 9c94540 Compare December 23, 2021 10:15
@vrothberg
Copy link
Member Author

Rebased to get cross-build fixes in.

Buildah, containers and probably other container engines are normalizing
the platform parameters to support common values.  For instance, "x86_64"
is normalized to the OCI conformant "amd64".

Use the same normalization when copying images and looking up local
images.  Also add some debug logs to facilitate future debugging.

Fixes: containers/podman/issues/12680
Signed-off-by: Valentin Rothberg <[email protected]>
@vrothberg vrothberg force-pushed the libimage-platform-normalization branch from 9c94540 to b2d805e Compare December 23, 2021 12:09
@vrothberg
Copy link
Member Author

@rhatdan PTAL

@rhatdan
Copy link
Member

rhatdan commented Dec 23, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 23, 2021
@openshift-merge-robot openshift-merge-robot merged commit d34078a into containers:main Dec 23, 2021
@vrothberg vrothberg deleted the libimage-platform-normalization branch December 23, 2021 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accept --arch based on uname -m names (ie x86_64/aarch64) in addition to GOARCH like arch (ie amd64/arm64)
4 participants