From nobody Sun Feb 8 18:09:10 2026 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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=1676890046; cv=none; d=zohomail.com; s=zohoarc; b=XyaJIThQ8fCDQwLoamduwzAwzTxqZVLlyszVRjWKi2cSEDmVVTIqXLosfZIdq11pNUO7DdevcRvTPq7Z/EhQ8iPbgzE2TaNOY1VzFq3DYZBrj9IW1ce1j65081iEE08/tVQlUqOvKr2d42r2CbeiQpol5tD1veuZuOIbG56+wKE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676890046; 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=15TrZTYue7+w8aiX4gxL9uLF4YgxhcJ0SNrSqsyo69w=; b=dwoEj6guVuQOMULA5D0wLEXzhHHuDnzV9anretfPQ/mQIQhqiRUIz3WoGeSPCgaHDFtgSrMwsr7cbmXAV5MV9wvDzxVEHhsPJZkoTizoLIZGoSO8xLK5QGMVhry77kS+O1WWsNg3/x5hfJL47/XqMU5xPXGxNP1YU58LTQylTFc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1676890046095178.6065482110273; Mon, 20 Feb 2023 02:47:26 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-399-loU31VY0MOGuvaF0xqEggQ-1; Mon, 20 Feb 2023 05:47:21 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EB305802D35; Mon, 20 Feb 2023 10:47:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B6955492B05; Mon, 20 Feb 2023 10:47:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 972891946588; Mon, 20 Feb 2023 10:47:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E59E71946587 for ; Mon, 20 Feb 2023 10:47:15 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C7C87492B07; Mon, 20 Feb 2023 10:47:15 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 28ABB492B05 for ; Mon, 20 Feb 2023 10:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676890045; 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=15TrZTYue7+w8aiX4gxL9uLF4YgxhcJ0SNrSqsyo69w=; b=FJfRL0MHjlulyuc5ndRyXmSOqB5lrtasgz6xj4LLOFJfP2MnXF7gT0zX3l4ucTG8Fi8YkB RyqqGq3/ut4IDyG9JQpLMAU2U/pAYMrCv6T9f4VzhDglq1dKhCDE6A9mwrqYwHKbXAw9XS gRon0M2ffAP7seVS9CS/N56ulHqfhxI= X-MC-Unique: loU31VY0MOGuvaF0xqEggQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/6] docs/html: Properly generate ACL permissions into API reference Date: Mon, 20 Feb 2023 11:47:07 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: 1676890047534100004 Content-Type: text/plain; charset="utf-8" The 'newapi.xsl' stylesheet was referencing non-existing paths to the XML files holding ACL permission flags for individual APIs. Additionally the 'document()' XSL function doesn't even allow concatenation of the path as it was done via '{$builddir}/src..', but requires either direct argument or use of the 'concat()' function. This meant that the 'acls' variable was always empty and thus none of our API documentation was actually generated with the 'acl' section. Fix it by passing the path to the XML via an argument to the stylesheet as the files differ based on which document is being generated. Since the 'admin' API does not have ACL we need to handle it separately now in the build system. Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/html/meson.build | 32 +++++++++++++++++++++++++++++++- docs/newapi.xsl | 12 +++++------- src/access/meson.build | 4 ++++ 3 files changed, 40 insertions(+), 8 deletions(-) diff --git a/docs/html/meson.build b/docs/html/meson.build index b18a8ccb5f..4e818f9142 100644 --- a/docs/html/meson.build +++ b/docs/html/meson.build @@ -27,12 +27,14 @@ index_api_gen =3D custom_target( command: [ xsltproc_prog, '--nonet', '-o', docs_builddir, '--stringparam', 'builddir', meson.project_build_root(), + '--stringparam', 'aclxmlpath', docs_acl_xml.full_path(), '--stringparam', 'timestamp', docs_timestamp, '--stringparam', 'indexfile', 'index.html', '@INPUT@', ], install: true, install_dir: docs_html_dir / 'html', + depends: docs_acl_xml, depend_files: [ page_xsl, ], @@ -41,7 +43,7 @@ index_api_gen =3D custom_target( docs_html_gen +=3D index_api_gen.to_list() docs_html_dep +=3D index_api_gen -foreach name : [ 'admin', 'lxc', 'qemu' ] +foreach name : [ 'lxc', 'qemu' ] index_api_gen =3D custom_target( 'index-@0@-api'.format(name), input: [ @@ -54,11 +56,13 @@ foreach name : [ 'admin', 'lxc', 'qemu' ] command: [ xsltproc_prog, '--nonet', '-o', docs_builddir, '--stringparam', 'builddir', meson.project_build_root(), + '--stringparam', 'aclxmlpath', get_variable('docs_acl_@0@_xml'.forma= t(name)).full_path(), '--stringparam', 'timestamp', docs_timestamp, '@INPUT@', ], install: true, install_dir: docs_html_dir / 'html', + depends: get_variable('docs_acl_@0@_xml'.format(name)), depend_files: [ page_xsl, ], @@ -68,6 +72,32 @@ foreach name : [ 'admin', 'lxc', 'qemu' ] docs_html_dep +=3D index_api_gen endforeach +index_api_gen =3D custom_target( + 'index-admin-api'.format(name), + input: [ + newapi_xsl, + docs_admin_api_xml, + ], + output: [ + 'libvirt-libvirt-admin.html' + ], + command: [ + xsltproc_prog, '--nonet', '-o', docs_builddir, + '--stringparam', 'builddir', meson.project_build_root(), + '--stringparam', 'aclxmlpath', '', + '--stringparam', 'timestamp', docs_timestamp, + '@INPUT@', + ], + install: true, + install_dir: docs_html_dir / 'html', + depend_files: [ + page_xsl, + ], + ) + +docs_html_gen +=3D index_api_gen.to_list() +docs_html_dep +=3D index_api_gen + docs_html_paths =3D [] install_web_deps +=3D docs_html_dep diff --git a/docs/newapi.xsl b/docs/newapi.xsl index 3de603bb00..cc3ec681b7 100644 --- a/docs/newapi.xsl +++ b/docs/newapi.xsl @@ -24,18 +24,16 @@ + + html ../ - - - - - - - + + + diff --git a/src/access/meson.build b/src/access/meson.build index 07fd7d372e..0b12581dc1 100644 --- a/src/access/meson.build +++ b/src/access/meson.build @@ -74,6 +74,10 @@ foreach name : [ 'remote', 'qemu', 'lxc' ] ) endforeach +docs_acl_xml =3D access_gen_xml[0] +docs_acl_qemu_xml =3D access_gen_xml[1] +docs_acl_lxc_xml =3D access_gen_xml[2] + if conf.has('WITH_POLKIT') access_sources +=3D access_polkit_sources --=20 2.39.2