From nobody Mon May 6 22:48:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1591623334; cv=none; d=zohomail.com; s=zohoarc; b=b2AJGQ94hjI1pVltY6gMq5n43rDty6pauLnMBrzEqDr400PHBtG61krdJbNc/fpzwrYVEzv4uZsiI69rQ6t6gZBTTuVRY+8D5abJciseWLTDgeVijwoDVMxxQg99axSN247+iO7YcQwodeWmTFK1EiyWRzpCe5obNVY/DflnwuI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591623334; h=Content-Type:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=nExCeMcZTIIBumMnGzf56uWWC3S8j9MVFnrwkb0WJaQ=; b=FGX6oW5QgNI4p3Z+rE5fX7S5kLoZ+gys227TtGQEhY0d2r1vHbAv8kvUCXBjvdtdn6/zy8o3KO8wxaWEKP8zcsSDFjDxzQdEHM5MchA48Uzhvc4WmekAChVD/ntqPw0FY8LkoY3Dhc/sCY0wDcqTZlBpO1uAYNOqqIUQscIxNwY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1591623334622568.7643475188316; Mon, 8 Jun 2020 06:35:34 -0700 (PDT) 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 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) X-Inumbo-ID: df08c397-a98c-11ea-b275-12813bfff9fa 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 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" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Ian Jackson --- 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 unbre= ak 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 =20 git cat-file blob "$commitish:$versionfile" >"$tmp_versionfile" - version=3D$(make --no-print-directory -C docs \ - -f "${tmp_versionfile#docs/}" xenversion) - case "$version" in - *.*.*) version=3D"${version%.*}" ;; - esac - printf "%s\n" "${version%%-*}" + + local maj=3D$(sed -n 's/.*XEN_VERSION.*=3D \([0-9]\+\)/\1/p' < "$tmp_v= ersionfile") + local min=3D$(sed -n 's/.*XEN_SUBVERSION.*=3D \([0-9]\+\)/\1/p' < "$tm= p_versionfile") + + if [[ -z $maj || -z $min ]]; + then + fail "Unable to identify Xen version for ${commitish}"; + fi + + printf "%d.%d\n" "${maj}" "${min}" } =20 exec 4>"$tmp_revisions" --=20 2.11.0