|
| 1 | +# mkosi never locates its workspace in "/tmp/" by default because many Linux |
| 2 | +# distributions use tmpfs for /tmp and mkosi does not want to risk running out |
| 3 | +# of RAM with very large images. But on success, mkosi-workspace is deleted at |
| 4 | +# the end of the build so it really does not need to be located on persistent |
| 5 | +# storage. Also, we tend to build relatively small images: only a few |
| 6 | +# gigabytes. |
| 7 | +# |
| 8 | +# => to use /tmp for mkosi workspaces, simply copy this file to your |
| 9 | +# run_qemu.git/mkosi_tmpl_portable/ directory. This will save several minutes |
| 10 | +# of build time when you have fast CPUs and slow storage |
| 11 | +# |
| 12 | +# Pro-tip: symlink kernel/qbuild/ to /tmp/qbuild.real too. A few more gigabytes |
| 13 | +# required. (some old mkosi versions nest their WorkspaceDir inside qbuild/ by |
| 14 | +# default) |
| 15 | + |
| 16 | +# If you run out of /tmp space you can make it bigger without rebooting |
| 17 | +# with: "mount -o remount,size=newsize" |
| 18 | + |
| 19 | +# Warning: mkosi version v15 and v16 cannot use /tmp/... here because it's not |
| 20 | +# bind-mounted in bubblewrap (cpio error). Point WorkspaceDirectory= at another |
| 21 | +# tmpfs with a different name or cherry-pick mkosi fix 28ccb67a92e (v17) |
| 22 | + |
| 23 | +# We don't use "/tmp/" itself but a _subdirectory_ of it because: |
| 24 | +# - This keeps /tmp/ "cleaner" |
| 25 | +# - `WorkspaceDirectory=/tmp` is not compatible with mkosi v24 commit |
| 26 | +# f4eba02dd3ca and the bwrap-sandboxed "rm -rf |
| 27 | +# WorkspaceDirectory/mkosi-workspace-12345", see |
| 28 | +# https://github.com/pmem/run_qemu/pull/116 for the obscure details. (v25 |
| 29 | +# drops bwrap entirely) |
| 30 | + |
| 31 | +[Output] |
| 32 | +# WorkspaceDirectory= (and others) were moved to the brand new [Build] |
| 33 | +# section in mkosi v25 commit ef5a79993e2. Fortunately, no version |
| 34 | +# before or after that mkosi commit seems to mind the duplicate (mkosi |
| 35 | +# versions < v15 don't seem to care about sections at all). So just |
| 36 | +# duplicate [Output] and [Build] and forget about it. This may print |
| 37 | +# a warning. |
| 38 | +WorkspaceDirectory=/tmp/rq_mkosi_wspaces/ |
| 39 | + |
| 40 | +[Build] |
| 41 | +WorkspaceDirectory=/tmp/rq_mkosi_wspaces/ |
0 commit comments