From nobody Fri May 3 19:36:21 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=1639152561; cv=none; d=zohomail.com; s=zohoarc; b=HSPbEKl8gfUgePVRPMoid+WHGtBpVO2f+GsoiV6YpFOtT/YcNA01vYsv7KBq4eCSUkD5Al9AWxFXtiH0x+67zZfUUOouy7JXDK14b8G8NYOYVWAJ4rkK5i33MK9QvPPheQ6JVuVnV/dP19VTt9L8ORK8jeOCzbbt1I9pwOLGML0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639152561; 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=cbQxoqKgDYUv84B71ql93OhMtPbvm7nHkz9F1YuyNOc=; b=QWv+A56yhzaSPZbV8EdZgv5YC1ptEtdxFSYiObQ/il95IJ4iURYsvmX/t/pUMSRhLpli6Zq2+bxIUVfDvP/fagh3a732OhCUNl010WhIl3MvlhcBG9z5Y2PmpGET8zFQTz6ujmrkqJH7PqC+ECCqMJM7NhDaX5UF6i6tQCPNfyI= 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 1639152561529439.93148741354014; Fri, 10 Dec 2021 08:09: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-600-ADAj59qbP4aSS8OEAmHHkg-1; Fri, 10 Dec 2021 11:09:18 -0500 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 3257581CCB4; Fri, 10 Dec 2021 16:09:12 +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 0977B78C2B; Fri, 10 Dec 2021 16:09:11 +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 8A2F14A707; Fri, 10 Dec 2021 16:09:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BAG6jQS015336 for ; Fri, 10 Dec 2021 11:06:45 -0500 Received: by smtp.corp.redhat.com (Postfix) id CFD274ABA2; Fri, 10 Dec 2021 16:06:45 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.194.89]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B0E5660622 for ; Fri, 10 Dec 2021 16:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639152560; 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=cbQxoqKgDYUv84B71ql93OhMtPbvm7nHkz9F1YuyNOc=; b=SOH0vjzfvre+nEAzZvpQQGm6+mbLVVF60e7ZaavcNPk4bBUxJNZR4hZeMwJcR00cK0cekv R+ChIuLs542IqUc8hksSbay8cjhh1PFUV8VFmkxDhi7jEKaYkzSPieXu/SB5iAbbCTtEFO EoR1lduPDHeYTrmE1QWWg0qY1kjJWTM= X-MC-Unique: ADAj59qbP4aSS8OEAmHHkg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/6] virt-ssh-helper: Don't use optind Date: Fri, 10 Dec 2021 17:06:29 +0100 Message-Id: <20211210160634.366061-2-abologna@redhat.com> In-Reply-To: <20211210160634.366061-1-abologna@redhat.com> References: <20211210160634.366061-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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: 1639152563309100003 Content-Type: text/plain; charset="utf-8" It's a getopt interface and we're not using getopt, at least directly, so even though it works relying on it feels wrong. GOption takes care of removing any trace of the arguments it consumes from argc and argv, leaving behind only non-option arguments, so we can just use those standard variables. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- src/remote/remote_ssh_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/remote/remote_ssh_helper.c b/src/remote/remote_ssh_helper.c index 0945b90331..092676dd74 100644 --- a/src/remote/remote_ssh_helper.c +++ b/src/remote/remote_ssh_helper.c @@ -395,12 +395,12 @@ int main(int argc, char **argv) /* Initialize the log system */ virLogSetFromEnv(); =20 - if (optind !=3D (argc - 1)) { + if (argc !=3D 2) { g_printerr("%s: expected a URI\n", argv[0]); exit(EXIT_FAILURE); } =20 - uri_str =3D argv[optind]; + uri_str =3D argv[1]; VIR_DEBUG("Using URI %s", uri_str); =20 if (!(uri =3D virURIParse(uri_str))) { --=20 2.31.1 From nobody Fri May 3 19:36:21 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=1639152565; cv=none; d=zohomail.com; s=zohoarc; b=UvsIAYaVyZKGYhJE5tVz+jxytJMYl28ruGkDbEv0lyK3nnE0xcQ/xF4hYe2Yz8MT2PgdtdUEb4TRuk7mAGMWYY5cS+kA4WIzdjqkFRKlECzIXer13WsJWdgpV8cpBTDEnHaQ4Slp4E6wFprh4Bc+e0ZgJ/lYnjnZfWWs5u6GBzY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639152565; 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=QhlClYmOToCvrbtL4Fsl0SRZm8Tvno7DB2DOagsmbfQ=; b=ZL9z6k/81dy/B2nAAfrUL7oxY2Ahiytj/+0Fn0Cm9qUA9fD4VjTIUXXSqMlNqSDT/Mcgmzf+IHjDJUkiSkOy7TmjNR36xbeXpT01pzRF8RxLmfW+r3w1UAkeuILVxIBllaOY1/drIwTZ1y5RT+TQ/vu9MWn+UHVBvBU2lxpl8Fc= 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 1639152565087910.0767073178757; Fri, 10 Dec 2021 08:09:25 -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-392-xt8bKnj-NJyt9Rdr6UllPg-1; Fri, 10 Dec 2021 11:09:20 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ADCDF10168DC; Fri, 10 Dec 2021 16:09:14 +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 60F4626574; Fri, 10 Dec 2021 16:09:14 +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 27EC64A707; Fri, 10 Dec 2021 16:09:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BAG6lPn015344 for ; Fri, 10 Dec 2021 11:06:47 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5E84D60622; Fri, 10 Dec 2021 16:06:47 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.194.89]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F5304ABA2 for ; Fri, 10 Dec 2021 16:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639152564; 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=QhlClYmOToCvrbtL4Fsl0SRZm8Tvno7DB2DOagsmbfQ=; b=eWXl3+BbZVKyd/Zuh6sxoihK6lqsP/jt80QckAsESCiNdB2HGVnYHcespIi4LRe4/DrpGT OtJ3flu8ABuc/BLSRtnzsbrA9JjPxTa4j0P251uVDQSKWUQbatoQpLepVrrV04VZkg9aMU IGm3s0ZMdbIhZy6mS7Me/PhbI9AOVC4= X-MC-Unique: xt8bKnj-NJyt9Rdr6UllPg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/6] virt-ssh-helper: Improve usage information Date: Fri, 10 Dec 2021 17:06:30 +0100 Message-Id: <20211210160634.366061-3-abologna@redhat.com> In-Reply-To: <20211210160634.366061-1-abologna@redhat.com> References: <20211210160634.366061-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.23 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: 1639152566344100001 Content-Type: text/plain; charset="utf-8" Specifically: * include non-option argument 'URI' in usage summary; * mention that it's an internal tool not meant to be called directly; * exit earlier if required arguments are absent. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- src/remote/remote_ssh_helper.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/remote/remote_ssh_helper.c b/src/remote/remote_ssh_helper.c index 092676dd74..4f4dbff7d0 100644 --- a/src/remote/remote_ssh_helper.c +++ b/src/remote/remote_ssh_helper.c @@ -369,7 +369,10 @@ int main(int argc, char **argv) }; unsigned int flags; =20 - context =3D g_option_context_new("- libvirt socket proxy"); + context =3D g_option_context_new("URI - libvirt socket proxy"); + g_option_context_set_summary(context, + "Internal tool used to handle connections= coming from remote\n" + "clients. Not intended to be called direc= tly by the user."); g_option_context_add_main_entries(context, entries, PACKAGE); if (!g_option_context_parse(context, &argc, &argv, &error)) { g_printerr(_("option parsing failed: %s\n"), error->message); @@ -381,6 +384,12 @@ int main(int argc, char **argv) exit(EXIT_SUCCESS); } =20 + if (argc !=3D 2) { + g_autofree char *help =3D g_option_context_get_help(context, TRUE,= NULL); + g_printerr("%s", help); + exit(EXIT_FAILURE); + } + virSetErrorFunc(NULL, NULL); virSetErrorLogPriorityFunc(NULL); =20 @@ -395,11 +404,6 @@ int main(int argc, char **argv) /* Initialize the log system */ virLogSetFromEnv(); =20 - if (argc !=3D 2) { - g_printerr("%s: expected a URI\n", argv[0]); - exit(EXIT_FAILURE); - } - uri_str =3D argv[1]; VIR_DEBUG("Using URI %s", uri_str); =20 --=20 2.31.1 From nobody Fri May 3 19:36:21 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=1639152578; cv=none; d=zohomail.com; s=zohoarc; b=YJGRZlK7SYSDQMlkJfcYhhNCVYW7ewriSEGqQMwwEhflbL+/WGDKeQIC3Xc+n1j7qrpasZ31FsCLf6VzWwwQU039iEqsFEE2YL3nMgqqPdygq0KQHsSCw6Q9V0siBvnXx9IqjZzs72Py1R0ndOy8417RmCZI9SwBqM3kNKZdCNk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639152578; 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=49c6u87eb3kcJZNM35WLc39koGfxh9+PsPdlL4rWZqA=; b=MDlhfkc+zHpXbWJXygPoO+Ne8ysRFSmgAyKkU6LSbaXxmEhO26rB1uO9z9FdVN9ZIuYedpf5FiSL8/JumkPqoefRGuohCwzTaNO6DQUoVjdAf5aU+l1Pn/sfvoiwYBG3/1hk5H4dliHskbunPR+6AvQSj/ZaJJguYAc8thhz+hY= 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 163915257874052.24862320530292; Fri, 10 Dec 2021 08:09:38 -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-366-WpqQ74Z5MXCLgdxaALDiEQ-1; Fri, 10 Dec 2021 11:09:30 -0500 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 6718C10168C4; Fri, 10 Dec 2021 16:09:17 +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 EFCC578C26; Fri, 10 Dec 2021 16:09:16 +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 BA9F54A707; Fri, 10 Dec 2021 16:09:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BAG6nar015357 for ; Fri, 10 Dec 2021 11:06:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id 384E84ABA2; Fri, 10 Dec 2021 16:06:49 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.194.89]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B2B860622 for ; Fri, 10 Dec 2021 16:06:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639152577; 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=49c6u87eb3kcJZNM35WLc39koGfxh9+PsPdlL4rWZqA=; b=RLcqm52uptl6fzgxhOtVq3uNAxkWMn392eA+Kvg2DL9nv+SND8okBiEyt9kJCTdxfvFl3m 8YyVKuxI/F4ODyETW3S4e6oe65gB7wD8zhNQjIRNtn1GuKpnh2cTwo+WKsDHF1ZJPc+4+v HcDs8kl+gdXvmXgVQ6RwmtXNzVYpuD0= X-MC-Unique: WpqQ74Z5MXCLgdxaALDiEQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 3/6] virt-ssh-helper: Add manual page Date: Fri, 10 Dec 2021 17:06:31 +0100 Message-Id: <20211210160634.366061-4-abologna@redhat.com> In-Reply-To: <20211210160634.366061-1-abologna@redhat.com> References: <20211210160634.366061-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639152580173100003 Signed-off-by: Andrea Bolognani --- docs/manpages/meson.build | 1 + docs/manpages/virt-ssh-helper.rst | 96 +++++++++++++++++++++++++++++++ libvirt.spec.in | 1 + 3 files changed, 98 insertions(+) create mode 100644 docs/manpages/virt-ssh-helper.rst diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build index cafe29a545..e80fff48c8 100644 --- a/docs/manpages/meson.build +++ b/docs/manpages/meson.build @@ -18,6 +18,7 @@ docs_man_files =3D [ { '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-ssh-helper', 'section': '1', 'install': true }, { 'name': 'virt-xml-validate', 'section': '1', 'install': true }, =20 { 'name': 'libvirtd', 'section': '8', 'install': conf.has('WITH_LIBVIRTD= ') }, diff --git a/docs/manpages/virt-ssh-helper.rst b/docs/manpages/virt-ssh-hel= per.rst new file mode 100644 index 0000000000..be3f7db243 --- /dev/null +++ b/docs/manpages/virt-ssh-helper.rst @@ -0,0 +1,96 @@ +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +virt-ssh-helper +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +-------------------- +libvirt socket proxy +-------------------- + +:Manual section: 1 +:Manual group: Virtualization Support + +.. contents:: + + +SYNOPSIS +=3D=3D=3D=3D=3D=3D=3D=3D + +``virt-ssh-helper`` [*OPTIONS*...] *URI* +``virt-ssh-helper`` *OPTION* + + +DESCRIPTION +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +``virt-ssh-helper`` is an internal tool used to handle connections +coming from remote clients, and it's not intended to be called +directly by the user. + + +OPTIONS +=3D=3D=3D=3D=3D=3D=3D + +*URI* + +Local libvirt URI to connect the remote client to. + +``-r``, ``--readonly`` + +Make the connection read-only. + +``-h``, ``--help`` + +Display command line help usage then exit. + +``-V``, ``--version`` + +Display version information then exit. + + +EXIT STATUS +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +The exit status will be zero on success, non-zero on failure. + + +AUTHOR +=3D=3D=3D=3D=3D=3D + +Daniel P. Berrang=C3=A9 + + +BUGS +=3D=3D=3D=3D + +Please report all bugs you discover. This should be done via either: + +#. the mailing list + + `https://libvirt.org/contact.html `_ + +#. the bug tracker + + `https://libvirt.org/bugs.html `_ + +Alternatively, you may report bugs to your software distributor / vendor. + + +COPYRIGHT +=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Copyright (C) 2020 Red Hat, Inc. + + +LICENSE +=3D=3D=3D=3D=3D=3D=3D + +``virt-ssh-helper`` is distributed under the terms of the GNU LGPL v2+. +This is free software; see the source for copying conditions. There +is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + + +SEE ALSO +=3D=3D=3D=3D=3D=3D=3D=3D + +virsh(1), `https://libvirt.org/ `_ diff --git a/libvirt.spec.in b/libvirt.spec.in index 5a079cdaf3..9cf1046604 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1697,6 +1697,7 @@ exit 0 =20 %{_mandir}/man1/virt-admin.1* %{_mandir}/man1/virt-host-validate.1* +%{_mandir}/man1/virt-ssh-helper.1* %{_mandir}/man8/libvirtd.8* %{_mandir}/man8/virtlogd.8* %{_mandir}/man8/virtlockd.8* --=20 2.31.1 From nobody Fri May 3 19:36:21 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=1639152471; cv=none; d=zohomail.com; s=zohoarc; b=E+8rSMkxhSk7htUhIcTn6Ta9NmWRccuWm9I+TZWcm7UY5aMmHSxyew+8gmYXGBr+HN2nl60/51BkQz7jujO1SOcqtEx32e2oAIMdfYfTnsRhKKkinawyV5D/CThEEBei8edNlX0f4DJsY6yuxZ/E1SHAIZtpEuA9eRa58u1MlWg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639152471; 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=yJ+ReCKcvjRfBrfvaEdowyRhxIh3eWIOqHwtbEZnLJU=; b=B1dPdO4rVMlya0eFqnOFO/JEBomencCxdUi3qNdXRy1zCAwxtui+jnjuXL++H7o3wumSsuJosSM1/HC215W0VLNiSofoaDMSJEnBE9PjKQhceee4W0H6V0I6xHDOy6iYRnn8x5vOopA0orvRIaT7zZOl+1T5Ons5TsYn5/fydXg= 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 1639152471940313.22817503868566; Fri, 10 Dec 2021 08:07:51 -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-254-rOXImm9zNVuknH3_73qbsg-1; Fri, 10 Dec 2021 11:07:49 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DDC7410B7440; Fri, 10 Dec 2021 16:07:44 +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 BBD455D740; Fri, 10 Dec 2021 16:07:44 +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 8C4EB4A7C9; Fri, 10 Dec 2021 16:07:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BAG6o5l015367 for ; Fri, 10 Dec 2021 11:06:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id F28631B42C; Fri, 10 Dec 2021 16:06:50 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.194.89]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09A9760622 for ; Fri, 10 Dec 2021 16:06:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639152470; 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=yJ+ReCKcvjRfBrfvaEdowyRhxIh3eWIOqHwtbEZnLJU=; b=CLbLc053ybjxs2bhy9rY3mCGfML3y4VdfA6R33Pl0BJ2vr4ogx5LnjRNzl3RrFmB44bVbM o1kECL7/tUgBLPExJclcVfsjvUZTpMrUZWCYs23SSyKYISB6Pgqscta9oCsqhLSsNwOXYb BAQe8wV8aFR3wl3zPeCcVMwUZlf3MqM= X-MC-Unique: rOXImm9zNVuknH3_73qbsg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 4/6] virt-qemu-run: Improve usage information Date: Fri, 10 Dec 2021 17:06:32 +0100 Message-Id: <20211210160634.366061-5-abologna@redhat.com> In-Reply-To: <20211210160634.366061-1-abologna@redhat.com> References: <20211210160634.366061-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.15 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: 1639152473200100001 Content-Type: text/plain; charset="utf-8" Specifically, include non-option argument 'GUEST-XML-FILE' in usage summary. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_shim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_shim.c b/src/qemu/qemu_shim.c index 8b3afd0324..a06869a406 100644 --- a/src/qemu/qemu_shim.c +++ b/src/qemu/qemu_shim.c @@ -163,7 +163,7 @@ int main(int argc, char **argv) =20 #define deltams() ((long long)g_get_monotonic_time() - start) =20 - ctx =3D g_option_context_new("- run a standalone QEMU process"); + ctx =3D g_option_context_new("GUEST-XML-FILE - run a standalone QEMU p= rocess"); g_option_context_add_main_entries(ctx, entries, PACKAGE); if (!g_option_context_parse(ctx, &argc, &argv, &error)) { g_printerr("%s: option parsing failed: %s\n", --=20 2.31.1 From nobody Fri May 3 19:36:21 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; 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=1639152476; cv=none; d=zohomail.com; s=zohoarc; b=B8mFs6Jb7fasEpwZXNv/Z3SaPjRwUhptIzC0+UKNidpmB84XP44O9tbJ9GRE0Emt9AKw0ktAeWu9ulPCU494LLXAi9Z7gcUaAkknXsW29i92s2xkIA7QEiPsSgObOtsIOQi8VsG/hCY7o92lYIRTBetQwUtlpZZZ6clVwPhlN8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639152476; 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=OeDQ0xZetaoeJSyZMzdo0qKVck0haNgE50jqAWh54cg=; b=geQFgvY5rivCJY7nzz2vWGdZeL1li65WSre0Le+Ql6yjSxHgx2t5Ulgf2T5s5FK+vYSlGvHECRqOGe7/XthHw8Z7/vxIGICelsetkNjWPHhWhehSKGIJsHtdL2d9BOeuergV5xt0PyUHlDxyFMPdh8oJ+VzR+aXnv2LuV8NLaSg= 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 1639152476769238.82292507972522; Fri, 10 Dec 2021 08:07:56 -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-135-NX8rPEaJNPCBNMKGhgL0hQ-1; Fri, 10 Dec 2021 11:07:54 -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 8855E760C9; Fri, 10 Dec 2021 16:07:48 +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 6A78F1001F4D; Fri, 10 Dec 2021 16:07:48 +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 3EDC94A700; Fri, 10 Dec 2021 16:07:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BAG6q30015383 for ; Fri, 10 Dec 2021 11:06:52 -0500 Received: by smtp.corp.redhat.com (Postfix) id C82CC60622; Fri, 10 Dec 2021 16:06:52 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.194.89]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A5BB71B42C for ; Fri, 10 Dec 2021 16:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639152475; 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=OeDQ0xZetaoeJSyZMzdo0qKVck0haNgE50jqAWh54cg=; b=V0MboUAcS0srFwQSelVxRvNrzCLUIi3A23TRm4RDbdevotPJfD2h8d53W3Zc9mYfV3iNnU Xvug3oDCHgdLJJAIXSVvfQH6jYHgBApg/8TdHpawyN7r7Yb340I0gjNOYCd/eOG9g135ht /aBf+jsjytC5c1jNhZwO1raJ7pbOg8Y= X-MC-Unique: NX8rPEaJNPCBNMKGhgL0hQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 5/6] virt-qemu-run: Improve manual page Date: Fri, 10 Dec 2021 17:06:33 +0100 Message-Id: <20211210160634.366061-6-abologna@redhat.com> In-Reply-To: <20211210160634.366061-1-abologna@redhat.com> References: <20211210160634.366061-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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) X-ZM-MESSAGEID: 1639152478350100001 Content-Type: text/plain; charset="utf-8" Specifically: * use the correct notation and markup for commands, options and arguments; * rename arguments meta-variables; * document '--help' and '--version' options; * use consistent vertical spacing; * fix a typo. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- docs/manpages/virt-qemu-run.rst | 53 +++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/docs/manpages/virt-qemu-run.rst b/docs/manpages/virt-qemu-run.= rst index 470de93168..a755b7fda9 100644 --- a/docs/manpages/virt-qemu-run.rst +++ b/docs/manpages/virt-qemu-run.rst @@ -11,10 +11,13 @@ Run a standalone QEMU guest =20 .. contents:: =20 + SYNOPSIS =3D=3D=3D=3D=3D=3D=3D=3D =20 -``virt-qemu-run [OPTIONS...] [GUEST-XML]`` +``virt-qemu-run`` [*OPTIONS...*] *GUEST-XML-FILE* +``virt-qemu-run`` *OPTION* + =20 DESCRIPTION =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -26,50 +29,54 @@ directory tree. When the guest is run with this tool it= is invisible to libvirtd and thus also invisible to other libvirt tools such as virsh. =20 -The virt-qemu-run program will run the QEMU virtual machine, and then -block until the guest OS shuts down, at which point it will exit. +The ``virt-qemu-run`` program will run the QEMU virtual machine, and +then block until the guest OS shuts down, at which point it will +exit. =20 -If the virt-qemu-run program is interrupted (eg Ctrl-C) it will -immediately terminate the virtual machine without giving the guest -OS any opportunity to gracefully shutdown. +If the ``virt-qemu-run`` program is interrupted (eg Ctrl-C) it will +immediately terminate the virtual machine without giving the guest OS +any opportunity to gracefully shutdown. =20 **NOTE: this tool is currently considered experimental.** Its usage and behaviour is still subject to change in future libvirt releases. For further information on its usage consult the `QEMU driver documentation `_. =20 + OPTIONS =3D=3D=3D=3D=3D=3D=3D =20 -``GUEST-XML`` +*GUEST-XML-FILE* =20 The full path to the XML file describing the guest virtual machine to be booted. =20 -``-h``, ``--help`` - -Display the command line help - -``-v``, ``--verbose`` - -Display verbose information about startup - -``-r DIR``, ``--root=3DDIR`` +``-r`` *DIR*, ``--root``\ =3D\ *DIR* =20 Specify the root directory to use for storing state associated with the virtual machine. The caller is responsible for deleting this directory when it is no longer required. =20 If this parameter is omitted, then a random temporary directory -will be created, and its contents be automaticlaly deleted at +will be created, and its contents be automatically deleted at VM shutdown. =20 -``-s XML-FILE,VALUE-FILE``, ``--secret=3DXML-FILE,VALUE-FILE`` +``-s`` *SECRET-XML-FILE*\ ,\ *SECRET-VALUE-FILE*, +``--secret``\ =3D\ *SECRET-XML-FILE*\ ,\ *SECRET-VALUE-FILE* + +Specify a secret to be loaded into the secret driver. +*SECRET-XML-FILE* is a path to the XML description of the secret, +whose UUID should match a secret referenced in the guest domain XML. +*SECRET-VALUE-FILE* is a path containing the raw value of the secret. + +``-h``, ``--help`` + +Display the command line help + +``-v``, ``--verbose`` + +Display verbose information about startup =20 -Specify a secret to be loaded into the secret driver. The ``XML-FILE`` -is a path to the XML description of the secret, whose UUID should -match a secret referenced in the guest domain XML. The ``VALUE-FILE`` -is a path containing the raw value of the secret. =20 EXIT STATUS =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -77,6 +84,7 @@ EXIT STATUS Upon successful shutdown, an exit status of 0 will be set. Upon failure a non-zero status will be set. =20 + AUTHOR =3D=3D=3D=3D=3D=3D =20 @@ -113,6 +121,7 @@ This is free software; see the source for copying condi= tions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE =20 + SEE ALSO =3D=3D=3D=3D=3D=3D=3D=3D =20 --=20 2.31.1 From nobody Fri May 3 19:36:21 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; 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=1639152569; cv=none; d=zohomail.com; s=zohoarc; b=kOBjH+Wm8+kbrhPILPxmI5jLO/beCqcbTCFdoDr5MAXcAYeQVDYewM0zyX7HbiY3mX1NurLSTOasalFxj8aM74LTG/MC3ubNhWs70L8mgP0H5220bxoCVD3kABoDgbDhg5IKjuFHftmEf8HQc+oh7riHSLBPImvh+JOrC3/W2gI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639152569; 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=o+Ldwf7xpMOWEaxNkpjkYsGff4+x1n1NjMgsD07NY9Y=; b=U+iZuWIlRBDhu+8PmRuLoC3HoloujVtizZ+Xu7NqCYU9Gzzy+kgeWrxu+5iJE/NfUpBAXVW886+SMg/9w528ezANjjJj6pI3j2MkszOgiBh15u/JDEpxrtlsBfeCEw91ycmmOMM76kyLUlUiHosmNlBjRfz9vPZwo+8AHc4MFRE= 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 1639152569056252.64779226941732; Fri, 10 Dec 2021 08:09:29 -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-453--eusc0MpN4WfXv3-Iqdx0A-1; Fri, 10 Dec 2021 11:09:26 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C756F18C8C2D; Fri, 10 Dec 2021 16:09:19 +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 7220626DE5; Fri, 10 Dec 2021 16:09: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 1F9D11809CB9; Fri, 10 Dec 2021 16:09:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BAG6soJ015394 for ; Fri, 10 Dec 2021 11:06:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id 45C221B42C; Fri, 10 Dec 2021 16:06:54 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.194.89]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4FDF960622 for ; Fri, 10 Dec 2021 16:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639152568; 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=o+Ldwf7xpMOWEaxNkpjkYsGff4+x1n1NjMgsD07NY9Y=; b=WATxjUSmS4mOzXM9py5vg9i9ynxswXJBr3YoacF3rqJ9G5IFJYL8H7JMk9bESGaYryg8Pn H1rWcxANmdigISygbPhPteVqSWMwynTMrbQF/9wGWj/o3InwRK0dfBW2WZQhKDrvH2v9z8 zKuIXhw5CsPfLZzNe/xqGsqueSyaPKk= X-MC-Unique: -eusc0MpN4WfXv3-Iqdx0A-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 6/6] virt-pki-query-dn: Add manual page Date: Fri, 10 Dec 2021 17:06:34 +0100 Message-Id: <20211210160634.366061-7-abologna@redhat.com> In-Reply-To: <20211210160634.366061-1-abologna@redhat.com> References: <20211210160634.366061-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.23 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: 1639152569614100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- docs/manpages/meson.build | 1 + docs/manpages/virt-pki-query-dn.rst | 91 +++++++++++++++++++++++++++++ libvirt.spec.in | 1 + 3 files changed, 93 insertions(+) create mode 100644 docs/manpages/virt-pki-query-dn.rst diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build index e80fff48c8..bf6fc730e0 100644 --- a/docs/manpages/meson.build +++ b/docs/manpages/meson.build @@ -16,6 +16,7 @@ docs_man_files =3D [ { '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-query-dn', 'section': '1', 'install': true }, { 'name': 'virt-pki-validate', 'section': '1', 'install': true }, { 'name': 'virt-qemu-run', 'section': '1', 'install': conf.has('WITH_QEM= U') }, { 'name': 'virt-ssh-helper', 'section': '1', 'install': true }, diff --git a/docs/manpages/virt-pki-query-dn.rst b/docs/manpages/virt-pki-q= uery-dn.rst new file mode 100644 index 0000000000..0e162d6dc5 --- /dev/null +++ b/docs/manpages/virt-pki-query-dn.rst @@ -0,0 +1,91 @@ +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +virt-pki-query-dn +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +------------------------------------------------- +extract Distinguished Name from a PEM certificate +------------------------------------------------- + +:Manual section: 1 +:Manual group: Virtualization Support + +.. contents:: + + +SYNOPSIS +=3D=3D=3D=3D=3D=3D=3D=3D + +``virt-pki-query-dn`` *FILE* +``virt-pki-query-dn`` *OPTION* + + +DESCRIPTION +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Extract Distinguished Name from a PEM certificate. + +The output is meant to be used in the ``tls_allowed_dn_list`` +configuration option in the ``libvirtd.conf`` file. + + +OPTIONS +=3D=3D=3D=3D=3D=3D=3D + +``-h``, ``--help`` + +Display command line help usage then exit. + +``-V``, ``--version`` + +Display version information then exit. + + +EXIT STATUS +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +The exit status will be zero on success, non-zero on failure. + + +AUTHOR +=3D=3D=3D=3D=3D=3D + +Martin Kletzander + + +BUGS +=3D=3D=3D=3D + +Please report all bugs you discover. This should be done via either: + +#. the mailing list + + `https://libvirt.org/contact.html `_ + +#. the bug tracker + + `https://libvirt.org/bugs.html `_ + +Alternatively, you may report bugs to your software distributor / vendor. + + +COPYRIGHT +=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Copyright (C) 2021 Red Hat, Inc. + + +LICENSE +=3D=3D=3D=3D=3D=3D=3D + +``virt-pki-query-dn`` is distributed under the terms of the GNU GPL v2+. +This is free software; see the source for copying conditions. There +is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + + +SEE ALSO +=3D=3D=3D=3D=3D=3D=3D=3D + +virsh(1), virt-pki-validate(1), +`online PKI setup instructions `_, +`https://www.libvirt.org/ `_ diff --git a/libvirt.spec.in b/libvirt.spec.in index 9cf1046604..22a15c7d23 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1986,6 +1986,7 @@ exit 0 %files client %{_mandir}/man1/virsh.1* %{_mandir}/man1/virt-xml-validate.1* +%{_mandir}/man1/virt-pki-query-dn.1* %{_mandir}/man1/virt-pki-validate.1* %{_bindir}/virsh %{_bindir}/virt-xml-validate --=20 2.31.1