diff --git a/src/cmd-build b/src/cmd-build index 43ee657aae..b58d620eef 100755 --- a/src/cmd-build +++ b/src/cmd-build @@ -386,7 +386,7 @@ else case "${ostree_format}" in oci) ;; # Note rpm-ostree always copies the rpmostree.inputhash key - oci-chunked) cmd=(rpm-ostree container-encapsulate) ;; + oci-chunked) cmd=(rpm-ostree container-encapsulate --max-layers=$MAX_OSTREECONTAINER_LAYERS) ;; *) fatal "Unknown ostree-format: ${ostree_format}" esac runv "${cmd[@]}" --repo="${tmprepo}" \ diff --git a/src/cmdlib.sh b/src/cmdlib.sh index 80c18ef218..29f06020e5 100755 --- a/src/cmdlib.sh +++ b/src/cmdlib.sh @@ -36,6 +36,12 @@ export basearch arch=$(uname -m) export arch +# The ostree-ext default is 64, but this is still too much apparently +# for (older?) versions of podman AKA containers/storage (or maybe) +# a kernel limitation? For example +# `cannot mount layer, mount label "" too large 4168 > page size 4096` +MAX_OSTREECONTAINER_LAYERS=50 + case $arch in "x86_64") DEFAULT_TERMINAL="ttyS0" ;; "ppc64le") DEFAULT_TERMINAL="hvc0" ;;