]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
docs: Add some extra useful defines to rpm build doc
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 9 Feb 2024 20:26:27 +0000 (21:26 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 10 Feb 2024 12:09:06 +0000 (13:09 +0100)
These speed up the build so let's make readers aware that they exist.

docs/building-rpms-from-source.md

index d93f9cafb12e50895b0b4afb0ad00e465b8744cd..ed0111b5cebd8a62aaace58ab00ef1cb46247fba 100644 (file)
@@ -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: