ganeti / ganeti

Ganeti is a virtual machine cluster management tool built on top of existing virtualization technologies such as Xen or KVM and other open source software.
http://www.ganeti.org
BSD 2-Clause "Simplified" License
480 stars 106 forks source link

Haskell package regex-pcre: update it or find alternative #1744

Open thielema opened 1 month ago

thielema commented 1 month ago

The package libghc-regex-pcre-dev is gone in Debian Trixie. [1] It depends on the C library libpcre3, which is abondened. [2] A possible successor to this library is PCRE2. The question is, whether to switch to a different Haskell regex library or update regex-pcre to PCRE2. There has been work done for the second path, but there seems to be a blocking memory corruption bug. [3,4]

[1] https://tracker.debian.org/news/1495182/haskell-regex-pcre-removed-from-testing/ [2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000067 [3] https://github.com/haskell-hvr/regex-pcre/issues/1 [4] https://github.com/sjshuck/hs-pcre2/issues/34

rbott commented 2 weeks ago

How about the alternatives listed here:

https://wiki.haskell.org/Regular_expressions

I am not very involved with Haskell so this might me nonsense :-)

saschalucas commented 2 weeks ago

More context can be found here https://github.com/ganeti/ganeti/blob/ceff246e30547d6a10eef27a2d91edce24f05d3e/NEWS?plain=1#L1223-L1224 Seems like a feature I didn't know before: https://github.com/ganeti/ganeti/blob/ceff246e30547d6a10eef27a2d91edce24f05d3e/man/gnt-filter.rst Does anybody use this?

Maybe a third option would be, to remove this feature?

rbott commented 2 weeks ago

The man page sounds a bit like it's required for cluster operation, but maybe that's just ambiguous wording:

Filter rules are used by the Ganeti job scheduler to determine which jobs should be accepted, rejected, paused or rate-limited.

The rest of the man page sounds more like it's an optional feature which helps with cluster (more specific: job maintenance).

I'll look into this a bit more later.

thielema commented 1 week ago

On Tue, 2 Jul 2024, Rudolph Bott wrote:

How about the alternatives listed here:

https://wiki.haskell.org/Regular_expressions

Looks like a good overview. I think we must answer the question, whether we want Perl or POSIX regular expressions. It seems that POSIX has better support for Haskell-only implementations. A Haskell-only implementation is less prone to memory corruption bugs or interfacing issues to external libraries. I do not know how many people rely on Perl regexes in existing installations, though.

It seems the last substantial update to that Wiki page was in 2014. There may be newer regex libraries. I do not use regexes myself in Haskell, because it is easier and more flexible and more comprehensible to write 'parsec' parsers in Haskell. More research might reveal newer and better alternatives.