summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch
blob: 091370129a78ee00551d9c79f9d1baf74739bb58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Fixed openssh ptest

ptests for openssh, apart from a lot of .sh scripts, also
require 2 executables to be cross-compiled for the target
and deployed there, that will be called from the test
scripts.

Those 2 files were not built when cross-compiling
(Makefile target all:), so I added them to the build,
under the target all_test.

This new make target is intended to be run from
do_compile_ptest(), that builds everything needed for
performing the ptests.

Because both these 2 executables required for ptest
are linked with libssh (LDFLAGS += -lssh), I also
added it as dependency for each of them.

Upstream-status: Inappropriate

Signed-off-by: Liviu Gheorghisan <liviu.gheorghisan@enea.com>
---
--- a/Makefile.in	2014-12-10 16:19:37.513373454 +0100
+++ b/Makefile.in	2014-12-10 16:25:23.262764227 +0100
@@ -130,6 +130,8 @@ FIXALGORITHMSCMD= $(SHELL) $(srcdir)/fix
 
 all: $(CONFIGFILES) $(MANPAGES) $(TARGETS)
 
+all_test: regress/modpipe$(EXEEXT) regress/setuid-allowed$(EXEEXT)
+
 $(LIBSSH_OBJS): Makefile.in config.h
 $(SSHOBJS): Makefile.in config.h
 $(SSHDOBJS): Makefile.in config.h
@@ -394,18 +396,18 @@ uninstall:
 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
 
-regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c
+regress/modpipe$(EXEEXT): libssh.a
 	[ -d `pwd`/regress ]  ||  mkdir -p `pwd`/regress
 	[ -f `pwd`/regress/Makefile ]  || \
 	    ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile
-	$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
+	$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/modpipe.c \
 	$(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
 
-regress/setuid-allowed$(EXEEXT): $(srcdir)/regress/setuid-allowed.c
+regress/setuid-allowed$(EXEEXT): libssh.a
 	[ -d `pwd`/regress ]  ||  mkdir -p `pwd`/regress
 	[ -f `pwd`/regress/Makefile ]  || \
 	    ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile
-	$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
+	$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/setuid-allowed.c \
 	$(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
 
 tests interop-tests:	$(TARGETS) regress/modpipe$(EXEEXT) regress/setuid-allowed$(EXEEXT)