Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 682310 - sys-boot/syslinux-6.04_pre1 (& early) ebuild has multiple incorrect behaviours
Summary: sys-boot/syslinux-6.04_pre1 (& early) ebuild has multiple incorrect behaviours
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chí-Thanh Christopher Nguyễn
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2019-04-02 09:02 UTC by Denis Kaganovich
Modified: 2022-05-30 20:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
syslinux-6.04_pre3.ebuild (syslinux-6.04_pre3.ebuild,3.33 KB, text/plain)
2019-04-02 09:02 UTC, Denis Kaganovich
Details
syslinux-6.04_pre3.ebuild.patch (syslinux-6.04_pre3.ebuild.patch,2.16 KB, patch)
2019-04-02 09:29 UTC, Denis Kaganovich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Kaganovich 2019-04-02 09:02:17 UTC
Created attachment 571564 [details]
syslinux-6.04_pre3.ebuild

Short: current sys-boot/syslinux are: 1) use prebuild bios/core stuff 2) unmotivated select efi32/64 from current system arch - but there related only from hardware & must (or can) be build both.

What to do: 1) remove */core 2) make all.

Motivation: I got not working syslinux efi64, so start to dig... Found syslinux-6.04_pre3, where similar prebuild stuff placed also in efi*/core.

Attaching my syslinux-6.04_pre3.ebuild with minimal differences from pre1 + external patches from debian.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-04-02 09:08:36 UTC
Would you mind attaching a unified diff (diff -u) of the changes you did to the ebuild to this bug? That way it's easier for the maintainer(s) to catch your changes.
Comment 2 Denis Kaganovich 2019-04-02 09:29:08 UTC
Created attachment 571566 [details, diff]
syslinux-6.04_pre3.ebuild.patch

OK, + added removing prebuild efi*/lib too (only in diff).
Comment 3 Maciej S. Szmigiero 2019-04-09 18:40:51 UTC
+1

It's worth nothing that both Debian and Ubuntu seem to rebuild the entire
package, so Gentoo as a card-carrying source distribution should be even
more inclined to do so.

BTW: In your proposed ebuild you do "rm */core efi*/lib -Rf" to remove the
shipped binaries while Ubuntu simply removes the whole "bios", "efi32" and
"efi64" directories.
Comment 4 Denis Kaganovich 2019-04-15 16:28:12 UTC
(In reply to Maciej S. Szmigiero from comment #3)

Yep! "rm bios efi32 efi64 -Rf" looks even better.

But now I read:

# This ebuild is a departure from the old way of rebuilding everything in syslinux
# This departure is necessary since hpa doesn't support the rebuilding of anything other
# than the installers.

So:
1) Removing binaries - build all, but loose support by 	H. Peter Anvin.
2) Keeping binaries - keeping support, but no build efi32 under x86_64 and no even build 6.04_pre3 (at least "rm */core -Rf").

To keep both - need something like useflags "vanilla" & "multitarget" or wait for next release...

So, I keep it under big question... just add simple cleaned syslinux-6.04_pre3.ebuild into own overlay.
Comment 5 Denis Kaganovich 2019-04-15 16:30:20 UTC
PS +DEPEND app-arch/upx-ucl
Comment 6 Chí-Thanh Christopher Nguyễn gentoo-dev 2019-04-17 21:03:47 UTC
I agree that building syslinux binaries instead of using precompiled ones is better in principle.

However, due the to multitude of toolchain combinations, I fear that this will cause more non-working binaries to be produced, which makes people's systems unbootable. The situation is already a bit complex (bug 662678 and others).

So before we can enable such by default, I think some test needs to be devised (based on QEMU and Tianocore or whatever) that actually working binaries are produced.

(In reply to Maciej S. Szmigiero from comment #3)
> It's worth nothing that both Debian and Ubuntu seem to rebuild the entire package

Debian etc. have it somewhat easier, as they ship the same binary to all users.

(In reply to Denis Kaganovich from comment #4)

> To keep both - need something like useflags "vanilla" & "multitarget" or wait for next release...

This needs multilib support (bug 584464).
Comment 7 Maciej S. Szmigiero 2019-04-19 21:04:21 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #6)
> I agree that building syslinux binaries instead of using precompiled ones is
> better in principle.
> 
> However, due the to multitude of toolchain combinations, I fear that this
> will cause more non-working binaries to be produced, which makes people's
> systems unbootable. The situation is already a bit complex (bug 662678 and
> others).
> 
> So before we can enable such by default, I think some test needs to be
> devised (based on QEMU and Tianocore or whatever) that actually working
> binaries are produced.

I have written a test script that tests SYSLINUX BIOS,
SYSLINUX EFI and ISOLINUX by booting a test image in a VM in an automated way
(if you run it with a time limit of, for example, 3 minutes and then report
timeouts as failures).

The script is available at
https://gist.github.com/maciejsszmigiero/cf8267a7384970dc42b08574d50207a3
(one also would need qemu kernel and initrd images available at
https://gist.github.com/maciejsszmigiero/49dc6a74e711a917b24c2731963582a9 ).

BTW. SUSE rebuilds syslinux, too.
Comment 8 Maciej S. Szmigiero 2019-04-20 11:28:38 UTC
Updated the test script to also test PXELINUX and SYSLINUX EFI network boot
while enforcing an automatic 2 minute boot time limit.
This way the script can be used verbatim in CI-like deployment.

> This needs multilib support (bug 584464).

I think that even without multilib support building finally sys-boot/syslinux
completely from sources would be a huge improvement.

I agree that initially there can be a "binary" (or a similar) USE flag
that restores the old behaviour, so users have a way to get a working setup until
bug they had hit is fixed, much like the USE flag that sys-firmware/seabios has,
for example.
Comment 9 Mike Gilbert gentoo-dev 2022-05-30 20:13:19 UTC
I reworked the ebuild for 6.04_pre3. Please re-open if there are problems.