Every install bug of the last few days - the missing aubitrc, the
generated headers that were never installed, libSQL_pg8 built and then
left behind - had the same shape: make install reported success and
produced a tree nothing could be built against. None of it is visible
to anyone working in the source tree, which is where we all work.
So the container check now has two phases:
in-tree compile and run a 4GL program from the source tree
installed make install to a prefix, verify what actually landed,
then compile and run again with ONLY the installed tree
on PATH and LD_LIBRARY_PATH
The second phase does not trust the exit status. It checks that 4glc,
aubit-config, libaubit4gl, the public headers, json.h, at least eight
generated a4gl_API_*.h and an aubitrc are all present, and that every
libSQL_* plug-in that was built was also installed. Then it runs
aubit-config, which is the first thing to notice a config it cannot
read, and finally compiles and runs a program with a REPORT and checks
the output is right rather than merely that the compiler exited 0.
The container-side half moved into its own checks.sh, since it had
outgrown being a string inside the run command.
Both negative-tested by reintroducing a bug in a scratch export and
confirming the harness fails, by name and before the compile:
dropping json.h from the header list
MISSING: incl/json.h (exit 1)
dropping SQL_pg8 from the install list
BUILT BUT NOT INSTALLED: libSQL_pg8.so (exit 1)
In both, the in-tree phase still passed - which is the whole point.
Clean tree passes on both images.