From nobody Sun Feb 8 10:03:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1594894446; cv=none; d=zohomail.com; s=zohoarc; b=JWD4G34CgDL3nze65qE38emKL9Q0AMRoPt1Llo5kTnsPOESDLDWHZBUFbK1E3yrfMkZIn3t54Cq3K9u33+LXcZgZBcw+b5r3hzvCChH8XfWHt1jw/aEVNebrgz4e3RISUj0BPuUIoN4gcf3+Z4SPGvbOI9idoxZmXqt4mktGTf8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594894446; 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=fCKzgvDA2JzZtMaNlxb7F5VVHXH7ebn5LrJLkj5+RaY=; b=W63qOnbCE11YZ7P0NEa1EB4QJsi93A+Az2e6pSuQtcIKiAykjVhbNvzsmxg0xFDlz1ay7L8hbqGPRbo7PjxEY5657WpXShOY+829zQDSemjPP6yvNaofcbCSBOywLO+1r/U3eTDKOTFmx7cfNvtZleglvEyJskict98s3S5ZjEY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 159489444613110.415977773577424; Thu, 16 Jul 2020 03:14:06 -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-32-ZSj5Z6i5NXiQLm043bqi2A-1; Thu, 16 Jul 2020 06:11:29 -0400 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 EE84C1888AA0; Thu, 16 Jul 2020 10:11:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C77A71001B07; Thu, 16 Jul 2020 10:11:23 +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 9053E181B9F7; Thu, 16 Jul 2020 10:11:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA7eFg021126 for ; Thu, 16 Jul 2020 06:07:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1F60F2DE96; Thu, 16 Jul 2020 10:07:40 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D5222DE6B for ; Thu, 16 Jul 2020 10:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594894444; 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=fCKzgvDA2JzZtMaNlxb7F5VVHXH7ebn5LrJLkj5+RaY=; b=Mwkr/Z2QZ2613VtOLeqWCsfzSUBHhvKs5PdKfmn2YGOsLQU/F/5HWuiUh8Zu8kePa6/Fwx whHfO4ghj+cS1ks8ZhbmAr0YZyw7+ix/PCVutkGoCCXsgHVrjJFt/VjWQ4NITbyRhUGq5d CiWERtb+Srs/f1zQc4okMzgT2m5Msk4= X-MC-Unique: ZSj5Z6i5NXiQLm043bqi2A-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 335/351] meson: docs/manpages: install man pages Date: Thu, 16 Jul 2020 11:59:31 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.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-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- docs/Makefile.am | 120 ----------------- docs/manpages/{index.rst =3D> index.rst.in} | 0 .../{libvirtd.rst =3D> libvirtd.rst.in} | 0 docs/manpages/meson.build | 126 ++++++++++++++++++ docs/manpages/{virsh.rst =3D> virsh.rst.in} | 0 .../{virt-admin.rst =3D> virt-admin.rst.in} | 0 ...validate.rst =3D> virt-host-validate.rst.in} | 0 ...ogin-shell.rst =3D> virt-login-shell.rst.in} | 0 ...-validate.rst =3D> virt-pki-validate.rst.in} | 0 ...virt-qemu-run.rst =3D> virt-qemu-run.rst.in} | 0 ...leanup.rst =3D> virt-sanlock-cleanup.rst.in} | 0 ...-validate.rst =3D> virt-xml-validate.rst.in} | 0 .../{virtlockd.rst =3D> virtlockd.rst.in} | 0 .../{virtlogd.rst =3D> virtlogd.rst.in} | 0 docs/meson.build | 1 + 15 files changed, 127 insertions(+), 120 deletions(-) rename docs/manpages/{index.rst =3D> index.rst.in} (100%) rename docs/manpages/{libvirtd.rst =3D> libvirtd.rst.in} (100%) create mode 100644 docs/manpages/meson.build rename docs/manpages/{virsh.rst =3D> virsh.rst.in} (100%) rename docs/manpages/{virt-admin.rst =3D> virt-admin.rst.in} (100%) rename docs/manpages/{virt-host-validate.rst =3D> virt-host-validate.rst.i= n} (100%) rename docs/manpages/{virt-login-shell.rst =3D> virt-login-shell.rst.in} (= 100%) rename docs/manpages/{virt-pki-validate.rst =3D> virt-pki-validate.rst.in}= (100%) rename docs/manpages/{virt-qemu-run.rst =3D> virt-qemu-run.rst.in} (100%) rename docs/manpages/{virt-sanlock-cleanup.rst =3D> virt-sanlock-cleanup.r= st.in} (100%) rename docs/manpages/{virt-xml-validate.rst =3D> virt-xml-validate.rst.in}= (100%) rename docs/manpages/{virtlockd.rst =3D> virtlockd.rst.in} (100%) rename docs/manpages/{virtlogd.rst =3D> virtlogd.rst.in} (100%) diff --git a/docs/Makefile.am b/docs/Makefile.am index d17455f135e..8fe0959bc2d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -16,129 +16,9 @@ ## License along with this library. If not, see ## . =20 -# Sync with src/util/ -KEYCODES =3D linux osx atset1 atset2 atset3 xtkbd usb win32 qnum -KEYNAMES =3D linux osx win32 - -manpages_rst =3D \ - manpages/index.rst \ - $(NULL) -manpages1_rst =3D \ - manpages/virt-pki-validate.rst \ - manpages/virt-xml-validate.rst \ - manpages/virt-admin.rst \ - manpages/virsh.rst \ - $(NULL) -manpages7_rst =3D \ - $(KEYCODES:%=3Dmanpages/virkeycode-%.rst) \ - $(KEYNAMES:%=3Dmanpages/virkeyname-%.rst) \ - $(NULL) -manpages8_rst =3D $(NULL) -manpages_rst +=3D \ - $(manpages1_rst) \ - $(manpages7_rst) \ - $(manpages8_rst) \ - $(NULL) -if WITH_LIBVIRTD -manpages8_rst +=3D \ - manpages/libvirtd.rst \ - manpages/virtlockd.rst \ - manpages/virtlogd.rst \ - $(NULL) -else ! WITH_LIBVIRTD -manpages_rst +=3D \ - manpages/libvirtd.rst \ - manpages/virtlockd.rst \ - manpages/virtlogd.rst \ - $(NULL) -endif ! WITH_LIBVIRTD -if WITH_HOST_VALIDATE - manpages1_rst +=3D manpages/virt-host-validate.rst -else ! WITH_HOST_VALIDATE - manpages_rst +=3D manpages/virt-host-validate.rst -endif ! WITH_HOST_VALIDATE -if WITH_LOGIN_SHELL - manpages1_rst +=3D manpages/virt-login-shell.rst -else ! WITH_LOGIN_SHELL - manpages_rst +=3D manpages/virt-login-shell.rst -endif ! WITH_LOGIN_SHELL -if WITH_SANLOCK - manpages8_rst +=3D manpages/virt-sanlock-cleanup.rst -else ! WITH_SANLOCK - manpages_rst +=3D manpages/virt-sanlock-cleanup.rst -endif ! WITH_SANLOCK -if WITH_QEMU - manpages1_rst +=3D manpages/virt-qemu-run.rst -else ! WITH_QEMU - manpages_rst +=3D manpages/virt-qemu-run.rst -endif ! WITH_QEMU -manpages_rst_html_in =3D \ - $(manpages_rst:%.rst=3D%.html.in) -manpages_html =3D \ - $(manpages_rst_html_in:%.html.in=3D%.html) - -man1_MANS =3D $(manpages1_rst:%.rst=3D%.1) -man7_MANS =3D $(manpages7_rst:%.rst=3D%.7) -man8_MANS =3D $(manpages8_rst:%.rst=3D%.8) - -%.1: %.rst - $(AM_V_GEN)$(MKDIR_P) `dirname $@` && \ - grep -v '^\.\. contents::' < $< | \ - sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \ - -e 's|RUNSTATEDIR|$(runstatedir)|g' | \ - $(RST2MAN) --strict > $@ || { rm $@ && exit 1; } - -%.7: %.rst - $(AM_V_GEN)$(MKDIR_P) `dirname $@` && \ - grep -v '^\.\. contents::' < $< | \ - sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \ - -e 's|RUNSTATEDIR|$(runstatedir)|g' | \ - $(RST2MAN) --strict > $@ || { rm $@ && exit 1; } - -%.8: %.rst - $(AM_V_GEN)$(MKDIR_P) `dirname $@` && \ - grep -v '^\.\. contents::' < $< | \ - sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \ - -e 's|RUNSTATEDIR|$(runstatedir)|g' | \ - $(RST2MAN) --strict > $@ || { rm $@ && exit 1; } - -manpages/virkeycode-%.rst: $(top_srcdir)/src/keycodemapdb/data/keymaps.csv= \ - $(top_srcdir)/src/keycodemapdb/tools/keymap-gen Makefile.am - $(AM_V_GEN)export NAME=3D`echo $@ | \ - sed -e 's,manpages/virkeycode-,,' -e 's,\.rst,,'` && \ - $(MKDIR_P) manpages/ && \ - $(RUNUTF8) $(PYTHON) $(top_srcdir)/src/keycodemapdb/tools/keymap-gen \ - code-docs \ - --lang rst \ - --title "virkeycode-$$NAME" \ - --subtitle "Key code values for $$NAME" \ - $(top_srcdir)/src/keycodemapdb/data/keymaps.csv $$NAME > $@ - -manpages/virkeyname-%.rst: $(top_srcdir)/src/keycodemapdb/data/keymaps.csv= \ - $(top_srcdir)/src/keycodemapdb/tools/keymap-gen Makefile.am - $(AM_V_GEN)export NAME=3D`echo $@ | \ - sed -e 's,manpages/virkeyname-,,' -e 's,\.rst,,'` && \ - $(MKDIR_P) manpages/ && \ - $(RUNUTF8) $(PYTHON) $(top_srcdir)/src/keycodemapdb/tools/keymap-gen \ - name-docs \ - --lang rst \ - --title "virkeyname-$$NAME" \ - --subtitle "Key name values for $$NAME" \ - $(top_srcdir)/src/keycodemapdb/data/keymaps.csv $$NAME > $@ - -manpagesdir =3D $(HTML_DIR)/manpages -manpages_DATA =3D $(manpages_html) - schemadir =3D $(pkgdatadir)/schemas schema_DATA =3D $(wildcard $(srcdir)/schemas/*.rng) =20 -manpages/%.html.in: manpages/%.rst - $(AM_V_GEN)$(MKDIR_P) `dirname $@` && \ - grep -v '^:Manual ' < $< | \ - sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \ - -e 's|RUNSTATEDIR|$(runstatedir)|g' | \ - $(RST2HTML) --strict > $@ || { rm $@ && exit 1; } - check-html: $(XMLLINT) --nonet --noout html/*.html =20 diff --git a/docs/manpages/index.rst b/docs/manpages/index.rst.in similarity index 100% rename from docs/manpages/index.rst rename to docs/manpages/index.rst.in diff --git a/docs/manpages/libvirtd.rst b/docs/manpages/libvirtd.rst.in similarity index 100% rename from docs/manpages/libvirtd.rst rename to docs/manpages/libvirtd.rst.in diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build new file mode 100644 index 00000000000..72d362e92d8 --- /dev/null +++ b/docs/manpages/meson.build @@ -0,0 +1,126 @@ +# docs_man_files +# each entry is a dictionary with following items: +# name - man page name (required) +# section - man page section (required) +# install - whether to build and install the man page (required) +# file - generated RST file (optional, default none) + +docs_man_files =3D [ + { 'name': 'index', 'section': '', 'install': false }, + + { 'name': 'virsh', 'section': '1', 'install': true }, + { 'name': 'virt-admin', 'section': '1', 'install': true }, + { 'name': 'virt-host-validate', 'section': '1', 'install': conf.has('WIT= H_HOST_VALIDATE') }, + { 'name': 'virt-login-shell', 'section': '1', 'install': conf.has('WITH_= LOGIN_SHELL') }, + { 'name': 'virt-pki-validate', 'section': '1', 'install': true }, + { 'name': 'virt-qemu-run', 'section': '1', 'install': conf.has('WITH_QEM= U') }, + { 'name': 'virt-xml-validate', 'section': '1', 'install': true }, + + { 'name': 'libvirtd', 'section': '8', 'install': conf.has('WITH_LIBVIRTD= ') }, + { 'name': 'virt-sanlock-cleanup', 'section': '8', 'install': sanlock_dep= .found() }, + { 'name': 'virtlockd', 'section': '8', 'install': conf.has('WITH_LIBVIRT= D') }, + { 'name': 'virtlogd', 'section': '8', 'install': conf.has('WITH_LIBVIRTD= ') }, +] + +foreach name : keycode_list + rst_file =3D custom_target( + 'virkeycode-@0@.rst'.format(name), + input: keymap_src_file, + output: 'virkeycode-@0@.rst'.format(name), + command: [ + meson_python_prog, python3_prog, keymap_gen_prog, 'code-docs', + '--lang', 'rst', + '--title', 'virkeycode-@0@'.format(name), + '--subtitle', 'Key code values for @0@'.format(name), + '@INPUT@', name, + ], + capture: true, + build_by_default: true, + ) + + docs_man_files +=3D { + 'name': 'virkeycode-@0@'.format(name), 'section': '7', 'install': true= , 'file': rst_file, + } +endforeach + +foreach name : keyname_list + rst_file =3D custom_target( + 'virkeyname-@0@.rst'.format(name), + input: keymap_src_file, + output: 'virkeyname-@0@.rst'.format(name), + command: [ + meson_python_prog, python3_prog, keymap_gen_prog, 'name-docs', + '--lang', 'rst', + '--title', 'virkeyname-@0@'.format(name), + '--subtitle', 'Key name values for @0@'.format(name), + '@INPUT@', name, + ], + capture: true, + build_by_default: true, + ) + + docs_man_files +=3D { + 'name': 'virkeyname-@0@'.format(name), 'section': '7', 'install': true= , 'file': rst_file, + } +endforeach + +docs_man_conf =3D configuration_data() +docs_man_conf.set('SYSCONFDIR', sysconfdir) +docs_man_conf.set('RUNSTATEDIR', runstatedir) + +foreach data : docs_man_files + rst_in_file =3D '@0@.rst.in'.format(data['name']) + html_in_file =3D '@0@.html.in'.format(data['name']) + html_file =3D '@0@.html'.format(data['name']) + + if data.has_key('file') + rst_file =3D data['file'] + else + rst_file =3D configure_file( + input: rst_in_file, + output: '@0@.rst'.format(data['name']), + configuration: docs_man_conf, + ) + endif + + if data['install'] + man_file =3D '@0@.@1@'.format(data['name'], data['section']) + man_page =3D custom_target( + man_file, + input: rst_file, + output: man_file, + command: [ rst2man_prog, '--strict', '@INPUT@', '@OUTPUT@' ], + install: true, + install_dir: mandir / 'man@0@'.format(data['section']), + ) + endif + + html_in =3D custom_target( + html_in_file, + input: rst_file, + output: html_in_file, + command: [ rst2html_prog, '--strict', '@INPUT@' ], + capture: true, + ) + + custom_target( + html_file, + input: html_in, + output: html_file, + command: [ + meson_python_prog, + meson_html_gen_prog, + xsltproc_prog.path(), + xmllint_prog.path(), + meson.build_root(), + docs_timestamp, + site_xsl, + '@INPUT@', + '@OUTPUT@', + ], + depends: [ aclperms_gen ], + depend_files: [ page_xsl ], + install: true, + install_dir: docs_html_dir / 'manpages', + ) +endforeach diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst.in similarity index 100% rename from docs/manpages/virsh.rst rename to docs/manpages/virsh.rst.in diff --git a/docs/manpages/virt-admin.rst b/docs/manpages/virt-admin.rst.in similarity index 100% rename from docs/manpages/virt-admin.rst rename to docs/manpages/virt-admin.rst.in diff --git a/docs/manpages/virt-host-validate.rst b/docs/manpages/virt-host= -validate.rst.in similarity index 100% rename from docs/manpages/virt-host-validate.rst rename to docs/manpages/virt-host-validate.rst.in diff --git a/docs/manpages/virt-login-shell.rst b/docs/manpages/virt-login-= shell.rst.in similarity index 100% rename from docs/manpages/virt-login-shell.rst rename to docs/manpages/virt-login-shell.rst.in diff --git a/docs/manpages/virt-pki-validate.rst b/docs/manpages/virt-pki-v= alidate.rst.in similarity index 100% rename from docs/manpages/virt-pki-validate.rst rename to docs/manpages/virt-pki-validate.rst.in diff --git a/docs/manpages/virt-qemu-run.rst b/docs/manpages/virt-qemu-run.= rst.in similarity index 100% rename from docs/manpages/virt-qemu-run.rst rename to docs/manpages/virt-qemu-run.rst.in diff --git a/docs/manpages/virt-sanlock-cleanup.rst b/docs/manpages/virt-sa= nlock-cleanup.rst.in similarity index 100% rename from docs/manpages/virt-sanlock-cleanup.rst rename to docs/manpages/virt-sanlock-cleanup.rst.in diff --git a/docs/manpages/virt-xml-validate.rst b/docs/manpages/virt-xml-v= alidate.rst.in similarity index 100% rename from docs/manpages/virt-xml-validate.rst rename to docs/manpages/virt-xml-validate.rst.in diff --git a/docs/manpages/virtlockd.rst b/docs/manpages/virtlockd.rst.in similarity index 100% rename from docs/manpages/virtlockd.rst rename to docs/manpages/virtlockd.rst.in diff --git a/docs/manpages/virtlogd.rst b/docs/manpages/virtlogd.rst.in similarity index 100% rename from docs/manpages/virtlogd.rst rename to docs/manpages/virtlogd.rst.in diff --git a/docs/meson.build b/docs/meson.build index 17c8f956870..a03beb86b77 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -290,6 +290,7 @@ subdir('internals') subdir('js') subdir('kbase') subdir('logos') +subdir('manpages') =20 =20 # This hack enables us to view the web pages --=20 2.26.2