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

buildah: fix a nil pointer reference on FreeBSD #5580

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

dfr
Copy link
Contributor

@dfr dfr commented Jun 9, 2024

When setting up resolv.conf on Linux we need to reference the Linux namespaces from spec.Linux. This is not needed for FreeBSD and this change moves the dereference of spec.Linux to addResolvConfEntries and makes it conditional.

What type of PR is this?

/kind bug

What this PR does / why we need it:

This is needed to make 'buildah run' work on FreeBSD if networking is enabled.

How to verify it

# c=$(buildah from quay.io/dougrabson/busybox)
# buildah run $c ls

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 9, 2024
Copy link

Ephemeral COPR build failed. @containers/packit-build please check.

@dfr dfr force-pushed the freebsd-resolv-conf branch 2 times, most recently from 85a753d to e62a744 Compare June 9, 2024 09:59
When setting up resolv.conf on Linux we need to reference the Linux
namespaces from spec.Linux. This is not needed for FreeBSD and this
change moves the dereference of spec.Linux to addResolvConfEntries and
makes it conditional.

Signed-off-by: Doug Rabson <dfr@rabson.org>
@dfr dfr force-pushed the freebsd-resolv-conf branch from e62a744 to 1480f14 Compare June 9, 2024 11:00
@dfr
Copy link
Contributor Author

dfr commented Jun 9, 2024

No tests needed since there should be no functional different to the Linux build and existing tests can verify that.

@nalind nalind added the No New Tests Allow PR to proceed without adding regression tests label Jun 10, 2024
@rhatdan
Copy link
Member

rhatdan commented Jun 10, 2024

/approve
LGTM

@rhatdan
Copy link
Member

rhatdan commented Jun 10, 2024

Copy link
Collaborator

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

openshift-ci bot commented Jun 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dfr, flouthoc, rhatdan

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 Jun 11, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jun 11, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 44ef3a8 into containers:main Jun 11, 2024
32 of 36 checks passed
@dfr dfr deleted the freebsd-resolv-conf branch July 5, 2024 15:36
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Oct 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved kind/bug Categorizes issue or PR as related to a bug. lgtm locked - please file new issue/PR No New Tests Allow PR to proceed without adding regression tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants