From nobody Mon Feb 9 12:42:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1628522084; cv=none; d=zohomail.com; s=zohoarc; b=ck2iVOYD4mNbCscRxhaZcm7zkYSH44skki9wVsFYOrdavrnG6GDuPWG7Je6nxzLZ4ILZEGiLcsgC0ig85L7BjaW3FIy8APzwbtY5Z8x6xBJebn2ho0+JXuX200/cor7q8C1xua9yqzdsrljzZH2O+fc9IbwGjVyLjdHJeYRh23U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628522084; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WvPmm2jUNOHkFO7w0g23TxSorM7dGwFCRp2522bif7o=; b=YVye6MSdpSphpJtnMt16I0pzCcWAa37I1oSjn8YhMLHdo3OMmEJlkT4WxgHfTpeSSrc8m8bjWxu9bvkckxXOX4URoOJksl/AhD/SyRhk5LdLKhiIPG6jjKdnEaD43GabxSiDWGiKI6YSDF19Hm0GgfcUe064tSmoaT+5gomZ0oo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1628522084923378.0272731703594; Mon, 9 Aug 2021 08:14:44 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-458-Z7GW5h4fNbqjg9qlhTDgeg-1; Mon, 09 Aug 2021 11:14:42 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DA2BD1853028; Mon, 9 Aug 2021 15:14:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B796C5C1D1; Mon, 9 Aug 2021 15:14:36 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7B9774A7CB; Mon, 9 Aug 2021 15:14:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 179FDcs8030238 for ; Mon, 9 Aug 2021 11:13:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4531413950; Mon, 9 Aug 2021 15:13:38 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A32D55DF21 for ; Mon, 9 Aug 2021 15:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628522083; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=WvPmm2jUNOHkFO7w0g23TxSorM7dGwFCRp2522bif7o=; b=N/PLOUrh68/F9FqdSWZTHMFZmszcQo90nvoOcHEa0+56C9/Cx/laK+9pSVqm0OrfF2gXpJ shU/VALpBzRL3NY+tqr81h/NJCNe4QDrALn44dZv5tJSVkK2TYpQ9AbNk/urNu8c/xP2Wy VCur4mPVZgqbcrkGG/JBRs0jkZIvgro= X-MC-Unique: Z7GW5h4fNbqjg9qlhTDgeg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] meson: Detect and reject invalid rst2html5 command Date: Mon, 9 Aug 2021 17:13:29 +0200 Message-Id: <20210809151329.73017-3-abologna@redhat.com> In-Reply-To: <20210809151329.73017-1-abologna@redhat.com> References: <20210809151329.73017-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1628522085697100001 Content-Type: text/plain; charset="utf-8" The version coming from the rst2html5 package instead of the docutils package is unable to successfully generate the libvirt documentation. Examples of users encountering build issues because of the wrong version of rst2html5 being installed on their systems: https://gitlab.com/libvirt/libvirt/-/issues/40 https://gitlab.com/libvirt/libvirt/-/issues/139 https://gitlab.com/libvirt/libvirt/-/issues/169 https://gitlab.com/libvirt/libvirt/-/issues/195 Signed-off-by: Andrea Bolognani --- meson.build | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/meson.build b/meson.build index 32ad688c9c..02357a2678 100644 --- a/meson.build +++ b/meson.build @@ -813,6 +813,34 @@ foreach item : required_programs_groups set_variable('@0@_prog'.format(varname), prog) endforeach =20 +# There are two versions of rst2html5 in the wild: one is the version +# coming from the docutils package, and the other is the one coming +# from the rst2html5 package. These versions are subtly different, +# and the libvirt documentation can only be successfully generated +# using the docutils version. Every now and then, users will report +# build failures that can be traced back to having the wrong version +# installed. +# +# The only reliable way to tell the two binaris apart seems to be +# looking look at their version information: the docutils version +# will report +# +# rst2html5 (Docutils ..., Python ..., on ...) +# +# whereas the rst2html5 version will report +# +# rst2html5 ... (Docutils ..., Python ..., on ...) +# +# with the additional bit of information being the version number for +# the rst2html5 package itself. +# +# Use this knowledge to detect the version that we know doesn't work +# for building libvirt and reject it +rst2html5_version =3D run_command(rst2html5_prog, '--version') +rst2html5_version =3D rst2html5_version.stdout().split('(') +if rst2html5_version[0] !=3D 'rst2html5 ' + error('Please uninstall the rst2html5 package and install the docutils p= ackage') +endif =20 # optional programs =20 --=20 2.31.1