From: Daan De Meyer Date: Fri, 9 Feb 2024 20:26:27 +0000 (+0100) Subject: docs: Add some extra useful defines to rpm build doc X-Git-Tag: v21~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=023041e845f3d542f009b91b3fc97d39237c4afa;p=thirdparty%2Fmkosi.git docs: Add some extra useful defines to rpm build doc These speed up the build so let's make readers aware that they exist. --- diff --git a/docs/building-rpms-from-source.md b/docs/building-rpms-from-source.md index d93f9cafb..ed0111b5c 100644 --- a/docs/building-rpms-from-source.md +++ b/docs/building-rpms-from-source.md @@ -148,6 +148,13 @@ env --chdir=mkosi \ ${BUILDDIR:+--define} \ ${BUILDDIR:+"_vpath_builddir $BUILDDIR"} \ --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \ + --define "_binary_payload w.ufdio" \ + --define "debug_package %{nil}" \ + --define "__brp_strip %{nil}" \ + --define "__brp_compress %{nil}" \ + --define "__brp_mangle_shebangs %{nil}" \ + --define "__brp_strip_comment_note %{nil}" \ + --define "__brp_strip_static_archive %{nil}" \ rpm/mkosi.spec ``` @@ -157,6 +164,12 @@ Meson) so we set it to mkosi's out-of-tree build directory in `$BUILDDIR` if one is provided. This will make subsequent RPM builds much faster as CMake or Meson will be able to do an incremental build. +Setting `_binary_payload` to `w.ufdio` disables compression to speed up +the build. We also disable debug package generation using +`debug_package` and various rpm build root policy scripts to speed up +the build. Note that the build root policy macros we use here are +CentOS/Fedora specific. + After the build script finishes, the produced rpms will be located in `$OUTPUTDIR`. We can now install them from the `mkosi.postinst` post-installation script: