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

Run Docker so qemu-aarch64 flags: OCF (fixes uraimo#68) #75

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

benalexau
Copy link
Contributor

This PR resolves issue #68.

The root cause of the sudo: effective uid is not 0, is /usr/sbin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges? error is explained in multiarch/qemu-user-static#17.

In summary the QEMU Docker instance needs to launched so the binfmt_misc flags include OCF. Prior to this PR the flags are limited to F, which can be confirmed using following run-on-arch-action configuration:

  setup: |
    cat /proc/sys/fs/binfmt_misc/qemu-aarch64

This returns:

enabled
interpreter /usr/bin/qemu-aarch64-static
flags: F
offset 0
magic 7f454c460201010000000000000000000200b700
mask ffffffffffffff00fffffffffffffffffeffffff

Applying the PR results in:

enabled
interpreter /usr/bin/qemu-aarch64-static
flags: OCF
offset 0
magic 7f454c460201010000000000000000000200b700
mask ffffffffffffff00fffffffffffffffffeffffff

sudo now works in run-on-arch-action containers.

@uraimo uraimo merged commit a1086cf into uraimo:master Apr 12, 2022
@uraimo
Copy link
Owner

uraimo commented Apr 12, 2022

@benalexau thanks for taking the time to research and open this PR, will do a new release.

@benalexau benalexau deleted the issue-68 branch April 13, 2022 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants