gregkh / bti

bash twitter ididocy
GNU General Public License v2.0
162 stars 31 forks source link

bti uses old pcre library #53

Open gregoa opened 2 years ago

gregoa commented 2 years ago

We have the following bug report in Debian: https://bugs.debian.org/1000121

Summary: bti uses the old pcre library which is supposed to be faded out in Debian as it's EOL. The maintainer suggests to port bti to the currently maintained pcre2 library.

Cheers, gregor

paulrho commented 2 years ago

I think this will be a fairly easy fix, I'm willing to do it, but won't be able to until ~ December 20. It might just require switching the libraries, but possibly a few minor code changes, e.g. https://php.watch/versions/7.3/pcre2

Paul S.

On Sat, Nov 20, 2021 at 9:26 AM gregor herrmann @.***> wrote:

We have the following bug report in Debian: https://bugs.debian.org/1000121

Summary: bti uses the old pcre library which is supposed to be faded out in Debian as it's EOL. The maintainer suggests to port bti to the currently maintained pcre2 library.

Cheers, gregor

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gregkh/bti/issues/53, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGGYEZCWLGQAFSSYHQ2OHTUM3MKDANCNFSM5ING5IVA .

gregoa commented 2 years ago

On Fri, 19 Nov 2021 16:22:47 -0800, paulrho wrote:

I think this will be a fairly easy fix, I'm willing to do it, but won't be able to until ~ December 20.

This sounds great, thank you.

It might just require switching the libraries, but possibly a few minor code changes, e.g. https://php.watch/versions/7.3/pcre2

Ack, for someone speaking C porting to PCRE2 is probably just switching a few functions.

Cheers, gregor

-- .''. https://info.comodo.priv.at -- Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06 . ' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe -

paulrho commented 2 years ago

I compiled using PCRE2 (and guessing some mapping) - simple test appears to work, just need:

Note, this is only used to pull out URLs and try to shrink them (e.g. bit.ly) - I don't normally use that function - so it will need to be tested.

paulrho commented 2 years ago

The two link shortening methods (only two allowed) - will no longer work, bit.ly has now moved on to v4:

"If you go to https://dev.bitly.com/index.html, there's a big notice stating 'API V3 will be deactivated on March 1, 2020. If you are currently using V3, migrate to V4 as soon as possible to avoid a breakdown of your integrations. See all the changes in our updated documentation for API V4.'"

My suggestion is, make the code work (as though the shortening service is going to work) - test with a stub - then put the original (non working shortening script) back.

paulrho commented 2 years ago

54 - simplest change to move from pcre to pcre2