From: Scott Weaver <scwea...@redhat.com> automotive: propagate spec changes
Previously, any modifications made to kernel.spec.template did not automatically apply if the previously copied spec file existed. Now we ensure that we have a fresh copy of the spec file. Building automotive on fedora is not supported so we now catch this and exit the build. Suggested-by: Jarod Wilson <ja...@redhat.com> Signed-off-by: Scott Weaver <scwea...@redhat.com> diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -715,10 +715,8 @@ dist-get-buildreqs: setup-source # recipes may be ordered before/in parallel with dist-clean-sources # (prerequisite of setup-source), which would then delete their results. setup-source: dist-clean-sources dist-git-version-check - @if [ ! -e $(REDHAT)/$(SPECFILE).template ]; then \ - echo "Creating $(REDHAT)/$(SPECFILE).template as a copy of $(REDHAT)/kernel.spec.template"; \ - cp $(REDHAT)/kernel.spec.template $(REDHAT)/$(SPECFILE).template; \ - fi + @echo "Creating $(REDHAT)/$(SPECFILE).template as a copy of $(REDHAT)/kernel.spec.template"; + @cp $(REDHAT)/kernel.spec.template $(REDHAT)/$(SPECFILE).template; @cp $(REDHAT)/$(SPECFILE).template $(SOURCES)/$(SPECFILE) @if [ ! -e $(REDHAT)/$(SPECCHANGELOG) ]; then \ echo "Creating an empty $(SPECCHANGELOG) since it does not exist yet"; \ diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -1896,6 +1896,13 @@ exit 1 %endif %endif +%if %{with_automotive} +%if 0%{?fedora} +%{log_msg "Cannot build automotive with a fedora baseline, must be rhel/centos/eln"} +exit 1 +%endif +%endif + # more sanity checking; do it quietly if [ "%{patches}" != "%%{patches}" ] ; then for patch in %{patches} ; do -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3870 -- _______________________________________________ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue