diff -Nru tk8.6-8.6.8/debian/changelog tk8.6-8.6.8/debian/changelog --- tk8.6-8.6.8/debian/changelog 2018-02-23 04:24:50.000000000 +0000 +++ tk8.6-8.6.8/debian/changelog 2018-03-24 18:42:17.000000000 +0000 @@ -1,3 +1,13 @@ +tk8.6 (8.6.8-4) unstable; urgency=medium + + * Add a patch which sets the default font sizes in points instead of pixels. + * Add a patch by upstream which fixes Tk behaviour over untrusted X + connections (closes: 888581). + * Add the Salse VCS headers. + * Bump debhelper compatibility level to 10. + + -- Sergei Golovan Sat, 24 Mar 2018 21:42:17 +0300 + tk8.6 (8.6.8-3) unstable; urgency=medium * Rebuild using tcl8.6-dev 8.6.8+dfsg-3 which isn't linked against libieee diff -Nru tk8.6-8.6.8/debian/compat tk8.6-8.6.8/debian/compat --- tk8.6-8.6.8/debian/compat 2014-03-08 04:58:06.000000000 +0000 +++ tk8.6-8.6.8/debian/compat 2018-03-24 18:42:17.000000000 +0000 @@ -1 +1 @@ -9 +10 diff -Nru tk8.6-8.6.8/debian/control tk8.6-8.6.8/debian/control --- tk8.6-8.6.8/debian/control 2018-02-22 09:36:47.000000000 +0000 +++ tk8.6-8.6.8/debian/control 2018-03-24 18:42:17.000000000 +0000 @@ -3,11 +3,13 @@ Priority: optional Maintainer: Debian Tcl/Tk Packagers Uploaders: Sergei Golovan -Build-Depends: debhelper (>= 9.0.0), dpkg-dev (>= 1.16.1~), x11proto-core-dev, +Build-Depends: debhelper (>= 10.0.0), dpkg-dev (>= 1.16.1~), x11proto-core-dev, libx11-dev, libxt-dev, libxss-dev, libxext-dev, libxft-dev, tcl8.6-dev (>= 8.6.8+dfsg-3~) Standards-Version: 4.1.3 Homepage: http://www.tcl.tk/ +Vcs-Browser: https://salsa.debian.org/tcltk-team/tk8.6 +Vcs-Git: https://salsa.debian.org/tcltk-team/tk8.6.git Package: tk8.6 Section: interpreters diff -Nru tk8.6-8.6.8/debian/patches/crash-on-untrusted-X.diff tk8.6-8.6.8/debian/patches/crash-on-untrusted-X.diff --- tk8.6-8.6.8/debian/patches/crash-on-untrusted-X.diff 1970-01-01 00:00:00.000000000 +0000 +++ tk8.6-8.6.8/debian/patches/crash-on-untrusted-X.diff 2018-03-24 18:42:17.000000000 +0000 @@ -0,0 +1,197 @@ +Author: Upstream +Description: Patch fixes crashing when a TK application is used over untrusted + X connections. +Last-Modified: Sat, 24 Mar 2018 16:25:40 +0300 +Bug: http://core.tcl.tk/tk/tktview?name=502e74e9ad198e5239092356333aceba5c6ab47a +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888581 + +--- a/generic/tkCmds.c ++++ b/generic/tkCmds.c +@@ -101,6 +101,7 @@ + enum options { TK_BELL_DISPLAYOF, TK_BELL_NICE }; + Tk_Window tkwin = clientData; + int i, index, nice = 0; ++ Tk_ErrorHandler handler; + + if (objc > 4) { + wrongArgs: +@@ -128,11 +129,13 @@ + break; + } + } ++ handler = Tk_CreateErrorHandler(Tk_Display(tkwin), -1, -1, -1, NULL, NULL); + XBell(Tk_Display(tkwin), 0); + if (!nice) { + XForceScreenSaver(Tk_Display(tkwin), ScreenSaverReset); + } + XFlush(Tk_Display(tkwin)); ++ Tk_DeleteErrorHandler(handler); + return TCL_OK; + } + +--- a/unix/tkUnixSend.c ++++ b/unix/tkUnixSend.c +@@ -261,11 +261,14 @@ + unsigned long bytesAfter; + Atom actualType; + char **propertyPtr; ++ Tk_ErrorHandler handler; + + if (dispPtr->commTkwin == NULL) { + SendInit(interp, dispPtr); + } + ++ handler = Tk_CreateErrorHandler(dispPtr->display, -1, -1, -1, NULL, NULL); ++ + regPtr = ckalloc(sizeof(NameRegistry)); + regPtr->dispPtr = dispPtr; + regPtr->locked = 0; +@@ -306,8 +309,11 @@ + XDeleteProperty(dispPtr->display, + RootWindow(dispPtr->display, 0), + dispPtr->registryProperty); ++ XSync(dispPtr->display, False); + } + ++ Tk_DeleteErrorHandler(handler); ++ + /* + * Xlib placed an extra null byte after the end of the property, just to + * make sure that it is always NULL-terminated. Be sure to include this +@@ -514,6 +520,11 @@ + NameRegistry *regPtr) /* Pointer to a registry opened with a + * previous call to RegOpen. */ + { ++ Tk_ErrorHandler handler; ++ ++ handler = Tk_CreateErrorHandler(regPtr->dispPtr->display, -1, -1, -1, ++ NULL, NULL); ++ + if (regPtr->modified) { + if (!regPtr->locked && !localData.sendDebug) { + Tcl_Panic("The name registry was modified without being locked!"); +@@ -540,6 +551,8 @@ + + XFlush(regPtr->dispPtr->display); + ++ Tk_DeleteErrorHandler(handler); ++ + if (regPtr->property != NULL) { + if (regPtr->allocedByX) { + XFree(regPtr->property); +@@ -1095,6 +1108,31 @@ + Tcl_DStringAppend(&request, " ", 1); + Tcl_DStringAppend(&request, Tcl_GetString(objv[i]), -1); + } ++ ++ if (!async) { ++ /* ++ * Register the fact that we're waiting for a command to complete ++ * (this is needed by SendEventProc and by AppendErrorProc to pass ++ * back the command's results). Set up a timeout handler so that ++ * we can check during long sends to make sure that the destination ++ * application is still alive. ++ * ++ * We prepare the pending struct here in order to catch potential ++ * early X errors from AppendPropCarefully() due to XSync(). ++ */ ++ ++ pending.serial = localData.sendSerial; ++ pending.dispPtr = dispPtr; ++ pending.target = destName; ++ pending.commWindow = commWindow; ++ pending.interp = interp; ++ pending.result = NULL; ++ pending.errorInfo = NULL; ++ pending.errorCode = NULL; ++ pending.gotResponse = 0; ++ pending.nextPtr = tsdPtr->pendingCommands; ++ tsdPtr->pendingCommands = &pending; ++ } + (void) AppendPropCarefully(dispPtr->display, commWindow, + dispPtr->commProperty, Tcl_DStringValue(&request), + Tcl_DStringLength(&request) + 1, (async ? NULL : &pending)); +@@ -1109,26 +1147,6 @@ + } + + /* +- * Register the fact that we're waiting for a command to complete (this is +- * needed by SendEventProc and by AppendErrorProc to pass back the +- * command's results). Set up a timeout handler so that we can check +- * during long sends to make sure that the destination application is +- * still alive. +- */ +- +- pending.serial = localData.sendSerial; +- pending.dispPtr = dispPtr; +- pending.target = destName; +- pending.commWindow = commWindow; +- pending.interp = interp; +- pending.result = NULL; +- pending.errorInfo = NULL; +- pending.errorCode = NULL; +- pending.gotResponse = 0; +- pending.nextPtr = tsdPtr->pendingCommands; +- tsdPtr->pendingCommands = &pending; +- +- /* + * Enter a loop processing X events until the result comes in or the + * target is declared to be dead. While waiting for a result, look only at + * send-related events so that the send is synchronous with respect to +@@ -1951,6 +1969,7 @@ + "bogus", "prop", "serial", NULL + }; + TkWindow *winPtr = clientData; ++ Tk_ErrorHandler handler; + int index; + + if (objc < 2) { +@@ -1959,16 +1978,19 @@ + return TCL_ERROR; + } + +- if (Tcl_GetIndexFromObjStruct(interp, objv[1], testsendOptions, ++ if (Tcl_GetIndexFromObjStruct(interp, objv[1], testsendOptions, + sizeof(char *), "option", 0, &index) != TCL_OK) { +- return TCL_ERROR; +- } +- if (index == TESTSEND_BOGUS) { ++ return TCL_ERROR; ++ } ++ if (index == TESTSEND_BOGUS) { ++ handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, -1, -1, -1, ++ NULL, NULL); + XChangeProperty(winPtr->dispPtr->display, + RootWindow(winPtr->dispPtr->display, 0), + winPtr->dispPtr->registryProperty, XA_INTEGER, 32, + PropModeReplace, + (unsigned char *) "This is bogus information", 6); ++ Tk_DeleteErrorHandler(handler); + } else if (index == TESTSEND_PROP) { + int result, actualFormat; + unsigned long length, bytesAfter; +@@ -2007,7 +2029,10 @@ + XFree(property); + } + } else if (Tcl_GetString(objv[4])[0] == 0) { ++ handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, ++ -1, -1, -1, NULL, NULL); + XDeleteProperty(winPtr->dispPtr->display, w, propName); ++ Tk_DeleteErrorHandler(handler); + } else { + Tcl_DString tmp; + +@@ -2018,10 +2043,12 @@ + *p = 0; + } + } +- ++ handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, ++ -1, -1, -1, NULL, NULL); + XChangeProperty(winPtr->dispPtr->display, w, propName, XA_STRING, + 8, PropModeReplace, (unsigned char*)Tcl_DStringValue(&tmp), + p-Tcl_DStringValue(&tmp)); ++ Tk_DeleteErrorHandler(handler); + Tcl_DStringFree(&tmp); + } + } else if (index == TESTSEND_SERIAL) { diff -Nru tk8.6-8.6.8/debian/patches/font-sizes.diff tk8.6-8.6.8/debian/patches/font-sizes.diff --- tk8.6-8.6.8/debian/patches/font-sizes.diff 1970-01-01 00:00:00.000000000 +0000 +++ tk8.6-8.6.8/debian/patches/font-sizes.diff 2018-03-24 18:42:17.000000000 +0000 @@ -0,0 +1,22 @@ +Author: Sergei Golovan +Description: Patch sets the default font sizes for X11 in points instead of + pixels. This helps to get reasonable font sizes for high DPI displays. +Last-Modified: Sat, 24 Mar 2018 16:14:33 +0300 + +--- a/library/ttk/fonts.tcl ++++ b/library/ttk/fonts.tcl +@@ -131,10 +131,10 @@ + set F(family) "Helvetica" + set F(fixed) "courier" + } +- set F(size) -12 +- set F(ttsize) -10 +- set F(capsize) -14 +- set F(fixedsize) -12 ++ set F(size) 10 ++ set F(ttsize) 9 ++ set F(capsize) 12 ++ set F(fixedsize) 10 + + font configure TkDefaultFont -family $F(family) -size $F(size) + font configure TkTextFont -family $F(family) -size $F(size) diff -Nru tk8.6-8.6.8/debian/patches/series tk8.6-8.6.8/debian/patches/series --- tk8.6-8.6.8/debian/patches/series 2014-08-27 16:25:53.000000000 +0000 +++ tk8.6-8.6.8/debian/patches/series 2018-03-24 18:42:17.000000000 +0000 @@ -4,3 +4,5 @@ non-linux.diff manpages.diff xft.diff +font-sizes.diff +crash-on-untrusted-X.diff