diff --git a/debian/60xbrlapi b/debian/60xbrlapi deleted file mode 100644 index 32f92a05dcaa8da2a8ce704ddd035b68b42b915d..0000000000000000000000000000000000000000 --- a/debian/60xbrlapi +++ /dev/null @@ -1 +0,0 @@ -if [ -x /usr/bin/xbrlapi ]; then /usr/bin/xbrlapi -q 2> /dev/null & fi diff --git a/debian/brltty-udeb.udev.rules b/debian/brltty-udeb.udev.rules index 68b9e8887c501f58547488c925161a8a6b4d3559..bb9eb20d9de883d0e0b22dec468ae327cc52dee6 100644 --- a/debian/brltty-udeb.udev.rules +++ b/debian/brltty-udeb.udev.rules @@ -107,6 +107,7 @@ ATTRS{idVendor}=="1fe4", ATTRS{idProduct}=="0003", RUN+="/lib/udev/brltty.sh -b ATTRS{idVendor}=="1fe4", ATTRS{idProduct}=="0044", RUN+="/lib/udev/brltty.sh -b ht -d usb:" ATTRS{idVendor}=="1fe4", ATTRS{idProduct}=="0054", RUN+="/lib/udev/brltty.sh -b ht -d usb:" ATTRS{idVendor}=="1fe4", ATTRS{idProduct}=="0055", RUN+="/lib/udev/brltty.sh -b ht -d usb:" +ATTRS{idVendor}=="1fe4", ATTRS{idProduct}=="0061", RUN+="/lib/udev/brltty.sh -b ht -d usb:" ATTRS{idVendor}=="1fe4", ATTRS{idProduct}=="0064", RUN+="/lib/udev/brltty.sh -b ht -d usb:" ATTRS{idVendor}=="1fe4", ATTRS{idProduct}=="0074", RUN+="/lib/udev/brltty.sh -b ht -d usb:" ATTRS{idVendor}=="1fe4", ATTRS{idProduct}=="0081", RUN+="/lib/udev/brltty.sh -b ht -d usb:" @@ -125,6 +126,7 @@ ATTRS{idVendor}=="045e", ATTRS{idProduct}=="930b", RUN+="/lib/udev/brltty.sh -b # HumanWare ATTRS{idVendor}=="1c71", ATTRS{idProduct}=="c005", RUN+="/lib/udev/brltty.sh -b hw -d usb:" ATTRS{idVendor}=="1c71", ATTRS{idProduct}=="c006", RUN+="/lib/udev/brltty.sh -b hw -d usb:" +ATTRS{idVendor}=="1c71", ATTRS{idProduct}=="c00a", RUN+="/lib/udev/brltty.sh -b hw -d usb:" # BrailleMemo ATTRS{idVendor}=="1148", ATTRS{idProduct}=="0301", RUN+="/lib/udev/brltty.sh -b mm -d usb:" diff --git a/debian/brltty.examples b/debian/brltty.examples index d99e6e5fc7bcd12437555d5c961d85a9da070629..d06c825290940f39b896f521835a6126abd84dc2 100644 --- a/debian/brltty.examples +++ b/debian/brltty.examples @@ -1,2 +1,3 @@ -Autostart/Udev/udev.rules +Autostart/Udev/rules +Autostart/Udev/brltty-wrapper Autostart/Upstart/brltty.conf diff --git a/debian/brltty.install b/debian/brltty.install index 7dbb2a76a81a33ed29bb70addf9b6be5fe03b366..4ef38667b771c2f64f893b518d3e1db9ac33dbca 100644 --- a/debian/brltty.install +++ b/debian/brltty.install @@ -9,5 +9,5 @@ debian/tmp/lib/brltty lib debian/tmp/usr/share/locale debian/initramfs/hooks/brltty usr/share/initramfs-tools/hooks debian/initramfs/scripts/init-premount/brltty usr/share/initramfs-tools/scripts/init-premount -Authorization/Polkit/org.brltty.policy /usr/share/polkit-1/actions -debian/org.a11y.brltty.metainfo.xml /usr/share/metainfo +debian/tmp/usr/share/polkit-1/actions +debian/tmp/usr/share/metainfo diff --git a/debian/changelog b/debian/changelog index 7f971727e5527f2c8d81c2a240a560b762877377..6fe0a493c85bf656615607f1d4c6d835c77f0360 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,20 @@ -brltty (5.4-8) UNRELEASED; urgency=medium +brltty (5.5-1) experimental; urgency=medium * git-reproducible.patch: Make the build reproducible, thanks Chris West for the patch (Closes: Bug#859959). + * New upstream release + - patches/defauth-keyfile.patch, defauth-polkit, git-braillenote.patch, + git-lsystemd.patch, git-manufacturer.patch, git-reproducible.patch, + git-speech-crash.patch, git-vario-ultra-restart.patch, wait-polkit, + xbrlapi-nospam.patch, xbrlapi-setfocus.patch, xbrlapi.patch: Remove + patches, merged upstream. + - patches/20-sbin.patch: update patch. + - org.a11y.brltty.metainfo.xml, 60xbrlapi, xbrlapi.desktop: Remove files, + merged upstream. + * patches/api_startup.patch: Fix race between socket setup and select(). + * brltty-udeb.udev.rules: Update. - -- Samuel Thibault Sun, 09 Apr 2017 22:00:11 +0200 + -- Samuel Thibault Mon, 22 May 2017 01:43:35 +0200 brltty (5.4-7) unstable; urgency=medium diff --git a/debian/control b/debian/control index 58531fef462b81927d9c3b30612b91696b26f61c..d5c4f1e1b02c7df462c3a13d0f7ba1f05839744a 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Uploaders: Samuel Thibault Vcs-Browser: https://anonscm.debian.org/git/pkg-a11y/brltty.git Vcs-Git: https://anonscm.debian.org/git/pkg-a11y/brltty.git Homepage: https://brltty.com -Build-Depends: debhelper (>= 9.20150628), dh-lisp, dh-systemd (>= 1.5), dh-strip-nondeterminism, +Build-Depends: debhelper (>= 9.20150628), dh-lisp, dh-python, dh-systemd (>= 1.5), dh-strip-nondeterminism, autotools-dev, autoconf, pkg-config, tcl (>= 8.5~), libasound2-dev [linux-any], python-all-dev (>= 2.7~0), diff --git a/debian/org.a11y.brltty.metainfo.xml b/debian/org.a11y.brltty.metainfo.xml deleted file mode 100644 index 6cdc83ddc85df56687b062122aa1c89812560cce..0000000000000000000000000000000000000000 --- a/debian/org.a11y.brltty.metainfo.xml +++ /dev/null @@ -1,452 +0,0 @@ - - - - - - - - org.a11y.brltty - BRLTTY - Support for braille devices - - - A background process providing access to the console screen (when in - text mode) for a blind person using a refreshable braille display. - - - The BRLTTY Developers - http://brltty.com/ - - FSFAP - GPL-2.0 - - - - - - - - - - - - - - - - - - usb:v0403pDE58* - - - - usb:v0403pDE59* - - - - usb:v0403pF208* - - - - usb:v0403pFE70* - - - - usb:v0403pFE71* - - - - usb:v0403pFE72* - - - - usb:v0403pFE73* - - - - usb:v0403pFE74* - - - - usb:v0403pFE75* - - - - usb:v0403pFE76* - - - - usb:v0403pFE77* - - - - usb:v0452p0100* - - - - - - usb:v045Ep930A* - - - - usb:v045Ep930B* - - - - usb:v06B0p0001* - - - - usb:v0798p0001* - - - - usb:v0798p0600* - - - - usb:v0798p0624* - - - - usb:v0798p0640* - - - - usb:v0798p0680* - - - - usb:v0904p2000* - - - - usb:v0904p2001* - - - - usb:v0904p2002* - - - - usb:v0904p2007* - - - - usb:v0904p2008* - - - - usb:v0904p2009* - - - - usb:v0904p2010* - - - - usb:v0904p2011* - - - - usb:v0904p2014* - - - - usb:v0904p2015* - - - - usb:v0904p2016* - - - - usb:v0904p3000* - - - - usb:v0904p3001* - - - - usb:v0904p4004* - - - - usb:v0904p4005* - - - - usb:v0904p4007* - - - - usb:v0904p4008* - - - - usb:v0904p6001* - - - - usb:v0904p6002* - - - - usb:v0904p6003* - - - - usb:v0904p6004* - - - - usb:v0904p6005* - - - - usb:v0904p6006* - - - - usb:v0904p6007* - - - - usb:v0904p6008* - - - - usb:v0904p6009* - - - - usb:v0904p600A* - - - - usb:v0904p6011* - - - - usb:v0904p6012* - - - - usb:v0904p6013* - - - - usb:v0904p6101* - - - - usb:v0904p6102* - - - - usb:v0904p6103* - - - - usb:v0921p1200* - - - - usb:v0F4Ep0100* - - - - usb:v0F4Ep0111* - - - - usb:v0F4Ep0112* - - - - usb:v0F4Ep0114* - - - - - - - - - - - - - - - - - - - usb:v1148p0301* - - - - usb:v1C71pC004* - - - - usb:v1C71pC005* - - - - usb:v1C71pC006* - - - - usb:v1FE4p0003* - - - - usb:v1FE4p0044* - - - - usb:v1FE4p0054* - - - - usb:v1FE4p0055* - - - - usb:v1FE4p0061* - - - - usb:v1FE4p0064* - - - - usb:v1FE4p0074* - - - - usb:v1FE4p0081* - - - - usb:v1FE4p0082* - - - - usb:v1FE4p0083* - - - - usb:v1FE4p0084* - - - - usb:v1FE4p0086* - - - - usb:v1FE4p0087* - - - - usb:v1FE4p008A* - - - - usb:v1FE4p008B* - - - - usb:v4242p0001* - - - - usb:vC251p1122* - - - - usb:vC251p1123* - - - - usb:vC251p1124* - - - - usb:vC251p1125* - - - - usb:vC251p1126* - - - - usb:vC251p1127* - - - - usb:vC251p1128* - - - - usb:vC251p1129* - - - - usb:vC251p112A* - - - - usb:vC251p112B* - - - - usb:vC251p112C* - - - - usb:vC251p112D* - - - - usb:vC251p112E* - - - - usb:vC251p112F* - - - - - usb:vC251p1130* - - - - usb:vC251p1131* - - - - usb:vC251p1132* - - - - diff --git a/debian/patches/20-sbin.patch b/debian/patches/20-sbin.patch index 466c9e02ca021e6eedceb85ae218ec0c4e7ac3bb..6039c9aea280a7436fa7b9a81f75296f6903db19 100644 --- a/debian/patches/20-sbin.patch +++ b/debian/patches/20-sbin.patch @@ -3,19 +3,6 @@ Description: adust paths in startup scripts udev rule have to be patched to run /sbin/brltty instead of /bin/brltty. --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -diff --git a/Autostart/Udev/udev.rules b/Autostart/Udev/udev.rules -index 006d034..6516ece 100644 ---- a/Autostart/Udev/udev.rules -+++ b/Autostart/Udev/udev.rules -@@ -447,7 +447,7 @@ GOTO="brltty_end" - LABEL="brltty_add" - SYMLINK+="brltty/$env{BRLTTY_BRAILLE_DEVICE}" - TEST=="/sys/fs/cgroup/systemd", GOTO="brltty_add_systemd" --RUN+="/bin/brltty -E -+RUN+="/sbin/brltty -E" - GOTO="brltty_end" - - LABEL="brltty_add_systemd" diff --git a/Autostart/Upstart/brltty.conf b/Autostart/Upstart/brltty.conf index 5837b12..ac22f16 100644 --- a/Autostart/Upstart/brltty.conf diff --git a/debian/patches/api_startup.patch b/debian/patches/api_startup.patch new file mode 100644 index 0000000000000000000000000000000000000000..f287046fb22d1c082013dd9d39ff77c93c136e3d --- /dev/null +++ b/debian/patches/api_startup.patch @@ -0,0 +1,48 @@ +Fix race between socket creation and select preparation + +It can happen that between iterating over socketInfo[i].fd and testing +serverSocketsPending, the sockets get established, and thus no server fd +was recorded in sockset, but serverSocketsPending is found to be 0, and +thus we are passing a NULL timeout to select() without any FD to look +at, thus hanging. + +--- + Programs/brlapi_server.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +--- a/Programs/brlapi_server.c ++++ b/Programs/brlapi_server.c +@@ -2338,16 +2338,6 @@ THREAD_FUNCTION(runServer) { + FD_ZERO(&sockset); + fdmax=0; + +- for (i=0;i=0) { +- FD_SET(socketInfo[i].fd, &sockset); +- +- if (socketInfo[i].fd>fdmax) { +- fdmax = socketInfo[i].fd; +- } +- } +- } +- + lockMutex(&apiConnectionsMutex); + addTtyFds(&sockset, &fdmax, ¬ty); + addTtyFds(&sockset, &fdmax, &ttys); +@@ -2357,6 +2347,16 @@ THREAD_FUNCTION(runServer) { + struct timeval tv, *timeout; + + lockMutex(&serverSocketsMutex); ++ for (i=0;i=0) { ++ FD_SET(socketInfo[i].fd, &sockset); ++ ++ if (socketInfo[i].fd>fdmax) { ++ fdmax = socketInfo[i].fd; ++ } ++ } ++ } ++ + if (unauthConnections || serverSocketsPending) { + memset(&tv, 0, sizeof(tv)); + tv.tv_sec = SERVER_SELECT_TIMEOUT; diff --git a/debian/patches/defauth-keyfile.patch b/debian/patches/defauth-keyfile.patch deleted file mode 100644 index e50a98e0abc7e3f9aa240cfdad5f1dfbbd3c7603..0000000000000000000000000000000000000000 --- a/debian/patches/defauth-keyfile.patch +++ /dev/null @@ -1,110 +0,0 @@ -commit 41f5c64ceb06d3cef1af1b3f474f56db1e3d2dd8 -Author: Dave Mielke -Date: Sat Oct 8 22:12:29 2016 -0400 - - Fix polkit/keyfile authentication. (st) - - Some parts of the code were assuming that auth had to always be a keyfile, - thus preventing the use of polkit+keyfile:/etc/brlapi.key as auth. - -diff --git a/Programs/brlapi_client.c b/Programs/brlapi_client.c -index 0e20ec1..7a54980 100644 ---- a/Programs/brlapi_client.c -+++ b/Programs/brlapi_client.c -@@ -724,7 +724,12 @@ brlapi_fileDescriptor BRLAPI_STDCALL brlapi__openConnection(brlapi_handle_t *han - case BRLAPI_AUTH_KEY: { - size_t authKeyLength; - int res; -- if (brlapi_loadAuthKey(settings.auth, &authKeyLength, (void *) &auth->key) < 0) -+ char *keyfile = brlapi_getKeyFile(settings.auth); -+ if (!keyfile) -+ continue; -+ res = brlapi_loadAuthKey(keyfile, &authKeyLength, (void *) &auth->key); -+ free(keyfile); -+ if (res < 0) - continue; - res = brlapi_writePacket(handle->fileDescriptor, BRLAPI_PACKET_AUTH, auth, - sizeof(auth->type)+authKeyLength); -diff --git a/Programs/brlapi_common.h b/Programs/brlapi_common.h -index 98fed09..090ce84 100644 ---- a/Programs/brlapi_common.h -+++ b/Programs/brlapi_common.h -@@ -415,3 +415,23 @@ BRLAPI(getKeyrangeMask) (brlapi_rangeType_t r, brlapi_keyCode_t code, brlapi_key - brlapi_errno = BRLAPI_ERROR_INVALID_PARAMETER; - return -1; - } -+ -+static char * -+BRLAPI(getKeyFile)(const char *auth) -+{ -+ const char *path; -+ char *ret, *delim; -+ if (!strncmp(auth,"keyfile:",8)) -+ path=auth+8; -+ else { -+ path=strstr(auth,"+keyfile:"); -+ if (path) path+=9; -+ else path=auth; -+ } -+ ret=strdup(path); -+ delim=strchr(ret,'+'); -+ if (delim) -+ *delim = 0; -+ return ret; -+} -+ -diff --git a/Programs/brlapi_server.c b/Programs/brlapi_server.c -index 3fadda2..c3b3c6e 100644 ---- a/Programs/brlapi_server.c -+++ b/Programs/brlapi_server.c -@@ -1225,6 +1225,18 @@ static void handleNewConnection(Connection *c) - brlapiserver_writePacket(c->fd,BRLAPI_PACKET_VERSION,&versionPacket.data,sizeof(versionPacket.version)); - } - -+static int -+hasKeyFile(const char *auth) -+{ -+ if (isAbsolutePath(auth)) -+ return 1; -+ if (!strncmp(auth,"keyfile:", 8)) -+ return 1; -+ if (strstr(auth,"+keyfile:")) -+ return 1; -+ return 0; -+} -+ - /* Function : handleUnauthorizedConnection */ - /* Returns 1 if connection has to be removed */ - static int handleUnauthorizedConnection(Connection *c, brlapi_packetType_t type, brlapi_packet_t *packet, size_t size) -@@ -1252,7 +1264,7 @@ static int handleUnauthorizedConnection(Connection *c, brlapi_packetType_t type, - unauthConnections--; - c->auth = 1; - } else { -- if (isAbsolutePath(auth)) -+ if (hasKeyFile(auth)) - authPacket->type[nbmethods++] = htonl(BRLAPI_AUTH_KEY); - c->auth = 0; - } -@@ -1288,15 +1300,18 @@ static int handleUnauthorizedConnection(Connection *c, brlapi_packetType_t type, - if (authDescriptor) authCorrect = authPerform(authDescriptor, c->fd); - break; - case BRLAPI_AUTH_KEY: -- if (isAbsolutePath(auth)) { -- if (brlapiserver_loadAuthKey(auth,&authKeyLength,&authKey)==-1) { -- logMessage(LOG_WARNING,"Unable to load API authorization key from %s: %s in %s. You may use parameter auth=none if you don't want any authorization (dangerous)", auth, strerror(brlapi_libcerrno), brlapi_errfun); -+ if (hasKeyFile(auth)) { -+ char *path = brlapiserver_getKeyFile(auth); -+ int ret = brlapiserver_loadAuthKey(path,&authKeyLength,&authKey); -+ free(path); -+ if (ret==-1) { -+ logMessage(LOG_WARNING,"Unable to load API authorization key from %s: %s in %s. You may use parameter auth=none if you don't want any authorization (dangerous)", path, strerror(brlapi_libcerrno), brlapi_errfun); - break; - } - logMessage(LOG_CATEGORY(SERVER_EVENTS), "authorization key loaded"); - authCorrect = (remaining==authKeyLength) && (!memcmp(&authPacket->key, &authKey, authKeyLength)); - memset(&authKey, 0, authKeyLength); -- memset(&authPacket->key, 0, authKeyLength); -+ memset(&authPacket->key, 0, remaining); - } - break; - default: diff --git a/debian/patches/defauth-polkit b/debian/patches/defauth-polkit deleted file mode 100644 index ab89612ce6d2b383069e7f0e3bc8635c6b3b413d..0000000000000000000000000000000000000000 --- a/debian/patches/defauth-polkit +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Programs/brlapi.h.in -+++ b/Programs/brlapi.h.in -@@ -138,7 +138,7 @@ size_t BRLAPI_STDCALL brlapi_getHandleSi - /* No authentication by default on Windows */ - #define BRLAPI_DEFAUTH "none" - #else --#define BRLAPI_DEFAUTH BRLAPI_ETCDIR "/" BRLAPI_AUTHKEYFILE -+#define BRLAPI_DEFAUTH "polkit+keyfile:" BRLAPI_ETCDIR "/" BRLAPI_AUTHKEYFILE - #endif /* BRLAPI_WIN32 */ - - #ifdef __MINGW32__ diff --git a/debian/patches/git-braillenote.patch b/debian/patches/git-braillenote.patch deleted file mode 100644 index c264429cea52aa97a9c7977e97842b7c774d8680..0000000000000000000000000000000000000000 --- a/debian/patches/git-braillenote.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 71e8623c494d1936e27f12270f460312beb383bf -Author: Dave Mielke -Date: Wed Nov 9 14:49:00 2016 -0500 - - The BrailleNote wasn't being autodetected when using USB. (dm) - -diff --git a/Programs/config.c b/Programs/config.c -index 295d269..6554461 100644 ---- a/Programs/config.c -+++ b/Programs/config.c -@@ -1487,7 +1487,7 @@ activateBrailleDriver (int verify) { - autodetectableDrivers = serialDrivers; - } else if (isUsbDevice(&dev)) { - static const char *const usbDrivers[] = { -- "al", "bm", "eu", "fs", "hd", "hm", "ht", "hw", "mt", "pg", "pm", "sk", "vo", -+ "al", "bm", "bn", "eu", "fs", "hd", "hm", "ht", "hw", "mt", "pg", "pm", "sk", "vo", - NULL - }; - autodetectableDrivers = usbDrivers; diff --git a/debian/patches/git-lsystemd.patch b/debian/patches/git-lsystemd.patch deleted file mode 100644 index 975727c3a075f7c05f1319c75d3847af315d76e3..0000000000000000000000000000000000000000 --- a/debian/patches/git-lsystemd.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 00506f796c79f05e18a1959998fd4b0932155019 -Author: Dave Mielke -Date: Mon Oct 3 07:13:19 2016 -0400 - - The service package libraries should be in the link list instead of in the compile list. (st) - -diff --git a/config.mk.in b/config.mk.in -index 4e405c1..de096c9 100644 ---- a/config.mk.in -+++ b/config.mk.in -@@ -235,7 +235,7 @@ TUNE_OBJECTS = tune.$O notes.$O $(BEEP_OBJECTS) $(PCM_OBJECTS) $(MIDI_OBJECTS) $ - ASYNC_OBJECTS = async_handle.$O async_data.$O async_wait.$O async_alarm.$O async_task.$O async_io.$O async_event.$O async_signal.$O thread.$O - BASE_OBJECTS = log.$O addresses.$O file.$O device.$O parse.$O variables.$O datafile.$O unicode.$O $(CHARSET_OBJECTS) timing.$O $(ASYNC_OBJECTS) queue.$O lock.$O $(DYNLD_OBJECTS) $(PORTS_OBJECTS) $(SYSTEM_OBJECTS) - OPTIONS_OBJECTS = options.$O $(PARAMS_OBJECTS) --PROGRAM_OBJECTS = program.$O $(PGMPATH_OBJECTS) $(SERVICE_OBJECTS) $(SERVICE_LIBS) pid.$O $(OPTIONS_OBJECTS) $(BASE_OBJECTS) -+PROGRAM_OBJECTS = program.$O $(PGMPATH_OBJECTS) $(SERVICE_OBJECTS) pid.$O $(OPTIONS_OBJECTS) $(BASE_OBJECTS) - - CC = @CC@ - CPPFLAGS = -I$(BLD_DIR) -I$(SRC_DIR) -I$(BLD_TOP:/=)/$(PGM_DIR) -I$(SRC_TOP:/=)/$(PGM_DIR) -I$(SRC_TOP:/=)/$(HDR_DIR) -I$(BLD_TOP:/=) -I$(SRC_TOP:/=) @CPPFLAGS@ @DEFS@ -@@ -248,7 +248,7 @@ LIBCXXFLAGS = $(CXXFLAGS) @LIBCXXFLAGS@ - - LD = @LD@ - LDFLAGS = @LDFLAGS@ --LDLIBS = $(ICU_LIBS) $(POLKIT_LIBS) $(SYSTEM_LIBS) @LIBS@ -+LDLIBS = $(ICU_LIBS) $(POLKIT_LIBS) $(SERVICE_LIBS) $(SYSTEM_LIBS) @LIBS@ - - MKOBJ = @MKOBJ@ - MKMOD = @MKMOD@ diff --git a/debian/patches/git-manufacturer.patch b/debian/patches/git-manufacturer.patch deleted file mode 100644 index 1c757d2f7bd0af2f951a4a3bd844cdcd43b86f6c..0000000000000000000000000000000000000000 --- a/debian/patches/git-manufacturer.patch +++ /dev/null @@ -1,186 +0,0 @@ -commit 0ee455a451f4f354159fea709d20ccedcb36fcdb -Author: Dave Mielke -Date: Sun Nov 20 23:15:36 2016 -0500 - - Add manufacturer string protection to the generic USB device definitions (Cebra and MDV not done yet). (dm) - ---- a/Drivers/Braille/Albatross/braille.c -+++ b/Drivers/Braille/Albatross/braille.c -@@ -173,9 +173,14 @@ static UsbChannel *usbChannel = NULL; - - static int - openUsbPort (const char *device) { -+ BEGIN_USB_STRING_LIST(usbManufacturers_0403_6001) -+ "Tivomatic Oy", -+ END_USB_STRING_LIST -+ - BEGIN_USB_CHANNEL_DEFINITIONS - { /* all models */ - .vendor=0X0403, .product=0X6001, -+ .manufacturers = usbManufacturers_0403_6001, - .configuration=1, .interface=0, .alternative=0, - .inputEndpoint=1, .outputEndpoint=2 - }, ---- a/Drivers/Braille/BrailleMemo/braille.c -+++ b/Drivers/Braille/BrailleMemo/braille.c -@@ -286,9 +286,14 @@ connectResource (BrailleDisplay *brl, co - .baud = 9600 - }; - -+ BEGIN_USB_STRING_LIST(usbManufacturers_10C4_EA60) -+ "Silicon Labs", -+ END_USB_STRING_LIST -+ - BEGIN_USB_CHANNEL_DEFINITIONS - { /* Pocket */ - .vendor=0X10C4, .product=0XEA60, -+ .manufacturers = usbManufacturers_10C4_EA60, - .configuration=1, .interface=0, .alternative=0, - .inputEndpoint=1, .outputEndpoint=1, - .serial=&serialParameters ---- a/Drivers/Braille/HIMS/braille.c -+++ b/Drivers/Braille/HIMS/braille.c -@@ -556,6 +556,10 @@ connectResource (BrailleDisplay *brl, co - .baud = 115200 - }; - -+ BEGIN_USB_STRING_LIST(usbManufacturers_0403_6001) -+ "FTDI", -+ END_USB_STRING_LIST -+ - BEGIN_USB_CHANNEL_DEFINITIONS - { /* Braille Sense (USB 1.1) */ - .version = UsbSpecificationVersion_1_1, -@@ -588,6 +592,7 @@ connectResource (BrailleDisplay *brl, co - - { /* Sync Braille */ - .vendor=0X0403, .product=0X6001, -+ .manufacturers = usbManufacturers_0403_6001, - .configuration=1, .interface=0, .alternative=0, - .inputEndpoint=1, .outputEndpoint=2, - .data=&syncBrailleProtocol ---- a/Drivers/Braille/HandyTech/braille.c -+++ b/Drivers/Braille/HandyTech/braille.c -@@ -1107,6 +1107,10 @@ connectResource (BrailleDisplay *brl, co - .parity = SERIAL_PARITY_ODD - }; - -+ BEGIN_USB_STRING_LIST(usbManufacturers_0403_6001) -+ "FTDI", -+ END_USB_STRING_LIST -+ - BEGIN_USB_CHANNEL_DEFINITIONS - { /* GoHubs chip */ - .vendor=0X0921, .product=0X1200, -@@ -1117,6 +1121,7 @@ connectResource (BrailleDisplay *brl, co - - { /* FTDI chip */ - .vendor=0X0403, .product=0X6001, -+ .manufacturers = usbManufacturers_0403_6001, - .configuration=1, .interface=0, .alternative=0, - .inputEndpoint=1, .outputEndpoint=2, - .serial = &serialParameters ---- a/Drivers/Braille/Seika/braille.c -+++ b/Drivers/Braille/Seika/braille.c -@@ -676,9 +676,18 @@ connectResource (BrailleDisplay *brl, co - .baud = 9600 - }; - -+ BEGIN_USB_STRING_LIST(usbManufacturers_10C4_EA60) -+ "Silicon Labs", -+ END_USB_STRING_LIST -+ -+ BEGIN_USB_STRING_LIST(usbManufacturers_10C4_EA80) -+ "Silicon Laboratories", -+ END_USB_STRING_LIST -+ - BEGIN_USB_CHANNEL_DEFINITIONS - { /* Braille Display */ - .vendor=0X10C4, .product=0XEA60, -+ .manufacturers = usbManufacturers_10C4_EA60, - .configuration=1, .interface=0, .alternative=0, - .inputEndpoint=1, .outputEndpoint=1, - .serial=&serialParameters -@@ -686,6 +695,7 @@ connectResource (BrailleDisplay *brl, co - - { /* Note Taker */ - .vendor=0X10C4, .product=0XEA80, -+ .manufacturers = usbManufacturers_10C4_EA80, - .configuration=1, .interface=0, .alternative=0, - .inputEndpoint=1, - .serial=&serialParameters ---- a/Headers/usb_types.h -+++ b/Headers/usb_types.h -@@ -300,7 +300,15 @@ typedef enum { - #define USB_HID_ITEM_LENGTH(item) ((item) & ~UsbHidItemType_Mask) - #define USB_HID_ITEM_BIT(type) (UINT64_C(1) << ((type) >> 2)) - -+#define BEGIN_USB_STRING_LIST(name) static const char *const name[] = { -+#define END_USB_STRING_LIST NULL}; -+ - typedef struct { -+ const void *data; -+ const SerialParameters *serial; -+ const char *const *manufacturers; -+ const char *const *products; -+ - uint16_t vendor; - uint16_t product; - uint16_t version; -@@ -314,9 +322,6 @@ typedef struct { - unsigned disableAutosuspend:1; - unsigned disableEndpointReset:1; - unsigned verifyInterface:1; -- -- const SerialParameters *serial; -- const void *data; - } UsbChannelDefinition; - - #define BEGIN_USB_CHANNEL_DEFINITIONS static const UsbChannelDefinition usbChannelDefinitions[] = { ---- a/Programs/usb.c -+++ b/Programs/usb.c -@@ -370,6 +370,34 @@ usbVerifyProductIdentifier (const UsbDev - return identifier == getLittleEndian16(descriptor->idProduct); - } - -+static int -+usbVerifyStrings ( -+ UsbDevice *device, -+ const char *const *strings, -+ unsigned char number -+) { -+ if (!strings) return 1; -+ if (!number) return 0; -+ -+ char *string = usbGetString(device, number, 1000); -+ int matched = 0; -+ -+ if (string) { -+ while (*strings) { -+ if (strcmp(*strings, string) == 0) { -+ matched = 1; -+ break; -+ } -+ -+ strings += 1; -+ } -+ -+ free(string); -+ } -+ -+ return matched; -+} -+ - const UsbDeviceDescriptor * - usbDeviceDescriptor (UsbDevice *device) { - return &device->descriptor; -@@ -1445,6 +1473,9 @@ usbChooseChannel (UsbDevice *device, Usb - if (!usbVerifyProductIdentifier(descriptor, data->productIdentifier)) goto nextDefinition; - if (!usbVerifySerialNumber(device, data->serialNumber)) goto nextDefinition; - -+ if (!usbVerifyStrings(device, definition->manufacturers, descriptor->iManufacturer)) goto nextDefinition; -+ if (!usbVerifyStrings(device, definition->products, descriptor->iProduct)) goto nextDefinition; -+ - if (definition->verifyInterface) { - if (!usbConfigureDevice(device, definition->configuration)) goto nextDefinition; - if (!usbInterfaceDescriptor(device, definition->interface, definition->alternative)) goto nextDefinition; diff --git a/debian/patches/git-reproducible.patch b/debian/patches/git-reproducible.patch deleted file mode 100644 index 85029a2ade26b7a09430968df2744fe5b1e8db05..0000000000000000000000000000000000000000 --- a/debian/patches/git-reproducible.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 9c353d590d6ca90139d0449c9a4eb8d6e1b07478 -Author: Dave Mielke -Date: Sun Apr 9 15:27:13 2017 -0400 - - Remove the timestamps from the JavaDocs for load reproducibility. (st) - -diff --git a/Bindings/Java/Makefile.in b/Bindings/Java/Makefile.in -index c4bc90e38..3a1d65feb 100644 ---- a/Bindings/Java/Makefile.in -+++ b/Bindings/Java/Makefile.in -@@ -75,7 +75,7 @@ doc: doc.made - - doc.made: $(JAVA_SOURCES) - $(INSTALL_DIRECTORY) doc -- $(JAVADOC) -quiet -d doc -author -version -use $(JAVA_SOURCES) -+ $(JAVADOC) -quiet -d doc -author -notimestamp -version -use $(JAVA_SOURCES) - touch $@ - - clean:: diff --git a/debian/patches/git-speech-crash.patch b/debian/patches/git-speech-crash.patch deleted file mode 100644 index c4b2c66acc533db72e32c3a906d5ba74a0f583d1..0000000000000000000000000000000000000000 --- a/debian/patches/git-speech-crash.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 5ddde1f78a35ad698df2bfb06f180a43d3d7ed7f -Author: Dave Mielke -Date: Mon Sep 26 20:09:03 2016 -0400 - - Fix a possible crash during speech thread construction. (dm) - -diff --git a/Programs/spk_thread.c b/Programs/spk_thread.c -index 288518c..3d33ded 100644 ---- a/Programs/spk_thread.c -+++ b/Programs/spk_thread.c -@@ -80,7 +80,6 @@ typedef enum { - - struct SpeechDriverThreadStruct { - ThreadState threadState; -- unsigned stopping:1; - Queue *requestQueue; - - volatile SpeechSynthesizer *speechSynthesizer; -@@ -253,7 +252,7 @@ testThreadValidity (volatile SpeechDriverThread *sdt) { - - if (spk) { - if (sdt == spk->driver.thread) { -- if (!sdt->stopping) { -+ if (sdt->threadState == THD_READY) { - return 1; - } - } -@@ -874,7 +873,6 @@ constructSpeechDriverThread ( - - if ((sdt = malloc(sizeof(*sdt)))) { - memset((void *)sdt, 0, sizeof(*sdt)); -- sdt->stopping = 0; - setThreadState(sdt, THD_CONSTRUCTING); - setResponsePending(sdt); - diff --git a/debian/patches/git-vario-ultra-restart.patch b/debian/patches/git-vario-ultra-restart.patch deleted file mode 100644 index e68e023f2a4ca8d2ad677311477ce439d59e1802..0000000000000000000000000000000000000000 --- a/debian/patches/git-vario-ultra-restart.patch +++ /dev/null @@ -1,55 +0,0 @@ -commit 587004a914d572e6481d0a810e1b3af8cf8afaf2 -Author: Dave Mielke -Date: Sat Mar 11 21:03:18 2017 -0500 - - USB write timeouts should be ignored for the Vario Ultra. (dm) - -diff --git a/Drivers/Braille/Baum/braille.c b/Drivers/Braille/Baum/braille.c -index a571d319d..f137bdbe3 100644 ---- a/Drivers/Braille/Baum/braille.c -+++ b/Drivers/Braille/Baum/braille.c -@@ -3104,6 +3104,7 @@ connectResource (BrailleDisplay *brl, const char *identifier) { - descriptor.serial.options.applicationData = &baumEscapeOperations; - - descriptor.usb.channelDefinitions = usbChannelDefinitions; -+ descriptor.usb.options.ignoreWriteTimeouts = 1; - - descriptor.bluetooth.channelNumber = 1; - descriptor.bluetooth.discoverChannel = 1; -diff --git a/Headers/gio_types.h b/Headers/gio_types.h -index 481bb0fd0..11110d5c9 100644 ---- a/Headers/gio_types.h -+++ b/Headers/gio_types.h -@@ -32,6 +32,7 @@ typedef struct { - int inputTimeout; - int outputTimeout; - int requestTimeout; -+ unsigned ignoreWriteTimeouts:1; - } GioOptions; - - typedef ssize_t GioUsbWriteDataMethod ( -diff --git a/Programs/gio.c b/Programs/gio.c -index 123f188a2..f370c3f34 100644 ---- a/Programs/gio.c -+++ b/Programs/gio.c -@@ -228,8 +228,18 @@ gioWriteData (GioEndpoint *endpoint, const void *data, size_t size) { - return -1; - } - -- return method(endpoint->handle, data, size, -- endpoint->options.outputTimeout); -+ ssize_t result = method(endpoint->handle, data, size, -+ endpoint->options.outputTimeout); -+ -+ if (endpoint->options.ignoreWriteTimeouts) { -+ if (result == -1) { -+ if (errno == ETIMEDOUT) { -+ result = size; -+ } -+ } -+ } -+ -+ return result; - } - - int diff --git a/debian/patches/series b/debian/patches/series index ec0f53f04a8802462e74a70183df17a8a73414bf..38e858e22df50920f805d58b2e2911fbacfb6fd1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,16 +3,5 @@ 40-no-update-pot.patch 41-java-bytecode-compat.patch 50-constants.patch -git-speech-crash.patch -git-lsystemd.patch -defauth-polkit -xbrlapi.patch -defauth-keyfile.patch -wait-polkit -xbrlapi-setfocus.patch -git-braillenote.patch -git-manufacturer.patch -xbrlapi-nospam.patch -git-vario-ultra-restart.patch disable-synth-callback.patch -git-reproducible.patch +api_startup.patch diff --git a/debian/patches/wait-polkit b/debian/patches/wait-polkit deleted file mode 100644 index 58bd9399fee2fe967bc621a24addd7854ccb7a0c..0000000000000000000000000000000000000000 --- a/debian/patches/wait-polkit +++ /dev/null @@ -1,88 +0,0 @@ -commit 7c26200d24b73fd4b3eec5e00f8593cf7ba507ff -Author: Dave Mielke -Date: Sat Oct 8 22:27:03 2016 -0400 - - Waiting for Polkit initialization shouldn't delay BRLTTY startup. (st) - - When BRLTTY is started very early, policykit is not running yet. - BrlAPI would then be disabled. - This makes the policykit initialization detect the case - when policykit it not started yet (G_IO_ERROR_NOT_FOUND), and - moves the initialization of authentication to inside the BrlAPI thread. - -diff --git a/Programs/auth.c b/Programs/auth.c -index f93afad..9b8bf3b 100644 ---- a/Programs/auth.c -+++ b/Programs/auth.c -@@ -54,6 +54,7 @@ typedef unsigned int gid_t; - #include "strfmt.h" - #include "parse.h" - #include "auth.h" -+#include "async_wait.h" - - /* peer credentials */ - #undef CAN_CHECK_CREDENTIALS -@@ -452,15 +453,28 @@ authPolkit_initialize (const char *parameter) { - if ((polkit = malloc(sizeof(*polkit)))) { - memset(polkit, 0, sizeof(*polkit)); - -- GError *error_local = NULL; -- polkit->authority = polkit_authority_get_sync(NULL, &error_local); -+ while(1) { -+ GError *error_local = NULL; -+ polkit->authority = polkit_authority_get_sync(NULL, &error_local); - -- if (polkit->authority) { -- return polkit; -- } else { -- g_error_free(error_local); -- g_free(polkit); -+ if (polkit->authority) { -+ return polkit; -+ } else { -+ GQuark domain = error_local->domain; -+ gint code = error_local->code; -+ -+ logMessage(LOG_WARNING, "Unable to connect to polkit: %s (%d) %s (%d)", g_quark_to_string(domain), (int) domain, error_local->message, code); -+ g_error_free(error_local); -+ -+ if ((domain != G_IO_ERROR) && (code != G_IO_ERROR_NOT_FOUND)) { -+ break; -+ } -+ } -+ -+ asyncWait(1000); - } -+ -+ g_free(polkit); - } else { - logMallocError(); - } -diff --git a/Programs/brlapi_server.c b/Programs/brlapi_server.c -index c3b3c6e..295f169 100644 ---- a/Programs/brlapi_server.c -+++ b/Programs/brlapi_server.c -@@ -2183,6 +2183,12 @@ THREAD_FUNCTION(runServer) { - logMessage(LOG_CATEGORY(SERVER_EVENTS), "server thread started"); - if (!prepareThread()) goto finished; - -+ if (auth && !isAbsolutePath(auth)) -+ if (!(authDescriptor = authBeginServer(auth))) { -+ logMessage(LOG_WARNING, "Unable to start auth server"); -+ goto finished; -+ } -+ - socketHosts = splitString(hosts,'+',&numSockets); - if (numSockets>MAXSOCKETS) { - logMessage(LOG_ERR,"too many hosts specified (%d, max %d)",numSockets,MAXSOCKETS); -@@ -3086,10 +3092,6 @@ int api_start(BrailleDisplay *brl, char **parameters) - if (*operand) auth = operand; - } - -- if (auth && !isAbsolutePath(auth)) -- if (!(authDescriptor = authBeginServer(auth))) -- return 0; -- - pthread_attr_t attr; - pthread_mutexattr_t mattr; - diff --git a/debian/patches/xbrlapi-nospam.patch b/debian/patches/xbrlapi-nospam.patch deleted file mode 100644 index 3241304dac89c45057e526b3e02243d6fb9c16b9..0000000000000000000000000000000000000000 --- a/debian/patches/xbrlapi-nospam.patch +++ /dev/null @@ -1,45 +0,0 @@ -commit 0a5341121ba8f4de24407ce2a4d5369dadf5d099 -Author: Dave Mielke -Date: Tue Jan 17 11:01:39 2017 -0500 - - Prevent xbrlapi from retrying to connect to brltty when it fails at startup. (st) - - This is typical for a system that doesn't actually have an attached braille display, - thus allowing xbrlapi to be started by default on a standard system. - -diff --git a/Programs/xbrlapi.c b/Programs/xbrlapi.c -index 4796b8db8..d6b83f363 100644 ---- a/Programs/xbrlapi.c -+++ b/Programs/xbrlapi.c -@@ -173,20 +173,25 @@ static int tobrltty_init(char *auth, char *host) { - unsigned int x,y; - settings.host=host; - settings.auth=auth; -+ static int had_succeeded; - - if ((brlapi_fd = brlapi_openConnection(&settings,&settings))<0) - { -- static int tried; -- if (!tried) -+ if (!had_succeeded) - { -- /* Only produce an error message the first time we try to connect, to -- * provide feedback to users running xbrlapi by hand, but not fill logs -- * with reconnection attempts. */ -- tried = 1; -+ /* This is the first attempt to connect to BRLTTY, and it failed. -+ * Return the error immediately to the user, to provide feedback to users -+ * running xbrlapi by hand, but not fill logs, eat battery, spam -+ * 127.0.0.1 with reconnection attempts. -+ */ - fatal_brlapi_errno("openConnection",gettext("cannot connect to braille devices daemon brltty at %s\n"),settings.host); -+ exit(PROG_EXIT_FATAL); - } - return 0; - } -+ /* We achieved connecting to BRLTTY. If BRLTTY dies later on, we will -+ * silently try to reconnect to it. */ -+ had_succeeded = 1; - - if (brlapi_getDisplaySize(&x,&y)<0) - { diff --git a/debian/patches/xbrlapi-setfocus.patch b/debian/patches/xbrlapi-setfocus.patch deleted file mode 100644 index 90473040bb42494dae6abba6ea56d074b17403b1..0000000000000000000000000000000000000000 --- a/debian/patches/xbrlapi-setfocus.patch +++ /dev/null @@ -1,48 +0,0 @@ -commit a4029b60dff75d0352453f87274a1f243a78fed1 -Author: Dave Mielke -Date: Sat Oct 8 22:35:32 2016 -0400 - - Fix BrlAPI refresh on xbrlapi setfocus notification. (st) - - Braille rendering was not flushed when xbrlapi notifies brltty of the - focus change. Also, we need to make sure to flush rendering when the - displayed connection changes - so far we were just lucky that the cursor - position was different and thus triggered a flush. - -diff --git a/Programs/brlapi_server.c b/Programs/brlapi_server.c -index 295f169..613f52d 100644 ---- a/Programs/brlapi_server.c -+++ b/Programs/brlapi_server.c -@@ -924,6 +924,7 @@ static int handleSetFocus(Connection *c, brlapi_packetType_t type, brlapi_packet - CHECKEXC(c->tty,BRLAPI_ERROR_ILLEGAL_INSTRUCTION,"not allowed out of tty mode"); - c->tty->focus = ntohl(ints[0]); - logMessage(LOG_CATEGORY(SERVER_EVENTS), "focus on window %#010x",c->tty->focus); -+ asyncSignalEvent(flushEvent, NULL); - return 0; - } - -@@ -2851,6 +2852,7 @@ out: - */ - int api_flush(BrailleDisplay *brl) { - Connection *c; -+ static Connection *displayed_last; - int ok = 1; - int drain = 0; - int update = 0; -@@ -2884,7 +2886,7 @@ int api_flush(BrailleDisplay *brl) { - } - } - -- if (c->brlbufstate==TODISPLAY || update) { -+ if (c != displayed_last || c->brlbufstate==TODISPLAY || update) { - unsigned char *oldbuf = disp->buffer, buf[displaySize]; - disp->buffer = buf; - getDots(&c->brailleWindow, buf); -@@ -2892,6 +2894,7 @@ int api_flush(BrailleDisplay *brl) { - ok = trueBraille->writeWindow(brl, c->brailleWindow.text); - drain = 1; - disp->buffer = oldbuf; -+ displayed_last = c; - } - unlockMutex(&apiDriverMutex); - unlockMutex(&c->brailleWindowMutex); diff --git a/debian/patches/xbrlapi.patch b/debian/patches/xbrlapi.patch deleted file mode 100644 index e8f4881f3b2279c1d3e247c4c4ef2360f354f4d8..0000000000000000000000000000000000000000 --- a/debian/patches/xbrlapi.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit 7545cade829b461a3edc7c717a1ac270a24aba1d -Author: Dave Mielke -Date: Sat Oct 8 22:03:15 2016 -0400 - - xbrlapi spuriously reconnects on every window change. (st) - - A bogus if: tobrltty_init should be called only when brlapi_fd<0, and not as - soon as !FD_ISSET(brlapi_fd,&readfds) - -diff --git a/Programs/xbrlapi.c b/Programs/xbrlapi.c -index 489d73f..1520f81 100644 ---- a/Programs/xbrlapi.c -+++ b/Programs/xbrlapi.c -@@ -733,9 +733,9 @@ static void toX_f(const char *display) { - default: fprintf(stderr,gettext("xbrlapi: unhandled event type: %d\n"),ev.type); break; - } - } -- if (brlapi_fd>=0 && FD_ISSET(brlapi_fd,&readfds)) { -+ if (brlapi_fd>=0) { - #ifdef CAN_SIMULATE_KEY_PRESSES -- if (haveXTest) { -+ if (haveXTest && FD_ISSET(brlapi_fd,&readfds)) { - while (((res = brlapi_readKey(0, &code))==1)) { - switch (code & BRLAPI_KEY_TYPE_MASK) { - case BRLAPI_KEY_TYPE_CMD: diff --git a/debian/xbrlapi.desktop b/debian/xbrlapi.desktop deleted file mode 100644 index 100762f3bef2236ff17b685ff64fb8cebda1f42f..0000000000000000000000000000000000000000 --- a/debian/xbrlapi.desktop +++ /dev/null @@ -1,6 +0,0 @@ -[Desktop Entry] -Type=Application -Name=xbrlapi -Exec=xbrlapi -q -NoDisplay=true -X-GNOME-AutoRestart=true diff --git a/debian/xbrlapi.install b/debian/xbrlapi.install index 4d4b23434f224cabeed52c2cc2dba0a13a553f1b..9ca2a0f0e4648016b3b027c17803f0b62329842b 100644 --- a/debian/xbrlapi.install +++ b/debian/xbrlapi.install @@ -1,3 +1,3 @@ debian/tmp/sbin/xbrlapi usr/bin -debian/60xbrlapi /etc/X11/Xsession.d -debian/xbrlapi.desktop usr/share/gdm/greeter/autostart +debian/tmp/etc/X11/Xsession.d +debian/tmp/usr/share/gdm/greeter/autostart