From e0a55a24366a25dbc91aaa2188ec20fb913c26a2be4a29949e7703dd3590a7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Sat, 2 Nov 2024 22:40:44 +0100 Subject: [PATCH 1/2] Update to 1.13.2 - Included changes: - Remove config.{sub,guess} - Update version to 1.13.2 - Rename configure.in to configure.ac - dictP.h: remove #include - configure.in: fix obsolete code - Fix compilation issues with gcc-14 - Update configure script and the like (autoconf-2.72) - Remove upstreamed patch gcc-14.patch - Add index-buf-ovrflw.patch to overcome a buffer overflow (courtesy of the upstream author) --- .gitignore | 1 + _service.NO | 16 ++++++++++++++++ _servicedata | 4 ++++ dictd-1.13.1.tar.gz | 3 --- dictd-1.13.2.tar.gz | 3 +++ dictd.changes | 29 +++++++++++++++++++++++++++++ dictd.obsinfo | 7 +++---- dictd.spec | 32 +++++++++++++++++++++++++------- index-buf-ovrflw.patch | 22 ++++++++++++++++++++++ 9 files changed, 103 insertions(+), 14 deletions(-) create mode 100644 _service.NO create mode 100644 _servicedata delete mode 100644 dictd-1.13.1.tar.gz create mode 100644 dictd-1.13.2.tar.gz create mode 100644 index-buf-ovrflw.patch diff --git a/.gitignore b/.gitignore index 57affb6..211a014 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .osc +dictd*/ diff --git a/_service.NO b/_service.NO new file mode 100644 index 0000000..6fe96ff --- /dev/null +++ b/_service.NO @@ -0,0 +1,16 @@ + + + git + https://github.com/cheusov/dictd.git + 1.13.1+git + dictd-1.13 + enable + mcepl@cepl.eu + + + + *.tar + gz + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..0740537 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/cheusov/dictd.git + cccab00fe9eea071f35474c0f7d1c95daa5eeb22 \ No newline at end of file diff --git a/dictd-1.13.1.tar.gz b/dictd-1.13.1.tar.gz deleted file mode 100644 index 9936e29..0000000 --- a/dictd-1.13.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a00bfa802354217d355bef2846b69bf81628af9a137651da74a8366ef55ecc16 -size 338581 diff --git a/dictd-1.13.2.tar.gz b/dictd-1.13.2.tar.gz new file mode 100644 index 0000000..b1e0b32 --- /dev/null +++ b/dictd-1.13.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf4e2fba0127098968b4b9163c76bd3c44c3f395d541afcb8339fb71b1f8f6f3 +size 317290 diff --git a/dictd.changes b/dictd.changes index 09b8b47..6c891df 100644 --- a/dictd.changes +++ b/dictd.changes @@ -1,3 +1,32 @@ +------------------------------------------------------------------- +Fri Nov 15 12:58:53 UTC 2024 - Matej Cepl + +- Update to 1.13.2: + - Remove config.{sub,guess} + - Update version to 1.13.2 + - Rename configure.in to configure.ac + - dictP.h: remove #include + - configure.in: fix obsolete code + - Fix compilation issues with gcc-14 + - Update configure script and the like (autoconf-2.72) +- Remove upstreamed patches: + - gcc-14.patch +- Add index-buf-ovrflw.patch to fix a buffer overflow in index.c + (courtesy of the upstream author). + +------------------------------------------------------------------- +Sat Nov 02 21:08:57 UTC 2024 - mcepl@cepl.eu + +- Update to version 1.13.1+git.1730572217.cccab00: + * dictd: listen to ipv6 and ipv4 by default + * remove use of deprecated inet_aton and inet_ntoa + * dictd: install dictd*.conf files to ${DATADIR}/examples/dictd by default + * Fix problems with DICT_CONFIG_PATH and other defined came from Makefile + * dict/Makefile: do not copy man page to ${BINDIR} :-) + * dict/Makefile: formatting + * dict: install samples dict.conf and dict2.conf to ${EGDIR} + * Move examples/dict1.conf to dict/ + ------------------------------------------------------------------- Thu Mar 7 18:18:01 UTC 2024 - Matej Cepl diff --git a/dictd.obsinfo b/dictd.obsinfo index 181e1f8..8eac90e 100644 --- a/dictd.obsinfo +++ b/dictd.obsinfo @@ -1,5 +1,4 @@ name: dictd -version: 1.12.1.git.1520674574.9a2f53e -mtime: 1520674574 -commit: 9a2f53ec26ec7eb1880437f1cafae6291634c98d - +version: 1.13.1+git.1730572217.cccab00 +mtime: 1730572217 +commit: cccab00fe9eea071f35474c0f7d1c95daa5eeb22 diff --git a/dictd.spec b/dictd.spec index 127751e..44f1460 100644 --- a/dictd.spec +++ b/dictd.spec @@ -17,7 +17,7 @@ Name: dictd -Version: 1.13.1 +Version: 1.13.2 Release: 0 Summary: DICT protocol (RFC 2229) server and command-line client License: BSD-3-Clause AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND MIT AND SUSE-Public-Domain @@ -28,11 +28,16 @@ Source1: colorit.conf Source2: dictd.service Source99: dictd-rpmlintrc Patch0: dictd-1.12.1-unused-return.patch +# PATCH-FIX-UPSTREAM index-buf-ovrflw.patch mcepl@suse.com +# A buffer overflow +Patch1: index-buf-ovrflw.patch +# BuildRequires: mk-configure BuildRequires: autoconf BuildRequires: bison BuildRequires: flex BuildRequires: gawk BuildRequires: gcc +BuildRequires: judy-devel BuildRequires: libdbi-devel BuildRequires: libmaa-devel BuildRequires: libtool @@ -52,12 +57,6 @@ set up a custom dictionary. To look up, for example, the word "grunt", execute `dict grunt` at a command line. See the man pages of dict and dictd for details. -%prep -%setup -q -%autopatch -p1 - -autoreconf -fv - %package devel Summary: Development files for dictd Group: Development/Languages/C and C++ @@ -73,14 +72,30 @@ dictd for details. This package contains development files for the dictd package. +%prep +%autosetup -p1 + +autoreconf --force --install --verbose + %build export LDFLAGS="%{?__global_ldflags}" CPPFLAGS="%{optflags} -fPIC" +# export USE_PLUGIN=1 +# export PREFIX="%%{_prefix}" +# export MANDIR="%%{_mandir}" +# export SYSCONFDIR="%%{_sysconfdir}" +# export CC="%%{__cc}" +# export DESTDIR="%%{buildroot}" +# export COPTS="%%{optflags} -fPIC" +# mkc_compiler_settings +# mkcmake all +export LEXLIB="-fl" %configure --enable-dictorg --with-plugin-dbi # --disable-plugin %make_build %install %make_install +# mkcmake install install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/colorit.conf cat <%{buildroot}/%{_sysconfdir}/dictd.conf global { @@ -110,6 +125,9 @@ if [ "x%{_libdir}" != "x%{_libexecdir}" ] ; then fi rm -fv %{buildroot}%{_libdir}/*.{la,a} +%check +%make_build test + %pre %service_add_pre dictd.service diff --git a/index-buf-ovrflw.patch b/index-buf-ovrflw.patch new file mode 100644 index 0000000..26b055e --- /dev/null +++ b/index-buf-ovrflw.patch @@ -0,0 +1,22 @@ +diff --git a/index.c b/index.c +index ced1459..883a12d 100644 +--- a/index.c ++++ b/index.c +@@ -1505,7 +1505,7 @@ static int dict_search_suffix( + assert (database); + + if (database->index_suffix){ +- buf = (char *) alloca (strlen (word)); ++ buf = (char *) alloca (strlen (word) + 1); + strcpy (buf, word); + + PRINTF(DBG_SEARCH, ("anagram: '%s' ==> ", buf)); +@@ -1549,7 +1549,7 @@ static int dict_search_last ( + assert (database); + + if (database->index_suffix){ +- buf = (char *) alloca (strlen (word)); ++ buf = (char *) alloca (strlen (word) + 1); + strcpy (buf, word); + + PRINTF(DBG_SEARCH, ("anagram: '%s' ==> ", buf)); From f2921cc646ba6e2e5119e1085f9d3eda9efe6a618d794b7bfe6b9f5610298559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Mon, 18 Nov 2024 12:10:58 +0100 Subject: [PATCH 2/2] Update to 1.13.3: - dictd: fix buffer overflow in first/last search strategies. --- dictd-1.13.2.tar.gz | 3 --- dictd-1.13.3.tar.gz | 3 +++ dictd.changes | 7 +++++++ dictd.spec | 11 +++-------- index-buf-ovrflw.patch | 22 ---------------------- 5 files changed, 13 insertions(+), 33 deletions(-) delete mode 100644 dictd-1.13.2.tar.gz create mode 100644 dictd-1.13.3.tar.gz delete mode 100644 index-buf-ovrflw.patch diff --git a/dictd-1.13.2.tar.gz b/dictd-1.13.2.tar.gz deleted file mode 100644 index b1e0b32..0000000 --- a/dictd-1.13.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf4e2fba0127098968b4b9163c76bd3c44c3f395d541afcb8339fb71b1f8f6f3 -size 317290 diff --git a/dictd-1.13.3.tar.gz b/dictd-1.13.3.tar.gz new file mode 100644 index 0000000..7deec31 --- /dev/null +++ b/dictd-1.13.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:192129dfb38fa723f48a9586c79c5198fc4904fec1757176917314dd073f1171 +size 390047 diff --git a/dictd.changes b/dictd.changes index 6c891df..aee65ff 100644 --- a/dictd.changes +++ b/dictd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Nov 18 11:00:22 UTC 2024 - Matej Cepl + +- Update to 1.13.3: + - dictd: fix buffer overflow in first/last search strategies. +- Remove upstreamed index-buf-ovrflw.patch. + ------------------------------------------------------------------- Fri Nov 15 12:58:53 UTC 2024 - Matej Cepl diff --git a/dictd.spec b/dictd.spec index 44f1460..0581975 100644 --- a/dictd.spec +++ b/dictd.spec @@ -17,22 +17,19 @@ Name: dictd -Version: 1.13.2 +Version: 1.13.3 Release: 0 Summary: DICT protocol (RFC 2229) server and command-line client License: BSD-3-Clause AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND MIT AND SUSE-Public-Domain Group: Productivity/Office/Dictionary URL: https://github.com/cheusov/dictd -Source0: https://github.com/cheusov/dictd/archive/%{version}.tar.gz#/dictd-%{version}.tar.gz +# Source0: https://github.com/cheusov/dictd/archive/%%{version}.tar.gz#/dictd-%%{version}.tar.gz +Source0: https://sourceforge.net/projects/dict/files/dictd/dictd-%{version}/dictd-%{version}.tar.gz Source1: colorit.conf Source2: dictd.service Source99: dictd-rpmlintrc Patch0: dictd-1.12.1-unused-return.patch -# PATCH-FIX-UPSTREAM index-buf-ovrflw.patch mcepl@suse.com -# A buffer overflow -Patch1: index-buf-ovrflw.patch # BuildRequires: mk-configure -BuildRequires: autoconf BuildRequires: bison BuildRequires: flex BuildRequires: gawk @@ -75,8 +72,6 @@ This package contains development files for the dictd package. %prep %autosetup -p1 -autoreconf --force --install --verbose - %build export LDFLAGS="%{?__global_ldflags}" CPPFLAGS="%{optflags} -fPIC" # export USE_PLUGIN=1 diff --git a/index-buf-ovrflw.patch b/index-buf-ovrflw.patch deleted file mode 100644 index 26b055e..0000000 --- a/index-buf-ovrflw.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/index.c b/index.c -index ced1459..883a12d 100644 ---- a/index.c -+++ b/index.c -@@ -1505,7 +1505,7 @@ static int dict_search_suffix( - assert (database); - - if (database->index_suffix){ -- buf = (char *) alloca (strlen (word)); -+ buf = (char *) alloca (strlen (word) + 1); - strcpy (buf, word); - - PRINTF(DBG_SEARCH, ("anagram: '%s' ==> ", buf)); -@@ -1549,7 +1549,7 @@ static int dict_search_last ( - assert (database); - - if (database->index_suffix){ -- buf = (char *) alloca (strlen (word)); -+ buf = (char *) alloca (strlen (word) + 1); - strcpy (buf, word); - - PRINTF(DBG_SEARCH, ("anagram: '%s' ==> ", buf));