Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 739244 - net-misc/asterisk-16.12.0 automagically depends on media-libs/speex
Summary: net-misc/asterisk-16.12.0 automagically depends on media-libs/speex
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Jaco Kroon
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-08-27 11:27 UTC by Daniel M. Weeks
Modified: 2020-09-12 01:49 UTC (History)
1 user (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 Daniel M. Weeks 2020-08-27 11:27:19 UTC
Even with USE=-speex, asterisk will link against libspeex if it is present on the system.

>>> package: media-libs/speex-1.2.0-r1
 *  - /usr/lib64/libspeex.so.1
 *  - /usr/lib64/libspeex.so.1.5.1
 *      used by /usr/lib64/asterisk/modules/format_ogg_speex.so (net-misc/asterisk-16.12.0)

Reproducible: Always
Comment 1 Jaco Kroon 2020-08-27 17:12:21 UTC
Hi Daniel,

Does this happen with asterisk-13.X as well?

I'd expect the codec_ogg_speex.so to reference the encoder/decoder libraries, but format_ is an odd one as that generally merely describes the format of the codec, but it could be possible.  If this is the case (And I'll have to check the sources) a hard depend on speex may be required (I'd highly prefer to avoid that).

Kind Regards,
Jaco
Comment 2 Daniel M. Weeks 2020-08-27 17:47:57 UTC
(In reply to Jaco Kroon from comment #1)
> Does this happen with asterisk-13.X as well?

I have not tested 13.x.

> 
> I'd expect the codec_ogg_speex.so to reference the encoder/decoder
> libraries, but format_ is an odd one as that generally merely describes the
> format of the codec, but it could be possible.  If this is the case (And
> I'll have to check the sources) a hard depend on speex may be required (I'd
> highly prefer to avoid that).

I believe you just need this in the ebuild configuration:

_use_select speex format_ogg_speex

By the way you're also automagically depending on media-libs/libogg in the same way for both format_ogg_vorbis and format_ogg_speex. That will require a slightly larger fix as those modules need compound conditionals of useflags vorbis+ogg and speex+ogg.
Comment 3 Jaco Kroon 2020-08-27 18:12:52 UTC
(In reply to Daniel M. Weeks from comment #2)
> _use_select speex format_ogg_speex

Indeed.

> By the way you're also automagically depending on media-libs/libogg in the
> same way for both format_ogg_vorbis and format_ogg_speex. That will require
> a slightly larger fix as those modules need compound conditionals of
> useflags vorbis+ogg and speex+ogg.

You're correct, but libogg is required, but if both format_ogg_speex and format_ogg_vorbis is disabled it doesn't actually link libogg.  So this is a missing depend on media-libs/libogg in case of USE=speex || USE=vorbis, else the two format_ogg_{speex,vorbis} will end up not building anyway.

Could you please confirm that you're happy with this fix:

https://github.com/gentoo/gentoo/pull/17285
Comment 4 Daniel M. Weeks 2020-08-27 18:18:38 UTC
(In reply to Jaco Kroon from comment #3)
> (In reply to Daniel M. Weeks from comment #2)
> > _use_select speex format_ogg_speex
> 
> Indeed.
> 
> > By the way you're also automagically depending on media-libs/libogg in the
> > same way for both format_ogg_vorbis and format_ogg_speex. That will require
> > a slightly larger fix as those modules need compound conditionals of
> > useflags vorbis+ogg and speex+ogg.
> 
> You're correct, but libogg is required, but if both format_ogg_speex and
> format_ogg_vorbis is disabled it doesn't actually link libogg.  So this is a
> missing depend on media-libs/libogg in case of USE=speex || USE=vorbis, else
> the two format_ogg_{speex,vorbis} will end up not building anyway.
> 
> Could you please confirm that you're happy with this fix:
> 
> https://github.com/gentoo/gentoo/pull/17285

That looks good as long as there is no other dependency on libogg than these two cases. (I don't see one but you're the maintainer.)
Comment 5 Larry the Git Cow gentoo-dev 2020-09-12 01:49:48 UTC
The bug has been closed via the following commit(s):

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

commit 39cb6fe031cb10b8fbfbec9d33c4a4d50e57ae0b
Author:     Jaco Kroon <jaco@uls.co.za>
AuthorDate: 2020-08-27 17:55:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2020-09-12 01:49:43 +0000

    net-misc/asterisk: rbump to fix link against speex via format_ogg_speex
    
    libogg is used by format_ogg_{speex,vorbis} - missing depend.
    Tie format_ogg_speex to USE=speex.
    
    Signed-off-by: Jaco Kroon <jaco@uls.co.za>
    Closes: https://bugs.gentoo.org/739244
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{asterisk-13.35.0.ebuild => asterisk-13.35.0-r1.ebuild}        | 7 ++++++-
 .../{asterisk-16.12.0.ebuild => asterisk-16.12.0-r1.ebuild}        | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)