]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Add BuildSourcesEphemeral= to the rpms from source doc.
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 7 Nov 2023 08:43:13 +0000 (09:43 +0100)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 7 Nov 2023 08:56:15 +0000 (09:56 +0100)
rpmbuild with --build-in-place is a top offender when it comes to
writing files to the source directory, so let's suggest enabling
BuildSourcesEphemeral= in the building rpms from source doc.

docs/building-rpms-from-source.md

index 106283d8336bf940db01bdc1092baf41063c4d1d..7a84d4912710955814d46912cb7214567abb021f 100644 (file)
@@ -26,12 +26,17 @@ example, in `mkosi.local.conf`, we could have the following settings:
 [Content]
 BuildSources=../mkosi:mkosi
              ../fedora/mkosi:mkosi/rpm
+BuildSourcesEphemeral=yes
 ```
 
 Which instructs mkosi to mount the local version of the mkosi upstream
 repository at `../mkosi` to `mkosi` in the current working directory
 when running mkosi. The Fedora RPM spec is mounted at `mkosi/rpm`.
 
+We enable the `BuildSourcesEphemeral=` option as `rpmbuild` will write
+quite a few files to the source directory as part of building the rpm
+which we don't want to remain there after the build finishes.
+
 We use `rpmspec` and `rpmbuild`, but these do not really support running
 from outside of the image that the RPM is being built in, so we have to
 make sure they're available inside the image by adding the following to