Bug 267185 - devel/git: make PCRE2 default and remove OPTION
Summary: devel/git: make PCRE2 default and remove OPTION
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Renato Botelho
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2022-10-18 20:04 UTC by Michael Osipov
Modified: 2022-10-20 11:05 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (garga)


Attachments
Patch against /usr/ports (main) (1.70 KB, patch)
2022-10-19 13:59 UTC, Michael Osipov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2022-10-18 20:04:56 UTC
PCRE(1) has been deprecated for quite some time now and superseded by PCRE2. All users are advised to switch to it.

http://pcre.org/ says:
======================
There are two major versions of the PCRE library. The current version, PCRE2, released in 2015, is now at version 10.39.

The older, but still widely deployed PCRE library, originally released in 1997, is at version 8.45. This version of PCRE is now at end of life, and is no longer being actively maintained. Version 8.45 is expected to be the final release of the older PCRE library, and new projects should use PCRE2 instead.
======================

Since Git does support PCRE2 there is no reason to stick to the old one anymore after seven years after its inception.

Proposal: Remove the port option altogether and always depend on PCRE2 port
Comment 1 Michael Osipov 2022-10-19 06:39:15 UTC
I can provide a patch, if wanted/required.
Comment 2 Renato Botelho freebsd_committer freebsd_triage 2022-10-19 12:05:53 UTC
(In reply to Michael Osipov from comment #1)
Do not worry.  I can take care of it.

Thanks!
Comment 3 Michael Osipov 2022-10-19 13:59:26 UTC
Created attachment 237458 [details]
Patch against /usr/ports (main)

Here is a patch I did today in the morning. Ran with poudriere:
============
=>> Checking shared library dependencies
 0x0000000000000001 NEEDED               Shared library: [libc.so.7]
 0x0000000000000001 NEEDED               Shared library: [libcrypto.so.111]
 0x0000000000000001 NEEDED               Shared library: [libcurl.so.4]
 0x0000000000000001 NEEDED               Shared library: [libexpat.so.1]
 0x0000000000000001 NEEDED               Shared library: [libintl.so.8]
 0x0000000000000001 NEEDED               Shared library: [libpcre2-8.so.0]
 0x0000000000000001 NEEDED               Shared library: [libssl.so.111]
 0x0000000000000001 NEEDED               Shared library: [libthr.so.3]
 0x0000000000000001 NEEDED               Shared library: [libz.so.6]

nobody@123-release-amd64-default-head:/usr/ports/devel/git % ldd /usr/local/bin/git
/usr/local/bin/git:
        libpcre2-8.so.0 => /usr/local/lib/libpcre2-8.so.0 (0x80057a000)
        libz.so.6 => /lib/libz.so.6 (0x80063b000)
        libintl.so.8 => /usr/local/lib/libintl.so.8 (0x800657000)
        libthr.so.3 => /lib/libthr.so.3 (0x800666000)
        libc.so.7 => /lib/libc.so.7 (0x800693000)

Also all executables in /usr/local/libexec/git-core properly link with pcre2:
git-remote:
        libpcre2-8.so.0 => /usr/local/lib/libpcre2-8.so.0 (0x80057a000)
===================
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-10-19 15:41:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0b7192bd7c4f8e4c05e0a9cefcae347606ebadd1

commit 0b7192bd7c4f8e4c05e0a9cefcae347606ebadd1
Author:     Michael Osipov <michael.osipov@siemens.com>
AuthorDate: 2022-10-19 15:35:10 +0000
Commit:     Renato Botelho <garga@FreeBSD.org>
CommitDate: 2022-10-19 15:40:09 +0000

    devel/git: Make PCRE2 dependency mandatory

    According to project website, pcre 8.45 was the latest version of old
    pcre, which is now deprecated, and it must be replaced by pcre2.

    Remove OPTION and change port to depend of pcre2.

    PR:             267185

 devel/git/Makefile | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
Comment 5 Michael Osipov 2022-10-19 19:45:17 UTC
Muito obrigado!
Comment 6 Renato Botelho freebsd_committer freebsd_triage 2022-10-19 19:51:24 UTC
(In reply to Michael Osipov from comment #5)
Actually I reverted this change.  As pointed out by jbeich@, it's not necessary.

Old PCRE support was removed already, PCRE2 OPTION is present because git can be built without any PCRE support.
Comment 7 Michael Osipov 2022-10-20 11:05:07 UTC
(In reply to Renato Botelho from comment #6)

This is fine as well!