diff -Nru xkeycaps-2.47/debian/changelog xkeycaps-2.47/debian/changelog --- xkeycaps-2.47/debian/changelog 2017-12-27 18:45:17.000000000 +0000 +++ xkeycaps-2.47/debian/changelog 2017-12-26 18:48:20.000000000 +0000 @@ -1,3 +1,13 @@ +xkeycaps (2.47-5) unstable; urgency=medium + + * Prevent segfault in commands.c when more than 8 keysyms per key are + present. + * Convert to format 3.0 (quilt). + * Modernize packaging using dh. + * Remove menu file. + + -- Christoph Berg Tue, 26 Dec 2017 19:48:20 +0100 + xkeycaps (2.47-4.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru xkeycaps-2.47/debian/compat xkeycaps-2.47/debian/compat --- xkeycaps-2.47/debian/compat 2017-12-27 18:45:17.000000000 +0000 +++ xkeycaps-2.47/debian/compat 2017-12-26 18:48:20.000000000 +0000 @@ -1 +1 @@ -9 +11 diff -Nru xkeycaps-2.47/debian/control xkeycaps-2.47/debian/control --- xkeycaps-2.47/debian/control 2017-12-27 18:45:17.000000000 +0000 +++ xkeycaps-2.47/debian/control 2017-12-26 18:48:20.000000000 +0000 @@ -2,8 +2,11 @@ Section: x11 Priority: optional Maintainer: Christoph Berg -Standards-Version: 3.7.2 -Build-Depends: debhelper (>> 9), libxaw7-dev | libxaw-dev, xutils-dev, xbitmaps +Standards-Version: 4.1.2 +Build-Depends: debhelper (>= 11~), libxaw7-dev | libxaw-dev, xutils-dev, xbitmaps +Vcs-Browser: https://salsa.debian.org/debian/xkeycaps +Vcs-Git: https://salsa.debian.org/debian/xkeycaps.git +Homepage: https://www.jwz.org/xkeycaps/ Package: xkeycaps Architecture: any diff -Nru xkeycaps-2.47/debian/menu xkeycaps-2.47/debian/menu --- xkeycaps-2.47/debian/menu 2017-12-27 18:45:17.000000000 +0000 +++ xkeycaps-2.47/debian/menu 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -?package(xkeycaps):needs="x11" section="Applications/System/Administration" title="xkeycaps" command="/usr/bin/xkeycaps" diff -Nru xkeycaps-2.47/debian/patches/man.patch xkeycaps-2.47/debian/patches/man.patch --- xkeycaps-2.47/debian/patches/man.patch 1970-01-01 00:00:00.000000000 +0000 +++ xkeycaps-2.47/debian/patches/man.patch 2017-12-26 18:48:20.000000000 +0000 @@ -0,0 +1,11 @@ +--- a/xkeycaps.man ++++ b/xkeycaps.man +@@ -267,7 +267,7 @@ Not to be confused with KeySyms, this re + the physical keys: it is immutable (unless you repaint your keyboard...) + .TP 10 + .B \fIChord\fP +-This term refers to a set of two or more keys held down simultaniously (by ++This term refers to a set of two or more keys held down simultaneously (by + analogy with piano keyboards.) All but one of the keys will generally be + Modifier Keys. Sometimes \fIConstellation\fP is used to mean the same thing. + .TP 10 diff -Nru xkeycaps-2.47/debian/patches/max8 xkeycaps-2.47/debian/patches/max8 --- xkeycaps-2.47/debian/patches/max8 1970-01-01 00:00:00.000000000 +0000 +++ xkeycaps-2.47/debian/patches/max8 2017-12-26 18:48:20.000000000 +0000 @@ -0,0 +1,61 @@ +The code only deals with 8 names per key, but unfortunately doesn't expose that +number as a constant that is easily changed. Clip to 8 so we don't segfault. + + Program received signal SIGSEGV, Segmentation fault. + strlen () at ../sysdeps/x86_64/strlen.S:106 + 106 ../sysdeps/x86_64/strlen.S: Datei oder Verzeichnis nicht gefunden. + (gdb) bt + #0 strlen () at ../sysdeps/x86_64/strlen.S:106 + #1 0x00007ffff6a2fa45 in __GI__IO_fputs ( + str=str@entry=0x7fff0000000a , + fp=fp@entry=0x5555559f6da0) at iofputs.c:33 + #2 0x00005555555dc2a4 in fprintf (__fmt=0x5555555e49e1 "%s", __stream=) + at /usr/include/x86_64-linux-gnu/bits/stdio2.h:97 + #3 button_write (button=, client_data=, + call_data=) at commands.c:629 + #4 0x00007ffff7944aad in ?? () from /usr/lib/x86_64-linux-gnu/libXt.so.6 + #5 0x00007ffff7944f15 in ?? () from /usr/lib/x86_64-linux-gnu/libXt.so.6 + #6 0x00007ffff7945bdd in _XtTranslateEvent () from /usr/lib/x86_64-linux-gnu/libXt.so.6 + #7 0x00007ffff791def2 in XtDispatchEventToWidget () from /usr/lib/x86_64-linux-gnu/libXt.so.6 + #8 0x00007ffff791e8dd in ?? () from /usr/lib/x86_64-linux-gnu/libXt.so.6 + #9 0x00007ffff791e9b9 in XtDispatchEvent () from /usr/lib/x86_64-linux-gnu/libXt.so.6 + #10 0x00005555555d2d96 in xkeycaps_main_loop (app=0x5555559a81a0, keyboard=) + at xkeycaps.c:232 + #11 main (argc=, argv=) at xkeycaps.c:355 + (gdb) f 3 + #3 button_write (button=, client_data=, + call_data=) at commands.c:629 + 629 fprintf (out, "%s", differences[i].names[j]); + (gdb) p i + $1 = 1 + (gdb) p j + $2 = 9 + (gdb) p differences + $3 = {{key = 0x555555a0dde0, count = 3, names = {0x7ffff6e13fc6 <_XkeyTable+134> "Escape", + 0x5555555e4448 "NoSymbol", 0x7ffff6e13fc6 <_XkeyTable+134> "Escape", 0x0, + 0x1d7 , + 0x1000 , + 0x8 , + 0x5a42ab91 }}, {key = 0x555555a0dfa0, + count = 10, names = {0x7ffff6e144be <_XkeyTable+1406> "F1", + 0x7ffff6e144be <_XkeyTable+1406> "F1", 0x7ffff6e144be <_XkeyTable+1406> "F1", + 0x7ffff6e144be <_XkeyTable+1406> "F1", 0x7ffff6e144be <_XkeyTable+1406> "F1", + 0x7ffff6e144be <_XkeyTable+1406> "F1", + 0x7ffff6e1dfaf <_XkeyTable+41071> "XF86Switch_VT_1", + 0x7ffff6e144be <_XkeyTable+1406> "F1"}}, {key = 0x555555a0e160, count = 10, names = { + 0x7ffff6e144c7 <_XkeyTable+1415> "F2", 0x7ffff6e144c7 <_XkeyTable+1415> "F2", + 0x7ffff6e144c7 <_XkeyTable+1415> "F2", 0x7ffff6e144c7 <_XkeyTable+1415> "F2", + 0x7ffff6e144c7 <_XkeyTable+1415> "F2", 0x7ffff6e144c7 <_XkeyTable+1415> "F2", + 0x7ffff6e1dfc5 <_XkeyTable+41093> "XF86Switch_VT_2", + 0x7ffff6e144c7 <_XkeyTable+1415> "F2"}}, + +--- a/commands.c ++++ b/commands.c +@@ -440,6 +440,7 @@ button_write (button, client_data, call_ + keysyms = XGetKeyboardMapping (XtDisplay (widget), + key->key.keycode, + 1, &count); ++ if (count > 8) count = 8; /* FIXME: we are only prepared for 8 names per key, clip here */ + if (! keysyms) count = 0; + all [all_count].key = key; + for (; count > 0; count--) diff -Nru xkeycaps-2.47/debian/patches/series xkeycaps-2.47/debian/patches/series --- xkeycaps-2.47/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ xkeycaps-2.47/debian/patches/series 2017-12-26 18:48:20.000000000 +0000 @@ -0,0 +1,2 @@ +man.patch +max8 diff -Nru xkeycaps-2.47/debian/rules xkeycaps-2.47/debian/rules --- xkeycaps-2.47/debian/rules 2017-12-27 18:45:17.000000000 +0000 +++ xkeycaps-2.47/debian/rules 2017-12-26 18:48:20.000000000 +0000 @@ -1,69 +1,16 @@ #!/usr/bin/make -f -# based on the sample debian/rules file for GNU hello by Ian Jackson. -#export DH_VERBOSE=1 +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk -# Rather paranoid than sorry. Make the shell exit with an error if an -# untested command fails. -SHELL+= -e - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CDEBUGFLAGS="-O0 -g -Wall" -else - CDEBUGFLAGS="-O2 -g -Wall" -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALLFLAGS = -c -s -else - INSTALLFLAGS = -c -endif - -build: build-stamp -build-stamp: - dh_testdir +override_dh_auto_build: xmkmf - make CDEBUGFLAGS=$(CDEBUGFLAGS) - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - [ ! -f Makefile ] || $(MAKE) distclean + $(MAKE) CDEBUGFLAGS="$(CFLAGS)" - dh_clean - -binary-indep: -# There are no architecture-independent files to be uploaded -# generated by this package. If there were any they would be -# made here. - -binary-arch: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - - make INSTALL="install -p" INSTALLFLAGS=$(INSTALLFLAGS) \ - DESTDIR=$(CURDIR)/debian/xkeycaps BINDIR=/usr/bin \ - install +override_dh_auto_install: + dh_auto_install install -p -m 644 XKeyCaps.ad \ debian/xkeycaps/etc/X11/app-defaults/XKeyCaps - dh_install - dh_installdocs README - dh_installmenu - dh_installman xkeycaps.man - dh_installchangelogs - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: binary binary-arch binary-indep clean checkroot +%: + dh $@ diff -Nru xkeycaps-2.47/debian/source/format xkeycaps-2.47/debian/source/format --- xkeycaps-2.47/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ xkeycaps-2.47/debian/source/format 2017-12-26 18:48:20.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru xkeycaps-2.47/debian/xkeycaps.docs xkeycaps-2.47/debian/xkeycaps.docs --- xkeycaps-2.47/debian/xkeycaps.docs 1970-01-01 00:00:00.000000000 +0000 +++ xkeycaps-2.47/debian/xkeycaps.docs 2017-12-26 18:48:20.000000000 +0000 @@ -0,0 +1 @@ +README diff -Nru xkeycaps-2.47/debian/xkeycaps.manpages xkeycaps-2.47/debian/xkeycaps.manpages --- xkeycaps-2.47/debian/xkeycaps.manpages 1970-01-01 00:00:00.000000000 +0000 +++ xkeycaps-2.47/debian/xkeycaps.manpages 2017-12-26 18:48:20.000000000 +0000 @@ -0,0 +1 @@ +xkeycaps.man diff -Nru xkeycaps-2.47/xkeycaps.man xkeycaps-2.47/xkeycaps.man --- xkeycaps-2.47/xkeycaps.man 2017-12-27 18:45:17.000000000 +0000 +++ xkeycaps-2.47/xkeycaps.man 2006-01-02 00:22:17.000000000 +0000 @@ -267,7 +267,7 @@ the physical keys: it is immutable (unless you repaint your keyboard...) .TP 10 .B \fIChord\fP -This term refers to a set of two or more keys held down simultaneously (by +This term refers to a set of two or more keys held down simultaniously (by analogy with piano keyboards.) All but one of the keys will generally be Modifier Keys. Sometimes \fIConstellation\fP is used to mean the same thing. .TP 10