Update to expect-5.45
This commit is contained in:
parent
114d21fd5c
commit
0c6b037f35
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
expect-5.44.1.15.tar.bz2
|
||||
/expect5.45.tar.gz
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -up expect-5.43/Makefile.in.libdir expect-5.43/Makefile.in
|
||||
--- expect-5.43/Makefile.in.libdir 2004-05-07 20:10:30.000000000 +0200
|
||||
+++ expect-5.43/Makefile.in 2008-09-25 12:24:08.000000000 +0200
|
||||
@@ -317,7 +317,7 @@ EXP_AND_TK_LIBS = $(LDFLAGS) @EXP_AND_TK
|
||||
CFLAGS_INT = $(MH_CFLAGS) $(CPPFLAGS) $(XCFLAGS)
|
||||
|
||||
LIB_INSTALL_DIR = $(tcl_libdir)
|
||||
-LIB_RUNTIME_DIR = $(tcl_libdir)
|
||||
+LIB_RUNTIME_DIR = $(subst $(INSTALL_ROOT),,$(tcl_libdir))
|
||||
# I don't understand why Tcl splits these up, but it does. LIB_RUNTIME_DIR
|
||||
# can appear as part of the LD_SEARCH_FLAGS inherited by configure.
|
||||
|
@ -1,29 +1,29 @@
|
||||
diff -up expect-5.44.1.15/configure.in.pkgpath expect-5.44.1.15/configure.in
|
||||
--- expect-5.44.1.15/configure.in.pkgpath 2009-11-03 20:27:58.000000000 +0100
|
||||
+++ expect-5.44.1.15/configure.in 2010-03-09 14:46:47.997377875 +0100
|
||||
@@ -1198,6 +1198,7 @@ AC_SUBST(EXP_SHLIB_LD_LIBS)
|
||||
diff -up expect5.45/configure.in.orig expect5.45/configure.in
|
||||
--- expect5.45/configure.in.orig 2011-01-18 16:58:14.860806442 +0100
|
||||
+++ expect5.45/configure.in 2011-01-18 16:58:30.378753210 +0100
|
||||
@@ -977,6 +977,7 @@ AC_SUBST(EXP_CC_SEARCH_FLAGS)
|
||||
AC_SUBST(SETUID)
|
||||
AC_SUBST(SETPGRP_VOID)
|
||||
AC_SUBST(DEFAULT_STTY_ARGS)
|
||||
+AC_SUBST(TCL_VERSION)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
#--------------------------------------------------------------------
|
||||
diff -up expect-5.44.1.15/Makefile.in.pkgpath expect-5.44.1.15/Makefile.in
|
||||
--- expect-5.44.1.15/Makefile.in.pkgpath 2008-10-03 19:05:14.000000000 +0200
|
||||
+++ expect-5.44.1.15/Makefile.in 2010-03-09 14:47:20.101376873 +0100
|
||||
# Expect uses these from tclConfig.sh to make the main executable
|
||||
AC_SUBST(TCL_DL_LIBS)
|
||||
AC_SUBST(TCL_CC_SEARCH_FLAGS)
|
||||
diff -up expect5.45/Makefile.in.orig expect5.45/Makefile.in
|
||||
--- expect5.45/Makefile.in.orig 2011-01-18 16:58:37.787723824 +0100
|
||||
+++ expect5.45/Makefile.in 2011-01-18 17:05:10.697636907 +0100
|
||||
@@ -121,8 +121,8 @@ includedir = @includedir@
|
||||
DESTDIR =
|
||||
|
||||
PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION)
|
||||
-pkgdatadir = $(datadir)/$(PKG_DIR)
|
||||
-pkglibdir = $(libdir)/$(PKG_DIR)
|
||||
+pkgdatadir = $(datadir)/tcl@TCL_VERSION@/$(PKG_DIR)
|
||||
+pkglibdir = $(libdir)/tcl@TCL_VERSION@/$(PKG_DIR)
|
||||
+pkgdatadir = $(datadir)/tcl@TCL_VERSION@/$(PKG_DIR)
|
||||
+pkglibdir = $(libdir)/tcl@TCL_VERSION@/$(PKG_DIR)
|
||||
pkgincludedir = $(includedir)/$(PKG_DIR)
|
||||
|
||||
top_builddir = .
|
||||
@@ -267,7 +267,7 @@ install-doc: doc
|
||||
@@ -263,7 +263,7 @@ install-doc: doc
|
||||
else true; fi ; \
|
||||
done
|
||||
|
||||
@ -33,9 +33,9 @@ diff -up expect-5.44.1.15/Makefile.in.pkgpath expect-5.44.1.15/Makefile.in
|
||||
|
||||
shell: binaries libraries
|
||||
@@ -331,6 +331,11 @@ pkgIndex.tcl:
|
||||
|
||||
pkgIndex.tcl-hand:
|
||||
(echo 'package ifneeded Expect $(PACKAGE_VERSION) \
|
||||
(echo 'if {![package vsatisfies [package provide Tcl] @TCL_VERSION@]} {return}' ; \
|
||||
echo 'package ifneeded Expect $(PACKAGE_VERSION) \
|
||||
+ [list load [file join $$dir .. .. $(PKG_LIB_FILE)]]'\
|
||||
+ ) > pkgIndex.tcl
|
||||
+
|
||||
|
@ -1,232 +0,0 @@
|
||||
Author: Sergei Golovan <sgolovan@debian.org>
|
||||
Description: Fixes Tk intialization by calling Tk_Init instead of
|
||||
using copy&pasted Tk_Init from older Tk.
|
||||
|
||||
--- expect-5.44.1.14.orig/exp_main_tk.c
|
||||
+++ expect-5.44.1.14/exp_main_tk.c
|
||||
@@ -162,13 +162,7 @@
|
||||
* the "argv" variable in Tk_Init.
|
||||
*/
|
||||
|
||||
-static int synchronize;
|
||||
-static CONST char *name;
|
||||
-static char *display;
|
||||
-static char *geometry;
|
||||
-static char *colormap;
|
||||
-static char *visual;
|
||||
-static int rest = 0;
|
||||
+static int rest;
|
||||
|
||||
/* for Expect */
|
||||
int my_rc = 1;
|
||||
@@ -181,21 +175,6 @@
|
||||
int print_version = 0;
|
||||
|
||||
static Tk_ArgvInfo argTable[] = {
|
||||
- {"-colormap", TK_ARGV_STRING, (char *) NULL, (char *) &colormap,
|
||||
- "Colormap for main window"},
|
||||
- {"-display", TK_ARGV_STRING, (char *) NULL, (char *) &display,
|
||||
- "Display to use"},
|
||||
- {"-geometry", TK_ARGV_STRING, (char *) NULL, (char *) &geometry,
|
||||
- "Initial geometry for window"},
|
||||
- {"-name", TK_ARGV_STRING, (char *) NULL, (char *) &name,
|
||||
- "Name to use for application"},
|
||||
- {"-sync", TK_ARGV_CONSTANT, (char *) 1, (char *) &synchronize,
|
||||
- "Use synchronous mode for display server"},
|
||||
- {"-visual", TK_ARGV_STRING, (char *) NULL, (char *) &visual,
|
||||
- "Visual for main window"},
|
||||
- {"--", TK_ARGV_REST, (char *) 1, (char *) &rest,
|
||||
- "Pass all remaining arguments through to script"},
|
||||
-/* for Expect */
|
||||
{"-command", TK_ARGV_GENFUNC, (char *) optcmd_eval, (char *)0,
|
||||
"Command(s) to execute immediately"},
|
||||
{"-diag", TK_ARGV_CONSTANT, (char *) optcmd_diagToStderr, (char *)0,
|
||||
@@ -210,6 +189,8 @@
|
||||
{"-Debug", TK_ARGV_GENFUNC, (char *) optcmd_debug, (char *)0,
|
||||
"Enable debugger"},
|
||||
#endif
|
||||
+ {"--", TK_ARGV_REST, (char *) 1, (char *) &rest,
|
||||
+ "Pass all remaining arguments through to script"},
|
||||
{(char *) NULL, TK_ARGV_END, (char *) NULL, (char *) NULL,
|
||||
(char *) NULL}
|
||||
};
|
||||
@@ -243,11 +224,11 @@
|
||||
Tcl_Interp *interp; /* Interpreter to initialize. */
|
||||
{
|
||||
CONST char *p;
|
||||
- char* alist, *cstr;
|
||||
- int argc, code;
|
||||
- char **argv, *args[20];
|
||||
- Tcl_DString class;
|
||||
+ char *alist, *pp;
|
||||
+ int argc, length, i, j;
|
||||
+ char **argv, **newargv;
|
||||
char buffer[30];
|
||||
+ size_t len;
|
||||
|
||||
/*
|
||||
* If there is an "argv" variable, get its value, extract out
|
||||
@@ -255,8 +236,7 @@
|
||||
* the arguments that we used.
|
||||
*/
|
||||
|
||||
- synchronize = 0;
|
||||
- name = display = geometry = colormap = visual = NULL;
|
||||
+ rest = -1;
|
||||
p = Tcl_GetVar2(interp, "argv", (char *) NULL, TCL_GLOBAL_ONLY);
|
||||
argv = NULL;
|
||||
if (p != NULL) {
|
||||
@@ -285,115 +265,57 @@
|
||||
}
|
||||
}
|
||||
|
||||
- alist = Tcl_Merge(argc, argv);
|
||||
- Tcl_SetVar2(interp, "argv", (char *) NULL, alist, TCL_GLOBAL_ONLY);
|
||||
- sprintf(buffer, "%d", argc);
|
||||
- Tcl_SetVar2(interp, "argc", (char *) NULL, buffer, TCL_GLOBAL_ONLY);
|
||||
- ckfree(alist);
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Figure out the application's name and class.
|
||||
- */
|
||||
+ if (rest >= 0) {
|
||||
+ /* Resore '--' in arguments list
|
||||
+ */
|
||||
|
||||
- if (name == NULL) {
|
||||
- name = Tcl_GetVar(interp, "argv0", TCL_GLOBAL_ONLY);
|
||||
- if ((name == NULL) || (*name == 0)) {
|
||||
- name = "tk";
|
||||
- } else {
|
||||
- p = (char *)strrchr(name, '/'); /* added cast - DEL */
|
||||
- if (p != NULL) {
|
||||
- name = p+1;
|
||||
+ length = 0;
|
||||
+ for (i = 0; i < argc; i++) {
|
||||
+ length += strlen(argv[i]) + 1;
|
||||
}
|
||||
- }
|
||||
- }
|
||||
- Tcl_DStringInit(&class);
|
||||
- Tcl_DStringAppend(&class, name, -1);
|
||||
- cstr = Tcl_DStringValue(&class);
|
||||
- if (islower(*cstr)) {
|
||||
- *cstr = toupper((unsigned char) *cstr);
|
||||
- }
|
||||
|
||||
- /*
|
||||
- * Create an argument list for creating the top-level window,
|
||||
- * using the information parsed from argv, if any.
|
||||
- */
|
||||
+ newargv = (char **) ckalloc((unsigned) ((argc+2)*sizeof(char *)) + length + 3);
|
||||
|
||||
- args[0] = "toplevel";
|
||||
- args[1] = ".";
|
||||
- args[2] = "-class";
|
||||
- args[3] = Tcl_DStringValue(&class);
|
||||
- argc = 4;
|
||||
- if (display != NULL) {
|
||||
- args[argc] = "-screen";
|
||||
- args[argc+1] = display;
|
||||
- argc += 2;
|
||||
-
|
||||
- /*
|
||||
- * If this is the first application for this process, save
|
||||
- * the display name in the DISPLAY environment variable so
|
||||
- * that it will be available to subprocesses created by us.
|
||||
- */
|
||||
+ pp = ((char *) newargv) + (argc+2)*sizeof(char *);
|
||||
+ j = 0;
|
||||
+ for (i = 0; i < argc; i++) {
|
||||
+ if (i == rest) {
|
||||
+ memcpy(pp, "--", 3);
|
||||
+ newargv[j++] = pp;
|
||||
+ pp += 3;
|
||||
+ }
|
||||
+
|
||||
+ len = strlen(argv[i]) + 1;
|
||||
+ memcpy(pp, argv[i], len);
|
||||
+ newargv[j++] = pp;
|
||||
+ pp += len;
|
||||
+ }
|
||||
+ newargv[j] = NULL;
|
||||
|
||||
- if (numMainWindows == 0) {
|
||||
- Tcl_SetVar2(interp, "env", "DISPLAY", display, TCL_GLOBAL_ONLY);
|
||||
+ alist = Tcl_Merge(argc+1, newargv);
|
||||
+ } else {
|
||||
+ newargv = NULL;
|
||||
+ alist = Tcl_Merge(argc, argv);
|
||||
}
|
||||
- }
|
||||
- if (colormap != NULL) {
|
||||
- args[argc] = "-colormap";
|
||||
- args[argc+1] = colormap;
|
||||
- argc += 2;
|
||||
- }
|
||||
- if (visual != NULL) {
|
||||
- args[argc] = "-visual";
|
||||
- args[argc+1] = visual;
|
||||
- argc += 2;
|
||||
- }
|
||||
- args[argc] = NULL;
|
||||
- code = TkCreateFrame((ClientData) NULL, interp, argc, args, 1, name);
|
||||
- Tcl_DStringFree(&class);
|
||||
- if (code != TCL_OK) {
|
||||
- goto done;
|
||||
- }
|
||||
- Tcl_ResetResult(interp);
|
||||
-#ifndef MAC_OSX_TK
|
||||
- if (synchronize) {
|
||||
- XSynchronize(Tk_Display(Tk_MainWindow(interp)), True);
|
||||
- }
|
||||
-#endif
|
||||
|
||||
- /*
|
||||
- * Set the geometry of the main window, if requested. Put the
|
||||
- * requested geometry into the "geometry" variable.
|
||||
- */
|
||||
-
|
||||
- if (geometry != NULL) {
|
||||
- Tcl_SetVar(interp, "geometry", geometry, TCL_GLOBAL_ONLY);
|
||||
- code = Tcl_VarEval(interp, "wm geometry . ", geometry, (char *) NULL);
|
||||
- if (code != TCL_OK) {
|
||||
- goto done;
|
||||
- }
|
||||
- }
|
||||
- if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1) == NULL) {
|
||||
- code = TCL_ERROR;
|
||||
- goto done;
|
||||
- }
|
||||
- code = Tcl_PkgProvide(interp, "Tk", TK_VERSION);
|
||||
- if (code != TCL_OK) {
|
||||
- goto done;
|
||||
+ Tcl_SetVar2(interp, "argv", (char *) NULL, alist, TCL_GLOBAL_ONLY);
|
||||
+ sprintf(buffer, "%d", argc);
|
||||
+ Tcl_SetVar2(interp, "argc", (char *) NULL, buffer, TCL_GLOBAL_ONLY);
|
||||
+ ckfree(alist);
|
||||
}
|
||||
|
||||
- /*
|
||||
- * Invoke platform-specific initialization.
|
||||
- */
|
||||
-
|
||||
- code = TkpInit(interp, 0);
|
||||
+ if (Tk_Init(interp) == TCL_ERROR) {
|
||||
+ return TCL_ERROR;
|
||||
+ }
|
||||
|
||||
- done:
|
||||
if (argv != NULL) {
|
||||
ckfree((char *) argv);
|
||||
}
|
||||
- return code;
|
||||
+ if (newargv != NULL) {
|
||||
+ ckfree((char *) newargv);
|
||||
+ }
|
||||
+
|
||||
+ return TCL_OK;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
@ -1,9 +0,0 @@
|
||||
diff -up expect-5.44.1.15/example/unbuffer.orig expect-5.44.1.15/example/unbuffer
|
||||
--- expect-5.44.1.15/example/unbuffer.orig 2010-03-08 16:24:38.260378258 +0100
|
||||
+++ expect-5.44.1.15/example/unbuffer 2010-03-08 16:24:57.525387178 +0100
|
||||
@@ -19,4 +19,5 @@ if {[string compare [lindex $argv 0] "-p
|
||||
set timeout -1
|
||||
eval [list spawn -noecho] $argv
|
||||
expect
|
||||
+ exit [lindex [eval wait] 3]
|
||||
}
|
28
expect.spec
28
expect.spec
@ -1,31 +1,26 @@
|
||||
%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)}
|
||||
%{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}}
|
||||
%define majorver 5.44
|
||||
%define majorver 5.45
|
||||
|
||||
Summary: A program-script interaction and testing utility
|
||||
Name: expect
|
||||
Version: %{majorver}.1.15
|
||||
Version: %{majorver}
|
||||
Release: 1%{?dist}
|
||||
License: Public Domain
|
||||
Group: Development/Languages
|
||||
# URL: probably more useful is http://sourceforge.net/projects/expect/
|
||||
URL: http://expect.nist.gov/
|
||||
# Source: upstream doesn't release tarballs, CVS snapshot packed
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source: http://downloads.sourceforge.net/%{name}/%{name}%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Buildrequires: tcl-devel tk-devel autoconf automake libXft-devel chrpath
|
||||
# Patch0: fixes change log file permissions
|
||||
Patch0: expect-5.43.0-log_file.patch
|
||||
# Patch1: fixes install location, change pkgIndex
|
||||
Patch1: expect-5.43.0-pkgpath.patch
|
||||
# Patch2: fixes bz456738, expectk is unsupported by upstream actually,
|
||||
# but the patch is under discussion (patch by Sergei Golovan)
|
||||
Patch2: expect-5.44.1.15-tk-init.patch
|
||||
# examples patches
|
||||
# Patch100: changes random function
|
||||
Patch100: expect-5.32.2-random.patch
|
||||
# Patch101: bz547686, no response from upstream
|
||||
Patch101: expect-5.44.1.15-unbuffer-exit-code.patch
|
||||
|
||||
%description
|
||||
Expect is a tcl application for automating and testing
|
||||
@ -59,16 +54,18 @@ interactive applications such as telnet, ftp, passwd, fsck,
|
||||
rlogin, tip, etc. Expect makes it easy for a script to
|
||||
control another program and interact with it.
|
||||
|
||||
This package contains expectk and some scripts that use it.
|
||||
This package originally contained expectk and some scripts
|
||||
that used it. As expectk was removed from upstream tarball
|
||||
in expect-5.45, now the package contains just these scripts.
|
||||
Please use tclsh with package require Tk and Expect instead
|
||||
of expectk.
|
||||
|
||||
%prep
|
||||
%setup -q -n expect-%{version}
|
||||
%setup -q -n expect%{version}
|
||||
%patch0 -p1 -b .log_file
|
||||
%patch1 -p1 -b .pkgpath
|
||||
%patch2 -p1 -b .tk-init
|
||||
# examples fixes
|
||||
%patch100 -p1 -b .random
|
||||
%patch101 -p1 -b .unbuffer-exit-code
|
||||
# -pkgpath.patch touch configure.in
|
||||
aclocal
|
||||
autoconf
|
||||
@ -77,7 +74,7 @@ autoconf
|
||||
|
||||
%build
|
||||
%configure --with-tcl=%{_libdir} --with-tk=%{_libdir} --enable-shared \
|
||||
--with-tclinclude=%{_includedir}/tcl-private
|
||||
--with-tclinclude=%{_includedir}/tcl-private/generic
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
@ -144,16 +141,17 @@ rm -rf "$RPM_BUILD_ROOT"
|
||||
|
||||
%files -n expectk
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/expectk
|
||||
%{_bindir}/multixterm
|
||||
%{_bindir}/tknewsbiff
|
||||
%{_bindir}/tkpasswd
|
||||
%{_bindir}/xpstat
|
||||
%{_mandir}/man1/expectk.1*
|
||||
%{_mandir}/man1/multixterm.1*
|
||||
%{_mandir}/man1/tknewsbiff.1*
|
||||
|
||||
%changelog
|
||||
* Tue Jan 18 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 5.45-1
|
||||
- Update to expect-5.45
|
||||
|
||||
* Wed Mar 10 2010 Vitezslav Crhonek <vcrhonek@redhat.com> - 5.44.1.15-1
|
||||
- Update to 5.44.1.15 from upstream CVS
|
||||
Resolves: #528654, Resolves: #501820
|
||||
|
Loading…
Reference in New Issue
Block a user