diff -Nru dico-2.11/debian/changelog dico-2.11/debian/changelog --- dico-2.11/debian/changelog 2022-12-25 19:42:30.000000000 +0000 +++ dico-2.11/debian/changelog 2023-06-30 03:52:24.000000000 +0000 @@ -1,20 +1,21 @@ -dico (2.11-2build3) lunar; urgency=medium +dico (2.11-3) unstable; urgency=medium - * No-change rebuild with Python 3.11 as default + [ Debian Janitor ] + * Apply multi-arch hints. + dico-module-guile, dico-module-python, dico-module-wordnet: Add Multi-Arch: same. + Changes-By: apply-multiarch-hints + + [ أحمد المحمودي (Ahmed El-Mahmoudy) ] + * Switch to new PCRE2 library. + Add pcre2.diff patch (Closes: #1000086) + * d/control: + + Update build-dep: libgsasl7-dev -> libgsasl-dev + + Remove dependency on obsolete lsb-base + + Bumped standards version to 4.6.2 + * d/dicod.lintian-overrides: update strings + * d/dicod.lintian-overrides: use wildcard for postinst line # + * d/copyright: update copyright years - -- Graham Inggs Sun, 25 Dec 2022 19:42:30 +0000 - -dico (2.11-2build2) lunar; urgency=medium - - * No-change rebuild against libldap-2 - - -- Steve Langasek Thu, 15 Dec 2022 19:46:34 +0000 - -dico (2.11-2build1) kinetic; urgency=medium - - * No-change rebuild against libgsasl18 - - -- Steve Langasek Tue, 21 Jun 2022 21:27:06 +0000 + -- أحمد المحمودي (Ahmed El-Mahmoudy) Fri, 30 Jun 2023 05:52:24 +0200 dico (2.11-2) unstable; urgency=medium diff -Nru dico-2.11/debian/control dico-2.11/debian/control --- dico-2.11/debian/control 2022-06-21 21:27:06.000000000 +0000 +++ dico-2.11/debian/control 2023-06-30 03:52:24.000000000 +0000 @@ -1,33 +1,32 @@ Source: dico Section: text Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Ritesh Raj Sarraf +Maintainer: Ritesh Raj Sarraf Uploaders: أحمد المحمودي (Ahmed El-Mahmoudy) , Marc Dequènes (Duck) Build-Depends: debhelper-compat (= 13), dh-sequence-python3, guile-3.0-dev, - libgsasl7-dev, + libgsasl-dev, libldap2-dev, libltdl-dev, m4, python3-all-dev, python3-six, zlib1g-dev, - libpcre3-dev, + libpcre2-dev, libpam0g-dev, wordnet-dev, texinfo Rules-Requires-Root: no -Standards-Version: 4.6.0 +Standards-Version: 4.6.2 Homepage: https://puszcza.gnu.org.ua/software/dico/ Vcs-Git: https://salsa.debian.org/debian/dico.git Vcs-Browser: https://salsa.debian.org/debian/dico Package: dicod Architecture: any -Depends: m4, ${misc:Depends}, ${shlibs:Depends}, lsb-base (>= 3.0-6) +Depends: m4, ${misc:Depends}, ${shlibs:Depends} Pre-Depends: adduser, ${misc:Pre-Depends} Suggests: dico-doc, openbsd-inetd | inetutils-inetd Provides: dict-server @@ -109,6 +108,7 @@ Architecture: any Depends: dicod, ${misc:Depends}, ${shlibs:Depends} Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same Description: RFC 2229 compliant modular dictionary server (Guile module) GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. It is fully modular: the daemon itself (dicod) provides only the server @@ -123,6 +123,7 @@ Architecture: any Depends: dicod, ${misc:Depends}, ${shlibs:Depends} Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same Description: RFC 2229 compliant modular dictionary server (Python module) GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. It is fully modular: the daemon itself (dicod) provides only the server @@ -154,6 +155,7 @@ Architecture: any Depends: dicod, ${misc:Depends}, ${shlibs:Depends} Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same Description: RFC 2229 compliant modular dictionary server (WordNet module) GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. It is fully modular: the daemon itself (dicod) provides only the server diff -Nru dico-2.11/debian/copyright dico-2.11/debian/copyright --- dico-2.11/debian/copyright 2022-04-25 11:07:23.000000000 +0000 +++ dico-2.11/debian/copyright 2023-06-30 03:52:24.000000000 +0000 @@ -9,7 +9,7 @@ License: GPL-3+ Files: debian/* -Copyright: 2009-2010,2012-2015,2017-2020 أحمد المحمودي (Ahmed El-Mahmoudy) +Copyright: 2009-2010,2012-2015,2017-2020,2023 أحمد المحمودي (Ahmed El-Mahmoudy) License: GPL-3+ Files: libltdl/* diff -Nru dico-2.11/debian/dicod.lintian-overrides dico-2.11/debian/dicod.lintian-overrides --- dico-2.11/debian/dicod.lintian-overrides 2022-04-25 11:07:23.000000000 +0000 +++ dico-2.11/debian/dicod.lintian-overrides 2023-06-30 03:52:24.000000000 +0000 @@ -1,13 +1,13 @@ # /etc/init.d/dictd is just a symlink to /etc/init.d/dicod init script, and # that is to make the dict-* database packages work with dicod, so I don't want # to register /etc/init.d/dictd -dicod: script-in-etc-init.d-not-registered-via-update-rc.d etc/init.d/dictd -dicod: init.d-script-does-not-provide-itself etc/init.d/dictd +dicod: script-in-etc-init.d-not-registered-via-update-rc.d [etc/init.d/dictd] +dicod: init.d-script-does-not-provide-itself [etc/init.d/dictd] dicod: init-script-is-not-a-file [etc/init.d/dictd] # stratall.so doesn't use any symbol from libc: -dicod: library-not-linked-against-libc usr/lib/x86_64-linux-gnu/dico/stratall.so +dicod: library-not-linked-against-libc [usr/lib/x86_64-linux-gnu/dico/stratall.so] # dicod can be run as a daemon or via inetd # the script check for inetd's presence but do not depend on it -dicod: maintainer-script-needs-depends-on-update-inetd update-inetd (does not satisfy update-inetd | inet-superserver | openbsd-inetd | inetutils-inetd | rlinetd | xinetd) [postinst:19] +dicod: maintainer-script-needs-depends-on-update-inetd update-inetd (does not satisfy update-inetd | inet-superserver | openbsd-inetd | inetutils-inetd | rlinetd | xinetd) [postinst:*] diff -Nru dico-2.11/debian/patches/pcre2.diff dico-2.11/debian/patches/pcre2.diff --- dico-2.11/debian/patches/pcre2.diff 1970-01-01 00:00:00.000000000 +0000 +++ dico-2.11/debian/patches/pcre2.diff 2023-06-30 03:52:24.000000000 +0000 @@ -0,0 +1,235 @@ +Description: Switch tooo new PCRE2 +Bug-Debian: https://bugs.debian.org/1000086 +Bug: https://puszcza.gnu.org.ua/bugs/index.php?600 +Origin:https://git.gnu.org.ua/dico.git/patch/?id=ef0eb6cc0afc70b381ff +Index: dico/modules/pcre/Makefile.am +=================================================================== +--- dico.orig/modules/pcre/Makefile.am 2023-05-13 04:42:25.453598880 +0200 ++++ dico/modules/pcre/Makefile.am 2023-05-13 04:42:25.453598880 +0200 +@@ -19,7 +19,7 @@ + mod_LTLIBRARIES=pcre.la + + pcre_la_SOURCES = pcre.c +-pcre_la_LIBADD = ../../lib/libdico.la -lpcre ++pcre_la_LIBADD = ../../lib/libdico.la -lpcre2-8 + AM_LDFLAGS = -module -avoid-version -no-undefined + AM_CPPFLAGS = @DICO_MODULE_INCLUDES@ + EXTRA_DIST=module.ac +Index: dico/modules/pcre/module.ac +=================================================================== +--- dico.orig/modules/pcre/module.ac 2023-05-13 04:42:25.453598880 +0200 ++++ dico/modules/pcre/module.ac 2023-05-13 04:42:25.453598880 +0200 +@@ -27,9 +27,9 @@ + esac],[status_pcre=yes]) + + if test $status_pcre = yes; then +- AC_CHECK_HEADER([pcre.h], [], [status_pcre=no]) ++ AC_CHECK_HEADER([pcre2.h], [], [status_pcre=no], [#define PCRE2_CODE_UNIT_WIDTH 8]) + if test $status_pcre = yes; then +- DICO_CHECK_LIB(pcre, main, [], ++ DICO_CHECK_LIB(pcre2-8, main, [], + [:], + [status_pcre=no]) + fi +Index: dico/modules/pcre/pcre.c +=================================================================== +--- dico.orig/modules/pcre/pcre.c 2023-05-13 04:42:25.453598880 +0200 ++++ dico/modules/pcre/pcre.c 2023-05-13 04:42:25.453598880 +0200 +@@ -20,7 +20,8 @@ + #include + #include + #include +-#include ++#define PCRE2_CODE_UNIT_WIDTH 8 ++#include + + struct dico_pcre_flag + { +@@ -29,15 +30,15 @@ + }; + + static struct dico_pcre_flag flagtab[] = { +- { 'a', PCRE_ANCHORED }, /* Force pattern anchoring */ +- { 'e', PCRE_EXTENDED }, /* Ignore whitespace and # comments */ +- { 'i', PCRE_CASELESS }, /* Do caseless matching */ +- { 'G', PCRE_UNGREEDY }, /* Invert greediness of quantifiers */ ++ { 'a', PCRE2_ANCHORED }, /* Force pattern anchoring */ ++ { 'e', PCRE2_EXTENDED }, /* Ignore whitespace and # comments */ ++ { 'i', PCRE2_CASELESS }, /* Do caseless matching */ ++ { 'G', PCRE2_UNGREEDY }, /* Invert greediness of quantifiers */ + { 0 }, + }; + + static int +-pcre_flag(int c, int *pflags) ++pcre_flag(int c, uint32_t *pflags) + { + struct dico_pcre_flag *p; + +@@ -53,75 +54,103 @@ + return 1; + } + +-static pcre * ++static pcre2_code * + compile_pattern(const char *pattern) + { +- int cflags = PCRE_UTF8|PCRE_NEWLINE_ANY; +- const char *error; +- int error_offset; +- char *tmp = NULL; +- pcre *pre; ++ uint32_t cflags = PCRE2_UTF|PCRE2_NEWLINE_ANY; ++ int error; ++ PCRE2_SIZE length; ++ PCRE2_SIZE error_offset; ++ pcre2_code *pre; + ++ /* ++ * Pcre2 documentation claims that pattern length is measured in code ++ * points. This, however, doesn't seem to be the case. At least, with ++ * version 10.35, length is measured in characters. ++ */ ++ length = strlen(pattern); + if (pattern[0] == '/') { +- size_t len; +- char *p; ++ char *p; + +- pattern++; +- p = strrchr(pattern, '/'); +- if (!p) { +- dico_log(L_ERR, 0, _("PCRE missing terminating /: %s"), +- pattern - 1); +- return NULL; +- } +- len = p - pattern; +- +- while (*++p) { +- if (pcre_flag(*p, &cflags)) { +- dico_log(L_ERR, 0, _("PCRE error: invalid flag %c"), *p); +- return NULL; +- } +- } +- +- tmp = malloc(len + 1); +- if (!tmp) +- return NULL; +- memcpy(tmp, pattern, len); +- tmp[len] = 0; +- pattern = tmp; ++ pattern++; ++ length--; ++ p = strrchr(pattern, '/'); ++ if (!p) { ++ dico_log(L_ERR, 0, _("PCRE missing terminating /: %s"), ++ pattern - 1); ++ return NULL; ++ } ++ length -= strlen(p); ++ ++ while (*++p) { ++ if (pcre_flag(*p, &cflags)) { ++ dico_log(L_ERR, 0, _("PCRE error: invalid flag %c"), *p); ++ return NULL; ++ } ++ } + } +- pre = pcre_compile(pattern, cflags, &error, &error_offset, 0); ++ pre = pcre2_compile((PCRE2_SPTR8)pattern, length, cflags, &error, &error_offset, NULL); + if (!pre) { +- dico_log(L_ERR, 0, +- _("pcre_compile(\"%s\") failed at offset %d: %s"), +- pattern, error_offset, error); ++ char errbuf[120]; ++ ++ switch (pcre2_get_error_message(error, (PCRE2_UCHAR8*)errbuf, sizeof errbuf)) { ++ case PCRE2_ERROR_NOMEMORY: ++ default: ++ break; ++ case PCRE2_ERROR_BADDATA: ++ strncpy(errbuf, "bad error code", sizeof(errbuf)-1); ++ break; ++ } ++ dico_log(L_ERR, 0, ++ _("pcre_compile(\"%s\") failed at offset %lu: %s"), ++ pattern, error_offset, errbuf); + } +- free(tmp); + return pre; + } + ++struct pcre_call_data ++{ ++ pcre2_code *code; ++ pcre2_match_data *md; ++}; ++ + static int + pcre_sel(int cmd, dico_key_t key, const char *dict_word) + { + int rc = 0; + char const *word = key->word; +- pcre *pre = key->call_data; ++ struct pcre_call_data *cdata = key->call_data; + + switch (cmd) { + case DICO_SELECT_BEGIN: +- pre = compile_pattern(word); +- if (!pre) +- return 1; +- key->call_data = pre; +- break; ++ if ((cdata = calloc(1, sizeof(cdata[0]))) == NULL) { ++ DICO_LOG_MEMERR(); ++ return 1; ++ } ++ if ((cdata->code = compile_pattern(word)) == NULL) { ++ free(cdata); ++ return 1; ++ } ++ cdata->md = pcre2_match_data_create_from_pattern(cdata->code, NULL); ++ if (cdata->md == NULL) { ++ pcre2_code_free(cdata->code); ++ free(cdata); ++ return 1; ++ } ++ key->call_data = cdata; ++ break; + + case DICO_SELECT_RUN: +- rc = pcre_exec(pre, 0, dict_word, strlen(dict_word), 0, 0, +- NULL, 0) >= 0; +- break; +- ++ rc = pcre2_match(cdata->code, ++ (PCRE2_SPTR8)dict_word, PCRE2_ZERO_TERMINATED, ++ 0, 0, cdata->md, NULL) >= 0; ++ break; ++ + case DICO_SELECT_END: +- pcre_free(pre); +- break; ++ pcre2_match_data_free(cdata->md); ++ pcre2_code_free(cdata->code); ++ free(cdata); ++ break; + } + return rc; + } +Index: dico/configure.ac +=================================================================== +--- dico.orig/configure.ac 2023-05-13 03:54:50.000000000 +0200 ++++ dico/configure.ac 2023-05-13 04:57:38.041468520 +0200 +@@ -395,9 +395,9 @@ + esac],[status_pcre=yes]) + + if test $status_pcre = yes; then +- AC_CHECK_HEADER([pcre.h], [], [status_pcre=no]) ++ AC_CHECK_HEADER([pcre2.h], [], [status_pcre=no], [#define PCRE2_CODE_UNIT_WIDTH 8]) + if test $status_pcre = yes; then +- DICO_CHECK_LIB(pcre, main, [], ++ DICO_CHECK_LIB(pcre2-8, main, [], + [:], + [status_pcre=no]) + fi diff -Nru dico-2.11/debian/patches/series dico-2.11/debian/patches/series --- dico-2.11/debian/patches/series 2022-04-25 11:07:23.000000000 +0000 +++ dico-2.11/debian/patches/series 2023-06-30 03:52:24.000000000 +0000 @@ -1,3 +1,4 @@ dicoweb-debian.diff py3.diff use_system_ltdl.patch +pcre2.diff