From nobody Fri Dec 19 07:18:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1615549511; cv=none; d=zohomail.com; s=zohoarc; b=cgi2aAEuohCGJXB2/0vREuTuswv41RgKCSw/DqenwaCu4/CDwBqH2nKeM9g5CcxsJf5fsrF3TXEFC7UvFiyGfrE44m1FUnrTJLCmki58wMDcRlco8cvvkq158p7Tbd6GU1wxSleVr+04CroYaYtnUTHYTbeN7h4RawulJY/y7ck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615549511; h=Content-Type:Content-Transfer-Encoding:Cc: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=R2w+0Kwx9MDb3qoZhSLOikQrKxIfabBcKWKhHXy5mD8=; b=fGCyei3oy/hDcjgwF//ETuB4AyzWo7dW0yFsxDJN7q1U/Gbu9GPcudhLE/iB8MD1pkC+jWDWcR1fGd9Ik94ea/j/qnVwqSS5n2h0z+e46nlbZsAtoNKTC+QlHzOC4t2QUrZElbFIX+Wa8B9HFqD3UfJxcoa2yApawjTf/e+4qYE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1615549511167171.28662880331524; Fri, 12 Mar 2021 03:45:11 -0800 (PST) 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-159-0rlmdD82PsWiAsfnFqxdMg-1; Fri, 12 Mar 2021 06:45:06 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0229A1084C83; Fri, 12 Mar 2021 11:45:01 +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 D38F160636; Fri, 12 Mar 2021 11:45:00 +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 8C4DC1801241; Fri, 12 Mar 2021 11:45:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12CBhQ1p024920 for ; Fri, 12 Mar 2021 06:43:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1916E60636; Fri, 12 Mar 2021 11:43:26 +0000 (UTC) Received: from nautilus.redhat.com (unknown [10.40.192.123]) by smtp.corp.redhat.com (Postfix) with ESMTP id 683CC19813; Fri, 12 Mar 2021 11:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615549510; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=R2w+0Kwx9MDb3qoZhSLOikQrKxIfabBcKWKhHXy5mD8=; b=jUlXAL9vShW+UsZKO03/T7VdwbKPfyWz3FUmjQ/d6W7obxTX/i6kn3fbTvSJDH/dQyl0c1 7TBQkUAkEKDQAP0VXdM3EXOl967OIp05lCbsGuaBHROOT9cIZR2hqX8ORz2tSQv4QXebKE pfPe8o50aJMTgDh+qVfIGFJjh1jzoxc= X-MC-Unique: 0rlmdD82PsWiAsfnFqxdMg-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH 9/9] docs: html.in: Convert 'compiling' to rst Date: Fri, 12 Mar 2021 12:43:12 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: eskultet@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.11 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: Erik Skultety Reviewed-by: Peter Krempa --- docs/compiling.html.in | 115 ----------------------------------------- docs/compiling.rst | 95 ++++++++++++++++++++++++++++++++++ docs/meson.build | 2 +- 3 files changed, 96 insertions(+), 116 deletions(-) delete mode 100644 docs/compiling.html.in create mode 100644 docs/compiling.rst diff --git a/docs/compiling.html.in b/docs/compiling.html.in deleted file mode 100644 index df6074780f..0000000000 --- a/docs/compiling.html.in +++ /dev/null @@ -1,115 +0,0 @@ - - - - -

libvirt Installation

- -
    - -

    Compiling a release tarball

    - -

    - libvirt uses the standard setup/build/install steps and mandates - that the build directory is different from the source directory: -

    - -
    -$ xz -dc libvirt-x.x.x.tar.xz | tar xvf -
    -$ cd libvirt-x.x.x
    -$ meson build
    - -

    - The meson script can be given options to change its default - behaviour. -

    - -

    - To get the complete list of the options run the following command: -

    - -
    -$ meson configure
    - -

    - When you have determined which options you want to use (if any), - continue the process. -

    - -

    - Note the use of sudo with the ninja install command - below. Using sudo is only required when installing to a location yo= ur - user does not have write access to. Installing to a system location - is a good example of this. -

    - -

    - If you are installing to a location that your user does have = write - access to, then you can instead run the ninja install command - without putting sudo before it. -

    - -
    -$ meson build [possible options]
    -$ ninja -C build
    -$ sudo ninja -C build install
    - -

    - At this point you may have to run ldconfig or a similar utili= ty - to update your list of installed shared libs. -

    - -

    Building from a GIT checkout

    - -

    - The libvirt build process uses Meson build system. By default when - the meson is run from within a GIT checkout, it - will turn on -Werror for builds. This can be disabled with - --werror=3Dfalse, but this is not recommended. -

    - -

    To build & install libvirt to your home - directory the following commands can be run: -

    - -
    -$ meson build --prefix=3D$HOME/usr
    -$ ninja -C build
    -$ sudo ninja -C build install
    - -

    - Be aware though, that binaries built with a custom prefix will not - interoperate with OS vendor provided binaries, since the UNIX socket - paths will all be different. To produce a build that is compatible - with normal OS vendor prefixes, use -

    - -
    -$ meson build -Dsystem=3Dtrue
    -$ ninja -C build
    -    
    - -

    - When doing this for day-to-day development purposes, it is recommend= ed - not to install over the OS vendor provided binaries. Instead simply - run libvirt directly from the source tree. For example to run - a privileged libvirtd instance -

    - -
    -$ su -
    -# service libvirtd stop  (or systemctl stop libvirtd.service)
    -# /home/to/your/checkout/build/src/libvirtd
    -    
    - -

    - It is also possible to run virsh directly from the build tree - using the ./run script (which sets some environment variables): -

    - -
    -$ pwd
    -/home/to/your/checkout/build
    -$ ./run ./tools/virsh ....
    -    
    - - diff --git a/docs/compiling.rst b/docs/compiling.rst new file mode 100644 index 0000000000..62519b6bdb --- /dev/null +++ b/docs/compiling.rst @@ -0,0 +1,95 @@ +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +libvirt Installation +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. contents:: + +Compiling a release tarball +--------------------------- + +libvirt uses the standard setup/build/install steps and mandates that +the build directory is different from the source directory: + +:: + + $ xz -dc libvirt-x.x.x.tar.xz | tar xvf - + $ cd libvirt-x.x.x + $ meson build + +The *meson* script can be given options to change its default behaviour. + +To get the complete list of the options run the following command: + +:: + + $ meson configure + +When you have determined which options you want to use (if any), +continue the process. + +Note the use of **sudo** with the *ninja install* command below. Using +sudo is only required when installing to a location your user does not +have write access to. Installing to a system location is a good example +of this. + +If you are installing to a location that your user *does* have write +access to, then you can instead run the *ninja install* command without +putting **sudo** before it. + +:: + + $ meson build [possible options] + $ ninja -C build + $ sudo ninja -C build install + +At this point you **may** have to run ldconfig or a similar utility to +update your list of installed shared libs. + +Building from a GIT checkout +---------------------------- + +The libvirt build process uses Meson build system. By default when the +``meson`` is run from within a GIT checkout, it will turn on -Werror for +builds. This can be disabled with --werror=3Dfalse, but this is not +recommended. + +To build & install libvirt to your home directory the following commands +can be run: + +:: + + $ meson build --prefix=3D$HOME/usr + $ ninja -C build + $ sudo ninja -C build install + +Be aware though, that binaries built with a custom prefix will not +interoperate with OS vendor provided binaries, since the UNIX socket +paths will all be different. To produce a build that is compatible with +normal OS vendor prefixes, use + +:: + + $ meson build -Dsystem=3Dtrue + $ ninja -C build + + +When doing this for day-to-day development purposes, it is recommended +not to install over the OS vendor provided binaries. Instead simply run +libvirt directly from the source tree. For example to run a privileged +libvirtd instance + +:: + + $ su - + # service libvirtd stop (or systemctl stop libvirtd.service) + # /home/to/your/checkout/build/src/libvirtd + + +It is also possible to run virsh directly from the build tree using the +./run script (which sets some environment variables): + +:: + + $ pwd + /home/to/your/checkout/build + $ ./run ./tools/virsh .... diff --git a/docs/meson.build b/docs/meson.build index f4b29a2e59..e816953bf4 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -34,7 +34,6 @@ docs_html_in_files =3D [ '404', 'bugs', 'cgroups', - 'compiling', 'contact', 'contribute', 'csharp', @@ -111,6 +110,7 @@ docs_rst_files =3D [ 'ci', 'coding-style', 'committer-guidelines', + 'compiling', 'daemons', 'developer-tooling', 'formatbackup', --=20 2.29.2