[kernel ALL] patching silently fails when building in-tree!

Problems with packages? Post here, using [tags] of the package name.

[kernel ALL] patching silently fails when building in-tree!

Postby rmsc » Tue Oct 18, 2022 11:07 pm

There's a nasty problem with ALL kernel PKGBUILDS in the way patches are applied.

They're currently being applied like this:
$this->bbcode_second_pass_code('', 'git apply ../0001-my.patch')

The kernel tarballs however aren't actually working git repos. git still attempts to apply the patch, but it's very brittle.

Building outside the PKGBUILD git tree seems to work fine. Unfortunately when in-tree, git seems to get confused and doesn't apply the patch correctly. Patching fails without any indication whatsoever.

Lost quite some time figuring out why a kernel that worked fine when built by hand, failed to boot when built via PKGBUILD.... Turns out my patch wasn't being applied :(

The solution IMHO seems to be just using patch directly, just like it's done in Archlinux:
$this->bbcode_second_pass_code('', 'patch -Np1 < ../0001-my.patch')
rmsc
 
Posts: 6
Joined: Tue Oct 18, 2022 10:50 pm

Re: [kernel ALL] patching silently fails when building in-tr

Postby rmsc » Tue Oct 18, 2022 11:27 pm

I've submitted a PR addressing this bug here:
https://github.com/archlinuxarm/PKGBUILDs/pull/1949

I've tried to keep the log message as similar to previous ones as possible, not sure if I succeeded :P
rmsc
 
Posts: 6
Joined: Tue Oct 18, 2022 10:50 pm

Re: [kernel ALL] patching silently fails when building in-tr

Postby moonman » Tue Oct 18, 2022 11:43 pm

Some patches require "git apply" as "patch" doesn't support binary patches.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am


Return to Packages

Who is online

Users browsing this forum: No registered users and 21 guests