OpenSSH 3.7 testing (Re: 3.6p1 bug on SCO OpenServer)

Brian Poole raj at cerias.purdue.edu
Sun Sep 14 09:42:21 EST 2003


Quoting Ben Lindstrom (mouring at etoh.eviladmin.org) from 13 September 2003:
> 
> 
> On Sat, 13 Sep 2003, Brian Poole wrote:
> 
> > It appears that the regress Makefile is not portable enough. Solaris
> > make in particular pukes on it currently (GNU make works fine.)
> >
> > $ make clean
> > rm -f *.o *.a ssh sshd ssh-add ssh-keygen ssh-keyscan ssh-keysign ssh-agent scp ssh-rand-helper sftp-server sftp logintest config.cache config.log
> > rm -f *.out core
> > (cd openbsd-compat && make clean)
> > rm -f *.o *.a core
> > (cd regress && make clean)
> > make: Fatal error in reader: Makefile, line 3: Badly formed macro assignment
> > Current working directory /tmp/openssh-cvs/regress
> > *** Error code 1
> > make: Fatal error: Command failed for target `clean'
> 
> but t-exec: works?

No, the Makefile was pretty much worthless for Solaris's make.
I was doing all the regression testing with gmake.

> Does it work if you do:
> 
> clean:
>         @for F in $(CLEANFILES); do rm -f $(OBJ)/${F}; done
> 	rm -f authorized_keys_${USER}
> 
> [..]
> 
> CLEANFILES += known_hosts pidfile \
>                 ssh_config ssh_proxy sshd_config sshd_proxy \
>                 rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \
>                 rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \
>                 ls.copy remote_pid
> 
> I'm wondering if the $${F} is tripping up Solaris' makefile.

This didn't work either.. I had a few minutes to poke at this and
I think I've got the problems down, though I may be a bit off as
my Makefile fu is pretty much non-existent.

problem #1, line #3 is unacceptable for Solaris's make:

basm 263 $ make clean
make: Fatal error in reader: Makefile, line 3: Badly formed macro assignment

Commenting that line out gives me (obviously not acceptable for the
real solution, just wanting to see if that was a separate problem):

$ cvs diff -u Makefile
Index: Makefile
===================================================================
RCS file: /cvs/openssh/regress/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile    9 Sep 2003 13:07:10 -0000       1.8
+++ Makefile    13 Sep 2003 23:31:51 -0000
@@ -1,6 +1,6 @@
 #      $OpenBSD: Makefile,v 1.24 2003/07/03 08:24:13 markus Exp $

-OBJ ?= `pwd`
+# OBJ ?= `pwd`

 REGRESS_TARGETS=       t1 t2 t3 t4 t5 t6 t7 t-exec
 tests:         $(REGRESS_TARGETS)

$ make clean
sh: syntax error at line 1: `;' unexpected
*** Error code 2
make: Fatal error: Command failed for target `clean'

Mmmkay, error has changed at least.. this problem turns out to be in
spacing around the +=.. From the man page of Solaris make:

     +=    When used in place of `=', appends a string to a macro
           definition  (must be surrounded by white space, unlike
           `=').

Must be surrounded by white space.. adding that in (and a change
so we can see what exactly its cleaning) gives us:

$ make clean
for F in t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 authorized_keys_raj known_hosts pidfile  ssh_config ssh_proxy sshd_config sshd_proxy  rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1  rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub  ls.copy remote_pid; do rm -f /${F}; done
$ make distclean
for F in t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 authorized_keys_raj known_hosts pidfile  ssh_config ssh_proxy sshd_config sshd_proxy  rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1  rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub  ls.copy remote_pid; do rm -f /${F}; done

Thats with the following patch:

Index: Makefile
===================================================================
RCS file: /cvs/openssh/regress/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile	9 Sep 2003 13:07:10 -0000	1.8
+++ Makefile	13 Sep 2003 23:41:22 -0000
@@ -1,13 +1,13 @@
 #	$OpenBSD: Makefile,v 1.24 2003/07/03 08:24:13 markus Exp $
 
-OBJ ?= `pwd`
+# OBJ ?= `pwd`
 
 REGRESS_TARGETS=	t1 t2 t3 t4 t5 t6 t7 t-exec
 tests:		$(REGRESS_TARGETS)
 
-CLEANFILES+=	t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2
+CLEANFILES   += t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2
 clean:
-	@for F in $(CLEANFILES); do rm -f $(OBJ)/$${F}; done
+	for F in $(CLEANFILES); do rm -f $(OBJ)/$${F}; done
 distclean:	clean
 
 LTESTS= 	connect \
@@ -38,13 +38,13 @@
 		forwarding
 
 USER!=		id -un
-CLEANFILES+=	authorized_keys_${USER} known_hosts pidfile \
+CLEANFILES   += authorized_keys_${USER} known_hosts pidfile \
 		ssh_config ssh_proxy sshd_config sshd_proxy \
 		rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \
 		rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \
 		ls.copy remote_pid
 
-#LTESTS+=	ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
+#LTESTS +=	ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
 
 t1:
 	ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv


So.. #1 is still a problem, perhaps someone better versed with Makefiles
can fix it. I'm getting twitchy just fiddling with it ;-). #2 seems to be
fixed by adding white space, though I'm suspicious that clean & distclean
are cleaning the exact same set of files. Is this correct? Why are there
two assignment statements if it is supposed to be always cleaning the 
same set of files?

> Darren and Tim already fixed this so it should be more portable.

So it was.. started testing on a SNAP and noticed it there. Moved up
to CVS a bit later and didn't recheck it. Much obliged.


-b




More information about the openssh-unix-dev mailing list