DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH v3] doc: prefer installing using meson rather than ninja
Date: Fri,  9 Jun 2023 15:51:08 +0100	[thread overview]
Message-ID: <20230609145107.144593-1-bruce.richardson@intel.com> (raw)
In-Reply-To: <20230609105139.76239-1-bruce.richardson@intel.com>

After doing a build, to install DPDK system-wide our documentation
recommended using the "ninja install" command. However, for anyone
building as a non-root user and only installing as root, the "meson
install" command is a better alternative, as it provides for
automatically dropping or elevating privileges as necessary in more
recent meson releases [1].

[1] https://mesonbuild.com/Installing.html#installing-as-the-superuser

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

---
V3:
* correct order of arguments to meson in CI scripts. The "-C" option
  must follow the meson "install" command. [This is consistent with
  other uses e.g. meson compile -C ..., meson test -C ...]

V2:
* Fix one missed reference to "ninja install" in Linux GSG
* Changed CI scripts to use "meson install" to ensure step is properly
  tested.
---
 .ci/linux-build.sh                           | 4 ++--
 doc/guides/contributing/coding_style.rst     | 2 +-
 doc/guides/cryptodevs/uadk.rst               | 2 +-
 doc/guides/freebsd_gsg/build_dpdk.rst        | 2 +-
 doc/guides/freebsd_gsg/build_sample_apps.rst | 2 +-
 doc/guides/linux_gsg/build_dpdk.rst          | 4 ++--
 doc/guides/prog_guide/build-sdk-meson.rst    | 4 ++--
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 9631e342b5..76d3e776af 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -150,14 +150,14 @@ if [ "$ABI_CHECKS" = "true" ]; then
         git clone --single-branch -b "$REF_GIT_TAG" $REF_GIT_REPO $refsrcdir
         meson setup $OPTS -Dexamples= $refsrcdir $refsrcdir/build
         ninja -C $refsrcdir/build
-        DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install
+        DESTDIR=$(pwd)/reference meson install -C $refsrcdir/build
         find reference/usr/local -name '*.a' -delete
         rm -rf reference/usr/local/bin
         rm -rf reference/usr/local/share
         echo $REF_GIT_TAG > reference/VERSION
     fi
 
-    DESTDIR=$(pwd)/install ninja -C build install
+    DESTDIR=$(pwd)/install meson install -C build
     devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-}
 fi
 
diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index 89db6260cf..00d6270624 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -956,7 +956,7 @@ ext_deps
 headers
 	**Default Value = []**.
 	Used to return the list of header files for the library that should be
-	installed to $PREFIX/include when ``ninja install`` is run. As with
+	installed to $PREFIX/include when ``meson install`` is run. As with
 	source files, these should be specified using the meson ``files()``
 	function.
 	When ``check_includes`` build option is set to ``true``, each header file
diff --git a/doc/guides/cryptodevs/uadk.rst b/doc/guides/cryptodevs/uadk.rst
index 9af6b88a5a..136ab4be6a 100644
--- a/doc/guides/cryptodevs/uadk.rst
+++ b/doc/guides/cryptodevs/uadk.rst
@@ -90,7 +90,7 @@ Test steps
       meson setup build (--reconfigure)
       cd build
       ninja
-      sudo ninja install
+      sudo meson install
 
 #. Prepare hugepages for DPDK (see also :doc:`../tools/hugepages`)
 
diff --git a/doc/guides/freebsd_gsg/build_dpdk.rst b/doc/guides/freebsd_gsg/build_dpdk.rst
index 514d18c870..86e8e5a805 100644
--- a/doc/guides/freebsd_gsg/build_dpdk.rst
+++ b/doc/guides/freebsd_gsg/build_dpdk.rst
@@ -47,7 +47,7 @@ The final, install, step generally needs to be run as root::
   meson setup build
   cd build
   ninja
-  ninja install
+  meson install
 
 This will install the DPDK libraries and drivers to `/usr/local/lib` with a
 pkg-config file `libdpdk.pc` installed to `/usr/local/lib/pkgconfig`. The
diff --git a/doc/guides/freebsd_gsg/build_sample_apps.rst b/doc/guides/freebsd_gsg/build_sample_apps.rst
index c87e982759..b1ab7545b1 100644
--- a/doc/guides/freebsd_gsg/build_sample_apps.rst
+++ b/doc/guides/freebsd_gsg/build_sample_apps.rst
@@ -22,7 +22,7 @@ the system when DPDK is installed, and so can be built using GNU make.
    on the FreeBSD system.
 
 The following shows how to compile the helloworld example app, following
-the installation of DPDK using `ninja install` as described previously::
+the installation of DPDK using `meson install` as described previously::
 
         $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
 
diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst
index bbd2efc9d8..9c0dd9daf6 100644
--- a/doc/guides/linux_gsg/build_dpdk.rst
+++ b/doc/guides/linux_gsg/build_dpdk.rst
@@ -68,11 +68,11 @@ Once configured, to build and then install DPDK system-wide use:
 
         cd build
         ninja
-        ninja install
+        meson install
         ldconfig
 
 The last two commands above generally need to be run as root,
-with the `ninja install` step copying the built objects to their final system-wide locations,
+with the `meson install` step copying the built objects to their final system-wide locations,
 and the last step causing the dynamic loader `ld.so` to update its cache to take account of the new objects.
 
 .. note::
diff --git a/doc/guides/prog_guide/build-sdk-meson.rst b/doc/guides/prog_guide/build-sdk-meson.rst
index 5deabbe54c..93aa1f80e3 100644
--- a/doc/guides/prog_guide/build-sdk-meson.rst
+++ b/doc/guides/prog_guide/build-sdk-meson.rst
@@ -12,7 +12,7 @@ following set of commands::
 	meson setup build
 	cd build
 	ninja
-	ninja install
+	meson install
 
 This will compile DPDK in the ``build`` subdirectory, and then install the
 resulting libraries, drivers and header files onto the system - generally
@@ -165,7 +165,7 @@ printing each command on a new line as it runs.
 Installing the Compiled Files
 ------------------------------
 
-Use ``ninja install`` to install the required DPDK files onto the system.
+Use ``meson install`` to install the required DPDK files onto the system.
 The install prefix defaults to ``/usr/local`` but can be used as with other
 options above. The environment variable ``DESTDIR`` can be used to adjust
 the root directory for the install, for example when packaging.
-- 
2.39.2


  parent reply	other threads:[~2023-06-09 14:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 10:51 [PATCH] " Bruce Richardson
2023-06-09 11:13 ` David Marchand
2023-06-09 11:19   ` Bruce Richardson
2023-06-09 11:21     ` David Marchand
2023-06-09 13:34 ` [PATCH v2] " Bruce Richardson
2023-06-09 14:51 ` Bruce Richardson [this message]
2023-06-22 18:35   ` [PATCH v3] " Thomas Monjalon
2023-06-23  7:54     ` Bruce Richardson
2023-06-23 11:43 ` [PATCH v4] " Bruce Richardson
2023-06-28  0:01   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230609145107.144593-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).