Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A10CC433DF for ; Mon, 8 Jun 2020 13:35:26 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 607F2206C3 for ; Mon, 8 Jun 2020 13:35:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 607F2206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jiHvl-0005Nv-9T; Mon, 08 Jun 2020 13:35:13 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jiHvk-0005Nq-5n for xen-devel@lists.xenproject.org; Mon, 08 Jun 2020 13:35:12 +0000 X-Inumbo-ID: df08c397-a98c-11ea-b275-12813bfff9fa Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id df08c397-a98c-11ea-b275-12813bfff9fa; Mon, 08 Jun 2020 13:35:10 +0000 (UTC) Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: lRPdGcQtw5arndInLSRzK97MBnanXN9L2aS9PQILo1QZZxDJ5pdM1bnMuhPCm7AzaKYCc5zW9m DDbrNOVZuNuGimqqJrqytR3TD6h2GS/i4NFDDXh3Mo0a3ZgGmSWgkq1jCTJYHrXoqQC/QDrEuA GXUueHrWj73DMPTd4UYzsGYaQruE6zbJylFa+i4up1iNYA+rGMM0JYGKci8d8YkqTCJB/z7vuN eCFdyU27aco4mt/KvgcFsl9M9DzaMK5caS1uof8W44nOke/pzLcVTsTD4r6q7rC/pJhb0GUSDD 7ng= X-SBRS: 2.7 X-MesageID: 20232980 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,487,1583211600"; d="scan'208";a="20232980" From: Andrew Cooper To: Xen-devel Subject: [PATCH v2 for-4.14] docs/support-matrix: unbreak docs rendering Date: Mon, 8 Jun 2020 14:34:33 +0100 Message-ID: <20200608133433.23659-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Paul Durrant , Jan Beulich , Anthony PERARD , Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The cronjob which renders https://xenbits.xen.org/docs/ has been broken for a while. commitish_version() pulls an old version of xen/Makefile out of history, and uses the xenversion rule. Currently, this fails with: tmp.support-matrix.xen.make:130: scripts/Kbuild.include: No such file or directory which is because the Makefile legitimately references Kbuild.include with a relative rather than absolute path. Rework support-matrix-generate to use sed to extract the major/minor, rather than expecting xen/Makefile to be usable in a different tree. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Ian Jackson CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Anthony PERARD CC: Paul Durrant v2: * Use sed rather than fixing up the makefile environment This needs backporting to all trees with the support matrix logic, to unbreak docs rendering --- docs/support-matrix-generate | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/support-matrix-generate b/docs/support-matrix-generate index a3d93321f1..b759d0440c 100755 --- a/docs/support-matrix-generate +++ b/docs/support-matrix-generate @@ -26,12 +26,9 @@ # SUPPORT.md into json. # # Then we try to find the next previous revision. This is done by -# extracting the current version number from xen/Makefile. (We make -# some slight assumption about how xen/Makefile's xenversion target -# works, because we want to be able to do this without checking out -# the whole tree for the version in question.) Then we use git log on -# xen/Makefile to try to find a commit where the version changed. -# This gives us the previous version number, NN. +# extracting the current version number from xen/Makefile. Then we +# use git log on xen/Makefile to try to find a commit where the +# version changed. This gives us the previous version number, NN. # # That is substituted into the `refs/remotes/origin/stable-NN' # argument to get the tip of the relevant branch. That in turns @@ -102,12 +99,16 @@ commitish_version () { esac git cat-file blob "$commitish:$versionfile" >"$tmp_versionfile" - version=$(make --no-print-directory -C docs \ - -f "${tmp_versionfile#docs/}" xenversion) - case "$version" in - *.*.*) version="${version%.*}" ;; - esac - printf "%s\n" "${version%%-*}" + + local maj=$(sed -n 's/.*XEN_VERSION.*= \([0-9]\+\)/\1/p' < "$tmp_versionfile") + local min=$(sed -n 's/.*XEN_SUBVERSION.*= \([0-9]\+\)/\1/p' < "$tmp_versionfile") + + if [[ -z $maj || -z $min ]]; + then + fail "Unable to identify Xen version for ${commitish}"; + fi + + printf "%d.%d\n" "${maj}" "${min}" } exec 4>"$tmp_revisions" -- 2.11.0