* [dizzy][PATCH] Fixed openssh ptest
@ 2014-12-11 12:22 Liviu Gheorghisan
2014-12-16 21:09 ` Burton, Ross
0 siblings, 1 reply; 4+ messages in thread
From: Liviu Gheorghisan @ 2014-12-11 12:22 UTC (permalink / raw)
To: poky
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.
Now we have 2 separate make targets:
all: builds all openssh, except for the ptest related files,
that is invoked from do_compile().
all_test: builds only the files required for ptests, that is
invoked from do_compile_ptest().
All this stuff fixes the following openssh ptest error:
/bin/sh: /usr/lib/openssh/ptest/regress/modpipe: No such file or directory
unexpected error mac chacha20-poly1305@openssh.com at 2909
test integrity: 10 errors: mac 0 padding 0 length 0
chacha20-poly1305@openssh.com: no mac errors
chacha20-poly1305@openssh.com: expected 10 mac errors, got 0
FAIL: integrity
make: *** [t-exec] Error 1
Makefile:168: recipe for target 't-exec' failed
make: Target 'tests' not remade because of errors.
Signed-off-by: Liviu Gheorghisan <liviu.gheorghisan@enea.com>
---
.../openssh/openssh-ptest-fix-sshconnect.patch | 57 ++++++++++++++++++++++
meta/recipes-connectivity/openssh/openssh_6.6p1.bb | 7 ++-
2 files changed, 63 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch
diff --git a/meta/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch b/meta/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch
new file mode 100644
index 0000000..0913701
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch
@@ -0,0 +1,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)
diff --git a/meta/recipes-connectivity/openssh/openssh_6.6p1.bb b/meta/recipes-connectivity/openssh/openssh_6.6p1.bb
index 047a895..fe9ee02 100644
--- a/meta/recipes-connectivity/openssh/openssh_6.6p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_6.6p1.bb
@@ -25,7 +25,8 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.
file://run-ptest \
file://openssh-CVE-2014-2532.patch \
file://openssh-CVE-2014-2653.patch \
- file://auth2-none.c-avoid-authenticate-empty-passwords-to-m.patch"
+ file://auth2-none.c-avoid-authenticate-empty-passwords-to-m.patch \
+ file://openssh-ptest-fix-sshconnect.patch"
PAM_SRC_URI = "file://sshd"
@@ -85,6 +86,10 @@ do_compile_append () {
install -m 0644 ${WORKDIR}/ssh_config ${S}/
}
+do_compile_ptest() {
+ oe_runmake all_test
+}
+
do_install_append () {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
install -D -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [dizzy][PATCH] Fixed openssh ptest
2014-12-11 12:22 [dizzy][PATCH] Fixed openssh ptest Liviu Gheorghisan
@ 2014-12-16 21:09 ` Burton, Ross
2014-12-17 9:21 ` Liviu Gheorghisan
0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2014-12-16 21:09 UTC (permalink / raw)
To: Liviu Gheorghisan; +Cc: Poky Project
[-- Attachment #1: Type: text/plain, Size: 467 bytes --]
Hi Liviu,
Patches for oe-core should go to the openembedded-core mailing list, the
Poky list is only for patches to meta-yocto.
On 11 December 2014 at 12:22, Liviu Gheorghisan <liviu.gheorghisan@enea.com>
wrote:
>
> 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.
>
Should this be applied to master too?
Ross
[-- Attachment #2: Type: text/html, Size: 963 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dizzy][PATCH] Fixed openssh ptest
2014-12-16 21:09 ` Burton, Ross
@ 2014-12-17 9:21 ` Liviu Gheorghisan
0 siblings, 0 replies; 4+ messages in thread
From: Liviu Gheorghisan @ 2014-12-17 9:21 UTC (permalink / raw)
To: Burton, Ross; +Cc: Poky Project
[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]
Hello Ross,
On 12/16/2014 11:09 PM, Burton, Ross wrote:
> Hi Liviu,
>
> Patches for oe-core should go to the openembedded-core mailing list,
> the Poky list is only for patches to meta-yocto.
My patch applies cleanly to oe-core/dizzy as well. I will re-send it to
openembedded-core@lists.openembedded.org.
>
> On 11 December 2014 at 12:22, Liviu Gheorghisan
> <liviu.gheorghisan@enea.com <mailto:liviu.gheorghisan@enea.com>> wrote:
>
> 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.
>
>
> Should this be applied to master too?
I only tested and reproduced the problem on dizzy. I did a quick diff
now between oe-core/master and oe-core/dizzy and, from the OpenSSH
point of view, the only difference is that the master branch contains an
additional CVE fixed (CVE-2014-2532) that is not on dizzy, and that's
it. So my presumption is that the problem reproduces on oe-core/master
as well. However this patch does not apply on oe-core/master, because
the OpenSSH recipe (openssh_6.6p1.bb) is slightly modified, so it must
be adapted.
>
> Ross
--
Liviu Gheorghisan
Software Engineer
http://www.enea.com
[-- Attachment #2: Type: text/html, Size: 3145 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dizzy][PATCH] Fixed openssh ptest
@ 2014-12-17 14:13 Liviu Gheorghisan
0 siblings, 0 replies; 4+ messages in thread
From: Liviu Gheorghisan @ 2014-12-17 14:13 UTC (permalink / raw)
To: openembedded-core
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.
Now we have 2 separate make targets:
all: builds all openssh, except for the ptest related files,
that is invoked from do_compile().
all_test: builds only the files required for ptests, that is
invoked from do_compile_ptest().
All this stuff fixes the following openssh ptest error:
/bin/sh: /usr/lib/openssh/ptest/regress/modpipe: No such file or directory
unexpected error mac chacha20-poly1305@openssh.com at 2909
test integrity: 10 errors: mac 0 padding 0 length 0
chacha20-poly1305@openssh.com: no mac errors
chacha20-poly1305@openssh.com: expected 10 mac errors, got 0
FAIL: integrity
make: *** [t-exec] Error 1
Makefile:168: recipe for target 't-exec' failed
make: Target 'tests' not remade because of errors.
Signed-off-by: Liviu Gheorghisan <liviu.gheorghisan@enea.com>
---
.../openssh/openssh-ptest-fix-sshconnect.patch | 57 ++++++++++++++++++++++
meta/recipes-connectivity/openssh/openssh_6.6p1.bb | 7 ++-
2 files changed, 63 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch
diff --git a/meta/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch b/meta/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch
new file mode 100644
index 0000000..0913701
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch
@@ -0,0 +1,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)
diff --git a/meta/recipes-connectivity/openssh/openssh_6.6p1.bb b/meta/recipes-connectivity/openssh/openssh_6.6p1.bb
index 047a895..fe9ee02 100644
--- a/meta/recipes-connectivity/openssh/openssh_6.6p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_6.6p1.bb
@@ -25,7 +25,8 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.
file://run-ptest \
file://openssh-CVE-2014-2532.patch \
file://openssh-CVE-2014-2653.patch \
- file://auth2-none.c-avoid-authenticate-empty-passwords-to-m.patch"
+ file://auth2-none.c-avoid-authenticate-empty-passwords-to-m.patch \
+ file://openssh-ptest-fix-sshconnect.patch"
PAM_SRC_URI = "file://sshd"
@@ -85,6 +86,10 @@ do_compile_append () {
install -m 0644 ${WORKDIR}/ssh_config ${S}/
}
+do_compile_ptest() {
+ oe_runmake all_test
+}
+
do_install_append () {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
install -D -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-17 14:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-11 12:22 [dizzy][PATCH] Fixed openssh ptest Liviu Gheorghisan
2014-12-16 21:09 ` Burton, Ross
2014-12-17 9:21 ` Liviu Gheorghisan
-- strict thread matches above, loose matches on Subject: below --
2014-12-17 14:13 Liviu Gheorghisan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.