From: Michał Kępień Date: Wed, 15 Apr 2020 09:38:40 +0000 (+0200) Subject: Fix "srcid" on Windows X-Git-Tag: v9.14.12~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d36832d601c6ab24989af71a4317cfc1064d585;p=thirdparty%2Fbind9.git Fix "srcid" on Windows Windows BIND releases produced by GitLab CI are built from Git repositories, not from release tarballs, which means the "srcid" file is not present in the top source directory when MSBuild is invoked. This causes the Git commit hash for such builds to be set to "unset_id". Enable win32utils/Configure to try determining the commit hash for a build by invoking Git on the build host if the "srcid" file is not present (which is what its Unix counterpart does). (cherry picked from commit 05e13e7cafaff48b5e3bb098114225df89f3e59c) --- diff --git a/win32utils/Configure b/win32utils/Configure index 5492310d044..85e8e8edfc7 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -2725,6 +2725,13 @@ sub makesrcid { close SIN; } + if ($srcid eq "unset_id" and -d "..\\.git") { + $data = `git rev-list --max-count=1 HEAD`; + if (length($data) > 0) { + $srcid = substr($data, 0, 7); + } + } + # Now set up the output version file my $ThisDate = scalar localtime();