]> git.pld-linux.org Git - packages/expect.git/commitdiff
- rel 5; fixes from FC auto/th/expect-5.45-5
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 28 Jan 2016 21:24:10 +0000 (22:24 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 28 Jan 2016 21:24:10 +0000 (22:24 +0100)
expect-5.32.2-random.patch [new file with mode: 0644]
expect-5.43.0-log_file.patch [new file with mode: 0644]
expect-5.45-check-telnet.patch [new file with mode: 0644]
expect-5.45-exp-log-buf-overflow.patch [new file with mode: 0644]
expect-5.45-fd-leak.patch [new file with mode: 0644]
expect-5.45-match-gt-numchars-segfault.patch [new file with mode: 0644]
expect-5.45-mkpasswd-dash.patch [new file with mode: 0644]
expect-5.45-passmass-su-full-path.patch [new file with mode: 0644]
expect-5.45-re-memleak.patch [new file with mode: 0644]
expect-5.45-segfault-with-stubs.patch [new file with mode: 0644]
expect.spec

diff --git a/expect-5.32.2-random.patch b/expect-5.32.2-random.patch
new file mode 100644 (file)
index 0000000..0cac294
--- /dev/null
@@ -0,0 +1,19 @@
+diff -up expect-5.44.1.15/example/mkpasswd.orig expect-5.44.1.15/example/mkpasswd
+--- expect-5.44.1.15/example/mkpasswd.orig     2010-03-08 16:01:05.518378075 +0100
++++ expect-5.44.1.15/example/mkpasswd  2010-03-08 16:01:27.408388162 +0100
+@@ -92,7 +92,14 @@ proc insert {pvar char} {
+ }
+ proc rand {m} {
+-    expr {int($m*rand())}
++    set device /dev/urandom            ;# /dev/random can block
++    set fileId [open $device r]
++    binary scan [read $fileId 4] i1 number
++    set clipped [expr $number % $m]
++#    puts "number is $number"
++#    puts "clipped is $clipped"
++    close $fileId
++    return $clipped
+ }
+ # choose left or right starting hand
diff --git a/expect-5.43.0-log_file.patch b/expect-5.43.0-log_file.patch
new file mode 100644 (file)
index 0000000..8a2c93d
--- /dev/null
@@ -0,0 +1,12 @@
+diff -up expect-5.44.1.15/exp_log.c.orig expect-5.44.1.15/exp_log.c
+--- expect-5.44.1.15/exp_log.c.orig    2010-03-08 15:45:20.581378309 +0100
++++ expect-5.44.1.15/exp_log.c 2010-03-08 15:45:38.838398279 +0100
+@@ -374,7 +374,7 @@ expDiagChannelOpen(interp,filename)
+       Tcl_DStringAppend(&tsdPtr->diagFilename,filename,-1);
+     }
+-    tsdPtr->diagChannel = Tcl_OpenFileChannel(interp,newfilename,"a",0777);
++    tsdPtr->diagChannel = Tcl_OpenFileChannel(interp,newfilename,"a",0666);
+     if (!tsdPtr->diagChannel) {
+       Tcl_DStringFree(&tsdPtr->diagFilename);
+       return TCL_ERROR;
diff --git a/expect-5.45-check-telnet.patch b/expect-5.45-check-telnet.patch
new file mode 100644 (file)
index 0000000..0b67dc6
--- /dev/null
@@ -0,0 +1,29 @@
+diff -up expect5.45/example/passmass.orig expect5.45/example/passmass
+--- expect5.45/example/passmass.orig   2011-07-27 16:09:31.013843393 +0200
++++ expect5.45/example/passmass        2011-07-27 16:10:55.667843578 +0200
+@@ -107,6 +107,10 @@ for {set i 0} {$i<$argc} {incr i} {
+       set login "ssh"
+       continue
+     } "-telnet" {
++      if {[file executable /usr/bin/telnet] == 0} {
++              send_user "It seems that telnet is not installed. Please install telnet in order to use the script with this option.\n"
++              exit 1
++      }
+       set login "telnet"
+       continue
+     } "-program" {
+diff -up expect5.45/example/weather.orig expect5.45/example/weather
+--- expect5.45/example/weather.orig    2011-07-27 15:49:57.878843862 +0200
++++ expect5.45/example/weather 2011-07-27 16:08:48.067843491 +0200
+@@ -33,6 +33,11 @@ set timeout 60
+ set env(TERM) vt100   ;# actual value doesn't matter, just has to be set
++if {[file executable /usr/bin/telnet] == 0} {
++      send_user "It seems that telnet is not installed. Please install telnet in order to use this script.\n"
++      exit 1
++}
++
+ spawn telnet rainmaker.wunderground.com 3000
+ while {1} {
+       expect timeout {
diff --git a/expect-5.45-exp-log-buf-overflow.patch b/expect-5.45-exp-log-buf-overflow.patch
new file mode 100644 (file)
index 0000000..162db80
--- /dev/null
@@ -0,0 +1,39 @@
+diff -up expect5.45/exp_log.c.orig expect5.45/exp_log.c
+--- expect5.45/exp_log.c.orig  2013-12-12 12:43:38.527854189 +0100
++++ expect5.45/exp_log.c       2013-12-12 12:49:26.866576387 +0100
+@@ -176,7 +176,7 @@ expStdoutLog TCL_VARARGS_DEF(int,arg1)
+     if ((!tsdPtr->logUser) && (!force_stdout) && (!tsdPtr->logAll)) return;
+-    (void) vsprintf(bigbuf,fmt,args);
++    (void) vsnprintf(bigbuf,sizeof(bigbuf),fmt,args);
+     expDiagWriteBytes(bigbuf,-1);
+     if (tsdPtr->logAll || (LOGUSER && tsdPtr->logChannel)) Tcl_WriteChars(tsdPtr->logChannel,bigbuf,-1);
+     if (LOGUSER) fprintf(stdout,"%s",bigbuf);
+@@ -222,7 +222,7 @@ expErrorLog TCL_VARARGS_DEF(char *,arg1)
+     va_list args;
+     fmt = TCL_VARARGS_START(char *,arg1,args);
+-    (void) vsprintf(bigbuf,fmt,args);
++    (void) vsnprintf(bigbuf,sizeof(bigbuf),fmt,args);
+     expDiagWriteChars(bigbuf,-1);
+     fprintf(stderr,"%s",bigbuf);
+@@ -264,7 +264,7 @@ expDiagLog TCL_VARARGS_DEF(char *,arg1)
+     fmt = TCL_VARARGS_START(char *,arg1,args);
+-    (void) vsprintf(bigbuf,fmt,args);
++    (void) vsnprintf(bigbuf,sizeof(bigbuf),fmt,args);
+     expDiagWriteBytes(bigbuf,-1);
+     if (tsdPtr->diagToStderr) {
+@@ -307,7 +307,7 @@ expPrintf TCL_VARARGS_DEF(char *,arg1)
+   int len, rc;
+   fmt = TCL_VARARGS_START(char *,arg1,args);
+-  len = vsprintf(bigbuf,arg1,args);
++  len = vsnprintf(bigbuf,sizeof(bigbuf),arg1,args);
+  retry:
+   rc = write(2,bigbuf,len);
+   if ((rc == -1) && (errno == EAGAIN)) goto retry;
diff --git a/expect-5.45-fd-leak.patch b/expect-5.45-fd-leak.patch
new file mode 100644 (file)
index 0000000..459a1f6
--- /dev/null
@@ -0,0 +1,12 @@
+diff -up expect5.45/exp_clib.c.orig expect5.45/exp_clib.c
+--- expect5.45/exp_command.c.orig      2014-09-04 12:12:21.075837835 +0200
++++ expect5.45/exp_command.c   2014-09-04 12:13:39.098593465 +0200
+@@ -1161,7 +1161,7 @@ Exp_SpawnObjCmd(
+     /* if stty finds dev(stderr) != dev(stdout) */
+     /* save error fd while we're setting up new one */
+-    errorfd = fcntl(2,F_DUPFD,3);
++    errorfd = fcntl(2,F_DUPFD_CLOEXEC,3);
+     /* and here is the macro to restore it */
+ #define restore_error_fd {close(2);fcntl(errorfd,F_DUPFD,2);}
diff --git a/expect-5.45-match-gt-numchars-segfault.patch b/expect-5.45-match-gt-numchars-segfault.patch
new file mode 100644 (file)
index 0000000..1abd424
--- /dev/null
@@ -0,0 +1,17 @@
+diff -up expect5.45/expect.c.orig expect5.45/expect.c
+--- expect5.45/expect.c.orig   2012-02-06 14:15:13.469490744 +0100
++++ expect5.45/expect.c        2012-02-06 14:16:23.596837896 +0100
+@@ -2363,7 +2363,12 @@ expMatchProcess(
+       /* "!e" means no case matched - transfer by default */
+       if (!e || e->transfer) {
+-          int remainder = numchars-match;
++          int remainder;
++          if (match > numchars) {
++              match = numchars;
++              eo->matchlen = match;
++          }
++          remainder = numchars-match;
+           /* delete matched chars from input buffer */
+           esPtr->printed -= match;
+           if (numchars != 0) {
diff --git a/expect-5.45-mkpasswd-dash.patch b/expect-5.45-mkpasswd-dash.patch
new file mode 100644 (file)
index 0000000..fbdecde
--- /dev/null
@@ -0,0 +1,13 @@
+diff -up expect5.45/example/mkpasswd.orig expect5.45/example/mkpasswd
+--- expect5.45/example/mkpasswd.orig   2011-03-16 13:23:23.125480017 +0100
++++ expect5.45/example/mkpasswd        2011-03-16 13:24:08.739353139 +0100
+@@ -202,7 +202,8 @@ if {[info exists user]} {
+       expect {
+               "assword*:" {
+                       # some systems say "Password (again):"
+-                      send "$password\r"
++                      send -- "$password\r"
++                      # "--" because of passwords beginning with dash
+                       exp_continue
+               }
+       }
diff --git a/expect-5.45-passmass-su-full-path.patch b/expect-5.45-passmass-su-full-path.patch
new file mode 100644 (file)
index 0000000..6febf94
--- /dev/null
@@ -0,0 +1,12 @@
+diff -up expect5.45/example/passmass.orig expect5.45/example/passmass
+--- expect5.45/example/passmass.orig   2011-09-06 13:04:41.439875491 +0200
++++ expect5.45/example/passmass        2011-09-06 13:04:54.663874571 +0200
+@@ -178,7 +178,7 @@ for {set i 0} {$i<$argc} {incr i} {
+     }
+     if ($su) {
+-      send "su -\r"
++      send "/bin/su -\r"
+       expect -nocase "password:"
+       send "$password(old)\r"
+       expect "# "
diff --git a/expect-5.45-re-memleak.patch b/expect-5.45-re-memleak.patch
new file mode 100644 (file)
index 0000000..182f596
--- /dev/null
@@ -0,0 +1,14 @@
+diff -up expect5.45/expect.c.orig expect5.45/expect.c
+--- expect5.45/expect.c.orig   2013-10-02 13:16:31.462430482 +0200
++++ expect5.45/expect.c        2013-10-02 13:17:18.420599495 +0200
+@@ -185,9 +185,9 @@ free_ecase(
+ {
+     if (ec->i_list->duration == EXP_PERMANENT) {
+       if (ec->pat)  { Tcl_DecrRefCount(ec->pat); }
+-      if (ec->gate) { Tcl_DecrRefCount(ec->gate); }
+       if (ec->body) { Tcl_DecrRefCount(ec->body); }
+     }
++    if (ec->gate) { Tcl_DecrRefCount(ec->gate); }
+     if (free_ilist) {
+       ec->i_list->ecount--;
diff --git a/expect-5.45-segfault-with-stubs.patch b/expect-5.45-segfault-with-stubs.patch
new file mode 100644 (file)
index 0000000..eb02fe3
--- /dev/null
@@ -0,0 +1,553 @@
+diff -up expect5.45/exp_clib.c.orig expect5.45/exp_clib.c
+--- expect5.45/exp_clib.c.orig 2010-09-01 00:20:27.000000000 +0200
++++ expect5.45/exp_clib.c      2015-05-19 12:01:22.413349423 +0200
+@@ -84,6 +84,8 @@ would appreciate credit if this program
+ #ifndef _STDLIB
+ #define _STDLIB
++#include <tcl.h>
++
+ extern void           abort _ANSI_ARGS_((void));
+ extern double         atof _ANSI_ARGS_((CONST char *string));
+ extern int            atoi _ANSI_ARGS_((CONST char *string));
+@@ -114,7 +116,6 @@ extern unsigned long       strtoul _ANSI_ARGS_
+ #include <stdlib.h>           /* for malloc */
+ #endif
+-#include <tcl.h>
+ #include "expect.h"
+ #define TclRegError exp_TclRegError
+@@ -1465,6 +1466,467 @@ TclGetRegError()
+  */
+ /*
++ * following stolen from tcl8.0.4/generic/tclPosixStr.c
++ */
++
++/*
++ *----------------------------------------------------------------------
++ *
++ * Tcl_ErrnoMsg --
++ *
++ *     Return a human-readable message corresponding to a given
++ *     errno value.
++ *
++ * Results:
++ *     The return value is the standard POSIX error message for
++ *     errno.  This procedure is used instead of strerror because
++ *     strerror returns slightly different values on different
++ *     machines (e.g. different capitalizations), which cause
++ *     problems for things such as regression tests.  This procedure
++ *     provides messages for most standard errors, then it calls
++ *     strerror for things it doesn't understand.
++ *
++ * Side effects:
++ *     None.
++ *
++ *----------------------------------------------------------------------
++ */
++
++static
++char *
++Tcl_ErrnoMsg(err)
++    int err;                   /* Error number (such as in errno variable). */
++{
++    switch (err) {
++#ifdef E2BIG
++       case E2BIG: return "argument list too long";
++#endif
++#ifdef EACCES
++       case EACCES: return "permission denied";
++#endif
++#ifdef EADDRINUSE
++       case EADDRINUSE: return "address already in use";
++#endif
++#ifdef EADDRNOTAVAIL
++       case EADDRNOTAVAIL: return "can't assign requested address";
++#endif
++#ifdef EADV
++       case EADV: return "advertise error";
++#endif
++#ifdef EAFNOSUPPORT
++       case EAFNOSUPPORT: return "address family not supported by protocol family";
++#endif
++#ifdef EAGAIN
++       case EAGAIN: return "resource temporarily unavailable";
++#endif
++#ifdef EALIGN
++       case EALIGN: return "EALIGN";
++#endif
++#if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY ))
++       case EALREADY: return "operation already in progress";
++#endif
++#ifdef EBADE
++       case EBADE: return "bad exchange descriptor";
++#endif
++#ifdef EBADF
++       case EBADF: return "bad file number";
++#endif
++#ifdef EBADFD
++       case EBADFD: return "file descriptor in bad state";
++#endif
++#ifdef EBADMSG
++       case EBADMSG: return "not a data message";
++#endif
++#ifdef EBADR
++       case EBADR: return "bad request descriptor";
++#endif
++#ifdef EBADRPC
++       case EBADRPC: return "RPC structure is bad";
++#endif
++#ifdef EBADRQC
++       case EBADRQC: return "bad request code";
++#endif
++#ifdef EBADSLT
++       case EBADSLT: return "invalid slot";
++#endif
++#ifdef EBFONT
++       case EBFONT: return "bad font file format";
++#endif
++#ifdef EBUSY
++       case EBUSY: return "file busy";
++#endif
++#ifdef ECHILD
++       case ECHILD: return "no children";
++#endif
++#ifdef ECHRNG
++       case ECHRNG: return "channel number out of range";
++#endif
++#ifdef ECOMM
++       case ECOMM: return "communication error on send";
++#endif
++#ifdef ECONNABORTED
++       case ECONNABORTED: return "software caused connection abort";
++#endif
++#ifdef ECONNREFUSED
++       case ECONNREFUSED: return "connection refused";
++#endif
++#ifdef ECONNRESET
++       case ECONNRESET: return "connection reset by peer";
++#endif
++#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK))
++       case EDEADLK: return "resource deadlock avoided";
++#endif
++#if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK))
++       case EDEADLOCK: return "resource deadlock avoided";
++#endif
++#ifdef EDESTADDRREQ
++       case EDESTADDRREQ: return "destination address required";
++#endif
++#ifdef EDIRTY
++       case EDIRTY: return "mounting a dirty fs w/o force";
++#endif
++#ifdef EDOM
++       case EDOM: return "math argument out of range";
++#endif
++#ifdef EDOTDOT
++       case EDOTDOT: return "cross mount point";
++#endif
++#ifdef EDQUOT
++       case EDQUOT: return "disk quota exceeded";
++#endif
++#ifdef EDUPPKG
++       case EDUPPKG: return "duplicate package name";
++#endif
++#ifdef EEXIST
++       case EEXIST: return "file already exists";
++#endif
++#ifdef EFAULT
++       case EFAULT: return "bad address in system call argument";
++#endif
++#ifdef EFBIG
++       case EFBIG: return "file too large";
++#endif
++#ifdef EHOSTDOWN
++       case EHOSTDOWN: return "host is down";
++#endif
++#ifdef EHOSTUNREACH
++       case EHOSTUNREACH: return "host is unreachable";
++#endif
++#if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS))
++       case EIDRM: return "identifier removed";
++#endif
++#ifdef EINIT
++       case EINIT: return "initialization error";
++#endif
++#ifdef EINPROGRESS
++       case EINPROGRESS: return "operation now in progress";
++#endif
++#ifdef EINTR
++       case EINTR: return "interrupted system call";
++#endif
++#ifdef EINVAL
++       case EINVAL: return "invalid argument";
++#endif
++#ifdef EIO
++       case EIO: return "I/O error";
++#endif
++#ifdef EISCONN
++       case EISCONN: return "socket is already connected";
++#endif
++#ifdef EISDIR
++       case EISDIR: return "illegal operation on a directory";
++#endif
++#ifdef EISNAME
++       case EISNAM: return "is a name file";
++#endif
++#ifdef ELBIN
++       case ELBIN: return "ELBIN";
++#endif
++#ifdef EL2HLT
++       case EL2HLT: return "level 2 halted";
++#endif
++#ifdef EL2NSYNC
++       case EL2NSYNC: return "level 2 not synchronized";
++#endif
++#ifdef EL3HLT
++       case EL3HLT: return "level 3 halted";
++#endif
++#ifdef EL3RST
++       case EL3RST: return "level 3 reset";
++#endif
++#ifdef ELIBACC
++       case ELIBACC: return "can not access a needed shared library";
++#endif
++#ifdef ELIBBAD
++       case ELIBBAD: return "accessing a corrupted shared library";
++#endif
++#ifdef ELIBEXEC
++       case ELIBEXEC: return "can not exec a shared library directly";
++#endif
++#ifdef ELIBMAX
++       case ELIBMAX: return
++               "attempting to link in more shared libraries than system limit";
++#endif
++#ifdef ELIBSCN
++       case ELIBSCN: return ".lib section in a.out corrupted";
++#endif
++#ifdef ELNRNG
++       case ELNRNG: return "link number out of range";
++#endif
++#if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT))
++       case ELOOP: return "too many levels of symbolic links";
++#endif
++#ifdef EMFILE
++       case EMFILE: return "too many open files";
++#endif
++#ifdef EMLINK
++       case EMLINK: return "too many links";
++#endif
++#ifdef EMSGSIZE
++       case EMSGSIZE: return "message too long";
++#endif
++#ifdef EMULTIHOP
++       case EMULTIHOP: return "multihop attempted";
++#endif
++#ifdef ENAMETOOLONG
++       case ENAMETOOLONG: return "file name too long";
++#endif
++#ifdef ENAVAIL
++       case ENAVAIL: return "not available";
++#endif
++#ifdef ENET
++       case ENET: return "ENET";
++#endif
++#ifdef ENETDOWN
++       case ENETDOWN: return "network is down";
++#endif
++#ifdef ENETRESET
++       case ENETRESET: return "network dropped connection on reset";
++#endif
++#ifdef ENETUNREACH
++       case ENETUNREACH: return "network is unreachable";
++#endif
++#ifdef ENFILE
++       case ENFILE: return "file table overflow";
++#endif
++#ifdef ENOANO
++       case ENOANO: return "anode table overflow";
++#endif
++#if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR))
++       case ENOBUFS: return "no buffer space available";
++#endif
++#ifdef ENOCSI
++       case ENOCSI: return "no CSI structure available";
++#endif
++#if defined(ENODATA) && (!defined(ECONNREFUSED) || (ENODATA != ECONNREFUSED))
++       case ENODATA: return "no data available";
++#endif
++#ifdef ENODEV
++       case ENODEV: return "no such device";
++#endif
++#ifdef ENOENT
++       case ENOENT: return "no such file or directory";
++#endif
++#ifdef ENOEXEC
++       case ENOEXEC: return "exec format error";
++#endif
++#ifdef ENOLCK
++       case ENOLCK: return "no locks available";
++#endif
++#ifdef ENOLINK
++       case ENOLINK: return "link has be severed";
++#endif
++#ifdef ENOMEM
++       case ENOMEM: return "not enough memory";
++#endif
++#ifdef ENOMSG
++       case ENOMSG: return "no message of desired type";
++#endif
++#ifdef ENONET
++       case ENONET: return "machine is not on the network";
++#endif
++#ifdef ENOPKG
++       case ENOPKG: return "package not installed";
++#endif
++#ifdef ENOPROTOOPT
++       case ENOPROTOOPT: return "bad proocol option";
++#endif
++#ifdef ENOSPC
++       case ENOSPC: return "no space left on device";
++#endif
++#if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR))
++       case ENOSR: return "out of stream resources";
++#endif
++#if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR))
++       case ENOSTR: return "not a stream device";
++#endif
++#ifdef ENOSYM
++       case ENOSYM: return "unresolved symbol name";
++#endif
++#ifdef ENOSYS
++       case ENOSYS: return "function not implemented";
++#endif
++#ifdef ENOTBLK
++       case ENOTBLK: return "block device required";
++#endif
++#ifdef ENOTCONN
++       case ENOTCONN: return "socket is not connected";
++#endif
++#ifdef ENOTDIR
++       case ENOTDIR: return "not a directory";
++#endif
++#if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST))
++       case ENOTEMPTY: return "directory not empty";
++#endif
++#ifdef ENOTNAM
++       case ENOTNAM: return "not a name file";
++#endif
++#ifdef ENOTSOCK
++       case ENOTSOCK: return "socket operation on non-socket";
++#endif
++#ifdef ENOTSUP
++       case ENOTSUP: return "operation not supported";
++#endif
++#ifdef ENOTTY
++       case ENOTTY: return "inappropriate device for ioctl";
++#endif
++#ifdef ENOTUNIQ
++       case ENOTUNIQ: return "name not unique on network";
++#endif
++#ifdef ENXIO
++       case ENXIO: return "no such device or address";
++#endif
++#if defined(EOPNOTSUPP) &&  (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP))
++       case EOPNOTSUPP: return "operation not supported on socket";
++#endif
++#ifdef EPERM
++       case EPERM: return "not owner";
++#endif
++#if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT))
++       case EPFNOSUPPORT: return "protocol family not supported";
++#endif
++#ifdef EPIPE
++       case EPIPE: return "broken pipe";
++#endif
++#ifdef EPROCLIM
++       case EPROCLIM: return "too many processes";
++#endif
++#ifdef EPROCUNAVAIL
++       case EPROCUNAVAIL: return "bad procedure for program";
++#endif
++#ifdef EPROGMISMATCH
++       case EPROGMISMATCH: return "program version wrong";
++#endif
++#ifdef EPROGUNAVAIL
++       case EPROGUNAVAIL: return "RPC program not available";
++#endif
++#ifdef EPROTO
++       case EPROTO: return "protocol error";
++#endif
++#ifdef EPROTONOSUPPORT
++       case EPROTONOSUPPORT: return "protocol not suppored";
++#endif
++#ifdef EPROTOTYPE
++       case EPROTOTYPE: return "protocol wrong type for socket";
++#endif
++#ifdef ERANGE
++       case ERANGE: return "math result unrepresentable";
++#endif
++#if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED))
++       case EREFUSED: return "EREFUSED";
++#endif
++#ifdef EREMCHG
++       case EREMCHG: return "remote address changed";
++#endif
++#ifdef EREMDEV
++       case EREMDEV: return "remote device";
++#endif
++#ifdef EREMOTE
++       case EREMOTE: return "pathname hit remote file system";
++#endif
++#ifdef EREMOTEIO
++       case EREMOTEIO: return "remote i/o error";
++#endif
++#ifdef EREMOTERELEASE
++       case EREMOTERELEASE: return "EREMOTERELEASE";
++#endif
++#ifdef EROFS
++       case EROFS: return "read-only file system";
++#endif
++#ifdef ERPCMISMATCH
++       case ERPCMISMATCH: return "RPC version is wrong";
++#endif
++#ifdef ERREMOTE
++       case ERREMOTE: return "object is remote";
++#endif
++#ifdef ESHUTDOWN
++       case ESHUTDOWN: return "can't send afer socket shutdown";
++#endif
++#ifdef ESOCKTNOSUPPORT
++       case ESOCKTNOSUPPORT: return "socket type not supported";
++#endif
++#ifdef ESPIPE
++       case ESPIPE: return "invalid seek";
++#endif
++#ifdef ESRCH
++       case ESRCH: return "no such process";
++#endif
++#ifdef ESRMNT
++       case ESRMNT: return "srmount error";
++#endif
++#ifdef ESTALE
++       case ESTALE: return "stale remote file handle";
++#endif
++#ifdef ESUCCESS
++       case ESUCCESS: return "Error 0";
++#endif
++#if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP))
++       case ETIME: return "timer expired";
++#endif
++#if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR))
++       case ETIMEDOUT: return "connection timed out";
++#endif
++#ifdef ETOOMANYREFS
++       case ETOOMANYREFS: return "too many references: can't splice";
++#endif
++#ifdef ETXTBSY
++       case ETXTBSY: return "text file or pseudo-device busy";
++#endif
++#ifdef EUCLEAN
++       case EUCLEAN: return "structure needs cleaning";
++#endif
++#ifdef EUNATCH
++       case EUNATCH: return "protocol driver not attached";
++#endif
++#ifdef EUSERS
++       case EUSERS: return "too many users";
++#endif
++#ifdef EVERSION
++       case EVERSION: return "version mismatch";
++#endif
++#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
++       case EWOULDBLOCK: return "operation would block";
++#endif
++#ifdef EXDEV
++       case EXDEV: return "cross-domain link";
++#endif
++#ifdef EXFULL
++       case EXFULL: return "message tables full";
++#endif
++       default:
++#ifdef NO_STRERROR
++           return "unknown POSIX error";
++#else
++           return strerror(errno);
++#endif
++    }
++}
++
++/*
++ * end of excerpt from tcl8.0.X/generic/tclPosixStr.c
++ */
++
++/*
+  * stolen from exp_log.c - this function is called from the Expect library
+  * but the one that the library supplies calls Tcl functions.  So we supply
+  * our own.
+diff -up expect5.45/expect.h.orig expect5.45/expect.h
+--- expect5.45/expect.h.orig   2010-09-01 00:20:27.000000000 +0200
++++ expect5.45/expect.h        2015-05-19 12:00:58.674248152 +0200
+@@ -258,6 +258,46 @@ typedef long LONG;
+ typedef struct Tcl_RegExp_ *Tcl_RegExp;
+ /*
++ * The following declarations either map ckalloc and ckfree to
++ * malloc and free, or they map them to procedures with all sorts
++ * of debugging hooks defined in tclCkalloc.c.
++ */
++
++#ifdef TCL_MEM_DEBUG
++
++#  define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
++#  define Tcl_Free(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
++#  define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
++#  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
++#  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
++#  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
++
++#else
++
++/*
++ * If USE_TCLALLOC is true, then we need to call Tcl_Alloc instead of
++ * the native malloc/free.  The only time USE_TCLALLOC should not be
++ * true is when compiling the Tcl/Tk libraries on Unix systems.  In this
++ * case we can safely call the native malloc/free directly as a performance
++ * optimization.
++ */
++
++#  if USE_TCLALLOC
++#     define ckalloc(x) Tcl_Alloc(x)
++#     define ckfree(x) Tcl_Free(x)
++#     define ckrealloc(x,y) Tcl_Realloc(x,y)
++#  else
++#     define ckalloc(x) malloc(x)
++#     define ckfree(x)  free(x)
++#     define ckrealloc(x,y) realloc(x,y)
++#  endif
++#  define Tcl_DumpActiveMemory(x)
++#  define Tcl_ValidateAllMemory(x,y)
++
++#endif /* !TCL_MEM_DEBUG */
++
++
++/*
+  * These function have been renamed. The old names are deprecated, but we
+  * define these macros for backwards compatibilty.
+  */
+@@ -268,6 +308,14 @@ typedef struct Tcl_RegExp_ *Tcl_RegExp;
+ #define Tcl_Return Tcl_SetResult
+ #define Tcl_TildeSubst Tcl_TranslateFileName
++/*
++ * In later releases, Tcl_Panic will be the correct name to use.  For now
++ * we leave it as panic to avoid breaking existing binaries.
++ */
++
++#define Tcl_Panic panic
++#define Tcl_PanicVA panicVA
++
+ #endif /* RESOURCE_INCLUDED */
+ #undef TCL_STORAGE_CLASS
index 2b6bef716a4d3816dddf23db4880cf97cfa32a80..929f4f913316cd71fb9bd7ce9c92610a0a2e010b 100644 (file)
@@ -12,7 +12,7 @@ Summary(tr.UTF-8):    Programlar arası etkileşimi mümkün kılan Tcl genişletme
 Summary(uk.UTF-8):     Розширення Tcl для керування програмами зі скриптів
 Name:          expect
 Version:       5.45
-Release:       4
+Release:       5
 License:       BSD
 Group:         Development/Languages/Tcl
 Source0:       http://downloads.sourceforge.net/expect/%{name}%{version}.tar.gz
@@ -21,14 +21,24 @@ Patch0:             %{name}-pty.patch
 Patch1:                %{name}-bug7869.patch
 Patch2:                %{name}-soname.patch
 Patch3:                %{name}-format.patch
+Patch4:                %{name}-5.43.0-log_file.patch
+Patch5:                %{name}-5.45-match-gt-numchars-segfault.patch
+Patch6:                %{name}-5.45-re-memleak.patch
+Patch7:                %{name}-5.45-exp-log-buf-overflow.patch
+Patch8:                %{name}-5.45-segfault-with-stubs.patch
+Patch9:                %{name}-5.45-fd-leak.patch
+Patch10:       %{name}-5.32.2-random.patch
+Patch11:       %{name}-5.45-mkpasswd-dash.patch
+Patch12:       %{name}-5.45-check-telnet.patch
+Patch13:       %{name}-5.45-passmass-su-full-path.patch
 URL:           http://expect.nist.gov/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: tcl-devel >= 8.5.0
 BuildRequires: tk-devel >= 8.5.0
 BuildRequires: xorg-lib-libX11-devel
-BuildRequires: xorg-lib-libXext-devel
 BuildRequires: xorg-lib-libXScrnSaver-devel
+BuildRequires: xorg-lib-libXext-devel
 Requires:      tcl >= 8.5.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -106,6 +116,16 @@ Pliki nagłówkowe i dokumentacja do rozszerzenia expect języka Tcl.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
 
 chmod +w {.,testsuite}/configure
 
This page took 0.111948 seconds and 4 git commands to generate.