SHA256
3
0
forked from pool/expect
OBS User unknown 2008-03-21 00:34:20 +00:00 committed by Git OBS Bridge
parent e9dfba9b1f
commit 802e03fd77
10 changed files with 2768 additions and 575 deletions

View File

@ -1,209 +0,0 @@
--- BUILD/expect-5.43/exp_chan.c
+++ BUILD/expect-5.43/exp_chan.c
@@ -640,6 +640,7 @@
esPtr->buffer = Tcl_NewStringObj("",0);
Tcl_IncrRefCount(esPtr->buffer);
esPtr->umsize = exp_default_match_max;
+ esPtr->umsize_changed = exp_default_match_max_changed;
/* this will reallocate object with an appropriate sized buffer */
expAdjust(esPtr);
--- BUILD/expect-5.43/exp_command.h
+++ BUILD/expect-5.43/exp_command.h
@@ -30,6 +30,7 @@
EXTERN char * exp_get_var _ANSI_ARGS_((Tcl_Interp *,char *));
EXTERN int exp_default_match_max;
+EXTERN int exp_default_match_max_changed;
EXTERN int exp_default_parity;
EXTERN int exp_default_rm_nulls;
EXTERN int exp_default_close_on_eof;
@@ -108,6 +109,7 @@
int msize; /* # of bytes that buffer can hold (max) */
int umsize; /* # of bytes (min) that is guaranteed to match */
/* this comes from match_max command */
+ int umsize_changed; /* is umsize changed by user? */
int printed; /* # of bytes written to stdout (if logging on) */
/* but not actually returned via a match yet */
int echoed; /* additional # of bytes (beyond "printed" above) */
--- BUILD/expect-5.43/expect.c
+++ BUILD/expect-5.43/expect.c
@@ -41,8 +41,17 @@
#include "tcldbg.h"
#endif
+/* The initial length is 2000. We increment it by 2000. The maximum
+ is 8MB (0x800000). */
+#define EXP_MATCH_MAX 2000
+#define EXP_MATCH_INC 2000
+#define EXP_MATCH_STEP_LIMIT 0x700000
+#define EXP_MATCH_LIMIT 0x800000
+#define EXP_MATCH_LIMIT_QUOTE "0x800000"
+
/* initial length of strings that we can guarantee patterns can match */
-int exp_default_match_max = 2000;
+int exp_default_match_max = EXP_MATCH_MAX;
+int exp_default_match_max_changed = 0;
#define INIT_EXPECT_TIMEOUT_LIT "10" /* seconds */
#define INIT_EXPECT_TIMEOUT 10 /* seconds */
int exp_default_parity = TRUE;
@@ -1619,6 +1628,76 @@
return newsize;
}
+/* returns # of bytes until we see a newline at the end or EOF. */
+/*ARGSUSED*/
+static int
+expReadNewLine(interp,esPtr,save_flags) /* INTL */
+Tcl_Interp *interp;
+ExpState *esPtr;
+int save_flags;
+{
+ int size;
+ int exp_size;
+ int full_size;
+ int count;
+ char *str;
+
+ count = 0;
+ for (;;) {
+ exp_size = expSizeGet(esPtr);
+
+ /* When we reach the limit, we will only read one char at a
+ time. */
+ if (esPtr->umsize >= EXP_MATCH_STEP_LIMIT)
+ size = TCL_UTF_MAX;
+ else
+ size = exp_size;
+
+ if (exp_size + TCL_UTF_MAX >= esPtr->msize) {
+ if (esPtr->umsize >= EXP_MATCH_LIMIT) {
+ expDiagLogU("WARNING: interact buffer is full. probably your program\r\n");
+ expDiagLogU("is not interactive or has a very long output line. The\r\n");
+ expDiagLogU("current limit is " EXP_MATCH_LIMIT_QUOTE ".\r\n");
+ expDiagLogU("Dumping first half of buffer in order to continue\r\n");
+ expDiagLogU("Recommend you enlarge the buffer.\r\n");
+ exp_buffer_shuffle(interp,esPtr,save_flags,EXPECT_OUT,"expect");
+ return count;
+ }
+ else {
+ esPtr->umsize += EXP_MATCH_INC;
+ expAdjust(esPtr);
+ }
+ }
+
+ full_size = esPtr->msize - (size / TCL_UTF_MAX);
+ size = Tcl_ReadChars(esPtr->channel,
+ esPtr->buffer,
+ full_size,
+ 1 /* append */);
+ if (size > 0) {
+ count += size;
+ /* We try again if there are more to read and we haven't
+ seen a newline at the end. */
+ if (size == full_size) {
+ str = Tcl_GetStringFromObj(esPtr->buffer, &size);
+ if (str[size - 1] != '\n')
+ continue;
+ }
+ }
+ else {
+ /* It is even trickier. We got an error from read. We have
+ to recover from it. Let's make sure the size of
+ buffer is correct. It can be corrupted. */
+ str = Tcl_GetString(esPtr->buffer);
+ Tcl_SetObjLength(esPtr->buffer, strlen(str));
+ }
+
+ break;
+ }
+
+ return count;
+}
+
/* returns # of bytes read or (non-positive) error of form EXP_XXX */
/* returns 0 for end of file */
/* If timeout is non-zero, set an alarm before doing the read, else assume */
@@ -1633,6 +1712,8 @@
{
int cc = EXP_TIMEOUT;
int size = expSizeGet(esPtr);
+ int full_size;
+ int count;
if (size + TCL_UTF_MAX >= esPtr->msize)
exp_buffer_shuffle(interp,esPtr,save_flags,EXPECT_OUT,"expect");
@@ -1649,11 +1730,43 @@
}
#endif
-
+ /* FIXME: If we ask less than what is available in the tcl buffer
+ when tcl has seen EOF, we will throw away the remaining data
+ since the next read will get EOF. Since expect is line-oriented,
+ we exand our buffer to get EOF or the next newline at the end of
+ the input buffer. I don't know if it is the right fix. H.J. */
+ count = 0;
+ full_size = esPtr->msize - (size / TCL_UTF_MAX);
cc = Tcl_ReadChars(esPtr->channel,
- esPtr->buffer,
- esPtr->msize - (size / TCL_UTF_MAX),
- 1 /* append */);
+ esPtr->buffer,
+ full_size,
+ 1 /* append */);
+ if (cc > 0) {
+ count += cc;
+ /* It gets very tricky. There are more to read. We will expand
+ our buffer and get EOF or a newline at the end unless the
+ buffer length has been changed. */
+ if (cc == full_size) {
+ char *str;
+ str = Tcl_GetStringFromObj(esPtr->buffer, &size);
+ if (str[size - 1] != '\n') {
+ if (esPtr->umsize_changed) {
+ char buf[20]; /* big enough for 64bit int in hex. */
+ snprintf(buf,sizeof(buf),"0x%x", esPtr->umsize);
+ expDiagLogU("WARNING: interact buffer is not large enough to hold\r\n");
+ expDiagLogU("all output. probably your program is not interactive or\r\n");
+ expDiagLogU("has a very long output line. The current limit is ");
+ expDiagLogU(buf);
+ expDiagLogU(".\r\n");
+ }
+ else {
+ cc = expReadNewLine(interp,esPtr,save_flags);
+ if (cc > 0)
+ count += cc;
+ }
+ }
+ }
+ }
i_read_errno = errno;
#ifdef SIMPLE_EVENT
@@ -1674,7 +1787,7 @@
}
}
#endif
- return cc;
+ return count > 0 ? count : cc;
}
/*
@@ -2758,8 +2871,14 @@
return(TCL_ERROR);
}
- if (Default) exp_default_match_max = size;
- else esPtr->umsize = size;
+ if (Default) {
+ exp_default_match_max = size;
+ exp_default_match_max_changed = 1;
+ }
+ else {
+ esPtr->umsize = size;
+ esPtr->umsize_changed = 1;
+ }
return(TCL_OK);
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:76e73a9441700cbfd70560bba9e98cd6c50421346d4e1888a1cb854e51f6dbc8
size 419691

3
expect-5.44.1.5.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d89fa6da2342a95d6094f0744cbb5ba085a0d37ad0a7f1383d29555e1e2f2f80
size 532193

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:58b15504852cb7ff8723daf38ce1d9972b7c6195ac4f002bec92915b9116c548
size 89099

182
expect-fixes.patch Normal file
View File

@ -0,0 +1,182 @@
Index: Makefile.in
================================================================================
--- Dbg.c
+++ Dbg.c
@@ -545,7 +545,7 @@
ClientData clientData,
Tcl_Interp *interp,
int level,
- char *command,
+ CONST char *command,
Tcl_Command commandInfo,
int objc,
struct Tcl_Obj * CONST * objv));
@@ -559,7 +559,7 @@
int level; /* positive number if called by Tcl, -1 if */
/* called by Dbg_On in which case we don't */
/* know the level */
-char *command;
+CONST char *command;
Tcl_Command commandInfo; /* Unused */
int objc;
struct Tcl_Obj * CONST * objv;
--- Makefile.in
+++ Makefile.in
@@ -23,7 +23,7 @@
SETUID = @SETUID@
# SETUID = chmod u+s
-LIB_RUNTIME_DIR = $(INSTALL_ROOT)@libdir@
+LIB_RUNTIME_DIR = $(DESTDIR)@libdir@
# The following Expect scripts are not necessary to have installed as
# commands, but are very useful. Edit out what you don't want
@@ -238,10 +238,10 @@
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
done;
# install standalone scripts and their man pages, if requested
- @mkdir -p $(INSTALL_ROOT)$(prefix)/bin
+ @mkdir -p $(DESTDIR)$(prefix)/bin
-for i in $(SCRIPT_LIST) ; do \
if [ -f $$i ] ; then \
- $(INSTALL_PROGRAM) $$i $(INSTALL_ROOT)$(prefix)/bin/$$i ; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(prefix)/bin/$$i ; \
rm -f $$i ; \
else true; fi ; \
done
@@ -256,14 +256,14 @@
@mkdir -p $(DESTDIR)$(mandir)/man3
@echo "Installing documentation in $(DESTDIR)$(mandir)"
# install Expectk man page if present
- $(INSTALL_DATA) $(srcdir)/expectk.man $(mandir)/man1/expectk.1 ; \
+ $(INSTALL_DATA) $(srcdir)/expectk.man $(DESTDIR)$(mandir)/man1/expectk.1 ; \
# install Expect man page
- $(INSTALL_DATA) $(srcdir)/expect.man $(mandir)/man1/expect.1
+ $(INSTALL_DATA) $(srcdir)/expect.man $(DESTDIR)$(mandir)/man1/expect.1
# install man page for Expect and Expectk libraries
- $(INSTALL_DATA) $(srcdir)/libexpect.man $(mandir)/man3/libexpect.3
+ $(INSTALL_DATA) $(srcdir)/libexpect.man $(DESTDIR)$(mandir)/man3/libexpect.3
-for i in $(SCRIPT_MANPAGE_LIST) ; do \
if [ -f $(srcdir)/example/$$i.man ] ; then \
- $(INSTALL_DATA) $(srcdir)/example/$$i.man $(mandir)/man1/$$i.1 ; \
+ $(INSTALL_DATA) $(srcdir)/example/$$i.man $(DESTDIR)$(mandir)/man1/$$i.1 ; \
else true; fi ; \
done
--- configure.in
+++ configure.in
@@ -448,7 +448,7 @@
*-*-irix*) stty_reads_stdout=0 ;;
*-*-sco3.2v[[45]]*) stty_reads_stdout=1 ;;
i[[3456]]86-*-sysv4.2MP) stty_reads_stdout=0 ;;
- i[[3456]]86-*-linux*) stty_reads_stdout=0 ;;
+ *-*-linux*) stty_reads_stdout=0 ;;
# Not sure about old convex but 5.2 definitely reads from stdout
c[[12]]-*-*) stty_reads_stdout=1 ;;
*-*-aix[[34]]*) stty_reads_stdout=0 ;;
@@ -471,8 +471,9 @@
# if we still don't know, test
if test x"${stty_reads_stdout}" = x"" ; then
- $STTY_BIN > /dev/null 2> /dev/null
- if test $? -ne 0 ; then
+ $STTY_BIN > /dev/null 2> /dev/null; a=$?
+ $STTY_BIN < /dev/tty > /dev/null 2> /dev/null; b=$?
+ if test $a -ne 0 -a $b -ne 0; then
stty_reads_stdout=1
else
stty_reads_stdout=0
--- exp_command.c
+++ exp_command.c
@@ -2940,12 +2940,13 @@
/* are marked sys_waited already */
if (!esPtr->sys_waited) {
if (nowait) {
+ Tcl_Pid pid = (Tcl_Pid)esPtr->pid;
/* should probably generate an error */
/* if SIGCHLD is trapped. */
/* pass to Tcl, so it can do wait */
/* in background */
- Tcl_DetachPids(1,(Tcl_Pid *)&esPtr->pid);
+ Tcl_DetachPids(1, &pid);
exp_wait_zero(&esPtr->wait);
} else {
while (1) {
@@ -3296,6 +3297,7 @@
} else {
strcpy (argv[0],Tcl_GetString (objv[0]));
}
+ command = Tcl_GetString (objv[0]);
signal(SIGINT, SIG_DFL);
signal(SIGQUIT, SIG_DFL);
@@ -3467,7 +3469,8 @@
if (!leaveopen) {
/* remove from Expect's memory in anticipation of passing to Tcl */
if (esPtr->pid != EXP_NOPID) {
- Tcl_DetachPids(1,(Tcl_Pid *)&esPtr->pid);
+ Tcl_Pid pid = (Tcl_Pid)esPtr->pid;
+ Tcl_DetachPids(1,&pid);
esPtr->pid = EXP_NOPID;
esPtr->sys_waited = esPtr->user_waited = TRUE;
}
--- exp_inter.c
+++ exp_inter.c
@@ -250,13 +250,13 @@
return(EXP_MATCH);
}
} else if (!km->re) {
- int slen, kslen;
+ int kslen;
Tcl_UniChar sch, ksch;
/* fixed string */
ks = Tcl_GetString(km->keys);
- for (s = start_search;; s += slen, ks += kslen) {
+ for (s = start_search;; s++, ks += kslen) {
/* if we hit the end of this map, must've matched! */
if (*ks == 0) {
*skip = start_search-string;
--- expect.c
+++ expect.c
@@ -355,6 +355,7 @@
ec->pat = 0;
ec->body = 0;
ec->transfer = TRUE;
+ ec->simple_start = 0;
ec->indices = FALSE;
ec->iread = FALSE;
ec->timestamp = FALSE;
--- testsuite/aclocal.m4
+++ testsuite/aclocal.m4
@@ -0,0 +1,10 @@
+#
+# Include the TEA standard macro set
+#
+
+builtin(include,../tclconfig/tcl.m4)
+builtin(include,../expect.m4)
+
+#
+# Add here whatever m4 macros you want to define for your package
+#
--- testsuite/configure.in
+++ testsuite/configure.in
@@ -1,8 +1,12 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(exp_test.c)
+AC_INIT([exp_test],[0.42])
-CY_AC_PATH_TCLCONFIG
-CY_AC_LOAD_TCLCONFIG
+TEA_INIT([3.5])
+
+AC_CONFIG_AUX_DIR(../tclconfig)
+
+TEA_PATH_TCLCONFIG
+TEA_LOAD_TCLCONFIG
CC=$TCL_CC
AC_PROG_CC

3
expect-rpmlintrc Normal file
View File

@ -0,0 +1,3 @@
addFilter("no-soname")
addFilter("files-duplicate")
addFilter("package-with-huge-docs")

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Mar 20 19:13:00 CET 2008 - max@suse.de
- Update to version 5.44.1.5 from CVS:
* Improved internal buffer management
* Ported script-level commands to the newer Tcl object API
* Optimized regular expression matching
- Split off a -devel subpackage
- Don't package the example subdir anymore.
- Fix all critical and part of the non-critical warnings that
show up with gcc 4.3. To be continued...
-------------------------------------------------------------------
Wed Jan 25 21:30:10 CET 2006 - mls@suse.de

View File

@ -1,15 +1,8 @@
Index: Makefile.in
================================================================================
--- Makefile.in
+++ Makefile.in
@@ -23,7 +23,7 @@
SETUID = @SETUID@
# SETUID = chmod u+s
-LIB_RUNTIME_DIR = $(INSTALL_ROOT)@libdir@
+LIB_RUNTIME_DIR = $(DESTDIR)@libdir@
# The following Expect scripts are not necessary to have installed as
# commands, but are very useful. Edit out what you don't want
@@ -101,7 +101,7 @@
@@ -103,7 +103,7 @@
PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
lib_BINARIES = $(PKG_LIB_FILE)
@ -18,48 +11,16 @@
BINARIES = $(lib_BINARIES) $(bin_BINARIES)
SHELL = @SHELL@
@@ -120,7 +120,7 @@
@@ -175,7 +175,7 @@
TCLSH = $(TCLSH_ENV) $(TCLSH_PROG)
SHARED_BUILD = @SHARED_BUILD@
PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION)
pkgdatadir = $(datadir)/$(PKG_DIR)
-pkglibdir = $(libdir)/$(PKG_DIR)
+pkglibdir = $(datadir)/tcl/$(PKG_DIR)
pkgincludedir = $(includedir)/$(PKG_DIR)
-INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@
+INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@
top_builddir = .
@@ -236,10 +236,10 @@
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
done;
# install standalone scripts and their man pages, if requested
- @mkdir -p $(INSTALL_ROOT)$(prefix)/bin
+ @mkdir -p $(DESTDIR)$(prefix)/bin
-for i in $(SCRIPT_LIST) ; do \
if [ -f $$i ] ; then \
- $(INSTALL_PROGRAM) $$i $(INSTALL_ROOT)$(prefix)/bin/$$i ; \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(prefix)/bin/$$i ; \
rm -f $$i ; \
else true; fi ; \
done
@@ -254,14 +254,14 @@
@mkdir -p $(DESTDIR)$(mandir)/man3
@echo "Installing documentation in $(DESTDIR)$(mandir)"
# install Expectk man page if present
- $(INSTALL_DATA) $(srcdir)/expectk.man $(mandir)/man1/expectk.1 ; \
+ $(INSTALL_DATA) $(srcdir)/expectk.man $(DESTDIR)$(mandir)/man1/expectk.1 ; \
# install Expect man page
- $(INSTALL_DATA) $(srcdir)/expect.man $(mandir)/man1/expect.1
+ $(INSTALL_DATA) $(srcdir)/expect.man $(DESTDIR)$(mandir)/man1/expect.1
# install man page for Expect and Expectk libraries
- $(INSTALL_DATA) $(srcdir)/libexpect.man $(mandir)/man3/libexpect.3
+ $(INSTALL_DATA) $(srcdir)/libexpect.man $(DESTDIR)$(mandir)/man3/libexpect.3
-for i in $(SCRIPT_MANPAGE_LIST) ; do \
if [ -f $(srcdir)/example/$$i.man ] ; then \
- $(INSTALL_DATA) $(srcdir)/example/$$i.man $(mandir)/man1/$$i.1 ; \
+ $(INSTALL_DATA) $(srcdir)/example/$$i.man $(DESTDIR)$(mandir)/man1/$$i.1 ; \
else true; fi ; \
done
PKG_CFLAGS = @PKG_CFLAGS@
@@ -329,7 +329,7 @@
@@ -331,7 +331,7 @@
pkgIndex.tcl-hand:
(echo 'package ifneeded Expect $(PACKAGE_VERSION) \
@ -68,7 +29,7 @@
) > pkgIndex.tcl
#========================================================================
@@ -460,29 +460,30 @@
@@ -552,29 +552,30 @@
#========================================================================
install-lib-binaries:
@ -108,7 +69,7 @@
@list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
if test -f $(srcdir)/$$p; then \
destp=`basename $$p`; \
@@ -521,7 +522,7 @@
@@ -613,7 +614,7 @@
uninstall-binaries:
list='$(lib_BINARIES)'; for p in $$list; do \
@ -119,144 +80,21 @@
p=`basename $$p`; \
--- configure.in
+++ configure.in
@@ -49,8 +49,8 @@
@@ -49,9 +49,6 @@
TEA_PATH_TCLCONFIG
TEA_LOAD_TCLCONFIG
-TEA_PATH_TKCONFIG
-TEA_LOAD_TKCONFIG
+# TEA_PATH_TKCONFIG
+# TEA_LOAD_TKCONFIG
-
#-----------------------------------------------------------------------
# Handle the --prefix=... option by defaulting to what Tcl gave.
@@ -79,7 +79,8 @@
# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
@@ -79,7 +76,6 @@
#TEA_PUBLIC_TCL_HEADERS
TEA_PRIVATE_TCL_HEADERS
-TEA_PUBLIC_TK_HEADERS
+#TEA_PUBLIC_TK_HEADERS
+AC_SUBST(TK_INCLUDES)
#--------------------------------------------------------------------
# A few miscellaneous platform-specific items:
--- exp_main_tk.c
+++ exp_main_tk.c
@@ -36,6 +36,7 @@
#undef USE_TCL_STUBS
#include <ctype.h>
+#include <string.h>
#include "tk.h"
--- expect_cf.h.in
+++ expect_cf.h.in
@@ -4,7 +4,7 @@
#ifndef __EXPECT_CF_H__
#define __EXPECT_CF_H__
-#undef NO_STDLIB_H /* Tcl requires this name */
+#undef NO_STDLIB_H
#undef NO_UNION_WAIT
#undef HAVE_STDARG_H
#undef HAVE_VARARGS_H
@@ -12,12 +12,12 @@
#undef HAVE_SYSCONF_H
#undef HAVE_SYS_FCNTL_H
#undef HAVE_SYS_WAIT_H
-#undef HAVE_SYS_BSDTYPES_H /* nice ISC special */
-#undef HAVE_SYS_SELECT_H /* nice ISC special */
-#undef HAVE_SYS_TIME_H /* nice ISC special */
-#undef HAVE_SYS_PTEM_H /* SCO needs this for window size */
-#undef HAVE_STRREDIR_H /* Solaris needs this for console redir */
-#undef HAVE_STRPTY_H /* old-style Dynix ptys need this */
+#undef HAVE_SYS_BSDTYPES_H
+#undef HAVE_SYS_SELECT_H
+#undef HAVE_SYS_TIME_H
+#undef HAVE_SYS_PTEM_H
+#undef HAVE_STRREDIR_H
+#undef HAVE_STRPTY_H
#undef HAVE_UNISTD_H
#undef HAVE_SYSMACROS_H
#undef HAVE_INTTYPES_H
@@ -26,8 +26,8 @@
#undef pid_t
#undef RETSIGTYPE
-#undef TIME_WITH_SYS_TIME /* ok to include both time.h and sys/time.h */
-#undef SETPGRP_VOID /* if setpgrp takes 0 args */
+#undef TIME_WITH_SYS_TIME
+#undef SETPGRP_VOID
/*
* This section is for compile macros needed by
@@ -42,7 +42,7 @@
#undef SIMPLE_EVENT
#undef HAVE_STRFTIME
#undef HAVE_MEMMOVE
-#undef HAVE_TIMEZONE /* timezone() a la Pyramid */
+#undef HAVE_TIMEZONE
#undef HAVE_SIGLONGJMP
#undef HAVE_STRCHR
--- pty_termios.c
+++ pty_termios.c
@@ -7,6 +7,8 @@
*/
+#define _XOPEN_SOURCE 1 /* for ptsname */
+
#include <stdio.h>
#include <signal.h>
--- tclconfig/tcl.m4
+++ tclconfig/tcl.m4
@@ -794,7 +794,7 @@
# results, and the version is kept in special file).
if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
+ system=MP-RAS-`awk '{print $3}' /etc/.relid`
fi
if test "`uname -s`" = "AIX" ; then
system=AIX-`uname -v`.`uname -r`
@@ -2208,7 +2208,7 @@
# results, and the version is kept in special file).
if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
+ system=MP-RAS-`awk '{print $3}' /etc/.relid`
fi
if test "`uname -s`" = "AIX" ; then
system=AIX-`uname -v`.`uname -r`
--- testsuite/configure.in
+++ testsuite/configure.in
@@ -1,12 +1,12 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(exp_test.c)
-CY_AC_PATH_TCLCONFIG
-CY_AC_LOAD_TCLCONFIG
+TEA_PATH_TCLCONFIG
+TEA_LOAD_TCLCONFIG
CC=$TCL_CC
AC_PROG_CC
-CY_AC_C_WORKS
+#CY_AC_C_WORKS
# This is for LynxOS, which needs a flag to force true POSIX when
# building. It's weirder than that, cause the flag varies depending
@@ -15,8 +15,8 @@
# -mposix is for the new gcc (at least 2.5.8)
# This modifies the value of $CC to have the POSIX flag added
# so it'll configure correctly
-CY_AC_TCL_LYNX_POSIX
-CY_AC_PATH_TCLH
+#CY_AC_TCL_LYNX_POSIX
+#CY_AC_PATH_TCLH
AC_SUBST(CC)
AC_SUBST(TCLHDIR)

View File

@ -1,36 +1,56 @@
#
# spec file for package expect (Version 5.43.0)
# spec file for package expect (Version 5.44.1.5)
#
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: expect
BuildRequires: tcl-devel
Version: 5.43.0
Release: 5
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Development/Tools/Building
License: distributable, Other License(s), see package
Summary: A Tool for Automating Interactive Programs
Autoreqprov: on
Source: %{name}-%{version}.tar.bz2
Patch0: expect-CVS.patch.bz2
Patch1: expect.patch
Patch2: expect-5.38.0-spawn-43310.patch
Patch3: expect-warnings.patch
Url: http://expect.nist.gov
Name: expect
BuildRequires: tcl-devel
Version: 5.44.1.5
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Development/Languages/Tcl
License: Public Domain, Freeware
Summary: A Tool for Automating Interactive Programs
AutoReqProv: on
Source: %{name}-%{version}.tar.bz2
Source1: expect-rpmlintrc
Patch1: expect.patch
Patch2: expect-fixes.patch
Patch3: expect-warnings.patch
%description
Expect is a tool primarily for automating interactive applications such
as telnet, ftp, passwd, fsck, rlogin, tip, and more. Expect really
makes this stuff trivial. Expect is also useful for testing these
applications. It is described in many books, articles, papers, and
FAQs. There is an entire book on it available from O'Reilly.
Expect is a tool primarily for automating interactive applications,
such as telnet, ftp, passwd, fsck, rlogin, tip, and more. Expect
really makes this stuff trivial. Expect is also useful for testing
these applications. It is described in many books, articles, papers,
and FAQs. There is an entire book on it available from O'Reilly.
Authors:
--------
libes@nist.gov
%package devel
Group: Development/Libraries/Tcl
Summary: Header Files and C API Documentation for expect
%description devel
This package contains header files and documentation needed for linking
to expect from programs written in compiled languages like C, C++, etc.
This package is not needed for developing scripts that run under the
/usr/bin/expect interpreter, or any other Tcl interpreter with the
expect package loaded.
@ -39,28 +59,28 @@ Authors:
libes@nist.gov
%prep
%setup -q -n %name-5.43
%patch0 -p1
%setup -q
%patch1
%patch2 -p2
%patch2
%patch3
%build
%{?suse_update_config:%suse_update_config -f tclconfig}
autoreconf --force --include=tclconfig
autoreconf
CFLAGS="%optflags" \
./configure \
--prefix=%_prefix \
--libdir=%_libdir \
--with-tclconfig=%_libdir \
--with-tcl=%_libdir \
--with-tk=no_tk \
--mandir=%_mandir \
--enable-shared
make all
%check
make test
%install
# set the right path to the expect binary...
rm -rf %buildroot
cd example
for f in *; do
sed -e '1s,^#![^ ]*expectk,#!/usr/bin/wish\npackage require Expect,' \
@ -69,7 +89,7 @@ for f in *; do
chmod a+x $f
done
cd ..
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=$RPM_BUILD_ROOT pkglibdir=%tclscriptdir/%name%version install
# Remove some executables and manpages we don't want to ship
rm $RPM_BUILD_ROOT%_prefix/bin/*passwd
rm $RPM_BUILD_ROOT%_mandir/*/*passwd*
@ -80,68 +100,80 @@ rm -rf %buildroot
%files
%defattr(-,root,root)
%{_prefix}/bin/*
%{_includedir}/*
%{_libdir}/libexpect*
%{_datadir}/tcl/expect*
%doc %{_mandir}/man?/*
%doc %{_mandir}/man1/*
%doc ChangeLog HISTORY INSTALL FAQ NEWS README
%doc example
%changelog -n expect
* Wed Jan 25 2006 - mls@suse.de
%files devel
%defattr(-,root,root)
%{_includedir}/*
%doc %{_mandir}/man3/*
%changelog
* Thu Mar 20 2008 max@suse.de
- Update to version 5.44.1.5 from CVS:
* Improved internal buffer management
* Ported script-level commands to the newer Tcl object API
* Optimized regular expression matching
- Split off a -devel subpackage
- Don't package the example subdir anymore.
- Fix all critical and part of the non-critical warnings that
show up with gcc 4.3. To be continued...
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Dec 13 2005 - max@suse.de
* Tue Dec 13 2005 max@suse.de
- Fixed a typo in tcl.m4 that broke configure with bash 3.1.
- Updated expect-CVS.patch.bz2 .
* Fri Sep 23 2005 - ro@suse.de
* Fri Sep 23 2005 ro@suse.de
- fix some missing declarations
* Tue Jun 14 2005 - max@suse.de
* Tue Jun 14 2005 max@suse.de
- New version: 5.43 plus patch to current CVS head.
- Disabled building of the static library.
- Moved script library to /usr/share/tcl .
* Tue Jul 13 2004 - max@suse.de
* Tue Jul 13 2004 max@suse.de
- New version: 5.41.
* Mon Mar 01 2004 - max@suse.de
* Mon Mar 01 2004 max@suse.de
- Re-enabled the test suite and added expect-send_tty.patch to
prevent it from crashing.
* Fri Feb 27 2004 - max@suse.de
* Fri Feb 27 2004 max@suse.de
- New version: 5.40
- Fixed warnings that broke build (expect-warnings.patch).
- Temporarily disabled "make test" to prevent crashes in autobuild
on some architectures (ppc, s390).
* Fri Oct 31 2003 - max@suse.de
* Fri Oct 31 2003 max@suse.de
- New version: 5.39
- Buliding as non-root user
* Wed May 28 2003 - ro@suse.de
* Wed May 28 2003 ro@suse.de
- package include files and static lib as well
* Tue Jan 28 2003 - max@suse.de
* Tue Jan 28 2003 max@suse.de
- Fixed path to /usr/bin/write in kibitz.
* Fri Jan 10 2003 - max@suse.de
* Fri Jan 10 2003 max@suse.de
- Fixed a segfault case during application shutdown, and sent
the patch to the author.
* Tue Nov 26 2002 - max@suse.de
* Tue Nov 26 2002 max@suse.de
- New version: 5.38
- Don't build the expectk binary anymore to remove the buildtime
dependency on Tk and X. Scripts that needed to run in expectk
before can be fixed by running them in expect and adding a line
that says "package require Tk" before the first tk command
is executed.
* Mon Aug 19 2002 - aj@suse.de
* Mon Aug 19 2002 aj@suse.de
- Read all input from invoked program.
* Wed Apr 03 2002 - max@suse.de
* Wed Apr 03 2002 max@suse.de
- Replaced autoreconf by autoconf because it breaks on
autoconf-2.53 and was overkill anyways.
* Wed Feb 20 2002 - max@suse.de
* Wed Feb 20 2002 max@suse.de
- Fixed for lib64-s390x.
* Thu Jan 24 2002 - max@suse.de
* Thu Jan 24 2002 max@suse.de
- Removed the mkpasswd manpage due to a file name conflict and
because the respective program is also not included.
* Fri Jan 18 2002 - max@suse.de
* Fri Jan 18 2002 max@suse.de
- added tk to neededforbuild to prevent linking to static libtk
which is included in tcl-devel
* Fri Jan 18 2002 - ro@suse.de
* Fri Jan 18 2002 ro@suse.de
- fixed neededforbuild
* Thu Jan 17 2002 - max@suse.de
* Thu Jan 17 2002 max@suse.de
- New version 5.34.
- Separated this package from the tcl source RPM, because it
doesn not any longer need the Tcl and Tk sources at hand.