varnish is a high performance http accellerator. http://varnish.projects.linpro.no/
This is a posting about packaging varnish-2.0-prebeta-something. It is also a posting about strange behaviour in rpmbuild.
It has been a while since varnish-1.1.x was submitted to Fedora, and a lot of people have asked for newer versions. Now, 2.0 is only a few days (read weeks) from release, and tech previews and betas are more or less available. So, I have started touching up the specfile for a Fedora release. I will probably submit the first public beta to rawhide, and perhaps push it for EPEL, and follow upstream till and through 2.0.
In the following, the source used is a tarball from a svn checkout from trunk, generated for example like this:
svn co http://varnish.projects.linpro.no/svn/trunk/varnish-cache tar cvzf varnish-cache.tar.gz varnish-cache
The specfile used is based on the one used in Fedora for 1.1.x. It can be downloaded here: http://init.linpro.no/ingvar/varnish/varnish.spec
Per default, it builds a working pre-alpha version of varnish 2.0.
varnish-2.0 has a test suite. It is ran by 'make check'. The test suite runs a series of tests that checks if the build works as expected. Most of the tests starts a server at port 9080 and 9081, and runs some tests against the ports, parsing the output.
Now, running 'make check' from a interactive shell on a Fedora 9 system works more or less as it should. It fails on one of the 72 tests on my intel/i386 box, and passes all the testes on my AMD based box. That is food for the upstream guys.
But when I run the test suite from within rpmbuild, most of the tests fails or hangs every time, and the problem seems to be related to some missing communication between the test scripts and the test server process.
The problem is not related to selinux.
Is it possible at all to run this kind of tests from within rpmbuild?
If so, I would be grateful if someone gave advice and/or had a look at the problem. The make check command is ready for decommenting in the specfile.
Ingvar
Ingvar Hagelund wrote: ...
But when I run the test suite from within rpmbuild, most of the tests fails or hangs every time, and the problem seems to be related to some missing communication between the test scripts and the test server process.
If I remove the comment on %{__make} check and build varnish, it doesn't run any checks at all. It just complains about a missing libvarnish.so.0:
... make[2]: Entering directory `/usr/src/redhat/BUILD/varnish-cache/bin/varnishtest' /usr/bin/make check-TESTS make[3]: Entering directory `/usr/src/redhat/BUILD/varnish-cache/bin/varnishtest' /usr/src/redhat/BUILD/varnish-cache/bin/varnishtest/.libs/lt-varnishtest: error while loading shared libraries: libvarnish.so.0: cannot open shared object file: No such file or directory FAIL: ./tests/a00000.vtc ...
So is the build system using an already installed libvarnish.so.0 if one is available and not the newly built libvarnish.so.0?
Mogens
* Mogens Kjaer
If I remove the comment on %{__make} check and build varnish, it doesn't run any checks at all. It just complains about a missing libvarnish.so.0:
... error while loading shared libraries: libvarnish.so.0: cannot open shared object file: No such file or directory FAIL: ./tests/a00000.vtc ...
So is the build system using an already installed libvarnish.so.0 if one is available and not the newly built libvarnish.so.0?
Yes, that is correct, and that would be a bug in the upstream source. I'll ask them to fix it. To work around, build and install varnish-libs first.
Ingvar
Ingvar Hagelund wrote: ...
So is the build system using an already installed libvarnish.so.0 if one is available and not the newly built libvarnish.so.0?
Yes, that is correct, and that would be a bug in the upstream source. I'll ask them to fix it. To work around, build and install varnish-libs first.
Well, if I run configure;make;make check in the unpacked tarball I don't see this problem.
All 72 tests pass (x86_64 system).
No varnish-libs installed.
So something is different in the rpmbuild environment, maybe this is the reason why 64 of the 72 tests fail (after adding LD_LIBRARY_PATH)?
Mogens
Ingvar Hagelund skrev:
- Mogens Kjaer
If I remove the comment on %{__make} check and build varnish, it doesn't run any checks at all. It just complains about a missing libvarnish.so.0:
... error while loading shared libraries: libvarnish.so.0: cannot open shared object file: No such file or directory FAIL: ./tests/a00000.vtc ...
So is the build system using an already installed libvarnish.so.0 if one is available and not the newly built libvarnish.so.0?
* Jason L Tibbitts III
Usually you play with LD_LIBRARY_PATH in your specfile to reference the just-built library.
Thanks, Jason. To make it run the test suite from within rpmbuild, try
%{__make} check LD_LIBRARY_PATH="../../lib/libvarnish/.libs:../../lib/libvarnishcompat/.libs:../../lib/libvarnishapi/.libs:../../lib/libvcl/.libs"
The specfile is updated.
This is not necessary when ran the tests from an interactive shell. It also appears that when test run within rpmbuild, and with libs from within the build, varnishd won't start, (or at least won't answer any ports) at all. That's different from when running test within rpmbuild, but using libs from the system.
Ingvar
- Mogens Kjaer
If I remove the comment on %{__make} check and build varnish, it doesn't run any checks at all. It just complains about a missing libvarnish.so.0: So is the build system using an already installed libvarnish.so.0 if one is available and not the newly built libvarnish.so.0?
The so version number should be bumped, as the old version of the libraries are incompatible with the pre-2.0 source, and this kind of problems would be discovered a bit earlier. I filed a bug for varnish 2.0 upstream.
http://varnish.projects.linpro.no/ticket/293
Ingvar