[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: autopkgtest/sbuild environment variables: LC_ALL, HOME, XDG_RUNTIME_DIR etc



On Fri, 29 Apr 2022 at 08:34:48 +0100, Julian Gilbey wrote:
> So can I suggest that
> sbuild-setup(7) explains this a bit more and discusses setting up a
> meaningful HOME directory?

I'm sure patches are accepted, but the problem with this is that what you
want for sbuild does not match what you want for autopkgtest. For sbuild,
the environment that most closely resembles our real, production buildds
involves the /etc/schroot/buildd profile, and a uid whose home directory
is /nonexistent. For autopkgtest, one of the more permissive profiles
like /etc/schroot/desktop is more realistic, and tests are allowed to
assume that they run as a user with a real home directory.

I would personally recommend one of the better-isolated autopkgtest
backends like -lxc or -qemu for running autopkgtest tests. -qemu doesn't
need root, and there are proposed patches adding backends that use
unprivileged user namespaces (-unshare and Podman), which I should
probably be reviewing instead of replying to this email.

> And perhaps has the things necessary for a
> meaningful XDG_RUNTIME_DIR set up by default as well?

Having a meaningful XDG_RUNTIME_DIR in your local sbuild setup will result
in a risk of uploading packages that cannot be built on our official
buildds, which do not have a meaningful XDG_RUNTIME_DIR (if I remember
correctly, the environment variable is set to a path that is valid outside
the chroot, but that path does not exist inside the chroot). This is
particularly true for older debhelper compat levels. Again, what you
want for sbuild and what you want for autopkgtest are unfortunately not
the same.

    smcv


Reply to: