The Linux Foundation

 
GenericTestBuildIssues

From The Linux Foundation

Back to TestGroup

Contents

Generic or Host System Specific Test Suite Issues/Workarounds

Mandriva

Issues with using rpm --rcfile

I've encountered a couple of issues with using rpm --rcfile "/usr/lib/rpm/rpmrc:./rpmrc" like several of the Makefiles do. I'm assuming these are unique to Mandriva and the fact we're one of the few using bleeding edge rpm (4.4.6 on cooker atm).

As a user, say "stew", I was seeing a long dealy before any actual building would start. Turns out using strace, that rpm is going out try to contact hkp://sks.keyserver.penguin.de, which apparently isn't there. The difference is, under "normal" rpm usage on Mandriva, you get:

_hkp_keyserver_query       %nil

but when using --rcfile as above, you get:

_hkp_keyserver_query       %{_hkp_keyserver}/pks/lookup?op=get&search=0x

So the workaround for me was to add "%_hkp_keyserver_query  %nil" to the local rpmmacros in the build directory.

As root (which runtime-test requires), I have a different problem:

rpm --rcfile "/usr/lib/rpm/rpmrc:./rpmrc" --define "_sourcedir ./" -bp lsb-runtime-test.spec
rpmdb: configured environment flags incompatible with existing environment
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm

Apparently there is an incompatibility with the /var/lib/rpm/__db.00* files created using /usr/lib/rpm/mandriva/rpmrc vs /usr/lib/rpm/rpmrc. This can be worked around by doing:

rm -f /var/lib/rpm/__db.00*

Before the build. You have to do it again after the build to be able to use rpm/urpmi to install packages etc.

"silent" failure of vsth_rtd.o in runtime-test build

I happened to see a gcc error go by in building lsb-runtime test. Unfortunately, this didn't stop the build or packaging. I went back and captured the output in a logfile and you see:

/usr/bin/cc -I/home/tet/test_sets/SRC/../../inc/tet3 -I../../INC -I../../SYSINC -D_XOPEN_SOURCE=500 -c -o vsth_rtd.o vsth_rtd.c
In file included from vsth_rtd.c:26:
../../SYSINC/ndbm.h:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dbm_fetch'
../../SYSINC/ndbm.h:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dbm_firstkey'
../../SYSINC/ndbm.h:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dbm_nextkey'
../../SYSINC/ndbm.h:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
make[1]: *** [vsth_rtd.o] Error 1
make[1]: Leaving directory `/home/tet/test_sets/SRC/common/vsthlib'

It looks like this earlier problem is the clue:

*** Starting ndbm.h
Missing #include file: ndbm.h
*** Completed ndbm.h

Installing lib64gdbm3-devel, which provides /usr/include/gdbm/ndbm.h solved the problem.


[Article] [Discussion] [View source] [History]