Bug#999922: xneur: depends on obsolete pcre3 library

2024-05-05 Thread Sebastian Ramacher
Control: reopen -1

On 2024-04-25 00:50:36 +0200, Andreas Rönnquist wrote:
> 
> Hi! 
> 
> I intend to nmu xneur shortly, fixing the two RC bugs (#22,
> #1037902, which has been open 7 months and 2,5 years) using the fixes
> that have been posted to the bugs, to help the progress of the time_t
> transition. See the attached debdiff for the full list of changes.

The fixes were incomplete. xnconfig.pc also needs to point to libpcre2
instead of libpcre. Uploading a fix in a bit.

Cheers
-- 
Sebastian Ramacher



Processed: Re: Bug#999922: xneur: depends on obsolete pcre3 library

2024-05-05 Thread Debian Bug Tracking System
Processing control commands:

> reopen -1
Bug #22 {Done: Andreas Rönnquist } [src:xneur] xneur: 
depends on obsolete pcre3 library
'reopen' may be inappropriate when a bug has been closed with a version;
all fixed versions will be cleared, and you may need to re-add them.
Bug reopened
No longer marked as fixed in versions xneur/0.20.0-3.1.

-- 
22: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=22
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#1037902: Bug#999922: xneur: depends on obsolete pcre3 library

2024-04-24 Thread Andreas Rönnquist
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Hi! 

I intend to nmu xneur shortly, fixing the two RC bugs (#22,
#1037902, which has been open 7 months and 2,5 years) using the fixes
that have been posted to the bugs, to help the progress of the time_t
transition. See the attached debdiff for the full list of changes.

If you want me to hold, please let me know.

Thanks to Bastian Germann, Jonathan Bergh and Yavor Doganov for the fixes!

best
/Andreas Rönnquist
gus...@debian.org
-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEETq74h7WfgJdjc9ALCHsqoZ75O8IFAmYpjLwACgkQCHsqoZ75
O8IhWw/9GKdSRYKdXwUT/YA0GBLET0zrBpb46Y8VBjlSUiMooQO72yZEj6DcLfjc
fpr8ZiMBggsS93MGK825zUQhFCQpOFYBbMr5eRUKh8vD3slzP1FCgGZNFcnTZzJf
zTmdoFnAWG9qMY+VZ+6Wqe28pYzPrIKDCP9qKX3c0wiZpGhdGsrufqIKmymInltN
Pd1BtBBEBvXbpaJqpKrN3puoBo31sg2pWktIhxSxIAVokMkXFBAZuBg5l9bsVRKV
8EZ/1Hdml2HaCKaKTOCeRiH06jHBSE+17W+DuyHfuIvx9FM0ToZuuDWnUNrItImq
YhdUFEycES8NUrJtW0OGGCwMFSU1xjKFGsWiox/DUiua350pIEjoJB8Ic5vZ4F9e
U+W+sCFWOLQpNNzjqtS2RpSVezD1phdrJIYVMKCvmwRErTY2dy0IU/3HyS1E9pUr
DBGCagvUrmOnxerLrkwljHnWgX6FmbkMBcJcO2xQjOPZlDOToBB08Yvit9FOEcmP
qwzj4sgqe3DHU2rFftmDddthjBvRnXOExc8PdCFmgb3ZmX/hyG6ckKpxKmmoi8WY
ePKJBrryIqN9tW7vQaxiSa7VcxcR87QTe2HpL/nX/Ptljolx2QyAlv4fYyFBFlbo
yfrxy5kuRzrGA78glph6gB7xauhjP/fUMlrk1aFO+h/6hdlk1NY=
=27s+
-END PGP SIGNATURE-


xneur_nmu.debdiff
Description: Binary data


Bug#999922: xneur: depends on obsolete pcre3 library

2023-12-20 Thread Yavor Doganov
Control: tags -1 + patch

Please find attached a patch.
Description: Port to PCRE2.
Bug-Debian: https://bugs.debian.org/22
Author: Yavor Doganov ya...@gnu.org>
Forwarded: no
Last-Update: 2023-12-20
---

--- xneur.orig/configure.ac
+++ xneur/configure.ac
@@ -143,7 +143,7 @@
AC_DEFINE(WITH_DEBUG, 1, [Define if you want debug support])
 fi
 
-PKG_CHECK_MODULES(PCRE, [libpcre >= 5.0])
+PKG_CHECK_MODULES(PCRE, [libpcre2-8])
 
 AC_ARG_WITH(keylogger, [  --without-keyloggerCompile without keylogger 
function])
 if test "x$with_keylogger" != "xno"; then
--- xneur.orig/lib/misc/regexp.c
+++ xneur/lib/misc/regexp.c
@@ -21,7 +21,8 @@
 #  include "config.h"
 #endif
 
-#include 
+#define PCRE2_CODE_UNIT_WIDTH 8
+#include 
 
 #include 
 #include 
@@ -31,45 +32,58 @@
 
 int check_regexp_match(const char *str, const char *pattern)
 {
-   int options = PCRE_UTF8;
-   const char *error;
-   int erroffset;
+   pcre2_compile_context *ctxt;
+   uint32_t options = PCRE2_UTF;
+   int error;
+   PCRE2_SIZE erroffset;

//log_message(DEBUG, "Processing word '%s' against regular expression 
'%s'", str, pattern);

-   const unsigned char *tables = pcre_maketables();
-   pcre *re = pcre_compile(pattern, options, , , tables);
+   ctxt = pcre2_compile_context_create(NULL);
+   const uint8_t *tables = pcre2_maketables(NULL);
+   pcre2_set_character_tables(ctxt, tables);
+   pcre2_code *re = pcre2_compile((PCRE2_SPTR)pattern, strlen(pattern),
+  options, , , ctxt);
+   pcre2_maketables_free(NULL, tables);
+   pcre2_compile_context_free(ctxt);
if (!re)
{
log_message(ERROR, _("Can't compile regular expression '%s'"), 
pattern);
return FALSE;
}
 
-   int str_len = strlen(str);
+   PCRE2_SIZE str_len = strlen(str);
 
-   int ovector[50];
-   int count = pcre_exec(re, NULL, str, str_len, 0, 0, ovector, 50);
-   if (count <= 0 && count != PCRE_ERROR_NOMATCH)
+   pcre2_match_data *ovector;
+   ovector = pcre2_match_data_create(50, NULL);
+   int count = pcre2_match(re, (PCRE2_SPTR)str, str_len, 0, 0, ovector, 
NULL);
+   if (count <= 0 && count != PCRE2_ERROR_NOMATCH)
{
log_message(ERROR, _("Can't exec regular expression '%s', eror 
code %d"), pattern, count);
-   pcre_free(re);
-   pcre_free((void*)tables);
+   pcre2_code_free(re);
+   pcre2_match_data_free(ovector);
return FALSE;
}
 
-   pcre_free(re);
-   pcre_free((void*)tables);
+   pcre2_code_free(re);

-   if (count == PCRE_ERROR_NOMATCH)
+   if (count == PCRE2_ERROR_NOMATCH)
+   {
+   pcre2_match_data_free(ovector);
return FALSE;
+   }

-   const char *pcre_string = NULL;
-   if(pcre_get_substring(str, ovector, count, 0, _string) < 0)
+   PCRE2_UCHAR *pcre_string;
+   if(pcre2_substring_get_bynumber(ovector, 0, _string, _len) < 0)
+   {
+   pcre2_match_data_free(ovector);
return FALSE;
+   }
 
//log_message(TRACE, _("Match word '%s' and PERL pattern '%s'"), str, 
pattern);

-   pcre_free_substring(pcre_string);
+   pcre2_substring_free(pcre_string);
+   pcre2_match_data_free(ovector);

return TRUE;
 }


Processed: Re: Bug#999922: xneur: depends on obsolete pcre3 library

2023-12-20 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + patch
Bug #999922 [src:xneur] xneur: depends on obsolete pcre3 library
Added tag(s) patch.

-- 
22: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=22
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems