Created attachment 218109 [details] multimedia/quodlibet: version 4.3.0 tarball Hello, The attached tarball is the 'multimedia/quodlibet' port that is updated to the latest 4.3.0 version. I've tested and am using it on DragonFly BSD now, and it should just work on FreeBSD. Since this port hasn't been updated for years by its maintainer, I'm wanting to take its maintainership. Please review, and thanks.
Please submit your patch as a svn diff or git patch Set URL to https://quodlibet.readthedocs.io/en/latest/changelog.html#release-4-3-0 in PR Is there a reason why we can't use upstream release archive/tarball? (also suggested by 5.4.3 in Porter's Handbook) https://github.com/quodlibet/quodlibet/releases/tag/release-4.3.0 --> https://github.com/quodlibet/quodlibet/releases/download/release-4.3.0/quodlibet-4.3.0.tar.gz Set python as min 3.5+ Remove #DBUS_BUILD_DEPENDS... if its not used. Looks good to me otherwise but I'm not a python port expert. Best regards, Daniel
(In reply to daniel.engberg.lists from comment #1) Hi Daniel, Thank you for your kind help. I've updated this port and improved a bit. Please review the attached Git patch. Following are my changes: * Update to the latest version 4.3.0 * Take maintainership as this port hasn't been updated by its original maintainer for years * Remove configure options since they're just optional runtime dependencies and don't affect the build * Add a 'pkg-message' to mention those optional runtime dependencies so that users can choose and know what to install Best regards, Aaron
Hi Aaron, Your changes sounds great however I think you forgot to attach the patch? Best regards, Daniel
Created attachment 218165 [details] multimedia/quodlibet: Update to version 4.3.0
(In reply to daniel.engberg.lists from comment #3) Ooops, sorry. Now I add the patch. Thank you for reviewing. Best regards, Aaron
Hmm, I just noticed that this port was marked to be expired on 2020-09-15, so it has been removed from the ports tree recently. Just a side note. Best regards, Aaron
(In reply to Aaron LI from comment #6) Hi Aaron, I'm a bit confused here. The title says update for multimedia/quodlibet but the attachment is named after multimedia/playerctl but still seems to apply to multimedia/quodlibet. So... which one is it?
Comment on attachment 218109 [details] multimedia/quodlibet: version 4.3.0 tarball deprecated
Comment on attachment 218165 [details] multimedia/quodlibet: Update to version 4.3.0 Well, the old version of this port uses Python 2.7 and has been removed in commit https://github.com/freebsd/freebsd-ports/commit/c06d5bc6d131c081e20d12a1f3e58373ce49a785
Created attachment 218215 [details] Bring back multimedia/quodlibet with latest version 4.3.0 Since the old version of this port uses Python 2.7 and has been removed in commit https://github.com/freebsd/freebsd-ports/commit/c06d5bc6d131c081e20d12a1f3e58373ce49a785, so this patch brings it back but updates it to the latest version 4.3.0 and uses Python 3.5+.
(In reply to Fernando Apesteguía from comment #7) Sorry for the confusion. The attachment name error was a copy/paste error... I already fixed it. In addition, I added a new patch that should apply on the master branch of freebsd-ports. Thank you for the review. Regards, Aaron
(In reply to Aaron LI from comment #11) It's OK. Now, this thing builds and runs, but I can not make it play a song. It says "No GStreamer audio sink found". The pipeline box in preferences is empty. I have plenty of gstreamer packages installed: $ pkg info -x 'gstrea.*' gstreamer-0.10.36_6 gstreamer-ffmpeg-0.10.13_7 gstreamer-plugins-0.10.36_12,3 gstreamer-plugins-a52dec-0.10.19_2,3 gstreamer-plugins-bad-0.10.23_4,3 gstreamer-plugins-core-0.10_13 gstreamer-plugins-dts-0.10.23_2,3 gstreamer-plugins-dvd-0.10.19_6,3 gstreamer-plugins-good-0.10.31_3,3 gstreamer-plugins-libpng-0.10.31_2,3 gstreamer-plugins-mad-0.10.19_3,3 gstreamer-plugins-mp3-0.10.0_1 gstreamer-plugins-ogg-0.10.36_2,3 gstreamer-plugins-pango-0.10.36_3,3 gstreamer-plugins-theora-0.10.36_2,3 gstreamer-plugins-ugly-0.10.19_2,3 gstreamer-plugins-vorbis-0.10.36_2,3 gstreamer-plugins-xvid-0.10.23_2,3 gstreamer1-1.16.2 gstreamer1-libav-1.16.2 gstreamer1-plugins-1.16.2 gstreamer1-plugins-a52dec-1.16.2 gstreamer1-plugins-bad-1.16.2 gstreamer1-plugins-core-1.16 gstreamer1-plugins-dts-1.16.2 gstreamer1-plugins-dvdread-1.16.2_1 gstreamer1-plugins-good-1.16.2 gstreamer1-plugins-mpg123-1.16.2 gstreamer1-plugins-ogg-1.16.2 gstreamer1-plugins-pango-1.16.2 gstreamer1-plugins-png-1.16.2 gstreamer1-plugins-resindvd-1.16.2_1 gstreamer1-plugins-theora-1.16.2 gstreamer1-plugins-ugly-1.16.2 gstreamer1-plugins-vorbis-1.16.2 A quick guide on how to make it work in order to test it?
(In reply to Fernando Apesteguía from comment #12) Hi Fernando, thank you for the testing. I looked into the QuodLibet code and find that error comes from: https://github.com/quodlibet/quodlibet/blob/quodlibet-4.3/quodlibet/quodlibet/player/gstbe/util.py#L101 On *BSD, it should use the 'autoaudiosink' Gstreamer audio sink, which is provided by the 'gstreamer1-plugins-good' package and this package is already installed on your system. I can't figure out why it doesn't work for you :( I'm using the new QuodLibet on my DragonFly BSD (5.9-development) desktop for several days, and it works fine. I'm also using the Gstreamer v1.16.2, same version as yours: ----------------------------------------------------------------------------- % pkg info -x 'gstrea.*' gstreamer1-1.16.2 gstreamer1-libav-1.16.2 gstreamer1-plugins-1.16.2 gstreamer1-plugins-bad-1.16.2 gstreamer1-plugins-faad-1.16.2 gstreamer1-plugins-flac-1.16.2 gstreamer1-plugins-gl-1.16.2 gstreamer1-plugins-good-1.16.2 gstreamer1-plugins-mpg123-1.16.2 gstreamer1-plugins-ogg-1.16.2 gstreamer1-plugins-speex-1.16.2 gstreamer1-plugins-ugly-1.16.2 gstreamer1-plugins-vorbis-1.16.2 gstreamer1-plugins-wavpack-1.16.2 ----------------------------------------------------------------------------- One difference here is that I don't have the legacy Gstreamer 0.10.x, but I don't think it's the issue, because QuodLibet requires Gstreamer 1.0: https://github.com/quodlibet/quodlibet/blob/quodlibet-4.3/quodlibet/quodlibet/_init.py#L396 Nevertheless, please try this in Python 3: ----------------------------------------------------------------------------- >>> import gi >>> gi.require_version('Gst', '1.0') >>> from gi.repository import Gst >>> Gst.init_check() (True, argv=[]) >>> Gst.ElementFactory.make('autoaudiosink', None) <__gi__.GstAutoAudioSink object at 0x8019dc870 (GstAutoAudioSink at 0x801fae060)> ----------------------------------------------------------------------------- and try: ----------------------------------------------------------------------------- % gst-inspect-1.0 autoaudiosink Factory Details: Rank none (0) Long-name Auto audio sink Klass Sink/Audio Description Wrapper audio sink for automatically detected audio sink Author Jan Schmidt <thaytan@noraisin.net> Plugin Details: Name autodetect Description Plugin contains auto-detection plugins for video/audio in- and outputs Filename /usr/local/lib/gstreamer-1.0/libgstautodetect.so Version 1.16.2 License LGPL Source module gst-plugins-good Source release date 2019-12-03 Binary package GStreamer Good Plug-ins source release Origin URL Unknown package origin GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBin +----GstAutoDetect +----GstAutoAudioSink ----------------------------------------------------------------------------- Hope this helps. Regards, Aaron
Created attachment 218244 [details] Bring back multimedia/quodlibet with latest version 4.3.0 Change 'python:3.5+' to 'python:3.6+' as Python >=3.6 is required.
(In reply to Aaron LI from comment #13) Factory Details: Rank none (0) Long-name Auto audio sink Klass Sink/Audio Description Wrapper audio sink for automatically detected audio sink Author Jan Schmidt <thaytan@noraisin.net> Plugin Details: Name autodetect Description Plugin contains auto-detection plugins for video/audio in- and outputs Filename /usr/local/lib/gstreamer-1.0/libgstautodetect.so Version 1.16.2 License LGPL Source module gst-plugins-good Source release date 2019-12-03 Binary package GStreamer Good Plug-ins source release Origin URL Unknown package origin GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBin +----GstAutoDetect +----GstAutoAudioSink For the python stuff: python3.6 Python 3.6.12 (default, Sep 5 2020, 11:31:39) [GCC 4.2.1 Compatible FreeBSD Clang 8.0.1 (tags/RELEASE_801/final 366581)] on freebsd12 Type "help", "copyright", "credits" or "license" for more information. >>> import gi Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'gi' >>>
With python3.7 $ python3.7 Python 3.7.9 (default, Sep 5 2020, 01:21:24) [Clang 8.0.1 (tags/RELEASE_801/final 366581)] on freebsd12 Type "help", "copyright", "credits" or "license" for more information. >>> import gi >>> gi.require_version('Gst', '1.0') >>> from gi.repository import Gst >>> Gst.init_check() (True, argv=[]) >>> Gst.ElementFactory.make('autoaudiosink', None) <__gi__.GstAutoAudioSink object at 0x801e80280 (GstAutoAudioSink at 0x802073020)> >>>
Hi Aaron, Sorry for my late response. I tested this a bit more. Interestingly, when I start quodlibet from a terminal as a regular user, I see this: $ quodlibet W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support. And I get the "No GStreamer audio sink found" and can not play music files. However, if I launch it as root, I don't see that warning and I can play files without problems. It might be a problem with my environment (I do not use Gnome) or permissions on my side. Are you running it as a regular user?
(In reply to Fernando Apesteguía from comment #17) Interesting! I never thought about the PulseAudio might play a role here. Actually, DragonFly BSD's DPorts removed PulseAudio altogether since it never worked well ;) I run QuodLibet as a regular user (but I'm in groups 'wheel', 'operator', 'video'; however, I don't think these supplement groups would make a difference). I did some searches and someone suggest the 'dbus' should be started as it's required by PulseAudio. In addition, PulseAudio may choose the wrong sink. So I suggest that you could try: * make sure 'dbus' is running * check the sink device in '/dev/sndstat' and set it for PulseAudio with 'pacmd set-default-sink <sink-number>' * is 'pulseaudio' running as your user? (On Linux, 'pulseaudio' is auto started and running as the regular user) If you could figure it out, I'll update the 'pkg-message' to guide users. ------------------- On the other hand, QuodLibet sometimes just crash on DragonFly BSD. I believe this issue is DragonFly-specific (the old QuodLibet also had such an issue) and I'm investigating it. ------------------- Regards, Aaron
(In reply to Fernando Apesteguía from comment #17) One more idea, should installing 'gstreamer1-plugins-pulse' be helpful? Regards, Aaron
(In reply to Aaron LI from comment #19) That was it. With it installed, it works. Without it, it shows the error. Would you add it to the run dependencies?
(In reply to Fernando Apesteguía from comment #20) Cool! We can list 'gstreamer1-plugin-pulse' as a runtime dependency on FreeBSD. However, I'm wondering why Gstreamer's 'autoaudiosink' prefer PulseAudio instead of OSS on FreeBSD... Do you have any ideas? (I'll also investigate a bit.) Regards, Aaron
(In reply to Fernando Apesteguía from comment #20) OK, I've found it. See: https://github.com/quodlibet/quodlibet/blob/quodlibet-4.3/quodlibet/quodlibet/player/gstbe/util.py#L84 QuodLibet will check whether PulseAudio is running (by executing 'pulseaudio --check') and will use the 'pulsesink' if yes... Then PulseAudio is chosen over the OSS (via the 'autoaudiosink'). I'm thinking whether we should just disable PulseAudio on FreeBSD (e.g., by removing that 'pulse_is_running()' check) ? Another idea is to provide a 'PULSEAUDIO' build option. If checked, add 'gstreamer1-plugins-pulse' to the runtime dependency; otherwise, disable the PulseAudio detection. What would you suggest? Thanks. Regards, Aaron
(In reply to Aaron LI from comment #22) I would do it optional. Some people use pulseaudio on FreeBSD.
Created attachment 218764 [details] Bring back multimedia/quodlibet with latest version 4.3.0 Add 'PULSEAUDIO' option to work better with PulseAudio.
(In reply to Fernando Apesteguía from comment #23) I've updated the port with the 'PULSEAUDIO' option. In addition, I added a new patch to make QuodLibet better detect the PulseAudio status. Now, QuodLibet/Gstreamer would not use PulseAudio even if the PulseAudio is running but the 'pulse' plugin is missing. This would avoid the issue of no Gstreamer sink found that you had before. So please test the updated port with 'PULSEAUDIO' option OFF and 'gstreamer1-plugin-pulse' uninstalled. I believe it will now use the OSS sink and work well. I'll submit the patch to upstream after your confirmation. Also, please test with the 'PULSEAUDIO' option ON. (I can't test it on DragonFly BSD because we just don't have PulseAudio ;). Thank you, regards. Aaron
A commit references this bug: Author: fernape Date: Mon Oct 19 06:46:26 UTC 2020 New revision: 552712 URL: https://svnweb.freebsd.org/changeset/ports/552712 Log: multimedia/quodlibet re-add with latest version 4.3.0 Repo-copied from @548979. PR was filed just the day after the port was deleted. The new version works fine with modern versions of Python. Builds in {11.4,12.1}[amd64,i386] and 13-current amd64. Run tested fine in 12.1 amd64. Submitter claims maintainership (already maintaininer for multimedia/playerctl). ChangeLog: https://quodlibet.readthedocs.io/en/latest/changelog.html#release-4-3-0 PR: 249483 Submitted by: aly@aaronly.me (maintainer) Changes: head/MOVED head/multimedia/Makefile head/multimedia/quodlibet/ head/multimedia/quodlibet/Makefile head/multimedia/quodlibet/distinfo head/multimedia/quodlibet/files/patch-gdist_man.py head/multimedia/quodlibet/files/patch-quodlibet_player_gstbe_util.py head/multimedia/quodlibet/pkg-descr head/multimedia/quodlibet/pkg-message
Committed, Thanks!
(In reply to Fernando Apesteguía from comment #27) Awesome. Thank you. Regards, Aaron
I think this can be closed?
Thanks for the heads up!