From dae224fdb17a549f6cf7d9589660e74a982871d9 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 9 Sep 2022 10:44:13 +0200 Subject: [PATCH] docs: compiling: Separate information on how to install libvirt and add disclaimer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Create a section for instructions on how to install the built binaries rather than mentioning it multiple times. Add a note that installing over your distro-provided packages will most likely break your instalation. Signed-off-by: Peter Krempa Reviewed-by: Jonathon Jongsma Reviewed-by: Ján Tomko --- docs/compiling.rst | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/docs/compiling.rst b/docs/compiling.rst index fc5556738d..0a9b9d0833 100644 --- a/docs/compiling.rst +++ b/docs/compiling.rst @@ -52,23 +52,12 @@ To get the complete list of the options run the following command: 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. +The ``build`` directory now contains the built binaries. Building from a GIT checkout ---------------------------- @@ -85,7 +74,6 @@ can be run: $ meson build --prefix=$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 @@ -97,6 +85,7 @@ normal OS vendor prefixes, use $ meson build -Dsystem=true $ ninja -C build +The ``build`` directory now contains the built binaries. Running compiled binaries from build directory ---------------------------------------------- @@ -120,3 +109,32 @@ It is also possible to run virsh directly from the build tree using the $ pwd /home/to/your/checkout/build $ ./run ./tools/virsh .... + +Installing compiled binaries +---------------------------- + +**Important:** Manual installation of libvirt is generally not recommended and +you should prefer installation from your operating system's package repository +or from manually built packages which are then installed using the package +manager. Overwriting an installation of libvirt from the package manager by a +manually compiled installation may not work properly. + +Installing the compiled binaries into the appropriate location (based on +how the build was configured) is done by the following command: + +:: + + $ sudo ninja -C build install + +Note the use of **sudo** with the *ninja install* command. 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. + +After installation you you **may** have to run ``ldconfig`` or a similar +utility to update your list of installed shared libs, or adjust the paths where +the system looks for binaries and shared libraries. -- 2.39.5