From e9dfba9b1f9f14f77d4e88ebcec145cc3446ec71952a86cd9f408e7d67a6ac9b Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 18 Dec 2006 23:15:52 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/expect?expand=0&rev=1 --- .gitattributes | 23 +++ .gitignore | 1 + expect-5.38.0-spawn-43310.patch | 209 +++++++++++++++++++++++++ expect-5.43.0.tar.bz2 | 3 + expect-CVS.patch.bz2 | 3 + expect-warnings.patch | 170 +++++++++++++++++++++ expect.changes | 117 ++++++++++++++ expect.patch | 262 ++++++++++++++++++++++++++++++++ expect.spec | 147 ++++++++++++++++++ ready | 0 10 files changed, 935 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 expect-5.38.0-spawn-43310.patch create mode 100644 expect-5.43.0.tar.bz2 create mode 100644 expect-CVS.patch.bz2 create mode 100644 expect-warnings.patch create mode 100644 expect.changes create mode 100644 expect.patch create mode 100644 expect.spec create mode 100644 ready diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/expect-5.38.0-spawn-43310.patch b/expect-5.38.0-spawn-43310.patch new file mode 100644 index 0000000..af07d61 --- /dev/null +++ b/expect-5.38.0-spawn-43310.patch @@ -0,0 +1,209 @@ +--- 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); + } diff --git a/expect-5.43.0.tar.bz2 b/expect-5.43.0.tar.bz2 new file mode 100644 index 0000000..c59bed3 --- /dev/null +++ b/expect-5.43.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76e73a9441700cbfd70560bba9e98cd6c50421346d4e1888a1cb854e51f6dbc8 +size 419691 diff --git a/expect-CVS.patch.bz2 b/expect-CVS.patch.bz2 new file mode 100644 index 0000000..1e76da7 --- /dev/null +++ b/expect-CVS.patch.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58b15504852cb7ff8723daf38ce1d9972b7c6195ac4f002bec92915b9116c548 +size 89099 diff --git a/expect-warnings.patch b/expect-warnings.patch new file mode 100644 index 0000000..fe503e5 --- /dev/null +++ b/expect-warnings.patch @@ -0,0 +1,170 @@ +--- Dbg.c ++++ Dbg.c +@@ -9,6 +9,7 @@ + */ + + #include ++#include + + #include "tcldbgcf.h" + #if 0 +--- exp_chan.c ++++ exp_chan.c +@@ -568,6 +568,8 @@ + return esPtr; + } + } ++ /*NOTREACHED*/ ++ abort(); + } + + void +--- exp_clib.c ++++ exp_clib.c +@@ -8,6 +8,7 @@ + */ + + #include "expect_cf.h" ++#include + #include + #include + #ifdef HAVE_INTTYPES_H +--- exp_command.c ++++ exp_command.c +@@ -2317,6 +2317,7 @@ + + Tcl_Exit(value); + /*NOTREACHED*/ ++ abort(); + } + + /*ARGSUSED*/ +--- exp_glob.c ++++ exp_glob.c +@@ -11,6 +11,7 @@ + + */ + ++#include + #include "expect_cf.h" + #include "tcl.h" + #include "exp_int.h" +--- exp_main_exp.c ++++ exp_main_exp.c +@@ -12,6 +12,7 @@ + + #include "expect_cf.h" + #include ++#include + #include "tcl.h" + #include "expect_tcl.h" + +--- exp_main_sub.c ++++ exp_main_sub.c +@@ -468,6 +468,7 @@ + Tcl_Eval(interp, buffer); + } + /*NOTREACHED*/ ++ abort(); + } + + static char init_auto_path[] = "\ +--- exp_win.c ++++ exp_win.c +@@ -78,7 +78,7 @@ + static exp_winsize winsize = {0, 0}; + static exp_winsize win2size = {0, 0}; + +-int exp_window_size_set(fd) ++void exp_window_size_set(fd) + int fd; + { + #ifdef TIOCSWINSZ +@@ -89,7 +89,7 @@ + #endif + } + +-int exp_window_size_get(fd) ++void exp_window_size_get(fd) + int fd; + { + #ifdef TIOCGWINSZ +@@ -140,7 +140,7 @@ + * separate copy of everything above - used for handling user stty requests + */ + +-int exp_win2_size_set(fd) ++void exp_win2_size_set(fd) + int fd; + { + #ifdef TIOCSWINSZ +@@ -151,7 +151,7 @@ + #endif + } + +-int exp_win2_size_get(fd) ++void exp_win2_size_get(fd) + int fd; + { + #ifdef TIOCGWINSZ +--- exp_win.h ++++ exp_win.h +@@ -6,8 +6,8 @@ + would appreciate credit if you use this file or parts of it. + */ + +-int exp_window_size_set(); +-int exp_window_size_get(); ++void exp_window_size_set(); ++void exp_window_size_get(); + + void exp_win_rows_set(); + void exp_win_rows_get(); +--- expect.c ++++ expect.c +@@ -2015,6 +2015,8 @@ + case EXP_CONTINUE_TIMER: return EXP_TCLCNTTIMER; + case EXP_TCL_RETURN: return EXP_TCLRETTCL; + } ++ /*NOTREACHED*/ ++ abort(); + } + + /* map from EXP_ style return value to TCL_ style return values */ +@@ -2031,6 +2033,8 @@ + case EXP_TCLCNTTIMER: return EXP_CONTINUE_TIMER; + case EXP_TCLRETTCL: return EXP_TCL_RETURN; + } ++ /*NOTREACHED*/ ++ abort(); + } + + /* variables predefined by expect are retrieved using this routine +@@ -2110,6 +2114,8 @@ + #ifdef LINT + return("unknown expect command"); + #endif ++ /*NOTREACHED*/ ++ abort(); + } + + /* exp_indirect_update2 is called back via Tcl's trace handler whenever */ +--- pkgIndex.in ++++ pkgIndex.in +@@ -7,4 +7,4 @@ + # script is sourced, the variable $dir must contain the + # full path name of this file's directory. + +-package ifneeded Expect @EXP_VERSION_FULL@ [list load [file join $dir .. @EXP_SHARED_LIB_FILE@]] ++package ifneeded Expect @EXP_VERSION_FULL@ [list load "@EXP_SHARED_LIB_FILE@"] +--- pty_termios.c ++++ pty_termios.c +@@ -11,6 +11,8 @@ + + #include + #include ++#include ++#include + + #if defined(SIGCLD) && !defined(SIGCHLD) + #define SIGCHLD SIGCLD diff --git a/expect.changes b/expect.changes new file mode 100644 index 0000000..db6e6e1 --- /dev/null +++ b/expect.changes @@ -0,0 +1,117 @@ +------------------------------------------------------------------- +Wed Jan 25 21:30:10 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Tue Dec 13 15:41:15 CET 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 01:31:50 CEST 2005 - ro@suse.de + +- fix some missing declarations + +------------------------------------------------------------------- +Tue Jun 14 15:54:14 CEST 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 16:58:00 CEST 2004 - max@suse.de + +- New version: 5.41. + +------------------------------------------------------------------- +Mon Mar 1 15:48:15 CET 2004 - max@suse.de + +- Re-enabled the test suite and added expect-send_tty.patch to + prevent it from crashing. + +------------------------------------------------------------------- +Fri Feb 27 18:44:33 CET 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 17:13:46 CET 2003 - max@suse.de + +- New version: 5.39 +- Buliding as non-root user + +------------------------------------------------------------------- +Wed May 28 00:39:00 CEST 2003 - ro@suse.de + +- package include files and static lib as well + +------------------------------------------------------------------- +Tue Jan 28 15:27:08 CET 2003 - max@suse.de + +- Fixed path to /usr/bin/write in kibitz. + +------------------------------------------------------------------- +Fri Jan 10 16:12:49 CET 2003 - max@suse.de + +- Fixed a segfault case during application shutdown, and sent + the patch to the author. + +------------------------------------------------------------------- +Tue Nov 26 17:27:49 CET 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 08:27:51 CEST 2002 - aj@suse.de + +- Read all input from invoked program. + +------------------------------------------------------------------- +Wed Apr 3 18:18:19 CEST 2002 - max@suse.de + +- Replaced autoreconf by autoconf because it breaks on + autoconf-2.53 and was overkill anyways. + +------------------------------------------------------------------- +Wed Feb 20 19:28:39 CET 2002 - max@suse.de + +- Fixed for lib64-s390x. + +------------------------------------------------------------------- +Thu Jan 24 09:29:01 CET 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 19:10:46 CET 2002 - max@suse.de + +- added tk to neededforbuild to prevent linking to static libtk + which is included in tcl-devel + +------------------------------------------------------------------- +Fri Jan 18 00:52:40 CET 2002 - ro@suse.de + +- fixed neededforbuild + +------------------------------------------------------------------- +Thu Jan 17 19:26:42 CET 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. diff --git a/expect.patch b/expect.patch new file mode 100644 index 0000000..4cf9cf0 --- /dev/null +++ b/expect.patch @@ -0,0 +1,262 @@ +--- 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 @@ + PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ + + lib_BINARIES = $(PKG_LIB_FILE) +-bin_BINARIES = expect expectk ++bin_BINARIES = expect + BINARIES = $(lib_BINARIES) $(bin_BINARIES) + + SHELL = @SHELL@ +@@ -120,7 +120,7 @@ + + PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) + pkgdatadir = $(datadir)/$(PKG_DIR) +-pkglibdir = $(libdir)/$(PKG_DIR) ++pkglibdir = $(datadir)/tcl/$(PKG_DIR) + pkgincludedir = $(includedir)/$(PKG_DIR) + + 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 + +@@ -329,7 +329,7 @@ + + pkgIndex.tcl-hand: + (echo 'package ifneeded Expect $(PACKAGE_VERSION) \ +- [list load [file join $$dir $(PKG_LIB_FILE)]]'\ ++ [list load $(PKG_LIB_FILE)]'\ + ) > pkgIndex.tcl + + #======================================================================== +@@ -460,29 +460,30 @@ + #======================================================================== + + install-lib-binaries: +- @mkdir -p $(DESTDIR)$(pkglibdir) ++ @mkdir -p $(DESTDIR)$(libdir) + @list='$(lib_BINARIES)'; for p in $$list; do \ + if test -f $$p; then \ +- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ +- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ ++ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p"; \ ++ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \ + stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ + if test "x$$stub" = "xstub"; then \ +- echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ +- $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ ++ echo " $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p"; \ ++ $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p; \ + else \ +- echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ +- $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ ++ echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \ ++ $(RANLIB) $(DESTDIR)$(libdir)/$$p; \ + fi; \ + ext=`echo $$p|sed -e "s/.*\.//"`; \ + if test "x$$ext" = "xdll"; then \ + lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ + if test -f $$lib; then \ +- echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ +- $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ ++ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib"; \ ++ $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib; \ + fi; \ + fi; \ + fi; \ + done ++ @mkdir -p $(DESTDIR)$(pkglibdir) + @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ + if test -f $(srcdir)/$$p; then \ + destp=`basename $$p`; \ +@@ -521,7 +522,7 @@ + + uninstall-binaries: + list='$(lib_BINARIES)'; for p in $$list; do \ +- rm -f $(DESTDIR)$(pkglibdir)/$$p; \ ++ rm -f $(DESTDIR)$(libdir)/$$p; \ + done + list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ + p=`basename $$p`; \ +--- configure.in ++++ configure.in +@@ -49,8 +49,8 @@ + 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 @@ + + #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 ++#include + + #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 + #include + +--- 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) diff --git a/expect.spec b/expect.spec new file mode 100644 index 0000000..c90d35e --- /dev/null +++ b/expect.spec @@ -0,0 +1,147 @@ +# +# spec file for package expect (Version 5.43.0) +# +# Copyright (c) 2005 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 +# + +# 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 + +%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. + + + +Authors: +-------- + libes@nist.gov + +%prep +%setup -q -n %name-5.43 +%patch0 -p1 +%patch1 +%patch2 -p2 +%patch3 + +%build +%{?suse_update_config:%suse_update_config -f tclconfig} +autoreconf --force --include=tclconfig +CFLAGS="%optflags" \ +./configure \ + --prefix=%_prefix \ + --libdir=%_libdir \ + --with-tclconfig=%_libdir \ + --mandir=%_mandir \ + --enable-shared +make all +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,' \ + -e '1s,^#![^ ]*expect,#!/usr/bin/expect,' $f > $f.mod + mv $f.mod $f + chmod a+x $f +done +cd .. +make DESTDIR=$RPM_BUILD_ROOT 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* + +%clean +rm -rf %buildroot + +%files +%defattr(-,root,root) +%{_prefix}/bin/* +%{_includedir}/* +%{_libdir}/libexpect* +%{_datadir}/tcl/expect* +%doc %{_mandir}/man?/* +%doc ChangeLog HISTORY INSTALL FAQ NEWS README +%doc example + +%changelog -n expect +* Wed Jan 25 2006 - mls@suse.de +- converted neededforbuild to BuildRequires +* 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 +- fix some missing declarations +* 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 +- New version: 5.41. +* 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 +- 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 +- New version: 5.39 +- Buliding as non-root user +* Wed May 28 2003 - ro@suse.de +- package include files and static lib as well +* Tue Jan 28 2003 - max@suse.de +- Fixed path to /usr/bin/write in kibitz. +* 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 +- 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 +- Read all input from invoked program. +* 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 +- Fixed for lib64-s390x. +* 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 +- added tk to neededforbuild to prevent linking to static libtk + which is included in tcl-devel +* Fri Jan 18 2002 - ro@suse.de +- fixed neededforbuild +* 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. diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4