Arrange unified /bin <-> $(bindir) in test-suite root
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 5 Apr 2012 11:21:27 +0000 (14:21 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 5 Apr 2012 11:21:27 +0000 (14:21 +0300)
- Rpm traditionally insists on putting itself into /bin and expects
  to find various things, especially /bin/sh there as well. This
  is normally the case, but on systems where the host /bin is symlink
  to eg /usr/bin, the test-suite /bin will be empty except for rpm
  itself causing a big number of bogus test-suite failures. Making
  test-suite root bin/ always a symlink to $(bindir) avoids this issue
  and works whether the host /bin is a real directory or not.

tests/Makefile.am

index dca36b2..cc82a7d 100644 (file)
@@ -91,6 +91,9 @@ EXTRA_DIST += atlocal.in
 # Hack: Abusing testing$(bindir)/rpmbuild as stamp file
 testing$(bindir)/rpmbuild: ../rpmbuild
        rm -rf testing
+       # Arrange unified /bin vs $(bindir) to keep things simple
+       mkdir -p testing/$(bindir)
+       ln -s ./$(bindir) testing/bin
        (cd ${top_builddir} && \
                  $(MAKE) DESTDIR=`pwd`/${subdir}/testing install)
        cp -r data/ testing/