Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Submit pulseaudio-modules-bt to Fedora/RPMFusion #20

Closed
gombosg opened this issue Dec 6, 2018 · 86 comments
Closed

Submit pulseaudio-modules-bt to Fedora/RPMFusion #20

gombosg opened this issue Dec 6, 2018 · 86 comments
Assignees

Comments

@gombosg
Copy link

gombosg commented Dec 6, 2018

Hi, I created this COPR (user) repo for the package:
https://copr.fedorainfracloud.org/coprs/gombosg/pulseaudio-modules-bt-aptx/

I repackaged the original Fedora Pulseaudio source with your patches. It works for me™, hopefully people can test it this way. Please add it to the wiki.

@EHfive
Copy link
Owner

EHfive commented Dec 6, 2018

Add libldac please.
https://github.com/EHfive/ldacBT

Also patch https://github.com/EHfive/pulseaudio-modules-bt/releases/tag/patch_v3
for AAC support. (If didn't)

@EHfive
Copy link
Owner

EHfive commented Dec 6, 2018

https://github.com/EHfive/pulseaudio-modules-bt/wiki/Packages/2422a6518a0598f073c1d756794da070ae1a4469

wiki updated

next time just mail me ( eh5 at sokka.cn )

@EHfive EHfive closed this as completed Dec 6, 2018
@gombosg
Copy link
Author

gombosg commented Dec 6, 2018

Thanks, I'll update to patch 3 & integrate libldac.

@gombosg
Copy link
Author

gombosg commented Dec 18, 2018

I updated it, please test Fedora users: https://copr.fedorainfracloud.org/coprs/gombosg/pulseaudio-modules-bt-aptx/

@inffy
Copy link

inffy commented Jan 22, 2019

@gombosg seems this copr repo has been removed. It worked fine this morning when I installed. Did something happen?

@gombosg
Copy link
Author

gombosg commented Jan 22, 2019

Yes, I just got mail today:

Hi,

Unfortunately, I had to delete your gombosg/pulseaudio-modules-bt-aptx
copr. It contains packages which cannot be distributed by Fedora due to
legal concerns.

Please remember that legally encumbered items may not be included in
either Fedora or Coprs.

Thanks,

Tom Callaway
Fedora Legal

I was suspecting that this might happen one day. I love Fedora but f*ck them for censoring COPR repos.

What now...? Maybe submitting the package to RPMFusion? (Does anyone know an RPMFusion packager to get this sponsored...) Waiting till it gets merged into PulseAudio?

Sources are here:
https://pagure.io/libldac
https://pagure.io/pulseaudio-module-bluetooth-aptx

@inffy
Copy link

inffy commented Jan 23, 2019

I guess RPMFusion would be the best bet, or some other repo. I have no clue how to submit packages/get packages to rpmfusion though or if there would be other "public" repos that would take it.

Shame really, just got my F29 set up the way i like it with this, never could get this to work with my manjaro install.

@inffy
Copy link

inffy commented Jan 23, 2019

@gombosg i found this from rpmfusion: https://rpmfusion.org/Contributors#Submitting_a_new_package

or you can ask in #rpmfusion channel in irc.freenode.net

@gombosg
Copy link
Author

gombosg commented Jan 23, 2019

Thanks!
[EDIT: see my latest comment for latest RPMs]

@gombosg
Copy link
Author

gombosg commented Jan 24, 2019

@EHfive What is the status for merging into upstream? If not expected, I'll post to RPMFusion since getting kicked out from the Fedora COPR repo.

@inffy
Copy link

inffy commented Jan 24, 2019

@gombosg thanks for the rpm, but it can't be installed because no libldac can be found (as its not in any repo)

@EHfive
Copy link
Owner

EHfive commented Jan 25, 2019

@EHfive What is the status for merging into upstream? If not expected, I'll post to RPMFusion since getting kicked out from the Fedora COPR repo.

Currently it won't be merged.

@gombosg
Copy link
Author

gombosg commented Jan 25, 2019

@inffy I added it to my comment above... seems that going to RPMFusion is the way currently. I'll look into it in the upcoming days.

@mumrau
Copy link

mumrau commented Feb 7, 2019

Maybe we could re-open the issue until a user-friendly (i.e repository) solution is found and added into the wiki? So people can subscribe to it and get a decent overview on the RPM situation.

@inffy
Copy link

inffy commented Feb 7, 2019

No need. It's not hard to install two rpm files.

@mumrau
Copy link

mumrau commented Feb 7, 2019

But they won't be kept up to date eventually.
Plus for some users, yes it is, you even need to search the issue, the doc doesn't state it (probably because it isn't the intended way to serve the packages in the (near) future).

@gombosg
Copy link
Author

gombosg commented Feb 7, 2019

Hi guys, I have submitted libldac to Fedora and the aptx module to RPMFusion. They will find their home there... review just takes time. :)

EDIT: it's live!

The RPMFusion build doesn't support the AAC codec due to licensing restrictions. Please build your own if you need AAC support.
Enable the RPMFusion (free) repository.
Then install the package and restart Pulseaudio:

sudo dnf install pulseaudio-module-bluetooth-freeworld --allowerasing
pulseaudio -k

@davidlt
Copy link

davidlt commented Feb 11, 2019

Just discovered this package a day ago. I am happy to help with any SPEC/RPM related questions/issues. Looks like libldac is stuck on FE-Legal, but comments are positive here.

There is a comment regarding "fdk-aac" package, which basically means that this targets nonfree repo in RPMFusion.

Nice work!

@gombosg
Copy link
Author

gombosg commented Feb 11, 2019

@davidlt Thanks, the package would be approved soon, they just need to lift the FE-LEGAL bug.
Are you a Fedora packager yourself? I could use some guidance getting into reviewing packages. :)

@davidlt
Copy link

davidlt commented Feb 12, 2019

@gombosg I am not a packager, but I maintain RISC-V 64-bit Fedora port thus I can help with technical bits.

Btw, people are writing about the project and your work:

@Sesivany
Copy link

Hi guys, I have submitted libldac to Fedora and the aptx module to RPMFusion. They will find their home there... review just takes time. :)

In the meantime you can indeed install the RPMs directly.

Can't it be package the way that it could get into Fedora and at least enable LDAC there and then it could be extended by some package from RPMFusion with support for AptX, AptX-HD etc.? It's a pity to rely on RPMFusion even for LDAC if it's accepted in Fedora.

@gombosg
Copy link
Author

gombosg commented Feb 12, 2019

@Sesivany Would be great but according to the Fedora legal & packaging guidelines:

  • Patent-encumbered stuff is not allowed (ffmpeg)
  • All build dependencies must be within the Fedora repos

I'm just the packager, @EHfive can tell whether it's possible to create or build the package without ffmpeg and AAC present, with only LDAC. (I guess that version won't have aptX and AAC support even if the codec packages are installed.)

It's not impossible but not sure either. Essentially it wouldn't be a new package then, just a patch to be applied against the Fedora version of PA and a PR could be submitted here.

In RPMFusion we already started the discussion and it will simply be a pulseaudio-module-bluetooth-nonfree package replacing the original, that would contain all codecs.

Edit: to sum up, if libldac gets into the Fedora repos and it's possible to convert the project into a patch with LDAC only, then I will submit a PR to the Fedora version of PA.

@EHfive
Copy link
Owner

EHfive commented Feb 13, 2019

I'm just the packager, @EHfive can tell whether it's possible to create or build the package without ffmpeg and AAC present, with only LDAC. (I guess that version won't have aptX and AAC support even if the codec packages are installed.)

Right. In the next release, I would probably make FDK-AAC/ffmpeg/LDAC be optional at building stage.

@Sesivany
Copy link

That would really help because then we could have it at least with LDAC support in Fedora/RHEL (and other patent-concerned distributions) by default although some claim there is also a problem with LGPL 2.1->Apache License compatibility. But this project has had 3 contributors so far, so it shouldn't be such a problem to grant an exception if necessary.

@lukehutch
Copy link

The soname version number for fdk-aac in rpmfusion is 2, not 1:

[root@localhost ~]# rpm -Uhv /tmp/libldacbt-1.1-1.fc29.x86_64.rpm /tmp/pulseaudio-module-bluetooth-aptx-12.2-1.fc29.x86_64.rpm 
error: Failed dependencies:
	libfdk-aac.so.1()(64bit) is needed by pulseaudio-module-bluetooth-aptx-12.2-1.fc29.x86_64
[root@localhost ~]# rpm -ql fdk-aac | grep libfdk-aac
/usr/lib64/libfdk-aac.so.2
/usr/lib64/libfdk-aac.so.2.0.0

@EHfive
Copy link
Owner

EHfive commented Feb 28, 2019

Actually, you can use fdk-aac-free licensed under FDK-AAC
fdk-aac-free don't support AAC-HE, but AAC format in A2DP transmission is AAC-LC.
fdk-aac-free and fdk-aac(non-free) share most ABI in AAC-LC case, so I don't need to change anything in pulseaudio-modules-bt to support fdk-aac-free.

@Sesivany
Copy link

Sesivany commented Mar 7, 2019

Just reporting: the packages provided here don't seem to survive upgrade to Fedora 30. They stay installed, but I'm back from LDAC to SBC after the upgrade.

@devurandom
Copy link

devurandom commented Apr 8, 2019

@vlastoun Yes, I'll move that libldacBT_(enc|abr).so link from the devel to the base package. Not a nice move but doable.

That is most certainly not what you want.

DT_SONAME (and a symlink of that name) is generally used to ensure ABI-compatibility of the library and its users. If an application is linked against a library, it is linked against a specific interface version. This interface version is part of that library's SONAME. Trying to run that program against a library with a different interface version (and hence different SONAME) is outright dangerous and may fail in unexpected ways -- the library authors specifically state that this will break, by giving their library a different SONAME (and thus interface version) than a previous version of their library, and usually they are the most knowledgeable in that area.

Hence when loading a library into a program (be it by adding the library to DT_NEEDED at compile time or using dlopen), one should always load the version of the library the program was compiled against, never any other version. Thus the load should happen using the full SONAME, not some part of it that happens to match an existing (but potentially different) library by accident. If the program happens to support multiple versions of the library, it could for example try to dlopen the SONAMEs it supports (and no other names) in some defined order, until it finds a supported library.

If in this case the pulseaudio module happens to dlopen the library with something other than its SONAME, the pulseaudio module should be fixed, not another Fedora package that is not actually broken.

P.S. -devel packages contain symlinks without a version number in order to allow for the linker parameter -lrary to pick the first library.so from the search path, without having to specify the desired version number, i.e. so that at compile time "any available version" can be used.

See-Also: https://en.wikipedia.org/wiki/Soname
See-Also: https://www.gnu.org/software/libtool/manual/libtool.html#Versioning

@gombosg
Copy link
Author

gombosg commented Apr 8, 2019

@devurandom : thanks for the explanation!

If @EHfive is willing to fix this, I'm going to cancel the Bodhi (testing) update.

@gombosg
Copy link
Author

gombosg commented Apr 12, 2019

@vlastoun can you test this please after removing the devel packages?

@vlastoun
Copy link

vlastoun commented Apr 12, 2019

@gombosg its working. I have instaled only libldac and the latest package of pulseaudio

/usr/lib64 » ll | grep libldacBT_enc.so                                                                                                                                                            vsadilek@ntbvsa
lrwxrwxrwx   1 root root    24 15. úno 15.51 libldacBT_enc.so.2 -> libldacBT_enc.so.2.0.2.2
-rwxr-xr-x   1 root root   52K 15. úno 15.51 libldacBT_enc.so.2.0.2.2

@gombosg
Copy link
Author

gombosg commented Apr 23, 2019

Okay everyone, the package is in the RPMFusion Free repos.
@EHfive please update the Fedora description:

The RPMFusion build doesn't support the AAC codec due to licensing restrictions. Please build your own if you need AAC support.
Enable the RPMFusion (free) repository.
Then install the package and restart Pulseaudio:

sudo dnf install pulseaudio-module-bluetooth-freeworld --allowerasing
pulseaudio -k

@djasa djasa mentioned this issue Jun 5, 2019
@ValdikSS
Copy link

@gombosg RPMFusion now ships fdk-aac, and fedora repos contain fdk-aac-free.
Also Fedora now considers fdk-aac GPL-compatible: https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/thread/OVW25JRWOKOLVMW3XGUX7E4OXFUR2RCG/
Please recompile the package with AAC support.

@gombosg
Copy link
Author

gombosg commented Jun 22, 2019

@ValdikSS hi, yes, I read it yesterday, great news!
Well currently there are issues with fdk-aac-free so it needs some testing. If I build it with it, can you test it?

@ValdikSS
Copy link

@gombosg sure. If fdk-aac is considered legal now, maybe it would be better to use it instead of free version?

@gombosg
Copy link
Author

gombosg commented Jun 22, 2019

I submitted #5294 and #5295 to start a conversation on this topic. Last time I wasn't allowed to use fdk-aac since it was in the nonfree repo.

@ValdikSS
Copy link

@gombosg oh sorry, I forgot I don't have any headphones with AAC support. I can perform a test between 2 PCs though.

@ValdikSS
Copy link

@gombosg also please update the code because the version currently in the repository is outdated and crashes due to missing commit fe90c44

@davidlt
Copy link

davidlt commented Jun 26, 2019

@gombosg
Copy link
Author

gombosg commented Jun 27, 2019

@gombosg also please update the code because the version currently in the repository is outdated and crashes due to missing commit fe90c44

It's not outdated, it's at the latest release. I won't include code from the master branch since it's not part of a release (how would I know which master commits warrant a package update and which don't?). But if @EHfive makes one I will.

@davidlt thanks, I'll make a build with fdk-aac-free during the weekend.

@gombosg
Copy link
Author

gombosg commented Jun 28, 2019

Hi, now that fdk-aac-free is deemed to be GPL compatible I've made a Fedora build. Can you test this build with AAC? Thanks!

@ValdikSS
Copy link

Please include at least commit f44d32e, or better, compile from git master. Without this commit the library crashes on my hardware.

@gombosg
Copy link
Author

gombosg commented Jun 30, 2019

Sure, here's your build!

@gombosg
Copy link
Author

gombosg commented Jul 2, 2019

@ValdikSS Did you get to test it? If it works I can push the update.

@ValdikSS
Copy link

ValdikSS commented Jul 4, 2019

I can't test it right now.

@gombosg
Copy link
Author

gombosg commented Jul 17, 2019

@ValdikSS And now? :D

@ValdikSS
Copy link

@gombosg I'm away from my devices and won't be able to test in this month.

@ValdikSS
Copy link

@gombosg I've tested the build overall, it works fine, but haven't tested AAC.

@gijsrrr
Copy link

gijsrrr commented Jul 26, 2019

Tested AAC, works fine. Much better quality now. Thanks for this!

@jakub-pluciennik
Copy link

Thank you very much for your efforts! Is there any possibility to switch between codecs? My connection is always set as LDAC and even when try to switch to another codec, Sony application and:

pactl list | grep a2dp_codec

are always showing that LDAC is on use. Not complaining, just wondering. My OS is Ubuntu 18.04. It also seems that I can not use headphones as headset with microphone even when I switch to "Headset Head Unit" I can hear only noises.

@gombosg
Copy link
Author

gombosg commented Jul 28, 2019

@groeffen Thanks, finally I can push it to F30 testing then stable!

@OkropNick In GNOME Control Center you can try switching codecs. There the SBC codec is for making phone calls. You can also read more in the wiki.

EDIT: this AAC update will only be available for F30 since fdk-aac-free is not available for F29.

@moontide
Copy link

moontide commented Mar 11, 2020

Update
Sorry, there's a bug report already posted: https://bugzilla.rpmfusion.org/show_bug.cgi?id=5558.


Thanks for the pulseaudio-module-bluetooth-freeworld package.

Now, in Fedora 31/32/33, pulseaudio-13.99.1 is in the update-testing repository, and dnf update pulseaudio* --enablerepo *-testing is complaining about pulseaudio-module-bluetooth-freeworld-1.3-1.fc31.x86_64 requires libpulsecore-13.0.so()(64bit), but none of the providers can be installed. Will it work if make the dependency be libpulsecore >= 13.0 && libpulsecommon >= 13.0?

# dnf update pulseaudio* --enablerepo *-testing
上次元数据过期检查:0:28:14 前,执行于 2020年03月11日 星期三 08时18分41秒。
依赖关系解决。

 问题 1: package pulseaudio-module-bluetooth-freeworld-1.3-1.fc31.x86_64 requires libpulsecore-13.0.so()(64bit), but none of the providers can be installed
  - cannot install both pulseaudio-13.99.1-1.fc31.x86_64 and pulseaudio-13.0-2.fc31.x86_64
  - cannot install both pulseaudio-13.0-2.fc31.x86_64 and pulseaudio-13.99.1-1.fc31.x86_64
  - cannot install both pulseaudio-13.0-1.fc31.x86_64 and pulseaudio-13.99.1-1.fc31.x86_64
  - cannot install the best update candidate for package pulseaudio-module-bluetooth-freeworld-1.3-1.fc31.x86_64
  - cannot install the best update candidate for package pulseaudio-13.0-2.fc31.x86_64
 问题 2: problem with installed package pulseaudio-module-bluetooth-freeworld-1.3-1.fc31.x86_64
  - package pulseaudio-module-bluetooth-freeworld-1.3-1.fc31.x86_64 requires libpulsecommon-13.0.so()(64bit), but none of the providers can be installed
  - cannot install both pulseaudio-libs-13.99.1-1.fc31.x86_64 and pulseaudio-libs-13.0-2.fc31.x86_64
  - cannot install both pulseaudio-libs-13.0-2.fc31.x86_64 and pulseaudio-libs-13.99.1-1.fc31.x86_64
  - cannot install both pulseaudio-libs-13.0-1.fc31.x86_64 and pulseaudio-libs-13.99.1-1.fc31.x86_64
  - cannot install the best update candidate for package pulseaudio-libs-13.0-2.fc31.x86_64
================================================================================
 Package             Arch       Version               Repository           Size
================================================================================
跳过有冲突的软件包:
(添加 '--best --allowerasing' 至命令行来强制升级):
 pulseaudio          x86_64     13.0-1.fc31           fedora              1.0 M
 pulseaudio          x86_64     13.99.1-1.fc31        updates-testing     1.0 M
 pulseaudio-libs     x86_64     13.0-1.fc31           fedora              710 k
 pulseaudio-libs     x86_64     13.99.1-1.fc31        updates-testing     708 k

事务概要
================================================================================
跳过  4 软件包

无需任何处理。
完毕!

@gombosg
Copy link
Author

gombosg commented Mar 28, 2020

@moontide sorry, yeah, since it needs an update with new PA versions in Fedora, it will break every now and then. 🤷‍♂️ Unfortunately we can never perfectly sync Fedora updates with RPMFusion. OTOH I subscribed for the PA source notifications to never miss updates again.

@ElbinP
Copy link

ElbinP commented Aug 13, 2020

pulseaudio-module-bluetooth-freeworld Does this give high bitrate SBC? How can I verify that?

@gombosg
Copy link
Author

gombosg commented Aug 13, 2020

Sorry, I don't know. I packaged the vanilla version. If pactl list sinks doesn't give you the info that you want, you may want to recompile with cusom parameters based on documentation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests