Hi, I build a custom kernel with rpmbuild. The latest kernel, 5.3.0-0.rc7.git1.1, fails when it patches. I noticed that the last successful spec file had the lines shown below, while the latest doesn't. However, adding them back does not enable patches, the build still fails immediately when it tries to patch, on the first patch. """ Applying: lib/cpumask: Make CPUMASK_OFFSTACK usable without debug dependency Patch failed at 0001 lib/cpumask: Make CPUMASK_OFFSTACK usable without debug dependency When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". error: lib/Kconfig: does not exist in index hint: Use 'git am --show-current-patch' to see the failed patch """ If I comment out the first patch, the second patch fails with the same messages, except the directory missing from the index is the directory where the second patch applies. What has changed in the kernel build process, and how do I fix the spec file so it works? Gone from latest spec: """ < patch_command='patch -p1 -F1 -s' < ApplyPatch() < { < local patch=$1 < shift < if [ ! -f $RPM_SOURCE_DIR/$patch ]; then < exit 1 < fi < if ! grep -E "^Patch[0-9]+: $patch\$" %{_specdir}/${RPM_PACKAGE_NAME%%%%%{?variant}}.spec ; then < if [ "${patch:0:8}" != "patch-5." ] ; then < echo "ERROR: Patch $patch not listed as a source patch in specfile" < exit 1 < fi < fi 2>/dev/null < case "$patch" in < *.bz2) bunzip2 < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;; < *.gz) gunzip < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;; < *.xz) unxz < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;; < *) $patch_command ${1+"$@"} < "$RPM_SOURCE_DIR/$patch" ;; < esac < } < < # don't apply patch if it's empty < ApplyOptionalPatch() < { < local patch=$1 < shift < if [ ! -f $RPM_SOURCE_DIR/$patch ]; then < exit 1 < fi < local C=$(wc -l $RPM_SOURCE_DIR/$patch | awk '{print $1}') < if [ "$C" -gt 9 ]; then < ApplyPatch $patch ${1+"$@"} < fi < } < """ _______________________________________________ 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