Re: [Rpm-maint] Getting make check to work

2013-03-07 Thread Mark Wielaard
On Wed, 2013-03-06 at 15:28 +0200, Panu Matilainen wrote:
 ./configure CPPFLAGS=`pkg-config --cflags nss` --with-external-db
 make
 make check
 [...]
 And finally, thanks for complaining about this, really. One can only 
 explain known bugs so many times before it gets so irritating as to 
 mandate a fix, which was the case here :)

Thank you! All 266 tests were successful.

Awesome,

Mark

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] Getting make check to work

2013-03-06 Thread Panu Matilainen

On 03/05/2013 11:15 PM, Mark Wielaard wrote:

Hi,

I am probably doing something wrong with configuring, but I cannot get
make check to work with the attached patch. And even with that half of
the tests fail because for some reason there is a literal '${prefix}'
string used somewhat that cause the creation of an extra directory
tests/testing\$\{prefix\}/ next to the tests/testing one which contains
just var/lib/rpm/

I also tried with srcdir == builddir and with the latest release
4.10.3.1 instead of a git checkout and on fedora 18. But the issue
is always the same with lots of failures because something seems to
use '${prefix}' literally.

I am configuring with: --with-external-db \
   CPPFLAGS=-I/usr/include/nspr4 -I/usr/include/nss3 -I/usr/include/db4

Does this ring any bell?


Indeed it does... there's an ages old flaw in the configure/make system 
that causes this unless you pass an explicit --prefix or --localstatedir 
to configure. Should really do something about it, just never gotten 
around to it :-/


Meanwhile, the patch looks ok (make check still worksforme :) - 
applied, thanks.


- Panu -

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] Getting make check to work

2013-03-05 Thread Mark Wielaard
Hi,

I am probably doing something wrong with configuring, but I cannot get
make check to work with the attached patch. And even with that half of
the tests fail because for some reason there is a literal '${prefix}'
string used somewhat that cause the creation of an extra directory
tests/testing\$\{prefix\}/ next to the tests/testing one which contains
just var/lib/rpm/

I also tried with srcdir == builddir and with the latest release
4.10.3.1 instead of a git checkout and on fedora 18. But the issue
is always the same with lots of failures because something seems to
use '${prefix}' literally.

I am configuring with: --with-external-db \
  CPPFLAGS=-I/usr/include/nspr4 -I/usr/include/nss3 -I/usr/include/db4

Does this ring any bell?

Thanks,

Mark
From 8ee4a07b970a834547dff1d95343a9ff86cb4597 Mon Sep 17 00:00:00 2001
From: Mark Wielaard m...@redhat.com
Date: Tue, 5 Mar 2013 21:52:36 +0100
Subject: [PATCH] tests: Make sure testing/usr/bin exists and to copy data from
 srcdir.

When srcdir != builddir the data has to be copied over from the srcdir.
When any of the required progs comes from /usr/bin then there also needs
to be a usr/bin under testing. Just use the same symlink as for testing/bin.
---
 tests/Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 61c18af..6a9f0e1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -101,10 +101,11 @@ testing$(bindir)/rpmbuild: ../rpmbuild
ln -s ./$(bindir) testing/bin
(cd ${top_builddir}  \
  $(MAKE) DESTDIR=`pwd`/${subdir}/testing install)
-   cp -r data/ testing/
+   cp -r ${srcdir}/data/ testing/
mkdir testing/{dev,etc,magic,tmp}
for node in stdin stderr stdout null; do ln -s /dev/$${node} 
testing/dev/$${node}; done
for cf in hosts resolv.conf passwd shadow group gshadow mtab fstab; do 
[ -f /etc/$${cf} ]  ln -s /etc/$${cf} testing/etc/$${cf}; done
+   ln -s ../$(bindir) testing/usr/bin
for prog in gzip cat patch tar sh ln chmod rm mkdir uname grep sed find 
file mktemp cut sort diff; do p=`which $${prog}`; ln -s $${p} testing/$${p}; 
done
for d in /proc /sys /selinux /etc/selinux; do if [ -d $${d} ]; then ln 
-s $${d} testing/$${d}; fi; done
(cd testing/magic  file -C)
-- 
1.8.1.4

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint