From: Daan De Meyer Date: Tue, 7 Nov 2023 08:43:13 +0000 (+0100) Subject: Add BuildSourcesEphemeral= to the rpms from source doc. X-Git-Tag: v19~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e626bf7a0ed6b218de4d10e1c9a391fd4ec1c4f;p=thirdparty%2Fmkosi.git Add BuildSourcesEphemeral= to the rpms from source doc. 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. --- diff --git a/docs/building-rpms-from-source.md b/docs/building-rpms-from-source.md index 106283d83..7a84d4912 100644 --- a/docs/building-rpms-from-source.md +++ b/docs/building-rpms-from-source.md @@ -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