From nobody Sun Feb 8 19:21:07 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=1676890085; cv=none; d=zohomail.com; s=zohoarc; b=lizpXZpIxssxZM6Q40UL5At9gnYeRFvZSR5XYyuR8npmjq58Lu4Y3ZDNiE3BKOGl0J9ju6zQk44qvKbNvowZpu9/ruNhPm9pbcm2fuBrxO4YgTvsXIwjDoz5PPXPg8T4bmG7aJLSNOCNOyoWQPlu7hU4+cAheEHnDnA45Vzab9o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676890085; 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=Sq89pncwGv6MWJoASoI4G5jiH4qwhxm+pl9lN5coVds=; b=X6ziQzLdFKACClZNb4rOtRqJAhKiG6Y3NZEsXd3h50w0zOgDOnnpro5Nl68CoFP9gUGVlTTNOo1eDbLORofPPjzxzLe0L3rjzJgbg8L6TD6C56CUYSHy0misuleP0GcMe/k+p2Iu1xFkH0PPYdrc8jzfO8JaP7TaL3OcbDYZf3Q= 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 1676890085386284.91229975332976; Mon, 20 Feb 2023 02:48:05 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-477-P67D8ifSPpiBluk4gLbNeQ-1; Mon, 20 Feb 2023 05:47:22 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3FC54382C966; Mon, 20 Feb 2023 10:47:19 +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 2914EC15BA0; Mon, 20 Feb 2023 10:47:19 +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 CB8A419465A8; 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 513A81946587 for ; Mon, 20 Feb 2023 10:47:17 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 47297492B05; Mon, 20 Feb 2023 10:47:17 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id B927B492B06 for ; Mon, 20 Feb 2023 10:47:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676890084; 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=Sq89pncwGv6MWJoASoI4G5jiH4qwhxm+pl9lN5coVds=; b=au9Hb2rGEUb/BrxllAaHBuf4u/MwqKiVM4QMtPZv/WpgYuznsJ4V2537PAIJVta4zqZa9B WjpS9igIFFupgOyJCr4dHZ/MORhc+W54PV8DNY3o5w9OfS8UPGap2DYvZILk6XuzsHkKt5 1TF/74x8hE4GSJzcaKgsJR2W78GdVdo= X-MC-Unique: P67D8ifSPpiBluk4gLbNeQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 5/6] docs: Distribute the XMLs with ACL permission flags for APIs Date: Mon, 20 Feb 2023 11:47:08 +0100 Message-Id: <032e1c3502f35df65d9b1244cf9218467bad2fdd.1676889902.git.pkrempa@redhat.com> 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.8 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: 1676890085873100002 Content-Type: text/plain; charset="utf-8" Similarly to the API XML we can distribute the ACL permissions for the APIs so that users who are potentially interested into the data don't have to scrape our web. Signed-off-by: Peter Krempa --- docs/meson.build | 27 +++++++++++++++++++++++++++ libvirt.spec.in | 3 +++ src/access/meson.build | 17 ----------------- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/docs/meson.build b/docs/meson.build index a90c59866a..08bf75e329 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -168,6 +168,33 @@ 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] +access_gen_xml =3D [] + +foreach name : [ 'remote', 'qemu', 'lxc' ] + if name =3D=3D 'remote' + xml_file =3D 'libvirt_access.xml' + else + xml_file =3D 'libvirt_access_@0@.xml'.format(name) + endif + protocol_file =3D remote_path / '@0@_protocol.x'.format(name) + + access_gen_xml +=3D custom_target( + xml_file, + input: protocol_file, + output: xml_file, + capture: true, + command: [ + gendispatch_prog, '--mode=3Daclapi', name, name.to_upper(), '@INPUT@= ', + ], + install: true, + install_dir: pkgdatadir / 'api', + ) +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] + docs_programs_groups =3D [ { 'name': 'rst2html5', 'prog': [ 'rst2html5', 'rst2html5.py', 'rst2html5= -3' ] }, { 'name': 'rst2man', 'prog': [ 'rst2man', 'rst2man.py', 'rst2man-3' ] }, diff --git a/libvirt.spec.in b/libvirt.spec.in index e795b98d48..df625a0db4 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -2333,6 +2333,9 @@ exit 0 %{_datadir}/libvirt/api/libvirt-admin-api.xml %{_datadir}/libvirt/api/libvirt-qemu-api.xml %{_datadir}/libvirt/api/libvirt-lxc-api.xml +%{_datadir}/libvirt/api/libvirt_access.xml +%{_datadir}/libvirt/api/libvirt_access_qemu.xml +%{_datadir}/libvirt/api/libvirt_access_lxc.xml %if %{with_mingw} %files -n mingw32-libvirt -f mingw32-libvirt.lang diff --git a/src/access/meson.build b/src/access/meson.build index 0b12581dc1..842f37a4b6 100644 --- a/src/access/meson.build +++ b/src/access/meson.build @@ -16,19 +16,16 @@ remote_path =3D meson.project_source_root() / 'src' / '= remote' access_gen_headers =3D [] access_gen_sources =3D [] access_gen_sym =3D [] -access_gen_xml =3D [] foreach name : [ 'remote', 'qemu', 'lxc' ] if name =3D=3D 'remote' header_file =3D 'viraccessapicheck.h' source_file =3D 'viraccessapicheck.c' syms_file =3D 'libvirt_access.syms' - xml_file =3D 'libvirt_access.xml' else header_file =3D 'viraccessapicheck@0@.h'.format(name) source_file =3D 'viraccessapicheck@0@.c'.format(name) syms_file =3D 'libvirt_access_@0@.syms'.format(name) - xml_file =3D 'libvirt_access_@0@.xml'.format(name) endif protocol_file =3D remote_path / '@0@_protocol.x'.format(name) @@ -62,22 +59,8 @@ foreach name : [ 'remote', 'qemu', 'lxc' ] gendispatch_prog, '--mode=3Daclsym', name, name.to_upper(), '@INPUT@= ', ] ) - - access_gen_xml +=3D custom_target( - xml_file, - input: protocol_file, - output: xml_file, - capture: true, - command: [ - gendispatch_prog, '--mode=3Daclapi', name, name.to_upper(), '@INPUT@= ', - ], - ) 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