From nobody Sat Apr 20 07:27:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=nutanix.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1642068441605283.71481670107414; Thu, 13 Jan 2022 02:07:21 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-505-TPojKhQ9MwKQD_B59KbzGw-1; Thu, 13 Jan 2022 05:07:16 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C2FBD10144EE; Thu, 13 Jan 2022 10:07:10 +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 9F78C1059A7C; Thu, 13 Jan 2022 10:07:10 +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 6F2CC4A71C; Thu, 13 Jan 2022 10:07:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20D8f8Nb023052 for ; Thu, 13 Jan 2022 03:41:09 -0500 Received: by smtp.corp.redhat.com (Postfix) id C159453DB; Thu, 13 Jan 2022 08:41:08 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B9A4E53D6 for ; Thu, 13 Jan 2022 08:41:05 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7BB3438011EA for ; Thu, 13 Jan 2022 08:41:05 +0000 (UTC) Received: from mx0a-002c1b01.pphosted.com (mx0a-002c1b01.pphosted.com [148.163.151.68]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-516-p0Nw9raXO5S8HOgfN14ueg-1; Thu, 13 Jan 2022 03:41:03 -0500 Received: from pps.filterd (m0127838.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20D5SulV018612 for ; Thu, 13 Jan 2022 00:41:02 -0800 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3dhdfakxt2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 13 Jan 2022 00:41:02 -0800 Received: from CY4PR0201MB3460.namprd02.prod.outlook.com (2603:10b6:910:91::14) by BL0PR02MB5651.namprd02.prod.outlook.com (2603:10b6:208:85::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 08:41:00 +0000 Received: from CY4PR0201MB3460.namprd02.prod.outlook.com ([fe80::9c6c:b86b:be1:d583]) by CY4PR0201MB3460.namprd02.prod.outlook.com ([fe80::9c6c:b86b:be1:d583%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:41:00 +0000 X-MC-Unique: TPojKhQ9MwKQD_B59KbzGw-1 X-MC-Unique: p0Nw9raXO5S8HOgfN14ueg-1 From: Ivan Teterevkov To: libvir-list@redhat.com Subject: [PATCH] meson: Detect rst2html5 and rst2man only when needed Date: Thu, 13 Jan 2022 08:40:56 +0000 Message-Id: <20220113084056.57038-1-ivan.teterevkov@nutanix.com> X-ClientProxiedBy: BY3PR05CA0007.namprd05.prod.outlook.com (2603:10b6:a03:254::12) To CY4PR0201MB3460.namprd02.prod.outlook.com (2603:10b6:910:91::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 06ec76bc-e9dd-457c-8d8f-08d9d6706cce X-MS-TrafficTypeDiagnostic: BL0PR02MB5651:EE_ X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: r78gMdRtd42Uz5pubpu648QpOFB7XmXa08krPDyXCRcdki+tHvLQtZQ4SdUCN0nreB6P17Wxg0VBTnyiHeB0ty7Wwkhlecddrxxfp5IAB4fpK1Wn6DWqyItiEse8QcYZomQjbqCTY/HRIjAqDJj6tgu9Y//RHRpNz62jHF1eQ4IXQQ2vNm41Hn5RJI/eyD5GWTZssD4Uq+8UpTpfM2gLPce0/HLwyszq30F0VBDn4DTmDyG5CFrNMJ/8Miag/Mh61EzQqFNadzkj28YQszU8GrM5q5rPrTYG7etWnByzkvGvPeuvJ0tsgzrAs6fSalI3bzI9YreLe+KlXBAxHLwNdcP9M793bsbDNxXexhpp6xw9c+hxUvOdresUd9X/9dhubEc0t/iqvVI75g6dMePx+0YyalTmRJvoovPe3hX/iwXdfY//ktNkqjOgU5+pE3Jw172IbRPCprdfNFu/Xd7YfuKSiINSaGIUZ9IBmaYftZEpMEtpqFhoxNvu5wHRydZWWl+F/d/XW7oyrq98nZGtEddPlflLXbiw6kXERAr4SpnNMD+et2aZ/OxQ0zmM5WsmtdP4HrspmK36410Hk0c74pK4N1nZZvKjLGVaI5ehCL6xkhEMx5hBoe+xdImjFeUQtp4ZwYBrLapieV+p6IU957pbuB7ahuM80Wlt6lAnOj3FxF8fTUCAIVTps9lTiOIEsTEbQQy5ACR3T5zojQvfmw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR0201MB3460.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(5660300002)(6916009)(2906002)(66476007)(66556008)(38350700002)(44832011)(38100700002)(8936002)(66946007)(6506007)(508600001)(8676002)(1076003)(2616005)(83380400001)(6512007)(36756003)(26005)(107886003)(316002)(86362001)(52116002)(186003)(4326008)(6666004)(6486002); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?1IVQiOeSJlVm0+mbTR3+MOmAfOuQxIIPU5KOJl6v3HEOYusAMkmwtkOAdzBU?= =?us-ascii?Q?UZLvvicEETnWGywjDQIUfqMt8NPfoBC8D787BOVJNZIwcl9nuPgw+pKFgsLU?= =?us-ascii?Q?cPMqC3tIl2lKP96RMoWZenkWWAFJQ5pX+UnlkDx52uPqrRxRcI7mn40LzpVh?= =?us-ascii?Q?WDhdRi298Ap4KApg81mNSeHdkyu2T/hy4iutDUET8UBkdCnflgGCFr6d+ZDP?= =?us-ascii?Q?sEnpbVY2gdUv6tm1qNbJj4UKbU5WJLmdclh6CH58h7rvY4v3WOpm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QNW9mLEkfeJUYIDoIrV1PdBrkVnPLZQ/QGxMd7Uq3Ab?= =?us-ascii?Q?+KhwC1unmG9I8dGosNethxw8ymTMYMCMWePP/A8tGPWc05bT/Z5ECin2FFK8?= =?us-ascii?Q?lJsz185zGLNKE5svYbSD1ob1rJlhu5YvPh33CfxmI9ezlPGOPTxkpNf0GM2z?= =?us-ascii?Q?L61R2mmIIffRSejffzaEm6chCAS+OAOsyggoLiUkOcpYn8IDUJxd8XMy9bqa?= =?us-ascii?Q?o6dei0gNZhyR1M+UoDNaZOJhxcBKbaoum/pNAZQGjYH79EAacBR89WFq/qrT?= =?us-ascii?Q?UmwQRSw7NPjle7IUirnz0uUHwSXkolQJXHpHgUVdwF+gv+eS1gLwvQVmQNem?= =?us-ascii?Q?VMbNhZsOvIkbqefxjCeia/Cc2wkvC7vDmDxX4CdtdZQXyxah02ROmLQrVGuK?= =?us-ascii?Q?fj+GyAlK2QtxagVAi2KfSVju3grzHMtQRsy5XTcFcixgpMfo22b6zJ3VdOvq?= =?us-ascii?Q?2fzohbETKNxMfQ6fJNvGgl2kOX+cx1JjlGxQSxEfTRv90anaSOfh7tQJniMH?= =?us-ascii?Q?IJ8vDXRNEsccs3CrzbTT8KueWSw=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06ec76bc-e9dd-457c-8d8f-08d9d6706cce X-MS-Exchange-CrossTenant-AuthSource: CY4PR0201MB3460.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:41:00.0886 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BVbH/usTFE9U5zK5gOsOldfpoufritRMJKai0aBaDYDmIw2aKhMcH806zsZaoqg+0r5DBbJJE3CDDaGmwA3lso2UU33Ig1nGFMLCzBhUjTQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB5651 X-Proofpoint-ORIG-GUID: 3TpHKjAjF_Gj73OrFCi7BWMZoZcSeBBT X-Proofpoint-GUID: 3TpHKjAjF_Gj73OrFCi7BWMZoZcSeBBT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205, Aquarius:18.0.790, Hydra:6.0.425, FMLib:17.11.62.513 definitions=2022-01-13_02,2022-01-11_01,2021-12-02_01 X-Proofpoint-Spam-Reason: safe X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Thu, 13 Jan 2022 04:58:07 -0500 Cc: Ivan Teterevkov 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.84 on 10.5.11.22 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-ZM-MESSAGEID: 1642068443365100001 Content-Type: text/plain; charset="utf-8" Detect these commands in docs/meson.build, i.e. only when users enable documentation. Signed-off-by: Ivan Teterevkov --- docs/meson.build | 41 +++++++++++++++++++++++++++++++++++++++++ meson.build | 31 ------------------------------- 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/docs/meson.build b/docs/meson.build index 3e912f21ad..50c12cc3c2 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -171,6 +171,47 @@ 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_programs_groups =3D [ + { 'name': 'rst2html5', 'prog': [ 'rst2html5', 'rst2html5.py', 'rst2html5= -3' ] }, + { 'name': 'rst2man', 'prog': [ 'rst2man', 'rst2man.py', 'rst2man-3' ] }, +] + +foreach item : docs_programs_groups + prog =3D find_program(item.get('prog'), dirs: libvirt_sbin_path) + varname =3D item.get('name').underscorify() + conf.set_quoted(varname.to_upper(), prog.path()) + set_variable('@0@_prog'.format(varname), prog) +endforeach + +# 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 binaries 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[1] !=3D '(Docutils' + error('Please uninstall the rst2html5 package and install the docutils p= ackage') +endif + docs_rst2html5_gen =3D generator( rst2html5_prog, output: '@BASENAME@.html.in', diff --git a/meson.build b/meson.build index 214a3f05eb..0d98f13d5e 100644 --- a/meson.build +++ b/meson.build @@ -788,8 +788,6 @@ required_programs =3D [ =20 required_programs_groups =3D [ { 'name': 'rpcgen', 'prog': [ 'rpcgen', 'portable-rpcgen' ] }, - { 'name': 'rst2html5', 'prog': [ 'rst2html5', 'rst2html5.py', 'rst2html5= -3' ] }, - { 'name': 'rst2man', 'prog': [ 'rst2man', 'rst2man.py', 'rst2man-3' ] }, ] =20 if host_machine.system() =3D=3D 'freebsd' @@ -810,35 +808,6 @@ 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 binaries 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[1] !=3D '(Docutils' - error('Please uninstall the rst2html5 package and install the docutils p= ackage') -endif - # optional programs =20 optional_programs =3D [ --=20 2.35.0-rc0