From: Ondrej Mosnacek <omosnace@xxxxxxxxxx> spec: don't overwrite auto.conf with .config This seems unnecessary (the auto.conf file is already there) and after commit 129ab0d2d9f3 ("kbuild: do not quote string values in include/config/auto.conf") it actually makes building external modules fail with a syntax error, because the kernel Makefile newly assumes that string values in auto.conf are not quoted. I tested a scratch build with the cp line removed and it was possible to build an external module without an issue. Still, to be on the safe side, explicitly sync the timestamp of auto.conf with the root Makefile as is done with version.h two lines above. Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx> diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100755 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -1960,12 +1960,11 @@ BuildKernel() { # Clean up intermediate tools files find $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools \( -iname "*.o" -o -iname "*.cmd" \) -exec rm -f {} + - # Make sure the Makefile and version.h have a matching timestamp so that - # external modules can be built - touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Makefile $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/generated/uapi/linux/version.h - - # Copy .config to include/config/auto.conf so "make prepare" is unnecessary. - cp $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/config/auto.conf + # Make sure the Makefile, version.h, and auto.conf have a matching + # timestamp so that external modules can be built + touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Makefile \ + $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/generated/uapi/linux/version.h \ + $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/config/auto.conf %if %{with_debuginfo} eu-readelf -n vmlinux | grep "Build ID" | awk '{print $NF}' > vmlinux.id -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1597 _______________________________________________ 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 on the list, report it: https://pagure.io/fedora-infrastructure