On 5/31/23 14:10, stan via kernel wrote:
It has been ages since I wanted to patch the kernel when I built a custom kernel. I tried putting the patch in the spec file where the other patches were, but it doesn't apply. There is no error, or even indication that it saw the patch, so I am obviously doing it incorrectly.
Just curious ... Is there a reason you don't want to commit the change and then build?
P.
I'm building the kernel from the srpm using rpmbuild. It builds fine when unpatched. I can, of course, just untar the kernel tar file, apply the patch, and tar it. But, it should be simple to do from the spec file directly. Can anyone point me to the current procedure? Here is what is in the spec file: ``` ## Patches needed for building this package %if !%{nopatches} Patch1: patch-%{patchversion}-redhat.patch Patch2: 0001-my_custom_change.patch %endif # empty final patch to facilitate testing of kernel patches Patch999999: linux-kernel-test.patch ``` I tried it outside the if, still didn't work: ``` ## Patches needed for building this package %if !%{nopatches} Patch1: patch-%{patchversion}-redhat.patch %endif Patch2: 0001-my_custom_change.patch # empty final patch to facilitate testing of kernel patches Patch999999: linux-kernel-test.patch ``` Here is the output with this version in the spec file. + ApplyOptionalPatch patch-6.4-redhat.patch + local patch=patch-6.4-redhat.patch + shift + '[' '!' -f /home/stan/rpmbuild/SOURCES/patch-6.4-redhat.patch ']' ++ wc -l /home/stan/rpmbuild/SOURCES/patch-6.4-redhat.patch ++ awk '{print $1}' + local C=2978 + '[' 2978 -gt 9 ']' + ApplyPatch patch-6.4-redhat.patch + local patch=patch-6.4-redhat.patch + shift + '[' '!' -f /home/stan/rpmbuild/SOURCES/patch-6.4-redhat.patch ']' + case "$patch" in + git --work-tree=. apply + ApplyOptionalPatch linux-kernel-test.patch + local patch=linux-kernel-test.patch + shift + '[' '!' -f /home/stan/rpmbuild/SOURCES/linux-kernel-test.patch ']' ++ wc -l /home/stan/rpmbuild/SOURCES/linux-kernel-test.patch It finds the Patch999999 patch which is empty, and in ~/rpmbuild/SOURCE like my patch, so why isn't it finding my patch? Thanks for any help. _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
_______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue