Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 836672 - mail-mta/postfix: change libpcre dep?
Summary: mail-mta/postfix: change libpcre dep?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Eray Aslan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 837980
  Show dependency tree
 
Reported: 2022-04-03 04:34 UTC by Sam James
Modified: 2022-04-19 11:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-03 04:34:37 UTC
The ebuild currently has:
>|| ( dev-libs/libpcre2:0 dev-libs/libpcre )
and
># libpcre is EOL. prefer libpcre2
>if has_version dev-libs/libpcre2; then
>	mycc="-DHAS_PCRE=2"
>	AUXLIBS_PCRE="$(pcre2-config --libs8)"
>else
>	mycc="-DHAS_PCRE=1"
>	AUXLIBS_PCRE="$(pcre-config --libs)"
>fi

Unless Postfix has runtime detection (like using dlopen) - and the has_version block implies it doesn't, this won't work if the package manager decides to replace libpcre with libpcre2 or vice-versa, because it won't cause a rebuild of Postfix.

(... and libpcre & libpcre2 are not ABI compatible.)

I suggest just hard depending on libpcre2 given it's The Future.

Noticed when going over some libpcre deps and making sure they're still valid.
Comment 1 Eray Aslan gentoo-dev 2022-04-03 13:07:29 UTC
there is no runtime dependency in postfix for pcre and pcre2 and all bets are off if we change the ground under a running program. replacing libpcre with libocre2 seems like a really bad idea.

but in any case, I'll change the dependency to hard coded pcre2 in the next release
Comment 2 Eray Aslan gentoo-dev 2022-04-03 13:08:33 UTC
(In reply to Eray Aslan from comment #1)
> there is no runtime dependency in postfix for pcre and pcre2

s/dependency/detection/
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-03 13:42:46 UTC
(In reply to Eray Aslan from comment #1)
> there is no runtime dependency in postfix for pcre and pcre2 and all bets
> are off if we change the ground under a running program. replacing libpcre
> with libocre2 seems like a really bad idea.
> 

That's exactly my point. || () deps allow Portage to do that.

> but in any case, I'll change the dependency to hard coded pcre2 in the next
> release

Thanks!
Comment 4 Larry the Git Cow gentoo-dev 2022-04-04 07:01:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa931397545f0f3c8e8f81acab0e37ee66a170b0

commit fa931397545f0f3c8e8f81acab0e37ee66a170b0
Author:     Eray Aslan <eras@gentoo.org>
AuthorDate: 2022-04-04 06:58:57 +0000
Commit:     Eray Aslan <eras@gentoo.org>
CommitDate: 2022-04-04 06:59:33 +0000

    mail-mta/postfix: add 3.8_pre20220403, drop 3.8_pre20220325
    
    and hardcode libpcre2 dependency. libpcre is EOL
    
    Bug: https://bugs.gentoo.org/836672
    Signed-off-by: Eray Aslan <eras@gentoo.org>

 mail-mta/postfix/Manifest                                     |  2 +-
 ...-3.8_pre20220325.ebuild => postfix-3.8_pre20220403.ebuild} | 11 +++--------
 2 files changed, 4 insertions(+), 9 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2022-04-19 11:59:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec2bb8722a27808f87a32d0572d1a3176ee4029b

commit ec2bb8722a27808f87a32d0572d1a3176ee4029b
Author:     Eray Aslan <eras@gentoo.org>
AuthorDate: 2022-04-19 11:58:11 +0000
Commit:     Eray Aslan <eras@gentoo.org>
CommitDate: 2022-04-19 11:59:08 +0000

    mail-mta/postfix: add 3.7.1
    
    mark libpcre2 dependency as mandatory
    
    Closes: https://bugs.gentoo.org/836672
    Signed-off-by: Eray Aslan <eras@gentoo.org>

 mail-mta/postfix/Manifest             |   1 +
 mail-mta/postfix/postfix-3.7.1.ebuild | 289 ++++++++++++++++++++++++++++++++++
 2 files changed, 290 insertions(+)