build-recipe-mkosi: fix unsupported options#1119
build-recipe-mkosi: fix unsupported options#1119aafeijoo-suse wants to merge 1 commit intoopenSUSE:masterfrom
Conversation
With every build, we can see: ``` ‣ --default is no longer supported ‣ --nspawn-keep-unit is no longer supported ‣ --cache is no longer supported ``` These warnings are present since v15 [1]. It works with the latest version of mkosi (v26), but with the next v27 from git main the build fails, specifically the `--cache` option has to be corrected. `--cache` and `--with-network=never`: in [2] it was added `--cache-only` to remove the special value `never` for `--with-network`. The package cache of the package manager is configure with `--cache-dir`. Also, `--with-network` only affects build scripts and is false by default, so it can be removed. `--nspawn-keep-unit`: obsolete and removed after moving to rootless builds [3], it can be removed. `--default`: renamed to --config in v14 [4], removed in v15 [5]. It was used to load additional settings from the specified settings file, but nowdays if mkosi.conf exists, it's always parsed. [1] systemd/mkosi@bbf7b64 [2] systemd/mkosi@a914321 [3] systemd/mkosi@fdecbf7 [4] systemd/mkosi@7b9bd98 [5] systemd/mkosi@c6290cd
FWICT this basically means it's no longer possible to override the recipe name, i.e. |
I think |
The problematic code added in systemd/mkosi@e6588af (implementation of the I tested this branching https://build.opensuse.org/package/show/home:kukuk:mkosi-images/tumbleweed-minimal together with mkosi from git, and setting the cache options in mkosi.conf, e.g.: |
|
Yep, I know that that option works (I was about to make a PR like this last week), but wasn't sure what it actually does and if it's an actual replacement. If |
|
This breaks building images with older versions, including those in some older debian release. The warnings should be harmless? |
Without |
|
ok but that sounds like a bug in mkosi? we can fix it there |
Maybe. The upstream design won't work with OBS requirements ATM. IMO it should be discussed at least. |
|
yeah fully offline builds totally need to be supported, the problem is we lack CI for it - but if something slips through, we definitely need to fix it |
|
more specifically, anything that is related to repos/packages and attempts to do online stuff needs to check for the local-mirror option, and act accordingly - if that new change doesn't, then yeah it should definitely be fixed to take this into account |
|
This alternative PR checks for support and passes the old parameters with old versions, that way nothing breaks when building older distros: #1122 |
With every build, we can see:
These warnings are present since v15 [1]. It works with the latest version of mkosi (v26), but with the next v27 from git main the build fails, specifically the
--cacheoption has to be corrected.--cacheand--with-network=never: in [2] it was added--cache-onlyto remove the special valueneverfor--with-network. The package cache of the package manager is configure with--cache-dir. Also,--with-networkonly affects build scripts and is false by default, so it can be removed.--nspawn-keep-unit: obsolete and removed after moving to rootless builds [3], it can be removed.--default: renamed to --config in v14 [4], removed in v15 [5]. It was used to load additional settings from the specified settings file, but nowdays if mkosi.conf exists, it's always parsed.[1] systemd/mkosi@bbf7b64
[2] systemd/mkosi@a914321
[3] systemd/mkosi@fdecbf7
[4] systemd/mkosi@7b9bd98
[5] systemd/mkosi@c6290cd