[Samba] Container setup - selftests not running?

Manfred
2019-07-06T22:12:40Z

On 7/5/2019 10:12 PM, Joachim Lindenberg via samba
wrote:
> Following my questions in
https://lists.samba.org/archive/samba/2019-July/224115.html and the lack of
recent builds of Samba in Ubuntu, I started to build Samba on my own.
> I installed a new virtual machine with Ubuntu 18.04.2 (LTS) server (+ssh),
installed docker and docker-compose, and then tried to build using the following
Dockerfile:
>
> --- Dockerfile begin ---
> # https://docs.docker.com/develop/develop-images/multistage-build/
> #
https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
>
> # https://wiki.samba.org/index.php/Build_Samba_from_Source
> # obviously you can only switch to distros also using apt :(
>
> ARG distro=ubuntu:18.04
> ARG dependencylist=ubuntu1804
> ARG version=4.10.5
> FROM ${distro} as samba-dev
> ARG dependencylist
> ARG version
> RUN apt-get update && apt-get install -y wget
> # TODO: can we reference the release branch of the version above?
> RUN wget -O deps
"https://git.samba.org/?p=samba.git;a=blob_plain;f=bootstrap/generated-dists/${dependencylist}/bootstrap.sh;hb=master"
> RUN chmod +x deps && ./deps
> RUN wget
https://download.samba.org/pub/samba/stable/samba-${version}.tar.gz
> RUN tar -zxf samba-${version}.tar.gz
> RUN cd samba-${version} && ./configure --enable-selftest &&
make && make test && make install
> --- Dockerfile end ---
>
> I thought it is a good idea to also run tests... unfortunately they fail.
Because of that I essentially ran the same steps also on the host, and they fail
as well, though apparently not exactly the same tests fail. I noticed that
during installation of krb on host, a configuration was created, whereas in the
container the runlevel was inadequate. Because of that observation I suspect
that it is a configuration or environment issue, as neither host nor container
have a real configuration to run samba - but what configuration is really
required to run the tests successfully? krb5.conf, smb.conf, a domain join, or
what?

I am not an expert on containers as well, but I ran through the process
of running selftest not long ago (I did that to test an extension for
IPX support that I built into the server); I was on Fedora, and it took
some extra work to get all the dependencies right, anyway after that I
noticed the following to get it to complete successfully:
- recent Perl versions require some small update to the selftest engine:
https://bugzilla.samba.org/show_bug.cgi?id=13910
- a few wrappers (e.g. libnss_wrapper.so) do not get the path right
during configuration if the system ones are used instead of the ones in
the build tree (at least this was the case in my environment)
- I have been running it in several VMs, and I have seen that it needs
8GB of RAM to complete - there are some torture tests late in the
process that are that hungry.

after ./configure.developer all tests build their own local
configurations, the system conf is not touched.

>
> Thanks & Best Regards, Joachim
>
>
>