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=-6.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS 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 83FE0C433E0 for ; Mon, 8 Jun 2020 13:38:50 +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 50A32206C3 for ; Mon, 8 Jun 2020 13:38:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ia/Lz60s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50A32206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 1jiHyn-0005Z3-OG; Mon, 08 Jun 2020 13:38:21 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jiHym-0005YJ-7I for xen-devel@lists.xenproject.org; Mon, 08 Jun 2020 13:38:20 +0000 X-Inumbo-ID: 4f7f35ce-a98d-11ea-9ad7-bc764e2007e4 Received: from mail-wm1-x335.google.com (unknown [2a00:1450:4864:20::335]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4f7f35ce-a98d-11ea-9ad7-bc764e2007e4; Mon, 08 Jun 2020 13:38:18 +0000 (UTC) Received: by mail-wm1-x335.google.com with SMTP id u13so15393142wml.1 for ; Mon, 08 Jun 2020 06:38:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:content-language :thread-index; bh=z2FvhJj0rboD2ZNlDgF/UnMTbEK6UqBAOC4li2lmzI4=; b=ia/Lz60saGcOssbgF1HoIvrU5vjHprdlt+ZJgRr/GrHhJU9ZEDPO0aos0eelP0nB8w 735/VfMRDeX1er3eEKXkJtH7LX3ONqRYFgo+rF0QbrBOFTdRfFxsQHG6n9V07Ld/PRJg eO7rDqpedOJ2rwDpoDoE8N9tskqZ+T3xE9ojUnFjCSc8rfFVYKoN9HARqH860sNuY0QX KoY19YrMGon2PqbeFtBeiP3B8zMz+Z8y7Eqp6UhHELXtzD2OU1DNw75/7YEAMujEKU0S vf1cWAnzoaMGgAknK3RrCN9dkEBOM6/99vIdB02LjDq2uByrxVj999L6+xsww80NDGh9 M7bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:to:cc:references:in-reply-to :subject:date:message-id:mime-version:content-transfer-encoding :content-language:thread-index; bh=z2FvhJj0rboD2ZNlDgF/UnMTbEK6UqBAOC4li2lmzI4=; b=qgfn/sHP/mANiJrBvP1Qc2VlDxAj7zYpOmg0kSgbKh/xF9WCGoIQebGGS4tQbKBTmP gHb5C0K7aKs9yfsifAZ9TE4UJy9ZLXAjLZfq+yogoXDL7XU3XSZjF7BOagUjwBWTPH7T dcJbWv5TvU0YKzo63gLlZfDSmH2Y+OuyJrr69FzCTO7/g9VyV7Vm1sBteB9IzkbtiVZZ ngi8alEimwt1XP9mnpKicSpDRg2rp2VN1ZqH3s0i6sosG40yKvbTX67cb9izFrwwKxEn PG4ypkpiBHyomBdvA0OQiEd4BRwke70PsMsy/YvMHMxZwO7aUaBlMK/lhT/rppKr87NI +TYw== X-Gm-Message-State: AOAM533i1Ws2TzfpJ/8+OPzg/Cmuy8/6bbZaekSp6AOAp4Z59ozbYgML WXSDNjVZLGsasryH3Tclt+I= X-Google-Smtp-Source: ABdhPJxUCbfA+B1QRkslt9DCIbp/k9qzxUuL5axNYq4GvWO7p09sdGw03Py4/30qq8HbH3hlNfMCNQ== X-Received: by 2002:a7b:c1ce:: with SMTP id a14mr15434623wmj.144.1591623497392; Mon, 08 Jun 2020 06:38:17 -0700 (PDT) Received: from CBGR90WXYV0 ([54.239.6.185]) by smtp.gmail.com with ESMTPSA id l17sm21342417wmi.3.2020.06.08.06.38.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jun 2020 06:38:16 -0700 (PDT) From: Paul Durrant X-Google-Original-From: "Paul Durrant" To: "'Andrew Cooper'" , "'Xen-devel'" References: <20200608133433.23659-1-andrew.cooper3@citrix.com> In-Reply-To: <20200608133433.23659-1-andrew.cooper3@citrix.com> Subject: RE: [PATCH v2 for-4.14] docs/support-matrix: unbreak docs rendering Date: Mon, 8 Jun 2020 14:38:15 +0100 Message-ID: <003201d63d9a$10a07f20$31e17d60$@xen.org> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: en-gb Thread-Index: AQF3f+tZUFdPAi1ShdzcWao/KRWiYamMM+ow 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: , Reply-To: paul@xen.org Cc: 'Stefano Stabellini' , 'Julien Grall' , 'Wei Liu' , 'Konrad Rzeszutek Wilk' , 'George Dunlap' , 'Jan Beulich' , 'Anthony PERARD' , 'Ian Jackson' Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" > -----Original Message----- > From: Andrew Cooper > Sent: 08 June 2020 14:35 > To: Xen-devel > Cc: Andrew Cooper ; George Dunlap ; Ian > Jackson ; Jan Beulich ; Konrad Rzeszutek Wilk > ; Stefano Stabellini ; Wei Liu ; Julien > Grall ; Anthony PERARD ; Paul Durrant > Subject: [PATCH v2 for-4.14] docs/support-matrix: unbreak docs rendering > > 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 Release-acked-by: Paul Durrant > --- > 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