-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
i686-elf-grub 2.06, x86_64-elf-grub 2.06 (new formulae) #208658
base: master
Are you sure you want to change the base?
Conversation
Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request. |
The CI pipeline is failing because of CI/Linux job.
The CI pipeline is showing failures in the Linux job due to two issues:
Would appreciate guidance on how to best handle these CI checks. |
This is a common problem with gnu.org/nongnu.org homepages (#206757). Try to use savannah.gnu.org if it has a homepage for these programs |
also can you please add at least one mirror for each formula? and why do you split one program into 2 formulae? |
Thank you for quick reaction! GRUB tools are used to create and work with bootable images for specific architectures. Tools like grub-mkrescue, grub-mkimage, and grub-mkstandalone embed architecture-specific software during their compilation process. This is controlled through target-specific variables:
I have these in my formulas. There is no universal version of these tools that can produce bootable images for any architecture. Instead:
When installing GRUB, you typically only install the tools for the specific architecture you're working with. This approach leverages the cross-compiler toolchains already available in Homebrew (i686-elf-binutils and x86_64-elf-binutils for example), allowing you to build boot images targeted at specific architectures regardless of your host system. I will change homepage to https://savannah.gnu.org/projects/grub later today and add this mirror: https://mirrors.ocf.berkeley.edu/gnu/grub/grub-2.06.tar.xz. But formulas will still not pass the Linux CI job because of brew audit detecting non-native binaries. Question is if we can omit this check. And why does it pass all the MacOs CIs, while there are still non-native binaries in formula's prefix. Why this test is different for MacOs and Linux? |
macOS CI is kinda strange (maybe because macOS uses Clang vs. Linux uses GCC) but I can say for sure that Homebrew would never ever accept non-native binaries |
But these binaries are not executables, they are images for specific architectures, used by GRUB tools to work with images and GRUB itself compiled for these architectures, needed to create images. Problem is how brew audit defines if it is executable binary in Linux. It supposed to skip not executables (see this line: https://github.com/Homebrew/brew/blob/b4dbbf19a21352dd5ed0748e32e6c3b7f15e800c/Library/Homebrew/extend/os/linux/keg_relocate.rb#L76). It happens like this in MacOs: ruby-macho gem just returns ":dunno" for these files (https://github.com/Homebrew/brew/blob/master/Library/Homebrew/os/mac/mach.rb). But for Linux the test is following: https://github.com/Homebrew/brew/blob/b4dbbf19a21352dd5ed0748e32e6c3b7f15e800c/Library/Homebrew/os/linux/elf.rb#L91. |
Try adding |
I still don't understand why we have to split this formula. Why not build 2 different targets in one formula? |
You can specify only single target for configure script, not multiple. |
Add GNU GRUB bootloader cross-compiler for i686-elf target. This formula builds GRUB bootloader components specifically for i386/i686 architecture, which is essential for OS development and bootloader customization. Signed-off-by: Polina Simonenko <[email protected]>
Add GNU GRUB bootloader cross-compiler for x86_64-elf target. This formula builds GRUB bootloader components specifically for x86_64 architecture, which is essential for OS development and bootloader customization. Signed-off-by: Polina Simonenko <[email protected]>
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?