Codebase list tk8.6 / 4b24a1a
New upstream release. Refresh patches, remove unneeded one. Sergei Golovan 5 years ago
7 changed file(s) with 23 addition(s) and 216 deletion(s). Raw diff Collapse all Expand all
0 tk8.6 (8.6.9-1) unstable; urgency=medium
1
2 * New upstream release.
3 * Refresh patches. Remove the no longer necessary patch which fixed
4 crashes when using untrusted X connections.
5
6 -- Sergei Golovan <sgolovan@debian.org> Wed, 12 Dec 2018 09:18:39 +0300
7
08 tk8.6 (8.6.8-4) unstable; urgency=medium
19
210 * Add a patch which sets the default font sizes in points instead of pixels.
11 and tkConfig.sh in /usr/lib/tk8.6 where they are located in Debian
22 installation.
33
4 --- a/unix/configure
5 +++ b/unix/configure
6 @@ -1431,6 +1431,7 @@
7 `ls -d ${prefix}/lib 2>/dev/null` \
4 --- a/unix/tcl.m4
5 +++ b/unix/tcl.m4
6 @@ -94,6 +94,7 @@
7 `ls -d /usr/local/lib 2>/dev/null` \
88 `ls -d /usr/contrib/lib 2>/dev/null` \
9 `ls -d /usr/local/lib 2>/dev/null` \
9 `ls -d /usr/pkg/lib 2>/dev/null` \
1010 + `ls -d /usr/lib/tcl8.6 2>/dev/null` \
11 `ls -d /usr/pkg/lib 2>/dev/null` \
1211 `ls -d /usr/lib 2>/dev/null` \
1312 `ls -d /usr/lib64 2>/dev/null` \
14 --- a/unix/tcl.m4
15 +++ b/unix/tcl.m4
16 @@ -224,6 +224,8 @@
17 `ls -d ${prefix}/lib 2>/dev/null` \
13 `ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
14 @@ -227,6 +228,7 @@
1815 `ls -d /usr/local/lib 2>/dev/null` \
1916 `ls -d /usr/contrib/lib 2>/dev/null` \
20 + `ls -d /usr/lib/tcl8.6 2>/dev/null` \
17 `ls -d /usr/pkg/lib 2>/dev/null` \
2118 + `ls -d /usr/lib/tk8.6 2>/dev/null` \
2219 `ls -d /usr/lib 2>/dev/null` \
2320 `ls -d /usr/lib64 2>/dev/null` \
24 ; do
21 `ls -d /usr/local/lib/tk8.6 2>/dev/null` \
+0
-197
debian/patches/crash-on-untrusted-X.diff less more
0 Author: Upstream
1 Description: Patch fixes crashing when a TK application is used over untrusted
2 X connections.
3 Last-Modified: Sat, 24 Mar 2018 16:25:40 +0300
4 Bug: http://core.tcl.tk/tk/tktview?name=502e74e9ad198e5239092356333aceba5c6ab47a
5 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888581
6
7 --- a/generic/tkCmds.c
8 +++ b/generic/tkCmds.c
9 @@ -101,6 +101,7 @@
10 enum options { TK_BELL_DISPLAYOF, TK_BELL_NICE };
11 Tk_Window tkwin = clientData;
12 int i, index, nice = 0;
13 + Tk_ErrorHandler handler;
14
15 if (objc > 4) {
16 wrongArgs:
17 @@ -128,11 +129,13 @@
18 break;
19 }
20 }
21 + handler = Tk_CreateErrorHandler(Tk_Display(tkwin), -1, -1, -1, NULL, NULL);
22 XBell(Tk_Display(tkwin), 0);
23 if (!nice) {
24 XForceScreenSaver(Tk_Display(tkwin), ScreenSaverReset);
25 }
26 XFlush(Tk_Display(tkwin));
27 + Tk_DeleteErrorHandler(handler);
28 return TCL_OK;
29 }
30
31 --- a/unix/tkUnixSend.c
32 +++ b/unix/tkUnixSend.c
33 @@ -261,11 +261,14 @@
34 unsigned long bytesAfter;
35 Atom actualType;
36 char **propertyPtr;
37 + Tk_ErrorHandler handler;
38
39 if (dispPtr->commTkwin == NULL) {
40 SendInit(interp, dispPtr);
41 }
42
43 + handler = Tk_CreateErrorHandler(dispPtr->display, -1, -1, -1, NULL, NULL);
44 +
45 regPtr = ckalloc(sizeof(NameRegistry));
46 regPtr->dispPtr = dispPtr;
47 regPtr->locked = 0;
48 @@ -306,8 +309,11 @@
49 XDeleteProperty(dispPtr->display,
50 RootWindow(dispPtr->display, 0),
51 dispPtr->registryProperty);
52 + XSync(dispPtr->display, False);
53 }
54
55 + Tk_DeleteErrorHandler(handler);
56 +
57 /*
58 * Xlib placed an extra null byte after the end of the property, just to
59 * make sure that it is always NULL-terminated. Be sure to include this
60 @@ -514,6 +520,11 @@
61 NameRegistry *regPtr) /* Pointer to a registry opened with a
62 * previous call to RegOpen. */
63 {
64 + Tk_ErrorHandler handler;
65 +
66 + handler = Tk_CreateErrorHandler(regPtr->dispPtr->display, -1, -1, -1,
67 + NULL, NULL);
68 +
69 if (regPtr->modified) {
70 if (!regPtr->locked && !localData.sendDebug) {
71 Tcl_Panic("The name registry was modified without being locked!");
72 @@ -540,6 +551,8 @@
73
74 XFlush(regPtr->dispPtr->display);
75
76 + Tk_DeleteErrorHandler(handler);
77 +
78 if (regPtr->property != NULL) {
79 if (regPtr->allocedByX) {
80 XFree(regPtr->property);
81 @@ -1095,6 +1108,31 @@
82 Tcl_DStringAppend(&request, " ", 1);
83 Tcl_DStringAppend(&request, Tcl_GetString(objv[i]), -1);
84 }
85 +
86 + if (!async) {
87 + /*
88 + * Register the fact that we're waiting for a command to complete
89 + * (this is needed by SendEventProc and by AppendErrorProc to pass
90 + * back the command's results). Set up a timeout handler so that
91 + * we can check during long sends to make sure that the destination
92 + * application is still alive.
93 + *
94 + * We prepare the pending struct here in order to catch potential
95 + * early X errors from AppendPropCarefully() due to XSync().
96 + */
97 +
98 + pending.serial = localData.sendSerial;
99 + pending.dispPtr = dispPtr;
100 + pending.target = destName;
101 + pending.commWindow = commWindow;
102 + pending.interp = interp;
103 + pending.result = NULL;
104 + pending.errorInfo = NULL;
105 + pending.errorCode = NULL;
106 + pending.gotResponse = 0;
107 + pending.nextPtr = tsdPtr->pendingCommands;
108 + tsdPtr->pendingCommands = &pending;
109 + }
110 (void) AppendPropCarefully(dispPtr->display, commWindow,
111 dispPtr->commProperty, Tcl_DStringValue(&request),
112 Tcl_DStringLength(&request) + 1, (async ? NULL : &pending));
113 @@ -1109,26 +1147,6 @@
114 }
115
116 /*
117 - * Register the fact that we're waiting for a command to complete (this is
118 - * needed by SendEventProc and by AppendErrorProc to pass back the
119 - * command's results). Set up a timeout handler so that we can check
120 - * during long sends to make sure that the destination application is
121 - * still alive.
122 - */
123 -
124 - pending.serial = localData.sendSerial;
125 - pending.dispPtr = dispPtr;
126 - pending.target = destName;
127 - pending.commWindow = commWindow;
128 - pending.interp = interp;
129 - pending.result = NULL;
130 - pending.errorInfo = NULL;
131 - pending.errorCode = NULL;
132 - pending.gotResponse = 0;
133 - pending.nextPtr = tsdPtr->pendingCommands;
134 - tsdPtr->pendingCommands = &pending;
135 -
136 - /*
137 * Enter a loop processing X events until the result comes in or the
138 * target is declared to be dead. While waiting for a result, look only at
139 * send-related events so that the send is synchronous with respect to
140 @@ -1951,6 +1969,7 @@
141 "bogus", "prop", "serial", NULL
142 };
143 TkWindow *winPtr = clientData;
144 + Tk_ErrorHandler handler;
145 int index;
146
147 if (objc < 2) {
148 @@ -1959,16 +1978,19 @@
149 return TCL_ERROR;
150 }
151
152 - if (Tcl_GetIndexFromObjStruct(interp, objv[1], testsendOptions,
153 + if (Tcl_GetIndexFromObjStruct(interp, objv[1], testsendOptions,
154 sizeof(char *), "option", 0, &index) != TCL_OK) {
155 - return TCL_ERROR;
156 - }
157 - if (index == TESTSEND_BOGUS) {
158 + return TCL_ERROR;
159 + }
160 + if (index == TESTSEND_BOGUS) {
161 + handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, -1, -1, -1,
162 + NULL, NULL);
163 XChangeProperty(winPtr->dispPtr->display,
164 RootWindow(winPtr->dispPtr->display, 0),
165 winPtr->dispPtr->registryProperty, XA_INTEGER, 32,
166 PropModeReplace,
167 (unsigned char *) "This is bogus information", 6);
168 + Tk_DeleteErrorHandler(handler);
169 } else if (index == TESTSEND_PROP) {
170 int result, actualFormat;
171 unsigned long length, bytesAfter;
172 @@ -2007,7 +2029,10 @@
173 XFree(property);
174 }
175 } else if (Tcl_GetString(objv[4])[0] == 0) {
176 + handler = Tk_CreateErrorHandler(winPtr->dispPtr->display,
177 + -1, -1, -1, NULL, NULL);
178 XDeleteProperty(winPtr->dispPtr->display, w, propName);
179 + Tk_DeleteErrorHandler(handler);
180 } else {
181 Tcl_DString tmp;
182
183 @@ -2018,10 +2043,12 @@
184 *p = 0;
185 }
186 }
187 -
188 + handler = Tk_CreateErrorHandler(winPtr->dispPtr->display,
189 + -1, -1, -1, NULL, NULL);
190 XChangeProperty(winPtr->dispPtr->display, w, propName, XA_STRING,
191 8, PropModeReplace, (unsigned char*)Tcl_DStringValue(&tmp),
192 p-Tcl_DStringValue(&tmp));
193 + Tk_DeleteErrorHandler(handler);
194 Tcl_DStringFree(&tmp);
195 }
196 } else if (index == TESTSEND_SERIAL) {
22
33 --- a/unix/configure
44 +++ b/unix/configure
5 @@ -4293,6 +4293,9 @@
5 @@ -4294,6 +4294,9 @@
66 if test "`uname -s`" = "AIX" ; then
77 tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
88 fi
1414
1515 --- a/unix/tcl.m4
1616 +++ b/unix/tcl.m4
17 @@ -925,6 +925,9 @@
17 @@ -930,6 +930,9 @@
1818 if test "`uname -s`" = "AIX" ; then
1919 tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
2020 fi
44 manpages.diff
55 xft.diff
66 font-sizes.diff
7 crash-on-untrusted-X.diff
00 --- a/unix/configure
11 +++ b/unix/configure
2 @@ -11057,7 +11057,7 @@
2 @@ -10938,7 +10938,7 @@
33 TCL_STUB_FLAGS="-DUSE_TCL_STUBS"
44 fi
55
1010 TK_PKG_DIR='tk$(VERSION)'
1111 --- a/unix/configure.in
1212 +++ b/unix/configure.in
13 @@ -672,7 +672,7 @@
13 @@ -663,7 +663,7 @@
1414 TCL_STUB_FLAGS="-DUSE_TCL_STUBS"
1515 fi
1616
55
66 --- a/unix/configure.in
77 +++ b/unix/configure.in
8 @@ -479,8 +479,8 @@
8 @@ -470,8 +470,8 @@
99 XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no"
1010 if test "$found_xft" = "no" ; then
1111 found_xft=yes
1818 dnl make sure that compiling against Xft header file doesn't bomb
1919 --- a/unix/configure
2020 +++ b/unix/configure
21 @@ -10136,8 +10136,8 @@
21 @@ -10016,8 +10016,8 @@
2222 XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no"
2323 if test "$found_xft" = "no" ; then
2424 found_xft=yes