diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/brltty-6.3-libspeechd.patch b/brltty-6.3-libspeechd.patch new file mode 100644 index 0000000..97e1d1f --- /dev/null +++ b/brltty-6.3-libspeechd.patch @@ -0,0 +1,13 @@ +diff --git a/Drivers/Speech/SpeechDispatcher/speech.c b/Drivers/Speech/SpeechDispatcher/speech.c +index cc55007..a2fcc0d 100644 +--- a/Drivers/Speech/SpeechDispatcher/speech.c ++++ b/Drivers/Speech/SpeechDispatcher/speech.c +@@ -35,7 +35,7 @@ typedef enum { + + #include "spk_driver.h" + +-#include ++#include + + static SPDConnection *connectionHandle = NULL; + static const char *moduleName; diff --git a/brltty-6.6-cython3.patch b/brltty-6.6-cython3.patch new file mode 100644 index 0000000..9696e2b --- /dev/null +++ b/brltty-6.6-cython3.patch @@ -0,0 +1,20 @@ +--- python2/Bindings/Python/brlapi.pyx 2023-07-17 07:55:47.000000000 -0700 ++++ python2/Bindings/Python/brlapi.pyx.new 2023-08-15 09:06:23.675136077 -0700 +@@ -453,6 +453,7 @@ + c_brlapi.brlapi_protocolExceptionInit(self.h) + if self.fd == -1: + c_brlapi.free(self.h) ++ self.h = NULL + raise ConnectionError(self.settings.host, self.settings.auth) + + def closeConnection(self): +@@ -465,7 +466,8 @@ + """Release resources used by the connection""" + if self.fd != -1: + c_brlapi.brlapi__closeConnection(self.h) +- c_brlapi.free(self.h) ++ if self.h != NULL: ++ c_brlapi.free(self.h) + + property host: + """To get authorized to connect, libbrlapi has to tell the BrlAPI server a secret key, for security reasons. This is the path to the file which holds it; it will hence have to be readable by the application.""" diff --git a/brltty-6.8-libspeechd.patch b/brltty-6.8-libspeechd.patch deleted file mode 100644 index 2f4a1d8..0000000 --- a/brltty-6.8-libspeechd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Drivers/Speech/SpeechDispatcher/speech.c~ 2025-05-25 03:58:25.000000000 -0500 -+++ b/Drivers/Speech/SpeechDispatcher/speech.c 2025-07-07 08:58:19.519919859 -0500 -@@ -36,7 +36,7 @@ - - #include "spk_driver.h" - --#include -+#include - - static SPDConnection *connectionHandle = NULL; - static unsigned int autospawn; diff --git a/brltty.spec b/brltty.spec index bbe3610..b6018f7 100644 --- a/brltty.spec +++ b/brltty.spec @@ -1,33 +1,43 @@ -%define pkg_version 6.8 -%define api_version 0.8.7 +%define pkg_version 6.6 +%define api_version 0.8.5 # minimal means brltty-minimal subpackage with minimal deps for # braille support in Anaconda installer # https://bugzilla.redhat.com/show_bug.cgi?id=1584679 -%bcond minimal 1 +%bcond_without minimal -# enable python3 by default -%bcond python3 1 +%if 0%{?rhel} && 0%{?rhel} <= 7 +# disable python3 by default +%bcond_with python3 +%else +%bcond_without python3 +%endif +%if 0%{?rhel} > 7 || 0%{?fedora} > 28 # disable python2 by default -%bcond python2 0 +%bcond_with python2 +%else +%bcond_without python2 +%endif %{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)} %{!?tcl_sitearch: %global tcl_sitearch %{_prefix}/%{_lib}/tcl%{tcl_version}} # with speech dispatcher iff on Fedora: -%bcond speech_dispatcher %{defined fedora} +%define with_speech_dispatcher 0%{?fedora} # with espeak support iff on Fedora: -%bcond espeak %{defined fedora} +%define with_espeak 0%{?fedora} # OCaml packages not built on i686 since OCaml 5 / Fedora 39. %ifnarch %{ix86} -%bcond ocaml %{defined fedora} +%global with_ocaml 1 %endif %ifarch %{java_arches} -%bcond java %{defined fedora} +%global JAVA 1 +%else +%global JAVA 0 %endif # Filter private libraries @@ -36,8 +46,8 @@ %global __requires_exclude ^(%{_privatelibs})$ Name: brltty -Version: 6.8 -Release: 6%{?dist} +Version: 6.6 +Release: 13%{?dist} License: LGPL-2.0-or-later AND LGPL-2.1-or-later AND GPL-2.0-or-later URL: http://brltty.app/ Source0: http://brltty.app/archive/%{name}-%{version}.tar.xz @@ -47,7 +57,11 @@ Source3: brlapi-forbuild.h Source4: brltty.sysusers Patch1: brltty-6.3-loadLibrary.patch # libspeechd.h moved in latest speech-dispatch (NOT sent upstream) -Patch2: brltty-6.8-libspeechd.patch +Patch2: brltty-6.3-libspeechd.patch +# https://brltty.app/pipermail/brltty/2023-August/020048.html +# thanks to Lukáš Tyrychtr for the diagnosis and initial patch, and +# Samuel Thibault for this improved patch +Patch3: brltty-6.6-cython3.patch Summary: Braille display driver for Linux/Unix BuildRequires: byacc BuildRequires: glibc-kernheaders @@ -55,11 +69,12 @@ BuildRequires: gcc BuildRequires: bluez-libs-devel BuildRequires: systemd BuildRequires: systemd-rpm-macros +%{?sysusers_requires_compat} BuildRequires: lua-devel BuildRequires: gettext BuildRequires: at-spi2-core-devel BuildRequires: alsa-lib-devel -%if %{with espeak} +%if %{with_espeak} BuildRequires: espeak-devel %endif BuildRequires: espeak-ng-devel @@ -69,7 +84,6 @@ BuildRequires: polkit-devel BuildRequires: libicu-devel BuildRequires: doxygen BuildRequires: linuxdoc-tools -BuildRequires: ncurses-devel %if %{with python2} BuildRequires: python2-docutils BuildRequires: python2-setuptools @@ -92,7 +106,7 @@ access to the Linux/Unix console (when in text mode) for a blind person using a refreshable braille display. It drives the braille display and provides complete screen review functionality. -%if %{with speech_dispatcher} +%if %{with_speech_dispatcher} BRLTTY can also work with speech synthesizers; if you want to use it with Speech Dispatcher, please install also package %{name}-speech-dispatcher. @@ -106,6 +120,7 @@ This package provides the Speech Dispatcher driver for BRLTTY. %package docs Summary: Documentation for BRLTTY +Requires: %{name} = %{pkg_version}-%{release} BuildArch: noarch %description docs This package provides the documentation for BRLTTY. @@ -114,7 +129,7 @@ This package provides the documentation for BRLTTY. Summary: XWindow driver for BRLTTY BuildRequires: libSM-devel libICE-devel libX11-devel libXaw-devel libXext-devel libXt-devel libXtst-devel Requires: %{name}%{?_isa} = %{pkg_version}-%{release} -Requires: xorg-x11-fonts-misc +Requires: xorg-x11-fonts-misc, ucs-miscfixed-fonts %description xw This package provides the XWindow driver for BRLTTY. @@ -124,7 +139,7 @@ Requires: %{name}%{?_isa} = %{pkg_version}-%{release} %description at-spi2 This package provides the AtSpi2 driver for BRLTTY. -%if %{with espeak} +%if %{with_espeak} %package espeak Summary: eSpeak driver for BRLTTY Requires: %{name}%{?_isa} = %{pkg_version}-%{release} @@ -135,7 +150,7 @@ This package provides the eSpeak driver for BRLTTY. %package espeak-ng Summary: eSpeak-NG driver for BRLTTY Requires: %{name}%{?_isa} = %{pkg_version}-%{release} -%if %{without espeak} +%if ! %{with_espeak} Obsoletes: brltty-espeak <= 5.6-5 %endif %description espeak-ng @@ -144,7 +159,8 @@ This package provides the eSpeak-NG driver for BRLTTY. %package -n brlapi Version: %{api_version} Summary: Application Programming Interface for BRLTTY -Requires(pre): glibc-common +Recommends: %{name} = %{pkg_version}-%{release} +Requires(pre): glibc-common, shadow-utils Requires(post): coreutils, util-linux %description -n brlapi This package provides the run-time support for the Application @@ -207,7 +223,7 @@ Summary: Python 3 binding for BrlAPI This package provides the Python 3 binding for BrlAPI. %endif -%if %{with java} +%if %{JAVA} %package -n brlapi-java Version: %{api_version} Requires: brlapi%{?_isa} = %{api_version}-%{release} @@ -218,7 +234,7 @@ Summary: Java binding for BrlAPI This package provides the Java binding for BrlAPI. %endif -%if %{with ocaml} +%if 0%{?with_ocaml} %package -n ocaml-brlapi Version: %{api_version} Requires: brlapi%{?_isa} = %{api_version}-%{release} @@ -253,7 +269,9 @@ installer. mv %{name}-%{version} python2 pushd python2 -%autopatch -p1 +%patch -P 1 -p1 -b .loadLibrary +%patch -P 2 -p1 -b .libspeechd +%patch -P 3 -p1 -b .cython3 # remove packaged binary file rm -f Programs/brltty-ktb @@ -271,11 +289,12 @@ cp -a python2 python3 cp -a python2 minimal %endif + %build # If MAKEFLAGS=-jN is set it would break local builds. unset MAKEFLAGS -%if %{with java} +%if %{JAVA} # Add the openjdk include directories to CPPFLAGS for i in -I/usr/lib/jvm/java/include{,/linux}; do java_inc="$java_inc $i" @@ -292,13 +311,13 @@ export CXXFLAGS="%{optflags} -fno-strict-aliasing $LDFLAGS" configure_opts=" \ --disable-stripping \ --without-curses \ -%if %{with speech_dispatcher} +%if %{with_speech_dispatcher} --with-speechd=%{_prefix} \ %endif -%if %{without espeak} +%if ! %{with_espeak} --without-espeak \ %endif -%if %{with java} +%if %{JAVA} --with-install-root=%{buildroot} \ JAVA_JAR_DIR=%{_jnidir} \ JAVA_JNI_DIR=%{_libdir}/brltty \ @@ -403,7 +422,7 @@ for python in $PYTHONS done %install -%if %{with ocaml} +%if 0%{?with_ocaml} mkdir -p %{buildroot}%{_libdir}/ocaml/stublibs %endif @@ -524,7 +543,7 @@ rmdir doc/Initramfs/Dracut doc/Initramfs # Install group creation file install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/brltty.conf -%if %{without java} +%if %{!JAVA} find . -type d -name 'Java' | xargs rm -rf find %{buildroot}%{_datadir} -type d -name 'Java' | xargs rm -rf %endif @@ -538,6 +557,8 @@ find %{buildroot}%{_datadir} -type d -name 'Java' | xargs rm -rf %postun %systemd_postun_with_restart brltty.service +%pre -n brlapi +%sysusers_create_compat %{SOURCE4} %post -n brlapi if [ ! -e %{_sysconfdir}/brlapi.key ]; then @@ -559,23 +580,17 @@ fi %{_bindir}/brltty-* %exclude %{_bindir}/brltty-minimal %{_libdir}/brltty/ -%if %{with java} -%exclude %{_libdir}/brltty/libbrlapi_java.so -%endif -# brlapi subpackage +%if %{!JAVA} %exclude %{_libdir}/brltty/libbrlttybba.so -# xw subpackage %exclude %{_libdir}/brltty/libbrlttybxw.so -# at-spi2 subpackage %exclude %{_libdir}/brltty/libbrlttyxa2.so -# espeak-ng subpackage %exclude %{_libdir}/brltty/libbrlttysen.so -%if %{with espeak} %exclude %{_libdir}/brltty/libbrlttyses.so -%endif -%if %{with speech_dispatcher} +%exclude %{_libdir}/brltty/libbrlapi_java.so +%if %{with_speech_dispatcher} %exclude %{_libdir}/brltty/libbrlttyssd.so %endif +%endif %license LICENSE-LGPL %doc %{_mandir}/man[15]/brltty.* %{_sysconfdir}/X11/Xsession.d/90xbrlapi @@ -591,7 +606,7 @@ fi %license LICENSE-LGPL %endif -%if %{with speech_dispatcher} +%if %{with_speech_dispatcher} %files speech-dispatcher %doc Drivers/Speech/SpeechDispatcher/README %{_libdir}/brltty/libbrlttyssd.so @@ -609,7 +624,7 @@ fi %files at-spi2 %{_libdir}/brltty/libbrlttyxa2.so -%if %{with espeak} +%if %{with_espeak} %files espeak %{_libdir}/brltty/libbrlttyses.so %endif @@ -621,7 +636,6 @@ fi %{_bindir}/vstp %{_bindir}/eutp %{_bindir}/xbrlapi -%dir %{_libdir}/brltty %{_libdir}/brltty/libbrlttybba.so %{_libdir}/libbrlapi.so.* %ghost %verify(not group) %{_sysconfdir}/brlapi.key @@ -656,13 +670,13 @@ fi %{python3_sitearch}/Brlapi-%{api_version}-*.egg-info %endif -%if %{with java} +%if %{JAVA} %files -n brlapi-java %{_libdir}/brltty/libbrlapi_java.so %{_jnidir}/brlapi.jar %endif -%if %{with ocaml} +%if 0%{?with_ocaml} %files -n ocaml-brlapi %{_libdir}/ocaml/brlapi/ %{_libdir}/ocaml/stublibs/ @@ -675,82 +689,6 @@ fi %config(noreplace) %verify(not size md5 mtime) %{_sysconfdir}/brltty/Initramfs/cmdline %changelog -* Mon Oct 13 2025 Richard W.M. Jones - 6.8-6 -- OCaml 5.4.0 rebuild - -* Wed Oct 08 2025 Dominik Mierzejewski - 6.8-5 -- own _libdir/brltty directory in brlapi - -* Wed Aug 06 2025 František Zatloukal - 6.8-4 -- Rebuilt for icu 77.1 - -* Wed Jul 23 2025 Fedora Release Engineering - 6.8-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Fri Jul 11 2025 Jerry James - 6.8-2 -- Rebuild to fix OCaml dependencies - -* Mon Jul 07 2025 Gwyn Ciesla - 6.8-1 -- 6.8 - -* Mon Jun 02 2025 Python Maint - 6.7-11 -- Rebuilt for Python 3.14 - -* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 6.7-10 -- Drop call to %sysusers_create_compat - -* Tue Feb 11 2025 Jaroslav Škarvada - 6.7-9 -- Built for tcl 9.0 - Related: rhbz#2337691 - -* Mon Feb 3 2025 Jaroslav Škarvada - 6.7-8 -- Rebuilt for tcl/tk change - Related: rhbz#2337691 - -* Fri Jan 31 2025 Yaakov Selkowitz - 6.7-7 -- Fix exclusions from main package - -* Thu Jan 16 2025 Fedora Release Engineering - 6.7-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Tue Jan 14 2025 Gwyn Ciesla - 6.7-5 -- Update to use tcl8 compat. - -* Fri Jan 10 2025 Jerry James - 6.7-4 -- OCaml 5.3.0 rebuild for Fedora 42 - -* Tue Dec 10 2024 Jaroslav Škarvada - 6.7-3 -- Switched to upstream patch - Related: rhbz#2328699 - -* Mon Dec 9 2024 Jaroslav Škarvada - 6.7-2 -- Resolves: rhbz#2328699 - -* Tue Oct 15 2024 Gwyn Ciesla - 6.7-1 -- 6.7 - -* Mon Aug 05 2024 Yaakov Selkowitz - 6.6-20 -- Use bcond consistently -- Disable java and ocaml bindings in RHEL - -* Wed Jul 17 2024 Fedora Release Engineering - 6.6-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Thu Jul 4 2024 Jaroslav Škarvada - 6.6-18 -- Dropped ucs-miscfixed-fonts requirement, xorg-x11-fonts-misc is enough - -* Wed Jun 19 2024 Richard W.M. Jones - 6.6-17 -- OCaml 5.2.0 ppc64le fix - -* Tue Jun 18 2024 Paolo Bonzini - 6.6-16 -- Remove unnecessary dependency from brlapi and brltty-docs to brltty - -* Fri Jun 07 2024 Python Maint - 6.6-15 -- Rebuilt for Python 3.13 - -* Wed May 29 2024 Richard W.M. Jones - 6.6-14 -- OCaml 5.2.0 for Fedora 41 - * Wed Jan 31 2024 Pete Walter - 6.6-13 - Rebuild for ICU 74 diff --git a/plans.fmf b/plans.fmf deleted file mode 100644 index d972d2f..0000000 --- a/plans.fmf +++ /dev/null @@ -1,5 +0,0 @@ -summary: Run all smoke tests -discover: - how: fmf -execute: - how: tmt diff --git a/sources b/sources index c63ce6d..e4631cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (brltty-6.8.tar.xz) = 08540cdf09eaa1caabd8400cb6e589f99f5f2b8aaaf8c031e5165e9b0605858e90dc9dd72f2095347f4860714214ecf184e3675422df880f1bf06bb4cc6f42ee +SHA512 (brltty-6.6.tar.xz) = 852bfd9179570be7b0da8b1279f84bdfedc14a319988d9c2eac5a20a9ce8977f31fdee167e8e96bb411184a1d72f4cdc633944c7b3f55bddae411fc71a9e6898 diff --git a/tests/main.fmf b/tests/main.fmf deleted file mode 100644 index 6189cf3..0000000 --- a/tests/main.fmf +++ /dev/null @@ -1,2 +0,0 @@ -summary: Smoke test -test: ./run_tests.sh diff --git a/tests/run_tests.sh b/tests/run_tests.sh deleted file mode 100644 index 9dd745a..0000000 --- a/tests/run_tests.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -pushd sanity-test || exit -./runtest.sh -popd || exit diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..b294380 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,17 @@ +- hosts: localhost + tags: + - classic + - container + roles: + - role: standard-test-beakerlib + tests: + - sanity-test + required_packages: + - ImageMagick + - Xvfb + - brltty + - nc + - orca + - psmisc + - xorg-x11-utils +