Re: [PATCH, kernel.spec] apply patches with build tweaks and compile fixes all the time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/28/2017 03:20 AM, Thorsten Leemhuis wrote:
> Hi! Find below a patch against master that slightly changes how patches are applied in kernel.spec. It adds a section in the patch definition area of the spec file where compile fixes can be added, to make sure they even get applied even in the nopatch/vanilla build path. It also gets rid of the SOURCE-approach for kbuild-AFTER_LINK.patch and makes it again a proper patch in the spec file.
> 
> This is a follow up to the discussion we had in 
> https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx/thread/RRFMNKRW5JYYCDE43AJ4Y3U3JAKG3XN5/#37D7ID7XPKOCW332S4QYKDAPA2AVDNKK
> I didn't consider it an important issue, but I got annoyed enough to get back to this when yet another compile fix hit the spec file yesterday.
> 
> FWIW:
> * 0001-Work-around-for-gcc7-and-arm64.patch is strictly only needed on >=f26, but for now it is simply applied everywhere. We can simply add a "%if 0%{?fedora} >= 26" "%endif" around the patch definition
> * I didn't check, but 0001-iio-Use-event-header-from-kernel-tree.patch might only be needed on <=f25, as the headers in f26 are likely new enough by now
> 
> CU, thl
> 

Thanks for this. I applied it to rawhide.

> commit 224aa0a6c443020f1ddd1a23fed4319a4be008ba
> Author: Thorsten Leemhuis <fedora@xxxxxxxxxxxxx>
> Date:   Tue Feb 28 12:01:38 2017 +0100
> 
>     apply patches with build tweaks (build-AFTER-LINK.patch) and compile fixes
>     all the time
> 
> diff --git a/kernel.spec b/kernel.spec
> index 247f0d1..c6f3a15 100644
> --- a/kernel.spec
> +++ b/kernel.spec
> @@ -487,11 +487,23 @@ Source5000: patch-4.%{base_sublevel}-git%{gitrev}.xz
>  %endif
>  %endif
>  
> +## patches needed for building this package
> +
>  # build tweak for build ID magic, even for -vanilla
> -Source5005: kbuild-AFTER_LINK.patch
> +Patch001: kbuild-AFTER_LINK.patch
>  
> -%if !%{nopatches}
> +## compile fixes 
> +
> +# ongoing complaint, full discussion delayed until ksummit/plumbers
> +Patch849: 0001-iio-Use-event-header-from-kernel-tree.patch
> +
> +# Still other instances of this bug floating around
> +Patch853: 0001-Work-around-for-gcc7-and-arm64.patch
>  
> +# compile error
> +Patch854: 0001-mm-x86-fix-HIGHMEM64-PARAVIRT-build-config-for-nativ.patch
> +
> +%if !%{nopatches}
>  # Git trees.
>  
>  # Standalone patches
> @@ -583,15 +595,6 @@ Patch509: MODSIGN-Don-t-try-secure-boot-if-EFI-runtime-is-disa.patch
>  #CVE-2016-3134 rhbz 1317383 1317384
>  Patch665: netfilter-x_tables-deal-with-bogus-nextoffset-values.patch
>  
> -#ongoing complaint, full discussion delayed until ksummit/plumbers
> -Patch849: 0001-iio-Use-event-header-from-kernel-tree.patch
> -
> -# Still other instances of this bug floating around
> -Patch853: 0001-Work-around-for-gcc7-and-arm64.patch
> -
> -# compile error
> -Patch854: 0001-mm-x86-fix-HIGHMEM64-PARAVIRT-build-config-for-nativ.patch
> -
>  # END OF PATCH DEFINITIONS
>  
>  %endif
> @@ -1192,18 +1195,12 @@ do
>  done
>  %endif
>  
> -# The kbuild-AFTER_LINK patch is needed regardless so we list it as a Source
> -# file and apply it separately from the rest.
> -git am %{SOURCE5005}
> -
> -%if !%{nopatches}
> -
> +# Note: Even in the "nopatches" path some patches (build tweaks and compile 
> +# fixes) will always get applied; see patch defition above for details
>  git am %{patches}
>  
>  # END OF PATCH APPLICATIONS
>  
> -%endif
> -
>  # Any further pre-build tree manipulations happen here.
>  
>  chmod +x scripts/checkpatch.pl
> @@ -2162,6 +2159,10 @@ fi
>  #
>  #
>  %changelog
> +* Tue Feb 28 2017 Thorsten Leemhuis <fedora@xxxxxxxxxxxxx> - 4.11.0-0.rc0.git5.2
> +- apply patches with build tweaks (build-AFTER-LINK.patch) and compile fixes
> +  all the time
> +
>  * Mon Feb 27 2017 Laura Abbott <labbott@xxxxxxxxxxxxxxxxx> - 4.11.0-0.rc0.git5.1
>  - Linux v4.10-10320-ge5d56ef
>  - Disable a series of s390x configuration options
> 
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux