From db8e361c3173b2f71ae37a14ec0b2e086575b982d4083bb60e7062cdd6abc94c Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 8 Feb 2024 16:46:23 +0000 Subject: [PATCH 1/3] - Version 8.6.14rc0: * [...] - Obsoleted patches: * tcl-interp-limit-time.patch * tcl-refchan-mode-needed.patch * tcl-string-compare.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=157 --- tcl-interp-limit-time.patch | 53 -------------- tcl-refchan-mode-needed.patch | 84 --------------------- tcl-string-compare.patch | 133 ---------------------------------- tcl.changes | 10 +++ tcl.spec | 16 ++-- tcl8.6.14rc0-src.tar.gz | 3 + 6 files changed, 18 insertions(+), 281 deletions(-) delete mode 100644 tcl-interp-limit-time.patch delete mode 100644 tcl-refchan-mode-needed.patch delete mode 100644 tcl-string-compare.patch create mode 100644 tcl8.6.14rc0-src.tar.gz diff --git a/tcl-interp-limit-time.patch b/tcl-interp-limit-time.patch deleted file mode 100644 index 654312f..0000000 --- a/tcl-interp-limit-time.patch +++ /dev/null @@ -1,53 +0,0 @@ -Index: generic/tclInterp.c -================================================================== ---- generic/tclInterp.c -+++ generic/tclInterp.c -@@ -4684,11 +4684,11 @@ - case OPT_SEC: - if (Tcl_LimitTypeEnabled(childInterp, TCL_LIMIT_TIME)) { - Tcl_Time limitMoment; - - Tcl_LimitGetTime(childInterp, &limitMoment); -- Tcl_SetObjResult(interp, Tcl_NewLongObj(limitMoment.sec)); -+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(limitMoment.sec)); - } - break; - } - return TCL_OK; - } else if ((objc-consumedObjc) & 1 /* isOdd(objc-consumedObjc) */) { -@@ -4742,28 +4742,30 @@ - "BADVALUE", NULL); - return TCL_ERROR; - } - limitMoment.usec = ((long) tmp)*1000; - break; -- case OPT_SEC: -+ case OPT_SEC: { -+ Tcl_WideInt sec; - secObj = objv[i+1]; - (void) Tcl_GetStringFromObj(objv[i+1], &secLen); - if (secLen == 0) { - break; - } -- if (TclGetIntFromObj(interp, objv[i+1], &tmp) != TCL_OK) { -+ if (TclGetWideIntFromObj(interp, objv[i+1], &sec) != TCL_OK) { - return TCL_ERROR; - } -- if (tmp < 0) { -+ if (sec < 0) { - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "seconds must be at least 0", -1)); - Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "BADVALUE", NULL); - return TCL_ERROR; - } -- limitMoment.sec = tmp; -+ limitMoment.sec = sec; - break; -+ } - } - } - if (milliObj != NULL || secObj != NULL) { - if (milliObj != NULL) { - /* - diff --git a/tcl-refchan-mode-needed.patch b/tcl-refchan-mode-needed.patch deleted file mode 100644 index 0957fe0..0000000 --- a/tcl-refchan-mode-needed.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- doc/refchan.n.orig -+++ doc/refchan.n -@@ -53,8 +53,8 @@ here, then the \fBfinalize\fR subcommand - .PP - The \fImode\fR argument tells the handler whether the channel was - opened for reading, writing, or both. It is a list containing any of --the strings \fBread\fR or \fBwrite\fR. The list will always --contain at least one element. -+the strings \fBread\fR or \fBwrite\fR. The list may be empty, but -+will usually contain at least one element. - .PP - The subcommand must throw an error if the chosen mode is not - supported by the \fIcmdPrefix\fR. ---- generic/tclIORChan.c.orig -+++ generic/tclIORChan.c -@@ -532,7 +532,7 @@ TclChanCreateObjCmd( - - /* - * First argument is a list of modes. Allowed entries are "read", "write". -- * Expect at least one list element. Abbreviations are ok. -+ * Empty list is uncommon, but allowed. Abbreviations are ok. - */ - - modeObj = objv[MODE]; -@@ -905,6 +905,11 @@ TclChanPostEventObjCmd( - if (EncodeEventMask(interp, "event", objv[EVENT], &events) != TCL_OK) { - return TCL_ERROR; - } -+ if (events == 0) { -+ Tcl_SetObjResult(interp, -+ Tcl_NewStringObj("bad event list: is empty", -1)); -+ return TCL_ERROR; -+ } - - /* - * Check that the channel is actually interested in the provided events. -@@ -2007,10 +2012,10 @@ ReflectGetOption( - * EncodeEventMask -- - * - * This function takes a list of event items and constructs the -- * equivalent internal bitmask. The list must contain at least one -- * element. Elements are "read", "write", or any unique abbreviation of -- * them. Note that the bitmask is not changed if problems are -- * encountered. -+ * equivalent internal bitmask. The list may be empty but will usually -+ * contain at least one element. Valid elements are "read", "write", or -+ * any unique abbreviation of them. Note that the bitmask is not changed -+ * if problems are encountered. - * - * Results: - * A standard Tcl error code. A bitmask where TCL_READABLE and/or -@@ -2040,12 +2045,6 @@ EncodeEventMask( - return TCL_ERROR; - } - -- if (listc < 1) { -- Tcl_SetObjResult(interp, Tcl_ObjPrintf( -- "bad %s list: is empty", objName)); -- return TCL_ERROR; -- } -- - events = 0; - while (listc > 0) { - if (Tcl_GetIndexFromObj(interp, listv[listc-1], eventOptions, ---- tests/ioCmd.test.orig -+++ tests/ioCmd.test -@@ -670,12 +670,12 @@ test iocmd-21.1 {chan create, wrong#args - catch {chan create a b c} msg - set msg - } {wrong # args: should be "chan create mode cmdprefix"} --test iocmd-21.2 {chan create, invalid r/w mode, empty} { -- proc foo {} {} -- catch {chan create {} foo} msg -+test iocmd-21.2 {chan create, r/w mode empty} { -+ proc foo {cmd args} { return {initialize finalize watch} } -+ set chan [chan create {} foo] -+ close $chan - rename foo {} -- set msg --} {bad mode list: is empty} -+} {} - test iocmd-21.3 {chan create, invalid r/w mode, bad string} { - proc foo {} {} - catch {chan create {c} foo} msg diff --git a/tcl-string-compare.patch b/tcl-string-compare.patch deleted file mode 100644 index 9922ae8..0000000 --- a/tcl-string-compare.patch +++ /dev/null @@ -1,133 +0,0 @@ ---- generic/tclCmdMZ.c.orig -+++ generic/tclCmdMZ.c -@@ -2629,7 +2629,7 @@ StringEqualCmd( - */ - - objv += objc-2; -- match = TclStringCmp(objv[0], objv[1], 0, nocase, reqlength); -+ match = TclStringCmp(objv[0], objv[1], 1, nocase, reqlength); - Tcl_SetObjResult(interp, Tcl_NewBooleanObj(match ? 0 : 1)); - return TCL_OK; - } -@@ -2702,8 +2702,8 @@ TclStringCmp( - Tcl_Obj *value2Ptr, - int checkEq, /* comparison is only for equality */ - int nocase, /* comparison is not case sensitive */ -- int reqlength) /* requested length; -1 to compare whole -- * strings */ -+ int reqlength) /* requested length in characters; -1 to -+ * compare whole strings */ - { - const char *s1, *s2; - int empty, length, match, s1len, s2len; -@@ -2731,10 +2731,10 @@ TclStringCmp( - } else if ((value1Ptr->typePtr == &tclStringType) - && (value2Ptr->typePtr == &tclStringType)) { - /* -- * Do a unicode-specific comparison if both of the args are of String -+ * Do a Unicode-specific comparison if both of the args are of String - * type. If the char length == byte length, we can do a memcmp. In - * benchmark testing this proved the most efficient check between the -- * unicode and string comparison operations. -+ * Unicode and string comparison operations. - */ - - if (nocase) { -@@ -2748,6 +2748,9 @@ TclStringCmp( - && (value1Ptr->bytes != NULL) - && (s2len == value2Ptr->length) - && (value2Ptr->bytes != NULL)) { -+ /* each byte represents one character so s1l3n, s2l3n, and -+ * reqlength are in both bytes and characters -+ */ - s1 = value1Ptr->bytes; - s2 = value2Ptr->bytes; - memCmpFn = memcmp; -@@ -2756,14 +2759,17 @@ TclStringCmp( - s2 = (char *) Tcl_GetUnicode(value2Ptr); - if ( - #if defined(WORDS_BIGENDIAN) && (TCL_UTF_MAX != 4) -- 1 -+ 1 - #else -- checkEq -+ checkEq - #endif /* WORDS_BIGENDIAN */ -- ) { -+ ) { - memCmpFn = memcmp; - s1len *= sizeof(Tcl_UniChar); - s2len *= sizeof(Tcl_UniChar); -+ if (reqlength > 0) { -+ reqlength *= sizeof(Tcl_UniChar); -+ } - } else { - memCmpFn = (memCmpFn_t) Tcl_UniCharNcmp; - } -@@ -2805,7 +2811,7 @@ TclStringCmp( - s2 = TclGetStringFromObj(value2Ptr, &s2len); - } - -- if (!nocase && checkEq) { -+ if (!nocase && checkEq && reqlength < 0) { - /* - * When we have equal-length we can check only for (in)equality. - * We can use memcmp() in all (n)eq cases because we don't need to -@@ -2826,24 +2832,28 @@ TclStringCmp( - s1len = Tcl_NumUtfChars(s1, s1len); - s2len = Tcl_NumUtfChars(s2, s2len); - memCmpFn = (memCmpFn_t) -- (nocase ? Tcl_UtfNcasecmp : Tcl_UtfNcmp); -+ (nocase ? Tcl_UtfNcasecmp : Tcl_UtfNcmp); - } - } - } - -+ /* At this point s1len, s2len, and reqlength should by now have been -+ * adjusted so that they are all in the units expected by the selected -+ * comparison function. -+ */ -+ - length = (s1len < s2len) ? s1len : s2len; - if (reqlength > 0 && reqlength < length) { - length = reqlength; - } else if (reqlength < 0) { - /* -- * The requested length is negative, so we ignore it by setting it to -- * length + 1 so we correct the match var. -+ * The requested length is negative, so ignore it by setting it to -+ * length + 1 to correct the match var. - */ -- - reqlength = length + 1; - } - -- if (checkEq && (s1len != s2len)) { -+ if (checkEq && reqlength < 0 && (s1len != s2len)) { - match = 1; /* This will be reversed below. */ - } else { - /* ---- tests/stringComp.test.orig -+++ tests/stringComp.test -@@ -100,7 +100,7 @@ foreach {tname tbody tresult tcode} { - {unicode} {string compare \334 \u00fc} -1 {} - {unicode} {string compare \334\334\334\374\374 \334\334\334\334\334} 1 {} - {high bit} { -- # This test will fail if the underlying comparison -+ # This test fails if the underlying comparison - # is using signed chars instead of unsigned chars. - # (like SunOS's default memcmp thus the compat/memcmp.c) - string compare "\x80" "@" -@@ -156,10 +156,10 @@ foreach {tname tbody tresult tcode} { - {-nocase null strings} { - string compare -nocase foo "" - } 1 {} -- {with length, unequal strings} { -+ {with length, unequal strings, partial first string} { - string compare -length 2 abc abde - } 0 {} -- {with length, unequal strings} { -+ {with length, unequal strings 2, full first string} { - string compare -length 2 ab abde - } 0 {} - {with NUL character vs. other ASCII} { diff --git a/tcl.changes b/tcl.changes index 965d02e..05cbcb4 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Feb 8 16:34:38 UTC 2024 - Reinhard Max + +- Version 8.6.14rc0: + * [...] +- Obsoleted patches: + * tcl-interp-limit-time.patch + * tcl-refchan-mode-needed.patch + * tcl-string-compare.patch + ------------------------------------------------------------------- Thu Mar 30 09:30:57 UTC 2023 - Reinhard Max diff --git a/tcl.spec b/tcl.spec index f86933c..7e8d209 100644 --- a/tcl.spec +++ b/tcl.spec @@ -1,7 +1,7 @@ # # spec file for package tcl # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,11 +22,11 @@ Name: tcl URL: http://www.tcl.tk -Version: 8.6.13 +Version: 8.6.14 Release: 0 -%define rrc %{nil} +%define rrc %{nil}rc0 %define TCL_MINOR %(echo %version | cut -c1-3) -%define itclver 4.2.3 +%define itclver 4.2.4 BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: The Tcl Programming Language License: TCL @@ -48,9 +48,6 @@ Source0: http://prdownloads.sourceforge.net/tcl/%{name}%{version}%{rrc}-s Source1: tcl-rpmlintrc Source2: baselibs.conf Source3: macros.tcl -Patch0: tcl-refchan-mode-needed.patch -Patch1: tcl-string-compare.patch -Patch2: tcl-interp-limit-time.patch BuildRequires: autoconf BuildRequires: pkg-config BuildRequires: zlib-devel @@ -91,12 +88,9 @@ the Tcl language itself. %prep %setup -q -n %name%version if ! test -d pkgs/itcl%itclver; then - : Version mismatch in itcl, please chek the %%itclver macro! + : New itcl version: pkgs/itcl* . Please update the %%itclver macro acordingly. exit 1 fi -%patch0 -%patch1 -%patch2 # The SQLite extension is provided by the sqlite3 package, # so don't build it here. diff --git a/tcl8.6.14rc0-src.tar.gz b/tcl8.6.14rc0-src.tar.gz new file mode 100644 index 0000000..e7d31f9 --- /dev/null +++ b/tcl8.6.14rc0-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1141202667d3a42fccc273b22653ec3130ce09a94c015db9ce98780494487bb9 +size 11623237 From ad83744a5506990809f44196a433769484169fdd5f034d1a2b279ed431135d37 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 26 Feb 2024 18:21:43 +0000 Subject: [PATCH 2/3] - 8.6.14rc1 OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=158 --- tcl.changes | 5 +++++ tcl.spec | 2 +- tcl8.6.13-src.tar.gz | 3 --- tcl8.6.14rc0-src.tar.gz | 3 --- tcl8.6.14rc1-src.tar.gz | 3 +++ 5 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 tcl8.6.13-src.tar.gz delete mode 100644 tcl8.6.14rc0-src.tar.gz create mode 100644 tcl8.6.14rc1-src.tar.gz diff --git a/tcl.changes b/tcl.changes index 05cbcb4..8ca8ddb 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 26 18:20:53 UTC 2024 - Reinhard Max + +- 8.6.14rc1 + ------------------------------------------------------------------- Thu Feb 8 16:34:38 UTC 2024 - Reinhard Max diff --git a/tcl.spec b/tcl.spec index 7e8d209..11f1b3b 100644 --- a/tcl.spec +++ b/tcl.spec @@ -24,7 +24,7 @@ Name: tcl URL: http://www.tcl.tk Version: 8.6.14 Release: 0 -%define rrc %{nil}rc0 +%define rrc %{nil}rc1 %define TCL_MINOR %(echo %version | cut -c1-3) %define itclver 4.2.4 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff --git a/tcl8.6.13-src.tar.gz b/tcl8.6.13-src.tar.gz deleted file mode 100644 index 09cb9bc..0000000 --- a/tcl8.6.13-src.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:43a1fae7412f61ff11de2cfd05d28cfc3a73762f354a417c62370a54e2caf066 -size 10834396 diff --git a/tcl8.6.14rc0-src.tar.gz b/tcl8.6.14rc0-src.tar.gz deleted file mode 100644 index e7d31f9..0000000 --- a/tcl8.6.14rc0-src.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1141202667d3a42fccc273b22653ec3130ce09a94c015db9ce98780494487bb9 -size 11623237 diff --git a/tcl8.6.14rc1-src.tar.gz b/tcl8.6.14rc1-src.tar.gz new file mode 100644 index 0000000..1873284 --- /dev/null +++ b/tcl8.6.14rc1-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5880225babf7954c58d4fb0f5cf6279104ce1cd6aa9b71e9a6322540e1c4de66 +size 11627322 From e24e642a801dd0fcdcbf585019a25ad3902cb240c6ad698002163027d1cda276 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 1 Mar 2024 17:30:43 +0000 Subject: [PATCH 3/3] - Version 8.6.14: * Backport TIP #402: path name starting with '//' not replaced by '/' also on Cygwin and QNX * (bug) [8f7fde] string compare failing on big endian * (bug) [3e8074] y2k38 problem in [interp limit time -seconds] * (bug) [e3dcab] crash with tcl_precision equal 15..18 * (bug) [d19fe0] output replacement character on incomplete sequences in unicode encoding * (bug) [534172] sporadic crash in memchan thread cleanup. * (bug) [f9eafc] throw error in zip command when file comment/filename to long or not iso-latin-1 * (bug)[183a1a] Prevent BO by Tcl_UtfToExternal * (bug) [ea69b0], crash when using a channel transformation on TCP client socket * (bug)[026575] Prevent invalid read in Tcl_UtfToUniChar * (rfe) Allow empty mode in [chan create] to allow refchan version of [socket -server] * (bug) [ab123c] argument position overflow in [scan %num$mode] * (bug) [784bef] tailcall crash * (bug) [af3ebc] clock scan and clock add bugs in error cases / with abbreviated options * (bug) [66ffaf] incomplete double byte encoding sequences ignored like in [encoding convertfrom gb12345 x] * (rfe) [c54e4a] fork multithreading performance by using vfork/spawn when supported * Update libtommath to version 1.2.1 * (bug) [60cacf] Fix tclvfs tkt Segmentation Fault at interpreter exit when tclvfs loaded. * (bug) [b5ac3e] Tcl_GetUniChar reads beyond string length for ASCII strings OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=159 --- tcl.changes | 61 ++++++++++++++++--- tcl.spec | 2 +- ...6.14rc1-src.tar.gz => tcl8.6.14-src.tar.gz | 0 3 files changed, 54 insertions(+), 9 deletions(-) rename tcl8.6.14rc1-src.tar.gz => tcl8.6.14-src.tar.gz (100%) diff --git a/tcl.changes b/tcl.changes index 8ca8ddb..e46a6a0 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,13 +1,58 @@ ------------------------------------------------------------------- -Mon Feb 26 18:20:53 UTC 2024 - Reinhard Max +Fri Mar 1 16:52:58 UTC 2024 - Reinhard Max -- 8.6.14rc1 - -------------------------------------------------------------------- -Thu Feb 8 16:34:38 UTC 2024 - Reinhard Max - -- Version 8.6.14rc0: - * [...] +- Version 8.6.14: + * Backport TIP #402: path name starting with '//' not replaced by + '/' also on Cygwin and QNX + * (bug) [8f7fde] string compare failing on big endian + * (bug) [3e8074] y2k38 problem in [interp limit time -seconds] + * (bug) [e3dcab] crash with tcl_precision equal 15..18 + * (bug) [d19fe0] output replacement character on incomplete + sequences in unicode encoding + * (bug) [534172] sporadic crash in memchan thread cleanup. + * (bug) [f9eafc] throw error in zip command when file + comment/filename to long or not iso-latin-1 + * (bug)[183a1a] Prevent BO by Tcl_UtfToExternal + * (bug) [ea69b0], crash when using a channel transformation on + TCP client socket + * (bug)[026575] Prevent invalid read in Tcl_UtfToUniChar + * (rfe) Allow empty mode in [chan create] to allow refchan + version of [socket -server] + * (bug) [ab123c] argument position overflow in [scan %num$mode] + * (bug) [784bef] tailcall crash + * (bug) [af3ebc] clock scan and clock add bugs in error cases / + with abbreviated options + * (bug) [66ffaf] incomplete double byte encoding sequences + ignored like in [encoding convertfrom gb12345 x] + * (rfe) [c54e4a] fork multithreading performance by using + vfork/spawn when supported + * Update libtommath to version 1.2.1 + * (bug) [60cacf] Fix tclvfs tkt Segmentation Fault at + interpreter exit when tclvfs loaded. + * (bug) [b5ac3e] Tcl_GetUniChar reads beyond string length for + ASCII strings + * Unicode 15.1 + * (bug) [00655c] ClockGetdatefieldsObjCmd(): avoid signed integer + overflow and platform-dependent behavior + * TIP #662: Tcl_VarEval is not depreciated any more + * (bug) [7b3167] tclOO.c: initialize fakeObject.refCount + * (bug) [7371b6] AddressSanitizer use-after-return detection + breaks NRE tests, coroutines + * (bug)[32b889] prevent spurious errors from [clock format] + * (rfe) [0ac9d0] Don't call getsockname(2) in + Tcl_MakeFileChannel(3) unless absolutely necessary. Permits + better constraining of Tcl/tclsh via OpenBSD's pledge(2) or + similar mechanisms. Minor rewrite. + * (feature) Adapt tcltest to support Tcl 9. + * (bug) [fd27ad] doc change of Tcl_PkgRequire & friends: version + string specification refers to "package require". + * (bug) [16e25e] error for + [tcl_startOfPreviousWord string end-1] + * [db4f28] segfault when Tcl_ReadChars is called with unicode + object + * fix/document Tcl_ObjPrintf with "ll" modifier + * [8e666d] endless loop when redefining proc ::history + * [86b3c1] endless loop when ::unknown is moved into a namespace - Obsoleted patches: * tcl-interp-limit-time.patch * tcl-refchan-mode-needed.patch diff --git a/tcl.spec b/tcl.spec index 11f1b3b..5fe7e8a 100644 --- a/tcl.spec +++ b/tcl.spec @@ -24,7 +24,7 @@ Name: tcl URL: http://www.tcl.tk Version: 8.6.14 Release: 0 -%define rrc %{nil}rc1 +%define rrc %{nil} %define TCL_MINOR %(echo %version | cut -c1-3) %define itclver 4.2.4 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff --git a/tcl8.6.14rc1-src.tar.gz b/tcl8.6.14-src.tar.gz similarity index 100% rename from tcl8.6.14rc1-src.tar.gz rename to tcl8.6.14-src.tar.gz