Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d21fbda06f | |||
| 6c07a89588 | |||
| f089d492df | |||
| dd5694ce5e |
@@ -1 +0,0 @@
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -1,2 +0,0 @@
|
||||
[lfs]
|
||||
url = https://artlfs.openeuler.openatom.cn/src-openEuler/tcl
|
||||
@@ -0,0 +1,35 @@
|
||||
From 7fff40c678507ffe82b3c65f1a0277a6da0b906e Mon Sep 17 00:00:00 2001
|
||||
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
|
||||
Date: Fri, 12 Jan 2018 10:03:58 +0000
|
||||
Subject: [PATCH 0837/1800] Fix [11ae2be95d]: tip-389 branch: string range
|
||||
errors with code points greater than U+FFFF
|
||||
|
||||
---
|
||||
generic/tclExecute.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
|
||||
index f2cda0ca8..63281a85e 100644
|
||||
--- a/generic/tclExecute.c
|
||||
+++ b/generic/tclExecute.c
|
||||
@@ -5445,7 +5445,7 @@ TEBCresume(
|
||||
valuePtr->bytes+index, 1);
|
||||
} else {
|
||||
char buf[TCL_UTF_MAX] = "";
|
||||
- Tcl_UniChar ch = Tcl_GetUniChar(valuePtr, index);
|
||||
+ int ch = Tcl_GetUniChar(valuePtr, index);
|
||||
|
||||
/*
|
||||
* This could be: Tcl_NewUnicodeObj((const Tcl_UniChar *)&ch, 1)
|
||||
@@ -5453,7 +5453,7 @@ TEBCresume(
|
||||
* practical use.
|
||||
*/
|
||||
|
||||
- length = Tcl_UniCharToUtf(ch, buf);
|
||||
+ length = (ch != -1) ? Tcl_UniCharToUtf(ch, buf) : 0;
|
||||
objResultPtr = Tcl_NewStringObj(buf, length);
|
||||
}
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From 30db6ce78e7c4b96b977320e4d16555a93401c8d Mon Sep 17 00:00:00 2001
|
||||
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
|
||||
Date: Tue, 22 Jun 2021 09:02:00 +0000
|
||||
Subject: [PATCH] Fix [bad6cc213d]: A format string vulnerability in Tcl
|
||||
nmakehelp.c allows code execution via a crated file. Also change a memcpy()
|
||||
to a memmove(), because the range could be overlapping
|
||||
|
||||
---
|
||||
win/nmakehlp.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
|
||||
index 7536ede..4021346 100644
|
||||
--- a/win/nmakehlp.c
|
||||
+++ b/win/nmakehlp.c
|
||||
@@ -537,7 +537,7 @@ GetVersionFromFile(
|
||||
++q;
|
||||
}
|
||||
|
||||
- memcpy(szBuffer, p, q - p);
|
||||
+ memmove(szBuffer, p, q - p);
|
||||
szBuffer[q-p] = 0;
|
||||
szResult = szBuffer;
|
||||
break;
|
||||
@@ -674,7 +674,7 @@ SubstituteFile(
|
||||
memcpy(szBuffer, szCopy, sizeof(szCopy));
|
||||
}
|
||||
}
|
||||
- printf(szBuffer);
|
||||
+ printf("%s", szBuffer);
|
||||
}
|
||||
|
||||
list_free(&substPtr);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
From a965b9b2624fefd1087fca8505ba3b486772ee70 Mon Sep 17 00:00:00 2001
|
||||
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
|
||||
Date: Mon, 20 Nov 2017 10:15:59 +0000
|
||||
Subject: [PATCH 0718/1800] Fix error-message for min/math functions: "to" ->
|
||||
"for", for consistancy with the error-messages for other math functions.
|
||||
|
||||
---
|
||||
library/init.tcl | 4 ++--
|
||||
tests/expr-old.test | 20 ++++++++++++++++----
|
||||
2 files changed, 18 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/library/init.tcl b/library/init.tcl
|
||||
index 87d9f14da..13a4300c3 100644
|
||||
--- a/library/init.tcl
|
||||
+++ b/library/init.tcl
|
||||
@@ -79,7 +79,7 @@ namespace eval tcl {
|
||||
proc min {args} {
|
||||
if {![llength $args]} {
|
||||
return -code error \
|
||||
- "too few arguments to math function \"min\""
|
||||
+ "too few arguments for math function \"min\""
|
||||
}
|
||||
set val Inf
|
||||
foreach arg $args {
|
||||
@@ -95,7 +95,7 @@ namespace eval tcl {
|
||||
proc max {args} {
|
||||
if {![llength $args]} {
|
||||
return -code error \
|
||||
- "too few arguments to math function \"max\""
|
||||
+ "too few arguments for math function \"max\""
|
||||
}
|
||||
set val -Inf
|
||||
foreach arg $args {
|
||||
diff --git a/tests/expr-old.test b/tests/expr-old.test
|
||||
index 3adfb635f..8c159b2bb 100644
|
||||
--- a/tests/expr-old.test
|
||||
+++ b/tests/expr-old.test
|
||||
@@ -1159,8 +1159,8 @@ test expr-old-40.2 {min math function} -body {
|
||||
expr {min(0.0)}
|
||||
} -result 0.0
|
||||
test expr-old-40.3 {min math function} -body {
|
||||
- list [catch {expr {min()}} msg] $msg
|
||||
-} -result {1 {too few arguments to math function "min"}}
|
||||
+ expr {min()}
|
||||
+} -returnCodes error -result {too few arguments for math function "min"}
|
||||
test expr-old-40.4 {min math function} -body {
|
||||
expr {min(wide(-1) << 30, 4.5, -10)}
|
||||
} -result [expr {wide(-1) << 30}]
|
||||
@@ -1170,6 +1170,12 @@ test expr-old-40.5 {min math function} -body {
|
||||
test expr-old-40.6 {min math function} -body {
|
||||
expr {min(300, "0xFF")}
|
||||
} -result 255
|
||||
+test expr-old-40.7 {min math function} -body {
|
||||
+ expr min(1[string repeat 0 10000], 1e300)
|
||||
+} -result 1e+300
|
||||
+test expr-old-40.8 {min math function} -body {
|
||||
+ expr {min(0, "a")}
|
||||
+} -returnCodes error -match glob -result *
|
||||
|
||||
test expr-old-41.1 {max math function} -body {
|
||||
expr {max(0)}
|
||||
@@ -1178,8 +1184,8 @@ test expr-old-41.2 {max math function} -body {
|
||||
expr {max(0.0)}
|
||||
} -result 0.0
|
||||
test expr-old-41.3 {max math function} -body {
|
||||
- list [catch {expr {max()}} msg] $msg
|
||||
-} -result {1 {too few arguments to math function "max"}}
|
||||
+ expr {max()}
|
||||
+} -returnCodes error -result {too few arguments for math function "max"}
|
||||
test expr-old-41.4 {max math function} -body {
|
||||
expr {max(wide(1) << 30, 4.5, -10)}
|
||||
} -result [expr {wide(1) << 30}]
|
||||
@@ -1189,6 +1195,12 @@ test expr-old-41.5 {max math function} -body {
|
||||
test expr-old-41.6 {max math function} -body {
|
||||
expr {max(200, "0xFF")}
|
||||
} -result 255
|
||||
+test expr-old-41.7 {max math function} -body {
|
||||
+ expr max(1[string repeat 0 10000], 1e300)
|
||||
+} -result 1[string repeat 0 10000]
|
||||
+test expr-old-41.8 {max math function} -body {
|
||||
+ expr {max(0, "a")}
|
||||
+} -returnCodes error -match glob -result *
|
||||
|
||||
# Special test for Pentium arithmetic bug of 1994:
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 5dfa918023df4ec9c5cbd4fe567ee509328f8d4f Mon Sep 17 00:00:00 2001
|
||||
From: dgp <dgp@users.sourceforge.net>
|
||||
Date: Mon, 5 Feb 2018 13:33:21 +0000
|
||||
Subject: [PATCH 0878/1800] Improved overflow prevention.
|
||||
|
||||
---
|
||||
generic/tclStringObj.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
|
||||
index ae75e449e..8437555ed 100644
|
||||
--- a/generic/tclStringObj.c
|
||||
+++ b/generic/tclStringObj.c
|
||||
@@ -140,8 +140,8 @@ GrowStringBuffer(
|
||||
objPtr->bytes = NULL;
|
||||
}
|
||||
if (flag == 0 || stringPtr->allocated > 0) {
|
||||
- attempt = 2 * needed;
|
||||
- if (attempt >= 0) {
|
||||
+ if (needed <= INT_MAX / 2) {
|
||||
+ attempt = 2 * needed;
|
||||
ptr = attemptckrealloc(objPtr->bytes, attempt + 1);
|
||||
}
|
||||
if (ptr == NULL) {
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 183dadc7fae0994a33901a7246989d2605f5c70c Mon Sep 17 00:00:00 2001
|
||||
From: dgp <dgp@users.sourceforge.net>
|
||||
Date: Mon, 5 Feb 2018 13:41:26 +0000
|
||||
Subject: [PATCH 0879/1800] Improved overflow prevention.
|
||||
|
||||
---
|
||||
generic/tclStringObj.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
|
||||
index 8437555ed..c3a0192d8 100644
|
||||
--- a/generic/tclStringObj.c
|
||||
+++ b/generic/tclStringObj.c
|
||||
@@ -190,8 +190,8 @@ GrowUnicodeBuffer(
|
||||
* Subsequent appends - apply the growth algorithm.
|
||||
*/
|
||||
|
||||
- attempt = 2 * needed;
|
||||
- if (attempt >= 0 && attempt <= STRING_MAXCHARS) {
|
||||
+ if (needed <= STRING_MAXCHARS / 2) {
|
||||
+ attempt = 2 * needed;
|
||||
ptr = stringAttemptRealloc(stringPtr, attempt);
|
||||
}
|
||||
if (ptr == NULL) {
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 6abda12a6aea301b037341b4c7c6ff1fe84920f9 Mon Sep 17 00:00:00 2001
|
||||
From: chenzhen <chenzhen44@huawei.com>
|
||||
Date: Tue, 6 Aug 2019 08:05:04 -0400
|
||||
Subject: [PATCH] fix exec test error
|
||||
|
||||
reason: fix exec test error
|
||||
|
||||
Signed-off-by: chenzhen <chenzhen44@huawei.com>
|
||||
---
|
||||
tests/exec.test | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/tests/exec.test b/tests/exec.test
|
||||
index cd29171..c718b2f 100644
|
||||
--- a/tests/exec.test
|
||||
+++ b/tests/exec.test
|
||||
@@ -17,7 +17,6 @@
|
||||
package require tcltest 2
|
||||
namespace import -force ::tcltest::*
|
||||
|
||||
-package require tcltests
|
||||
|
||||
# All tests require the "exec" command.
|
||||
# Skip them if exec is not defined.
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
%tcl_version %(echo 'puts $tcl_version' | tclsh)
|
||||
%tcl_sitelib %{_datadir}/tcl%{tcl_version}
|
||||
%tcl_sitearch %{_libdir}/tcl%{tcl_version}
|
||||
+24
-5
@@ -5,15 +5,16 @@ Subject: [PATCH 0239/1800] oops
|
||||
|
||||
---
|
||||
generic/tclOOMethod.c | 4 +---
|
||||
1 file changed, 1 insertions(+), 3 deletions(-)
|
||||
generic/tclTest.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
|
||||
index c65003f..0c7884a 100644
|
||||
index 34fa10893..6c9a2eb8d 100644
|
||||
--- a/generic/tclOOMethod.c
|
||||
+++ b/generic/tclOOMethod.c
|
||||
@@ -1548,9 +1548,7 @@ TclOOGetMethodBody(
|
||||
@@ -1540,9 +1540,7 @@ TclOOGetMethodBody(
|
||||
if (mPtr->typePtr == &procMethodType) {
|
||||
ProcedureMethod *pmPtr = (ProcedureMethod *)mPtr->clientData;
|
||||
ProcedureMethod *pmPtr = mPtr->clientData;
|
||||
|
||||
- if (pmPtr->procPtr->bodyPtr->bytes == NULL) {
|
||||
- (void) Tcl_GetString(pmPtr->procPtr->bodyPtr);
|
||||
@@ -22,6 +23,24 @@ index c65003f..0c7884a 100644
|
||||
return pmPtr->procPtr->bodyPtr;
|
||||
}
|
||||
return NULL;
|
||||
diff --git a/generic/tclTest.c b/generic/tclTest.c
|
||||
index 5bfa8f7ca..d96e35641 100644
|
||||
--- a/generic/tclTest.c
|
||||
+++ b/generic/tclTest.c
|
||||
@@ -7012,11 +7012,11 @@ TestconcatobjCmd(
|
||||
|
||||
list1Ptr = Tcl_NewStringObj("foo bar sum", -1);
|
||||
Tcl_ListObjLength(NULL, list1Ptr, &len);
|
||||
- Tcl_InvalidateStringrep(list1Ptr);
|
||||
+ Tcl_InvalidateStringRep(list1Ptr);
|
||||
|
||||
list2Ptr = Tcl_NewStringObj("eeny meeny", -1);
|
||||
Tcl_ListObjLength(NULL, list2Ptr, &len);
|
||||
- Tcl_InvalidateStringrep(list2Ptr);
|
||||
+ Tcl_InvalidateStringRep(list2Ptr);
|
||||
|
||||
/*
|
||||
* Verify that concat'ing a list obj with one or more empty strings does
|
||||
--
|
||||
2.27.0
|
||||
2.19.1
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ index 7c30d36e7..5bfa8f7ca 100644
|
||||
- ckfree(list1Ptr->bytes);
|
||||
- list1Ptr->bytes = NULL;
|
||||
- }
|
||||
+ Tcl_InvalidateStringRep(list1Ptr);
|
||||
+ Tcl_InvalidateStringrep(list1Ptr);
|
||||
|
||||
list2Ptr = Tcl_NewStringObj("eeny meeny", -1);
|
||||
Tcl_ListObjLength(NULL, list2Ptr, &len);
|
||||
@@ -28,7 +28,7 @@ index 7c30d36e7..5bfa8f7ca 100644
|
||||
- ckfree(list2Ptr->bytes);
|
||||
- list2Ptr->bytes = NULL;
|
||||
- }
|
||||
+ Tcl_InvalidateStringRep(list2Ptr);
|
||||
+ Tcl_InvalidateStringrep(list2Ptr);
|
||||
|
||||
/*
|
||||
* Verify that concat'ing a list obj with one or more empty strings does
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/library/auto.tcl b/library/auto.tcl
|
||||
index 7d23b6e..3c7717b 100644
|
||||
index a7a8979..892c2c4 100644
|
||||
--- a/library/auto.tcl
|
||||
+++ b/library/auto.tcl
|
||||
@@ -81,6 +81,13 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
|
||||
@@ -17,40 +17,40 @@ index 7d23b6e..3c7717b 100644
|
||||
# Tcl library as well as allowing loading of libraries added to the
|
||||
# auto_path that is not relative to the core library or binary paths.
|
||||
diff --git a/library/init.tcl b/library/init.tcl
|
||||
index edf6bd5..fa37bcc 100644
|
||||
index 5cda0d9..ffeb301 100644
|
||||
--- a/library/init.tcl
|
||||
+++ b/library/init.tcl
|
||||
@@ -52,16 +52,11 @@ if {![info exists auto_path]} {
|
||||
@@ -47,16 +47,11 @@ if {![info exists auto_path]} {
|
||||
}
|
||||
namespace eval tcl {
|
||||
if {![interp issafe]} {
|
||||
variable Dir
|
||||
- foreach Dir [list $::tcl_library [file dirname $::tcl_library]] {
|
||||
+ foreach Dir [list $::tcl_library] {
|
||||
if {$Dir ni $::auto_path} {
|
||||
lappend ::auto_path $Dir
|
||||
}
|
||||
variable Dir
|
||||
- foreach Dir [list $::tcl_library [file dirname $::tcl_library]] {
|
||||
+ foreach Dir [list $::tcl_library] {
|
||||
if {$Dir ni $::auto_path} {
|
||||
lappend ::auto_path $Dir
|
||||
}
|
||||
- set Dir [file join [file dirname [file dirname \
|
||||
- [info nameofexecutable]]] lib]
|
||||
- if {$Dir ni $::auto_path} {
|
||||
- lappend ::auto_path $Dir
|
||||
- }
|
||||
if {[info exists ::tcl_pkgPath]} { catch {
|
||||
foreach Dir $::tcl_pkgPath {
|
||||
if {$Dir ni $::auto_path} {
|
||||
}
|
||||
- set Dir [file join [file dirname [file dirname \
|
||||
- [info nameofexecutable]]] lib]
|
||||
- if {$Dir ni $::auto_path} {
|
||||
- lappend ::auto_path $Dir
|
||||
- }
|
||||
catch {
|
||||
foreach Dir $::tcl_pkgPath {
|
||||
if {$Dir ni $::auto_path} {
|
||||
diff --git a/unix/configure.in b/unix/configure.in
|
||||
index c73f368..5c57692 100644
|
||||
index 0d3f426..13ce9db 100755
|
||||
--- a/unix/configure.in
|
||||
+++ b/unix/configure.in
|
||||
@@ -869,9 +869,9 @@
|
||||
@@ -866,9 +866,9 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
|
||||
test -z "$TCL_MODULE_PATH" && \
|
||||
TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl"
|
||||
elif test "$prefix/lib" != "$libdir"; then
|
||||
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}:${prefix}/lib"
|
||||
+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6"
|
||||
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
|
||||
+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6 ${TCL_PACKAGE_PATH}"
|
||||
else
|
||||
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${prefix}/lib"
|
||||
+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6"
|
||||
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
|
||||
+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6 ${TCL_PACKAGE_PATH}"
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/unix/tcl.m4 b/unix/tcl.m4
|
||||
index f3d08ec..ed12cda 100644
|
||||
index 0e146e4..180fff1 100644
|
||||
--- a/unix/tcl.m4
|
||||
+++ b/unix/tcl.m4
|
||||
@@ -1378,7 +1378,7 @@
|
||||
@@ -1410,12 +1410,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
|
||||
# get rid of the warnings.
|
||||
#CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
|
||||
|
||||
@@ -11,11 +11,8 @@ index f3d08ec..ed12cda 100644
|
||||
DL_OBJS="tclLoadDl.o"
|
||||
DL_LIBS="-ldl"
|
||||
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
|
||||
@@ -1394,7 +1394,7 @@
|
||||
esac
|
||||
|
||||
AS_IF([test $doRpath = yes], [
|
||||
- CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
|
||||
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
|
||||
+ CC_SEARCH_FLAGS=''])
|
||||
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
|
||||
AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
|
||||
@@ -1,3 +1,25 @@
|
||||
diff --git a/generic/tclInt.h b/generic/tclInt.h
|
||||
index 39fb740..bbe342b 100644
|
||||
--- a/generic/tclInt.h
|
||||
+++ b/generic/tclInt.h
|
||||
@@ -3277,7 +3277,7 @@ MODULE_SCOPE void TclClockInit(Tcl_Interp *interp);
|
||||
MODULE_SCOPE int TclClockOldscanObjCmd(
|
||||
ClientData clientData, Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *const objv[]);
|
||||
-MODULE_SCOPE int Tcl_CloseObjCmd(ClientData clientData,
|
||||
+extern int Tcl_CloseObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE int Tcl_ConcatObjCmd(ClientData clientData,
|
||||
@@ -3458,7 +3458,7 @@ MODULE_SCOPE int Tcl_RenameObjCmd(ClientData clientData,
|
||||
MODULE_SCOPE int Tcl_RepresentationCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
-MODULE_SCOPE int Tcl_ReturnObjCmd(ClientData clientData,
|
||||
+extern int Tcl_ReturnObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE int Tcl_ScanObjCmd(ClientData clientData,
|
||||
diff --git a/generic/tclPort.h b/generic/tclPort.h
|
||||
index 9485567..f329cde 100644
|
||||
--- a/generic/tclPort.h
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
--- tcl8.6.15/unix/Makefile.in.orig 2024-11-12 16:31:23.486705192 +0800
|
||||
+++ tcl8.6.15/unix/Makefile.in 2024-11-12 16:56:09.598577892 +0800
|
||||
@@ -154,8 +154,8 @@
|
||||
INSTALL_STRIP_LIBRARY = strip -x
|
||||
|
||||
INSTALL = $(SHELL) $(UNIX_DIR)/install-sh -c
|
||||
-INSTALL_PROGRAM = ${INSTALL}
|
||||
-INSTALL_LIBRARY = ${INSTALL}
|
||||
+INSTALL_PROGRAM = ${INSTALL} -m 755
|
||||
+INSTALL_LIBRARY = ${INSTALL} -m 755
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_DATA_DIR = ${INSTALL} -d -m 755
|
||||
|
||||
@@ -812,7 +812,7 @@
|
||||
done
|
||||
@echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/"
|
||||
@@INSTALL_LIB@
|
||||
- @chmod 555 "$(DLL_INSTALL_DIR)/$(LIB_FILE)"
|
||||
+ @chmod 755 "$(DLL_INSTALL_DIR)/$(LIB_FILE)"
|
||||
@echo "Installing ${TCL_EXE} as $(BIN_INSTALL_DIR)/tclsh$(VERSION)${EXE_SUFFIX}"
|
||||
@$(INSTALL_PROGRAM) ${TCL_EXE} "$(BIN_INSTALL_DIR)/tclsh$(VERSION)${EXE_SUFFIX}"
|
||||
@echo "Installing tclConfig.sh to $(CONFIG_INSTALL_DIR)/"
|
||||
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3b371386a9a928eecdbf263bcab7d6a531e620ca3fbab4fdeeb3d6a9a56f38e9
|
||||
size 7022932
|
||||
@@ -1,19 +0,0 @@
|
||||
%__tcl_path ^(%{_datadir}|%{_libdir})/tcl[[:digit:]]+\\.[[:digit:]]+/.+
|
||||
|
||||
%__tcl_requires() %{lua:
|
||||
-- Match buildroot paths of the form
|
||||
-- /PATH/OF/BUILDROOT/usr/lib(64)/tclMAJOR.MINOR/ and
|
||||
-- /PATH/OF/BUILDROOT/usr/share/tclMAJOR.MINOR/
|
||||
-- generating a line of the form:
|
||||
-- tcl(abi) = MAJOR.MINOR
|
||||
local path = rpm.expand('%1')
|
||||
local datadir = rpm.expand('%_datadir')
|
||||
local libdir = rpm.expand('%_libdir')
|
||||
for i, dir in ipairs({datadir, libdir}) do
|
||||
if path:match(dir .. '/tcl%d+%.%d+/.*') then
|
||||
local requires = path:gsub('.*' .. dir .. '/tcl(%d+%.%d+)/.*', 'tcl(abi) = %1')
|
||||
print(requires)
|
||||
break
|
||||
end
|
||||
end
|
||||
}
|
||||
@@ -1,29 +1,32 @@
|
||||
%define MAJOR 8.6
|
||||
%define MAJOR 8.6
|
||||
|
||||
Name: tcl
|
||||
Version: 8.6.16
|
||||
Release: 2
|
||||
Version: 8.6.10
|
||||
Release: 5
|
||||
Epoch: 1
|
||||
Summary: The Tool Command Language implementation
|
||||
License: TCL AND GPL-3.0-or-later WITH bison-exception-2.2 AND BSD-3-Clause
|
||||
License: BSD
|
||||
URL: https://sourceforge.net/projects/tcl/
|
||||
Source0: https://downloads.sourceforge.net/sourceforge/tcl/tcl-core%{version}-src.tar.gz
|
||||
Source1: macros.tcl
|
||||
Source2: tcl.attr
|
||||
Source0: http://downloads.sourceforge.net/sourceforge/tcl/tcl-core%{version}-src.tar.gz
|
||||
|
||||
BuildRequires: autoconf zlib-devel systemtap-sdt-devel gcc
|
||||
Provides: tcl(abi) = %{MAJOR}
|
||||
Obsoletes: tcl-tcldict <= %{version}
|
||||
Provides: tcl-tcldict = %{version}
|
||||
|
||||
Patch0: tcl-8.6.15-autopath.patch
|
||||
Patch1: tcl-8.6.15-conf.patch
|
||||
Patch0: tcl-8.6.10-autopath.patch
|
||||
Patch1: tcl-8.6.10-conf.patch
|
||||
Patch2: tcl-8.6.10-hidden.patch
|
||||
Patch3: tcl-8.6.10-tcltests-path-fix.patch
|
||||
Patch4: stay-out-of-internals-when-nice-interfaces-are-avail.patch
|
||||
Patch5: oops.patch
|
||||
Patch6: File-not-found-should-be-ignored-silently.patch
|
||||
Patch7: tcl-8.6.15-fix-install-mode.patch
|
||||
Patch6: Fix-error-message-for-min-math-functions-to-for-for-.patch
|
||||
Patch7: Fix-11ae2be95d-tip-389-branch-string-range-errors-wi.patch
|
||||
Patch8: Improved-overflow-prevention-1.patch
|
||||
Patch9: Improved-overflow-prevention-2.patch
|
||||
Patch10: fix-exec-test-error.patch
|
||||
Patch11: File-not-found-should-be-ignored-silently.patch
|
||||
Patch12: Fix-bad6cc213d-A-format-string-vulnerability-in-Tcl-.patch
|
||||
|
||||
%description
|
||||
Tcl(Tool Command Language) provides a powerful platform for creating integration applications
|
||||
@@ -53,7 +56,7 @@ The development files for tcl.
|
||||
%autosetup -n %{name}%{version} -p1
|
||||
|
||||
%build
|
||||
pushd unix
|
||||
cd unix
|
||||
autoconf
|
||||
%configure --enable-threads --enable-symbols --enable-shared --enable-dtrace
|
||||
%ifnarch loongarch64
|
||||
@@ -61,13 +64,12 @@ autoconf
|
||||
%else
|
||||
%make_build CFLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive" TCL_LIBRARY=%{_datadir}/%{name}%{MAJOR}
|
||||
%endif
|
||||
popd
|
||||
|
||||
%install
|
||||
pushd unix
|
||||
cd unix
|
||||
make INSTALL_ROOT=$RPM_BUILD_ROOT TCL_LIBRARY=%{_datadir}/%{name}%{MAJOR} install
|
||||
popd
|
||||
|
||||
cd ..
|
||||
ln -s tclsh%{MAJOR} %{buildroot}%{_bindir}/tclsh
|
||||
ln -s lib%{name}%{MAJOR}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
|
||||
|
||||
@@ -90,25 +92,29 @@ done
|
||||
sed -i -e "s|$PWD/unix|%{_libdir}|; s|$PWD|%{_includedir}/%{name}-private|" %{buildroot}/%{_libdir}/%{name}Config.sh
|
||||
rm -rf %{buildroot}/%{_datadir}/%{name}%{MAJOR}/ldAix
|
||||
|
||||
install -D -m644 %{S:1} %{buildroot}%{_rpmmacrodir}/macros.tcl
|
||||
install -D -m644 %{S:2} %{buildroot}%{_fileattrsdir}/tcl.attr
|
||||
|
||||
%check
|
||||
pushd unix
|
||||
%make_build test
|
||||
popd
|
||||
cd unix
|
||||
make test
|
||||
|
||||
%pre
|
||||
|
||||
%preun
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc README.md changes
|
||||
%defattr(-,root,root)
|
||||
%doc README.md changes COPYING
|
||||
%{_bindir}/tclsh*
|
||||
%dir %{_libdir}/%{name}%{MAJOR}
|
||||
%{_datadir}/%{name}%{MAJOR}
|
||||
%{_datadir}/%{name}8
|
||||
%{_libdir}/lib%{name}%{MAJOR}.so
|
||||
%exclude %{_datadir}/%{name}%{MAJOR}/tclAppInit.c
|
||||
%{_rpmmacrodir}/macros.tcl
|
||||
%{_fileattrsdir}/tcl.attr
|
||||
|
||||
%files devel
|
||||
%{_includedir}/*
|
||||
@@ -121,47 +127,19 @@ popd
|
||||
%{_datadir}/%{name}%{MAJOR}/tclAppInit.c
|
||||
|
||||
%files help
|
||||
%{_mandir}/man?/*
|
||||
%{_mandir}/man3/*
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/mann/*
|
||||
|
||||
%changelog
|
||||
* Sat Aug 02 2025 Funda Wang <fundawang@yeah.net> - 1:8.6.16-2
|
||||
- add tcl.attr to generate 'tcl(abi)' requires automatically
|
||||
|
||||
* Wed Dec 25 2024 Funda Wang <fundawang@yeah.net> - 1:8.6.16-1
|
||||
- update to 8.6.16
|
||||
|
||||
* Tue Nov 12 2024 Funda Wang <fundawang@yeah.net> - 1:8.6.15-3
|
||||
- fix library and excutable install mode, which will confuse new debugedit
|
||||
|
||||
* Wed Oct 16 2024 Funda Wang <fundawang@yeah.net> - 1:8.6.15-2
|
||||
- add macros.tcl for downstream packages
|
||||
|
||||
* Tue Sep 17 2024 Funda Wang <fundawang@yeah.net> - 1:8.6.15-1
|
||||
- update to 8.6.15
|
||||
|
||||
* Thu Feb 29 2024 wangqia <wangqia@uniontech.com> - 1:8.6.14-1
|
||||
- Update to version 8.6.14
|
||||
|
||||
* Wed Feb 08 2023 fuanan <fuanan3@h-partners.com> - 1:8.6.13-2
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:drop the old symbol
|
||||
|
||||
* Sun Jan 29 2023 zhangruifang2020 <zhangruifang1@h-partners.com> - 1:8.6.13-1
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update to 8.6.13
|
||||
|
||||
* Tue Nov 15 2022 huajingyun <huajingyun@loongson.cn> - 1:8.6.12-2
|
||||
* Tue Nov 15 2022 huajingyun <huajingyun@loongson.cn> - 1:8.6.10-5
|
||||
- add build flags for weak symbols on loongarch64
|
||||
|
||||
* Thu Apr 21 2022 zoulin <zoulin13@h-partners.com> - 1:8.6.12-1
|
||||
- Type:enhancement
|
||||
* Wed Jun 15 2022 zhangruifang <zhangruifang1@h-partners.com> - 1:8.6.10-4
|
||||
- Type:cve
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update to 8.6.12
|
||||
- DESC: Fix cve-2021-35331
|
||||
|
||||
* Fri May 28 2021 yangzhuangzhuang <yangzhuangzhaung1@huawei.com> - 1:8.6.10-3
|
||||
- Type:bugfix
|
||||
|
||||
Reference in New Issue
Block a user