Bug 273970 - net/mpd5: fix linking from OpenSSL from ports
Summary: net/mpd5: fix linking from OpenSSL from ports
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Eugene Grosbein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-20 14:06 UTC by Ivan Rozhuk
Modified: 2023-10-26 07:24 UTC (History)
2 users (show)

See Also:
eugen: maintainer-feedback+


Attachments
patch (616 bytes, patch)
2023-09-20 14:06 UTC, Ivan Rozhuk
rozhuk.im: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2023-09-20 14:06:42 UTC
Created attachment 245060 [details]
patch
Comment 1 Eugene Grosbein freebsd_committer freebsd_triage 2023-09-20 14:18:34 UTC
You should not even try compiling/linking mpd5 with non-base ssl library because mpd5 links with libfetch that links with openssl from base system.

If you compile and link mpd5 with another ssl library so process image would have two of them in-memory once started, bad things may happen. Don't do that.
Comment 2 Eugene Grosbein freebsd_committer freebsd_triage 2023-09-20 14:24:53 UTC
In fact, the build system of mpd5 forces usage of base system SSL includes despite of presence of other *SSL packages. It does not use pkgconfig nor GNU configure, too.
Comment 3 Ivan Rozhuk 2023-09-20 14:30:21 UTC
(In reply to Eugene Grosbein from comment #1)

I see: USES=		cpe ssl
but not see where OpenSSL from base forced.

ports-mgmt/pkg uses OpenSSL from base and does not have USES=ssl in port Makefile.
Comment 4 Eugene Grosbein freebsd_committer freebsd_triage 2023-09-20 14:43:28 UTC
(In reply to Ivan Rozhuk from comment #3)

It is forced within mpd5 own Makefile. I guess I should remove ssl from USES for mpd5 as USES=ssl handles dependencies on *ssl ports. So, it is not for mpd5.
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-09-20 15:16:23 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=87e2681289fc1eb5fda22e4072aca1e7943af25e

commit 87e2681289fc1eb5fda22e4072aca1e7943af25e
Author:     Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2023-09-20 15:13:30 +0000
Commit:     Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2023-09-20 15:13:30 +0000

    net/mpd5: remove USES=ssl

    mpd5 forces usage of base system crypto libraries
    despite of presence of other *SSL libraries, so USES=ssl is wrong here.
    The change does not affect build, so PORTREVISION not bumped.

    PR:             273970

 net/mpd5/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 6 Franco Fichtner 2023-10-26 07:24:12 UTC
Hi,

While the commit states "The change does not affect build, so PORTREVISION not bumped." it does affect runtime with pkg-upgrade and openssl/openssl111 port shift resulting in a spurious conflict:

openssl111-1.1.1w conflicts with openssl-1.1.1w,1 on /usr/local/bin/c_rehash
Cannot solve problem using SAT solver, trying another plan

You can read more about the observed pkg-upgrade behaviour here:

https://github.com/opnsense/core/issues/6959

The obvious fix for us was to issue a revision bump.  It would probably be safer to have it in the FreBSD ports too since otherwise this may lead pkg-upgrade into the conflict state and it can't resolve it automatically.


Cheers,
Franco