PATCH: PAM xtests fail if build directory is not source directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear List,
               xtests/Makefile.am makes a rather half-hearted attempt to
handle the case of building outside the source tree (well, it uses
$(srcdir) to get at the test runner script, anyway).

Unfortunately, the script then fails to find the files to be installed,
since it is itself invoked from inside $(top_builddir)/xtests, and they
are all in $(top_srcdir)/xtests.

This can be worked around in many ways.  I use a simple-minded
approach (no additional configuration-time wizardry, and no attempt
to make the script find its own location).  I merely shove the necessary
$(srcdir) location as a command-line argument.

I attach a patch against the current CVS sources.  No relevant
changes have occurred since the Linux-PAM-0.99.7.1 release.
The patch uses UN*X-style (LF) line-breaks.

A bzipped version of the patch should be available, for the
foreseeable future, here:
<a href="http://www.brenda-arkle.demon.co.uk/patches/Linux-PAM/";>
http://www.brenda-arkle.demon.co.uk/patches/Linux-PAM/
</a>

Bernard Leak.

_________________________________________________________________
Could you be the guest MSN Movies presenter? Click Here to Audition http://www.lightscameraaudition.co.uk
#This patch was prepared by Bernard Leak on Monday 30th April 2007.
#It was prepared against the 0.99.7.1 release (as shown), but also
#checked against the live CVS versions in http://pam.cvs.sourceforge.net/pam/Linux-PAM/xtests/

#The problem: the use of $(srcdir) in the Makefile isn't enough!
#if builddir != srcdir, then the installable parts of the tests
#are invisible (we're in $(builddir), they are in $(srcdir)).
#The easiest way to provide the necessary information is simply
#to stick it in as a command-line argument to the runner script.

#This is against Revision 1.2 checked in Wed Jan 31 19:19:44 2007 UTC by kukuk 
#Output of diff -Nru Linux-PAM-0.99.7.1/xtests/run-xtests.sh{-old,}
--- Linux-PAM-0.99.7.1/xtests/run-xtests.sh-old	2006-08-30 09:45:30.000000000 +0100
+++ Linux-PAM-0.99.7.1/xtests/run-xtests.sh	2007-04-30 03:15:37.000000000 +0100
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+SRCDIR=$1
+[ -z "${SRCDIR}" ] && SRCDIR='.'
+
 if test `id -u` -ne 0 ; then
   echo "You need to be root to run the tests"
   exit 1
@@ -13,7 +16,7 @@
 all=0
 
 for testname in $XTESTS ; do
-	  install -m 644 $testname.pamd /etc/pam.d/$testname
+	  install -m 644 "${SRCDIR}"/$testname.pamd /etc/pam.d/$testname
 	  ./$testname > /dev/null
 	  if test $? -ne 0 ; then
 	    echo "FAIL: $testname"

#This is against Revision 1.6 checked in Wed Jan 31 19:19:44 2007 UTC by kukuk 
#Output of diff -Nru Linux-PAM-0.99.7.1/xtests/Makefile.am{-old,}
--- Linux-PAM-0.99.7.1/xtests/Makefile.am-old	2006-08-30 14:46:44.000000000 +0100
+++ Linux-PAM-0.99.7.1/xtests/Makefile.am	2007-04-30 03:13:51.000000000 +0100
@@ -19,4 +19,4 @@
 noinst_PROGRAMS = $(XTESTS)
 
 xtests: $(XTESTS) run-xtests.sh
-	$(srcdir)/run-xtests.sh
+	"$(srcdir)"/run-xtests.sh "$(srcdir)"

#Output of diff -Nru Linux-PAM-0.99.7.1/xtests/Makefile.in{-old,}
--- Linux-PAM-0.99.7.1/xtests/Makefile.in-old	2007-01-23 10:10:30.000000000 +0000
+++ Linux-PAM-0.99.7.1/xtests/Makefile.in	2007-04-30 03:18:11.000000000 +0100
@@ -536,7 +536,7 @@
 
 
 xtests: $(XTESTS) run-xtests.sh
-	$(srcdir)/run-xtests.sh
+	"$(srcdir)"/run-xtests.sh "$(srcdir)"
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:


_______________________________________________
Pam-list mailing list
Pam-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/pam-list

[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux