From nobody Sun May 5 21:03:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1628522069; cv=none; d=zohomail.com; s=zohoarc; b=YiPg6ph2K8dRZ8FNhJzij7nCsRGdrglVLQvGqvoKiD0n8a5hnFj99bExOAkR4ha40Ryo0tnPwLUb089jfSoen13AkbPRt54FsxBz6Dj44xGRDdUlAz6/hTXkLTpjmGrBUjStbtFros7GYp4mqabF08+0dfH962XVDYds8QiWxQA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628522069; 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=nAfZREC/9pNno/u3Bjorh1zJ9sWY90I06CgCohIQU+0=; b=PGpRoYD6o6Z7+ynAHBeW5KryKzxB56LQUHz+Pu83ipwcOIbkwbVSaSZYT9iFOExWlGizNHEtfBwi/WSrdVzjvuqqiKOE0wd6rKkyj9TJDJzBfoJwbOLHru4FHWXZG1odHBzeSMozx3DkRhqgxYSvsav4sD0GR+xiRm6Ga3NmKDk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1628522069572138.98537985118412; Mon, 9 Aug 2021 08:14:29 -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-347-Nw7z8Fm1PTmy8eqiKOF2KA-1; Mon, 09 Aug 2021 11:14:26 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 21F0D87180F; Mon, 9 Aug 2021 15:14:20 +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 7C29560C81; Mon, 9 Aug 2021 15:14:19 +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 A449F4BB7C; Mon, 9 Aug 2021 15:14:15 +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 179FDbfj030232 for ; Mon, 9 Aug 2021 11:13:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4188913950; Mon, 9 Aug 2021 15:13:37 +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 9FA4E17B73 for ; Mon, 9 Aug 2021 15:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628522068; 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=nAfZREC/9pNno/u3Bjorh1zJ9sWY90I06CgCohIQU+0=; b=e5Dsum4yv7S1aQ/ZaDsSiVEAUMRD0iX2I6xF+yThM1fJIzFERgVak7nWahbwNbrgIIy4fd QXiOjOsIbRDIfzzYD9S8Rd/pgda2OunEYrWcrWJ0L6SwBjT/MfZ5RZ2eocSG+6/C0vR1K9 Di8ytbwMHq8W0WFe6IeGrib0BSUZ/Po= X-MC-Unique: Nw7z8Fm1PTmy8eqiKOF2KA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] meson: Use 'rst2html5' instead of 'rst2html' everywhere Date: Mon, 9 Aug 2021 17:13:28 +0200 Message-Id: <20210809151329.73017-2-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.12 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: 1628522071132100003 Content-Type: text/plain; charset="utf-8" We only use the HTML5 version these days. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- docs/go/meson.build | 2 +- docs/kbase/meson.build | 2 +- docs/manpages/meson.build | 2 +- docs/meson.build | 8 ++++---- meson.build | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/go/meson.build b/docs/go/meson.build index d2accd322b..0ae0216ce3 100644 --- a/docs/go/meson.build +++ b/docs/go/meson.build @@ -12,7 +12,7 @@ foreach name : docs_go_files =20 html_xslt_gen +=3D { 'name': name, - 'file': docs_rst2html_gen.process(rst_file), + 'file': docs_rst2html5_gen.process(rst_file), 'source': 'docs' / 'go' / rst_file, } endforeach diff --git a/docs/kbase/meson.build b/docs/kbase/meson.build index 6d17a83d1d..8d8fd695ea 100644 --- a/docs/kbase/meson.build +++ b/docs/kbase/meson.build @@ -30,7 +30,7 @@ foreach name : docs_kbase_files =20 html_xslt_gen +=3D { 'name': name, - 'file': docs_rst2html_gen.process(rst_file), + 'file': docs_rst2html5_gen.process(rst_file), 'source': 'docs/kbase' / rst_file, } endforeach diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build index 0fa93fad89..fe91a43614 100644 --- a/docs/manpages/meson.build +++ b/docs/manpages/meson.build @@ -118,7 +118,7 @@ foreach data : docs_man_files html_in_file, input: rst_file, output: html_in_file, - command: [ rst2html_prog, '--stylesheet=3D', '--strict', '@INPUT@' ], + command: [ rst2html5_prog, '--stylesheet=3D', '--strict', '@INPUT@' ], capture: true, ) =20 diff --git a/docs/meson.build b/docs/meson.build index 4497f7270f..cbc138fa1f 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -183,8 +183,8 @@ docs_lxc_api_xml =3D docs_api_generated[1] docs_qemu_api_xml =3D docs_api_generated[2] docs_admin_api_xml =3D docs_api_generated[3] =20 -docs_rst2html_gen =3D generator( - rst2html_prog, +docs_rst2html5_gen =3D generator( + rst2html5_prog, output: '@BASENAME@.html.in', arguments: [ '--stylesheet=3D', '--strict', '@INPUT@' ], capture: true, @@ -215,7 +215,7 @@ foreach name : docs_rst_files rst_file =3D '@0@.rst'.format(name) html_xslt_gen +=3D { 'name': name, - 'file': docs_rst2html_gen.process(rst_file), + 'file': docs_rst2html5_gen.process(rst_file), 'source': 'docs' / rst_file, } endforeach @@ -252,7 +252,7 @@ html_xslt_gen +=3D { 'file': hvsupport_html_in, } =20 -news_html_in =3D docs_rst2html_gen.process(meson.source_root() / 'NEWS.rst= ') +news_html_in =3D docs_rst2html5_gen.process(meson.source_root() / 'NEWS.rs= t') html_xslt_gen +=3D { 'name': 'news', 'file': news_html_in, diff --git a/meson.build b/meson.build index e25dc17fc8..32ad688c9c 100644 --- a/meson.build +++ b/meson.build @@ -790,7 +790,7 @@ required_programs =3D [ =20 required_programs_groups =3D [ { 'name': 'rpcgen', 'prog': [ 'rpcgen', 'portable-rpcgen' ] }, - { 'name': 'rst2html', 'prog': [ 'rst2html5', 'rst2html5.py', 'rst2html5-= 3' ] }, + { 'name': 'rst2html5', 'prog': [ 'rst2html5', 'rst2html5.py', 'rst2html5= -3' ] }, { 'name': 'rst2man', 'prog': [ 'rst2man', 'rst2man.py', 'rst2man-3' ] }, ] =20 --=20 2.31.1 From nobody Sun May 5 21:03:31 2024 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 Reviewed-by: Pavel Hrdina --- 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