From: Prarit Bhargava <prarit@xxxxxxxxxx> redhat/kernel.spec.template: Set worktree git user information Builds fail with: >Committer identity unknown >*** Please tell me who you are. >Run > git config --global user.email "you@xxxxxxxxxxx" > git config --global user.name "Your Name" >to set your account's default identity. >Omit --global to set the identity only in this repository. >fatal: unable to auto-detect email address (got 'mockbuild@a6a1262f1b604ce09d24d04d7a377c59.(none)') >RPM build errors: >error: Bad exit status from /var/tmp/rpm-tmp.BdLSyq (%prep) > Bad exit status from /var/tmp/rpm-tmp.BdLSyq (%prep) This can be avoided by setting and unsetting git user information in the patch application section. Signed-off-by: Prarit Bhargava <prarit@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 @@ -1441,6 +1441,10 @@ git init . # disable autopacking in repository git config --worktree gc.autopacklimit 0 git config --worktree gc.auto 0 +# set email and name for initial commits (these are reset at the end of the +# patch applications) +git config --worktree user.email "kernel-team@xxxxxxxxxxxxxxxxx" +git config --worktree user.name "Fedora Kernel Team" git add -A git commit . -q --author "Fedora Kernel Team <kernel-team@xxxxxxxxxxxxxxxxx>" -m "Base commit for linux %kabiversion" @@ -1451,6 +1455,11 @@ ApplyOptionalPatch patch-%{patchversion}-redhat.patch "Fedora/ARK %patchversion ApplyOptionalPatch linux-kernel-test.patch "linux-kernel-test changes" +# These command must be done last in patch applications. If these git +# configuration variables are left set then future commits to the repository +# will be attributed incorrectly. +git config --worktree --unset user.email +git config --worktree --unset user.name # END OF PATCH APPLICATIONS # Any further pre-build tree manipulations happen here. -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2174 _______________________________________________ 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