Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regexp: drop obsolete pcre3 and port regexp usage to pcre2 #3824

Merged
merged 3 commits into from
Mar 3, 2024

Conversation

davvid
Copy link
Contributor

@davvid davvid commented Feb 10, 2024

pcre3 is deprecated and was replaced by pcre2. This fixes the issue that caused zoneminder to be dropped from Debian/testing.

A flavor of this patch has already been submitted to Debian: https://salsa.debian.org/debian/zoneminder/-/merge_requests/2

Related-to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=999919

@connortechnology
Copy link
Member

Are there not actual api differences that have not been addressed?

We actually don't need a pcre library. It is used in the old remote monitor code and without it we do our own parsing of http headers etc.

So my question is, do we compiled with pcre2? If not, we will need those commits as well. Or perhaps we should simply remove the code entirely.

@davvid
Copy link
Contributor Author

davvid commented Feb 12, 2024

Everything compiled with libpcre2 installed but I didn't check whether it's actually being used, and relatedly, whether it's just compiling the same way as it would if pcre were not installed at all and using the fallback code.

I'll take a closer look to see if it's actually getting used and if not get it enabled and port the code. I didn't realize that there's a chance it could be falling back to builtin code.

Thanks for the heads-up that this code could possibly be removed. If you have a preference for doing it that way I can do that instead, but I'll take a stab at porting it first unless I hear otherwise.

@davvid
Copy link
Contributor Author

davvid commented Feb 14, 2024

I've pushed an update that ports the code over to pcre2.

Here are some links that I used as reference:

Please test this thoroughly before merging as I don't have an easy way to test this out locally. I can confirm that it all compiles and links, though.

@davvid davvid changed the title debian/control: drop dependency on pcre3 regexp: drop obsolete pcre3 and port regexp usage to pcre2 Feb 14, 2024
pcre3 is deprecated and was replaced by pcre2. This fixes the issue
that caused zoneminder to be dropped from Debian/testing.

A flavor of this patch has already been submitted to Debian:
https://salsa.debian.org/debian/zoneminder/-/merge_requests/2

Related-to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=999919
Update pcre usage to be compatible with pcre2.
@connortechnology connortechnology merged commit dbff17e into ZoneMinder:master Mar 3, 2024
15 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants