From owner-dev-commits-doc-all@freebsd.org Tue Jan 19 14:20:03 2021 Return-Path: Delivered-To: dev-commits-doc-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE86C4F590D for ; Tue, 19 Jan 2021 14:20:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DKrQW5z8fz3lNf; Tue, 19 Jan 2021 14:20:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C000427F1D; Tue, 19 Jan 2021 14:20:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10JEK376007039; Tue, 19 Jan 2021 14:20:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10JEK3Je007036; Tue, 19 Jan 2021 14:20:03 GMT (envelope-from git) Date: Tue, 19 Jan 2021 14:20:03 GMT Message-Id: <202101191420.10JEK3Je007036@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Daniel Ebdrup Jensen Subject: git: 1e7c4a3928 - main - doc.docbook.mk: Fix LATESTREVISION determination, causes build failure on non-English locales MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e7c4a3928bf3b7d5edd89d6d8d02b8cbf0c865c Auto-Submitted: auto-generated X-BeenThere: dev-commits-doc-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the doc repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2021 14:20:04 -0000 The branch main has been updated by debdrup: URL: https://cgit.FreeBSD.org/doc/commit/?id=1e7c4a3928bf3b7d5edd89d6d8d02b8cbf0c865c commit 1e7c4a3928bf3b7d5edd89d6d8d02b8cbf0c865c Author: Olivier Certner AuthorDate: 2021-01-19 12:04:38 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2021-01-19 14:18:40 +0000 doc.docbook.mk: Fix LATESTREVISION determination, causes build failure on non-English locales Fixes, e.g., manual articles/books build (i.e., typing `make` in the right directory). There were two problems: 1. Git or SVN information retrieval depends on the current locale, and doesn't work with non-English ones. 2. Fallback for LATESTREVISION most of the time (sometimes works, probable race) itself fails because PWD is set to document's directory + '/obj', but sources are in the document's directory. Problem 2 is the most annoying because documentation builds simply fails (`xsltproc` becomes unable to resolve 'latestrevision.*' variables in, e.g., articles). But point 2's failure appears only because of point 1's failure, which doesn't happen on a machine with English or C locale. PR: 246936 --- share/mk/doc.docbook.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/share/mk/doc.docbook.mk b/share/mk/doc.docbook.mk index bcab2d712d..87512278e6 100644 --- a/share/mk/doc.docbook.mk +++ b/share/mk/doc.docbook.mk @@ -92,7 +92,7 @@ NO_SUBDIR= YES # If using git, use git log. The revision won't work with the generated links, # because it is a hash, and git log doesn't know about git svn find-rev. .if exists(${DOC_PREFIX}/.git) && exists(${GIT}) -LATESTREVISION!=cd ${.CURDIR} && ${GIT} log -1 --pretty=format:'\ +LATESTREVISION!=cd ${.CURDIR} && LC_ALL=C ${GIT} log -1 --pretty=format:'\ --stringparam latestrevision.timestamp "%ci" \ --stringparam latestrevision.committer "%cn" \ --stringparam latestrevision.number "%h"' ${SRCS} @@ -102,7 +102,7 @@ LATESTREVISION!=cd ${.CURDIR} && ${GIT} log -1 --pretty=format:'\ # the revision date from the timestamp of the most recent file and # set the revision number to "filedate" .if empty(LATESTREVISION) -LATESTREVISION!=${STAT} 2>/dev/null -t '%F %T %Z' -f '\ +LATESTREVISION!=cd ${.CURDIR} && ${STAT} 2>/dev/null -t '%F %T %Z' -f '\ --stringparam latestrevision.timestamp "%Sc" \ --stringparam latestrevision.committer "%Su" \ --stringparam latestrevision.number "filedate"' \ @@ -719,4 +719,3 @@ ${LOCAL_CSS_SHEET}: ${CSS_SHEET} .endif HTML.manifest: index.html -