Page MenuHomeFreeBSD

newvers.sh: Unbreak building in Git repositories.
ClosedPublic

Authored by 0mp on Sep 21 2018, 12:19 PM.
Tags
None
Referenced Files
F86486750: D17271.id48506.diff
Fri, Jun 21, 3:16 AM
F86485225: D17271.id.diff
Fri, Jun 21, 2:46 AM
F86485158: D17271.id48506.diff
Fri, Jun 21, 2:45 AM
Unknown Object (File)
May 14 2024, 12:20 PM
Unknown Object (File)
May 14 2024, 4:44 AM
Unknown Object (File)
May 9 2024, 12:54 AM
Unknown Object (File)
Apr 20 2024, 1:23 PM
Unknown Object (File)
Apr 20 2024, 3:50 AM

Details

Summary

Building the kernel in Git repositories when git-svn is not available and
the "help.autocorrect" Git parameter is enabled results in Git trying to
replace the "svn" command it does not know with "serve". As a result
the output of the "git server" command is appended to the values of the
environmental variables VERINFO, which causes the auto generated vers.c
file to contain invalid C syntax (missing newline escapes):

#define "@(#)FreeBSD 12.0-ALPHA7  r000eversion 2
0015agent=git/2.19.0
000cls-refs
0012fetch=shallow
0012server-option
0000=5e2272613fa(splash-vt)"
#define VERSTR "FreeBSD 12.0-ALPHA7  r000eversion 2
0015agent=git/2.19.0
000cls-refs
0012fetch=shallow
0012server-option
0000=5e2272613fa(splash-vt)\n"

Using -c help.autocorrect=0 seems to be a good solution as it does not
modify user's environment. I am not sure, however, if we should use
programs (or Git commands), which we are not sure exist (we never check if
git-svn is available on the host), as there may be more unexpected
behaviors like this one.

Sponsored by: Bally Wulff Games & Entertainment GmbH

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

0mp edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Sep 21 2018, 12:47 PM
0mp requested review of this revision.Sep 21 2018, 12:54 PM
0mp added reviewers: krion, mat.
0mp added subscribers: krion, mat.

@krion, @mat. May I have your approval? :)

This revision is now accepted and ready to land.Sep 21 2018, 12:55 PM
This revision was automatically updated to reflect the committed changes.