add new package expect

This commit is contained in:
erkanisik1
2022-05-01 13:33:21 +03:00
parent a5c76ba974
commit efa76301e8
7 changed files with 175 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get
libname = "libexpect.so.%s" % get.srcVERSION()
majorVersion = tuple(get.srcVERSION().split(".")[:2])
def setup():
#pisitools.dosed("expect.man", "/usr/local/bin", "/usr/bin")
#pisitools.dosed("expectk.man", "/usr/local/bin", "/usr/bin")
pisitools.dosed("Makefile.in", "^install: .*", "install: all install-binaries install-doc")
pisitools.dosed("Makefile.in", "^(SCRIPTS_MANPAGES = .*)$", "_\\1")
autotools.autoconf()
shelltools.export("CFLAGS","%s -D_BSD_SOURCE" % get.CFLAGS())
autotools.configure("--with-tcl=/usr/lib \
--with-tclinclude=/usr/include \
--without-x \
--with-tk=no \
--enable-shared")
def build():
autotools.make("SONAME=%s" % libname)
def install():
autotools.rawInstall('DESTDIR="%s"' % get.installDIR())
pisitools.domove("/usr/lib/expect%s/libexpect%s.so" % (get.srcVERSION(), get.srcVERSION()), "/usr/lib/", libname)
pisitools.rename("/usr/lib/expect%s" % get.srcVERSION(), "expect%s.%s" % majorVersion)
#pisitools.dosym(libname, "/usr/lib/libexpect.so.%s.%s" % majorVersion)
pisitools.dosym(libname, "/usr/lib/libexpect%s.so" % get.srcVERSION())
pisitools.dosym(libname, "/usr/lib/libexpect.so.%s" % majorVersion[0])
pisitools.dosym(libname, "/usr/lib/libexpect.so")
pisitools.dodoc("FAQ", "ChangeLog", "NEWS", "README", "HISTORY")
@@ -0,0 +1,27 @@
From 200f54ec3498c9d53c530b863ee43b42ff258fea Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@mandriva.com>
Date: Thu, 5 Mar 2009 11:44:35 +0100
Subject: [PATCH] Fix format security
---
exp_clib.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/exp_clib.c b/exp_clib.c
index 79e6309..1ae6073 100644
--- a/exp_clib.c
+++ b/exp_clib.c
@@ -1936,8 +1936,8 @@ expDiagLogU(str)
char *str;
{
if (exp_is_debugging) {
- fprintf(stderr,str);
- if (exp_logfile) fprintf(exp_logfile,str);
+ fprintf(stderr,"%s",str);
+ if (exp_logfile) fprintf(exp_logfile,"%s",str);
}
}
--
1.6.1.3
@@ -0,0 +1,13 @@
diff --git a/Makefile.in b/Makefile.in
index cc2c79b..1083eaf 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -148,7 +148,7 @@ OBJEXT = @OBJEXT@
RANLIB = @RANLIB@
RANLIB_STUB = @RANLIB_STUB@
SHLIB_CFLAGS = @SHLIB_CFLAGS@
-SHLIB_LD = @SHLIB_LD@
+SHLIB_LD = @SHLIB_LD@ $(LDFLAGS)
SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
STLIB_LD = @STLIB_LD@
TCL_DEFS = @TCL_DEFS@
@@ -0,0 +1,19 @@
diff -up expect-5.43/example/mkpasswd.random expect-5.43/example/mkpasswd
--- expect-5.43/example/mkpasswd.random 2004-12-07 00:38:21.000000000 +0100
+++ expect-5.43/example/mkpasswd 2008-09-25 12:27:19.000000000 +0200
@@ -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
@@ -0,0 +1,12 @@
diff -up expect-5.43/exp_log.c.log_file expect-5.43/exp_log.c
--- expect-5.43/exp_log.c.log_file 2004-08-18 22:54:35.000000000 +0200
+++ expect-5.43/exp_log.c 2008-09-25 12:24:42.000000000 +0200
@@ -471,7 +471,7 @@ expLogChannelOpen(interp,filename,append
Tcl_DStringAppend(&tsdPtr->logFilename,filename,-1);
}
- tsdPtr->logChannel = Tcl_OpenFileChannel(interp,newfilename,mode,0777);
+ tsdPtr->logChannel = Tcl_OpenFileChannel(interp,newfilename,mode,0666);
if (!tsdPtr->logChannel) {
Tcl_DStringFree(&tsdPtr->logFilename);
return TCL_ERROR;
+50
View File
@@ -0,0 +1,50 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>expect</Name>
<Homepage>https://core.tcl-lang.org/expect/index</Homepage>
<Packager>
<Name>Kamil Atlı</Name>
<Email>suvari@pisilinux.org</Email>
</Packager>
<License>BSD</License>
<IsA>app:console</IsA>
<IsA>library</IsA>
<Summary>A tool for automating interactive applications</Summary>
<Description>Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial. Expect is also useful for testing these same applications.</Description>
<Archive sha1sum="a97b2f377c6a799928d6728c2ada55beb7f57d96" type="targz">mirrors://sourceforge/expect/Expect/5.45.4/expect5.45.4.tar.gz</Archive>
<BuildDependencies>
<Dependency>tcl-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">expect-5.44.1.15-ldflags.patch</Patch>
<Patch level="1">expect-5.43.0-fixformatsecurity.patch</Patch>
<Patch level="1">expect-fedora-5.32.2-random.patch</Patch>
<Patch level="1">expect-fedora-5.43.0-log_file.patch</Patch>
</Patches>
</Source>
<Package>
<Name>expect</Name>
<RuntimeDependencies>
<Dependency>tcl</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="doc">/usr/share/doc</Path>
</Files>
</Package>
<History>
<Update release="1">
<Date>2022-05-01</Date>
<Version>5.45.4</Version>
<Comment>First release</Comment>
<Name>Kamil Atlı</Name>
<Email>suvari@pisilinux.org</Email>
</Update>
</History>
</PISI>
@@ -0,0 +1,8 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>expect</Name>
<Summary xml:lang="tr">İnteraktif uygulamaları otomatikleştirmek için kullanılan bir araç.</Summary>
<Summary xml:lang="fr">Outil pour automatiser les applications interactives</Summary>
</Source>
</PISI>