diff options
Diffstat (limited to 'meta/recipes-devtools/expect/expect')
9 files changed, 155 insertions, 149 deletions
diff --git a/meta/recipes-devtools/expect/expect/0001-Add-prototype-to-function-definitions.patch b/meta/recipes-devtools/expect/expect/0001-Add-prototype-to-function-definitions.patch new file mode 100644 index 0000000000..7d211b3dff --- /dev/null +++ b/meta/recipes-devtools/expect/expect/0001-Add-prototype-to-function-definitions.patch @@ -0,0 +1,113 @@ +From 904c7cf6647594939ce1e398468bca3c885f0622 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 15 Aug 2022 18:25:23 -0700 +Subject: [PATCH] Add prototype to function definitions + +Compilers like clang has started erroring out on implicit-function-declaration +therefore arrange the relevant include files where needed. + +Upstream-Status: Submitted [https://sourceforge.net/p/expect/patches/24/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + exp_chan.c | 5 +++-- + exp_clib.c | 4 +++- + exp_main_sub.c | 5 +++++ + pty_termios.c | 4 ++++ + 4 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/exp_chan.c b/exp_chan.c +index 79f486c..50375d3 100644 +--- a/exp_chan.c ++++ b/exp_chan.c +@@ -35,6 +35,7 @@ + #include "exp_prog.h" + #include "exp_command.h" + #include "exp_log.h" ++#include "exp_event.h" /* exp_background_channelhandler */ + #include "tcldbg.h" /* Dbg_StdinMode */ + + extern int expSetBlockModeProc _ANSI_ARGS_((int fd, int mode)); +@@ -631,7 +632,7 @@ expWaitOnOne() { + } + + void +-exp_background_channelhandlers_run_all() ++exp_background_channelhandlers_run_all(void) + { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + ExpState *esPtr; +@@ -760,7 +761,7 @@ expCreateChannel(interp,fdin,fdout,pid) + } + + void +-expChannelInit() { ++expChannelInit(void) { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + + tsdPtr->channelCount = 0; +diff --git a/exp_clib.c b/exp_clib.c +index b21fb5d..8f31fc3 100644 +--- a/exp_clib.c ++++ b/exp_clib.c +@@ -9,13 +9,14 @@ would appreciate credit if this program or parts of it are used. + + #include "expect_cf.h" + #include <stdio.h> ++#include <unistd.h> + #include <setjmp.h> + #ifdef HAVE_INTTYPES_H + # include <inttypes.h> + #endif + #include <sys/types.h> + #include <sys/ioctl.h> +- ++#include <sys/wait.h> + #ifdef TIME_WITH_SYS_TIME + # include <sys/time.h> + # include <time.h> +@@ -1738,6 +1739,7 @@ int exp_getptyslave(); + #define sysreturn(x) return(errno = x, -1) + + void exp_init_pty(); ++void exp_init_tty(); + + /* + The following functions are linked from the Tcl library. They +diff --git a/exp_main_sub.c b/exp_main_sub.c +index bf6c4be..f53b89e 100644 +--- a/exp_main_sub.c ++++ b/exp_main_sub.c +@@ -61,6 +61,11 @@ int exp_cmdlinecmds = FALSE; + int exp_interactive = FALSE; + int exp_buffer_command_input = FALSE;/* read in entire cmdfile at once */ + int exp_fgets(); ++int exp_tty_cooked_echo( ++ Tcl_Interp *interp, ++ exp_tty *tty_old, ++ int *was_raw, ++ int *was_echo); + + Tcl_Interp *exp_interp; /* for use by signal handlers who can't figure out */ + /* the interpreter directly */ +diff --git a/pty_termios.c b/pty_termios.c +index c605b23..80ed5e7 100644 +--- a/pty_termios.c ++++ b/pty_termios.c +@@ -7,6 +7,7 @@ would appreciate credit if you use this file or parts of it. + + */ + ++#include <pty.h> /* openpty */ + #include <stdio.h> + #include <signal.h> + +@@ -15,6 +16,9 @@ would appreciate credit if you use this file or parts of it. + #endif + + #include "expect_cf.h" ++#include "tclInt.h" ++ ++extern char * expErrnoMsg _ANSI_ARGS_((int)); + + /* + The following functions are linked from the Tcl library. They diff --git a/meta/recipes-devtools/expect/expect/0001-Resolve-string-formatting-issues.patch b/meta/recipes-devtools/expect/expect/0001-Resolve-string-formatting-issues.patch index af1d8c626c..bfb6dcd89a 100644 --- a/meta/recipes-devtools/expect/expect/0001-Resolve-string-formatting-issues.patch +++ b/meta/recipes-devtools/expect/expect/0001-Resolve-string-formatting-issues.patch @@ -3,7 +3,7 @@ From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Thu, 23 Mar 2017 13:44:41 +0200 Subject: [PATCH] Resolve string formatting issues. -Upstream-Status: Inappropriate [upstream seems dead] +Upstream-Status: Inactive-Upstream [no activity since 2018; cvs server went read-only] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- exp_clib.c | 4 ++-- diff --git a/meta/recipes-devtools/expect/expect/0001-configure.in.patch b/meta/recipes-devtools/expect/expect/0001-configure.in.patch index 7595a254a8..618c4bee8e 100644 --- a/meta/recipes-devtools/expect/expect/0001-configure.in.patch +++ b/meta/recipes-devtools/expect/expect/0001-configure.in.patch @@ -1,7 +1,7 @@ Allow cross compiling. Signed-off-by: Anders Roxell <anders.roxell@enea.com> -Upstream-Status: Pending +Upstream-Status: Inactive-Upstream [no activity since 2018; cvs server went read-only] --- diff -uNr a/configure.in b/configure.in --- a/configure.in 2012-12-14 15:31:32.623180450 +0100 diff --git a/meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch b/meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch index 37512fb9bc..d73f4c3421 100644 --- a/meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch +++ b/meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch @@ -10,7 +10,7 @@ Aborted (core dumped) Use PATH_MAX to fix the problem. -Upstream-Status: Pending [Upstream seems dead] +Upstream-Status: Inactive-Upstream [no activity since 2018; cvs server went read-only] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- diff --git a/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch b/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch index b1d322d5c9..40f7f3bd85 100644 --- a/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch +++ b/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch @@ -42,7 +42,7 @@ Example: } Author: Sergei Golovan <sgolovan@debian.org> -Upstream-Status: Pending +Upstream-Status: Inactive-Upstream [no activity since 2018; cvs server went read-only] This patch is backported from fedora changes for expect: http://pkgs.fedoraproject.org/cgit/rpms/expect.git/commit/ ?h=master&id=b6737eed550be93182f2ed194e836a6cbbcf4fa3 diff --git a/meta/recipes-devtools/expect/expect/0001-fixline1-fix-line-1.patch b/meta/recipes-devtools/expect/expect/0001-fixline1-fix-line-1.patch new file mode 100644 index 0000000000..9c73d3e579 --- /dev/null +++ b/meta/recipes-devtools/expect/expect/0001-fixline1-fix-line-1.patch @@ -0,0 +1,31 @@ +From eef7c44c10de32ba399ab162cb5799fafdce3fa5 Mon Sep 17 00:00:00 2001 +From: Joe Slater <joe.slater@windriver.com> +Date: Tue, 15 Mar 2022 22:00:04 +0000 +Subject: [PATCH] fixline1: fix line 1 + +Ironically, fixline1 needs its first line modified by +fixline1. We do that, manually. + +Upstream-Status: Inappropriate [OE specific cross build setup] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> +--- + fixline1 | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/fixline1 b/fixline1 +index 113e9bb..8a38e96 100755 +--- a/fixline1 ++++ b/fixline1 +@@ -1,4 +1,7 @@ +-#!expect -- ++#!/bin/sh ++# expect won't see the exec \ ++exec expect -- "$0" ${1+"$@"} ++ + # Synopsis: fixline1 newpath < input > output + # Author: Don Libes + +-- +2.32.0 + diff --git a/meta/recipes-devtools/expect/expect/0002-tcl.m4.patch b/meta/recipes-devtools/expect/expect/0002-tcl.m4.patch index dc4c6ba406..eb178f462a 100644 --- a/meta/recipes-devtools/expect/expect/0002-tcl.m4.patch +++ b/meta/recipes-devtools/expect/expect/0002-tcl.m4.patch @@ -1,7 +1,7 @@ Use proper -L path when cross compiling. Signed-off-by: Anders Roxell <anders.roxell@enea.com> -Upstream-Status: Pending +Upstream-Status: Inactive-Upstream [no activity since 2018; cvs server went read-only] --- diff -uNr a/tclconfig/tcl.m4 b/tclconfig/tcl.m4 --- a/tclconfig/tcl.m4 2012-12-14 09:16:58.789861281 +0100 diff --git a/meta/recipes-devtools/expect/expect/01-example-shebang.patch b/meta/recipes-devtools/expect/expect/01-example-shebang.patch deleted file mode 100644 index 8597f31387..0000000000 --- a/meta/recipes-devtools/expect/expect/01-example-shebang.patch +++ /dev/null @@ -1,144 +0,0 @@ -Author: Mike Markley <mike@markley.org> -Author: Sergei Golovan <sgolovan@debian.org> -Description: Fixes shebangs in examples (Closes: #152367). - -Backported from Debian - -Upstream-Status: Pending -Index: expect5.45/example/beer.exp -=================================================================== ---- expect5.45.orig/example/beer.exp 2006-01-25 13:51:39.000000000 -0800 -+++ expect5.45/example/beer.exp 2013-11-01 17:35:19.817318341 -0700 -@@ -1,4 +1,9 @@ --#!/depot/path/expect -f -+#!/bin/sh -+# -*- tcl -*- -+# The next line is executed by /bin/sh, but not tcl \ -+exec tclsh "$0" ${1+"$@"} -+ -+package require Expect - - # 99 bottles of beer on the wall, Expect-style - # Author: Don Libes <libes@nist.gov> -Index: expect5.45/example/expectd.proto -=================================================================== ---- expect5.45.orig/example/expectd.proto 2010-07-02 09:03:31.000000000 -0700 -+++ expect5.45/example/expectd.proto 2013-11-01 17:35:19.821318341 -0700 -@@ -1,4 +1,10 @@ --#!/depot/tcl/src/expect/e -- -+#!/bin/sh -+# -*- tcl -*- -+# The next line is executed by /bin/sh, but not tcl \ -+exec tclsh "$0" ${1+"$@"} -+ -+package require Expect -+ - # Description: Simple fragment to begin a telnet daemon - # For more information, see Chapter 17 of "Exploring Expect" - # Author: Don Libes, NIST -Index: expect5.45/example/irsh -=================================================================== ---- expect5.45.orig/example/irsh 2010-07-02 09:03:31.000000000 -0700 -+++ expect5.45/example/irsh 2013-11-01 17:35:19.821318341 -0700 -@@ -1,4 +1,9 @@ --#!/depot/path/expect -- -+#!/bin/sh -+# -*- tcl -*- -+# The next line is executed by /bin/sh, but not tcl \ -+exec tclsh "$0" ${1+"$@"} -+ -+package require Expect - - # Do rsh interactively. For example, consider the following command: - # rsh <remote> ls -l "|" more -Index: expect5.45/example/passwd.cgi -=================================================================== ---- expect5.45.orig/example/passwd.cgi 2000-01-06 15:22:07.000000000 -0800 -+++ expect5.45/example/passwd.cgi 2013-11-01 17:35:19.821318341 -0700 -@@ -1,4 +1,9 @@ --#!/depot/path/expect -- -+#!/bin/sh -+# -*- tcl -*- -+# The next line is executed by /bin/sh, but not tcl \ -+exec tclsh "$0" ${1+"$@"} -+ -+package require Expect - - # This is a CGI script to process requests created by the accompanying - # passwd.html form. This script is pretty basic, although it is -Index: expect5.45/example/passwdprompt -=================================================================== ---- expect5.45.orig/example/passwdprompt 2003-09-05 12:01:59.000000000 -0700 -+++ expect5.45/example/passwdprompt 2013-11-01 17:35:19.821318341 -0700 -@@ -1,4 +1,9 @@ --#!/depot/path/expect -+#!/bin/sh -+# -*- tcl -*- -+# The next line is executed by /bin/sh, but not tcl \ -+exec tclsh "$0" ${1+"$@"} -+ -+package require Expect - - # This script prompts for a passwd from stdin while echoing *'s - -Index: expect5.45/example/reprompt -=================================================================== ---- expect5.45.orig/example/reprompt 2000-01-06 15:22:07.000000000 -0800 -+++ expect5.45/example/reprompt 2013-11-01 17:35:19.821318341 -0700 -@@ -1,4 +1,9 @@ --#!/depot/path/expect -- -+#!/bin/sh -+# -*- tcl -*- -+# The next line is executed by /bin/sh, but not tcl \ -+exec tclsh "$0" ${1+"$@"} -+ -+package require Expect - - # Name: reprompt - # Description: reprompt every so often until user enters something -Index: expect5.45/example/term_expect -=================================================================== ---- expect5.45.orig/example/term_expect 2005-02-15 10:11:31.000000000 -0800 -+++ expect5.45/example/term_expect 2013-11-01 17:35:19.821318341 -0700 -@@ -1,4 +1,9 @@ --#!/depot/path/expectk -+#!/bin/sh -+# -*- tcl -*- -+# The next line is executed by /bin/sh, but not tcl \ -+exec wish "$0" ${1+"$@"} -+ -+package require Expect - - # Name: tkterm - terminal emulator using Expect and Tk text widget, v3.0 - # Author: Don Libes, July '94 -Index: expect5.45/example/vrfy -=================================================================== ---- expect5.45.orig/example/vrfy 2010-07-02 09:03:31.000000000 -0700 -+++ expect5.45/example/vrfy 2013-11-01 17:35:19.821318341 -0700 -@@ -1,4 +1,9 @@ --#!/depot/path/expect -f -+#!/bin/sh -+# -*- tcl -*- -+# The next line is executed by /bin/sh, but not tcl \ -+exec tclsh "$0" ${1+"$@"} -+ -+package require Expect - - - # separate address into user and host -Index: expect5.45/example/xrlogin -=================================================================== ---- expect5.45.orig/example/xrlogin 2000-01-06 15:22:08.000000000 -0800 -+++ expect5.45/example/xrlogin 2013-11-01 17:35:19.821318341 -0700 -@@ -1,4 +1,10 @@ --#!/depot/path/expect -- -+#!/bin/sh -+# -*- tcl -*- -+# The next line is executed by /bin/sh, but not tcl \ -+exec tclsh "$0" ${1+"$@"} -+ -+package require Expect -+ - # xrlogin - rlogin but with current DISPLAY - # - # You can extend this idea to save any arbitrary information across rlogin diff --git a/meta/recipes-devtools/expect/expect/run-ptest b/meta/recipes-devtools/expect/expect/run-ptest new file mode 100755 index 0000000000..856c314eaf --- /dev/null +++ b/meta/recipes-devtools/expect/expect/run-ptest @@ -0,0 +1,6 @@ +#!/bin/sh + +out_put=`tclsh tests/all.tcl -verbose bpse` +echo +echo "${out_put}" | awk '/PASSED|FAILED|SKIPPED/{gsub(/PASSED/,"PASS"); gsub(/FAILED/,"FAIL"); gsub(/SKIPPED/,"SKIP"); if ($NF=="PASS"){print $NF": "$(NF-1)}else{print $NF": "$2}}' | uniq + |