-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Call losetup -f
to make sure loop device exists
#6576
Conversation
As outlined in the "How Has This Been Tested?", there is currently a problem with the fix, which is why I'm making this PR a draft. |
Try to keep this function in host_prepare part. But on the other hand this is only needed for compiling images. |
Ok, I've moved the call to the command way earlier, but currently I'm not sure where its place really is. I've fixed the issue of having to run it 2 times by moving the call to losetup to host (before docker), put it in entrypoint... But I feel like that would mess with usage of |
doas is not compatible with sudo flags. The codebase was checked for sudo-specific uses of this function, but none were found, all cases were in the form of `sudo <command>`. Replacing it with `doas <command>` yields the same result.
271b8ec
to
117f8b5
Compare
117f8b5
to
ec6aa61
Compare
Rebased on main properly and squashed the moving around, removed the issue from the PR root comment and I think this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks ok, it works
Complete and general breakage due to this. |
I check if it breaks. It didn't ... so I merge as there was no other complains. |
This is an attempt to enable build framework execution on Gentoo. Which I don't mind if it doesn't harm us. Where is the problem? |
Dunno, seems it tries to use sudo even in the docker case. |
Yes, it breaks build on MacOS. The ensure_loop_exists must only run when ARMBIAN_RELAUNCHED is set to yes |
Also I don't see a point why ensure_loop_exists needs to be added to cli-docker.sh. |
The issue on my machine was that there were no loop devices created by default unless I try to find one using The PR breaking builds on MacOS is a major issue, which would justify the revert of the merge, if possible. This PR only provides a dirty quickfix to go around a problem in the part of the script that finds a free loop device. The problem is that it sets the result to an empty string and "succeeds" on the first try, breaking because of the edge case that there are no |
As I've explained, calling |
Yes, got that from the previous post. It was just that we both commented at almost the same time. There was no need to explain it twice. May I suggest a workaround? Create a file in userpatches/extensions with the following content
If that works for you, we can probably revert this change until a better version is proposed. |
Yes, that works, although I still need to add the |
@JohnTheCoolingFan OK, make revert PR and once this is better tested, new one. This would be IMO best path from current situation. |
I'll also put the doas support into a separate PR |
Description
losetup -f
which would make sure that there is a loop device that exists and available for use. See Fail at check_loop_device: device node doesn't exist andLOOP=
in cycle 1 #6568is_root_or_sudo_prefix
function. I will understand if this change would be asked to be removed, added just because I use doas.Jira reference number AR-2132
How Has This Been Tested?
Building using the command
./compile.sh BOARD=orangepi5 BRANCH=legacy BUILD_DESKTOP=no BUILD_MINIMAL=no KERNEL_CONFIGURE=no KERNEL_GIT=shallow RELEASE=bookworm
on my machine.Checklist:
Please delete options that are not relevant.