Need invoke systemd-nspawn with --timezone=off to avoid the timezone config of host pollute build environment
From systemd-nspawn(1)
,
--timezone=
Configures how /etc/localtime inside of the container (i.e. local timezone synchronization from host to container) shall be handled. Takes one of "off", "copy", "bind", "symlink", "delete" or "auto". If set to "off" the /etc/localtime file in the container
is left as it is included in the image, and neither modified nor bind mounted over. If set to "copy" the /etc/localtime file of the host is copied into the container. Similarly, if "bind" is used, the file is bind mounted from the host into the container. If
set to "symlink", a symlink is created pointing from /etc/localtime in the container to the timezone file in the container that matches the timezone setting on the host. If set to "delete", the file in the container is deleted, should it exist. If set to
"auto" and the /etc/localtime file of the host is a symlink, then "symlink" mode is used, and "copy" otherwise, except if the image is read-only in which case "bind" is used instead. Defaults to "auto".
Added in version 239.
When it's "auto", systemd-nspawn will try three ways to apply the host timezone config to the container inside. And it's the default value. So the host timezone config will pollute the build environment and make our packaging non-reproducible.
I will submit a PR for it later.