add runtime test for mpd
v2 cover add runtime test for mpd
Testing MPD in a real world situation is fairly straightforward: build, deploy, play some music. Representing this simple test within a test framework is quite complex.
I tried to break down my simple test case into a few atomic steps that interact with MPD via the built-in protocol. The necessary test data was generated with ffmpeg and imagemagick and is royalty-free :-D
In good old usenet tradition, test data had to be split in archive chunks, to overcome the limitations of the mailing list. The data will be re-combined in a post-build script.
Working on this also triggered some changes in the Buildroot setup:
The configuration file supplied by Buildroot is only a sample; it will not start MPD on a default installation. Usually a custom mpd.conf is supplied in a rootfs overlay. Drop the Buildroot configuration file and install the sample supplied by MPD instead, it is more complete, contains useful examples and is update regularly.
After various updates since version 0.20, most dependencies placing restrictions on sub-components are now superseded by restrictions placed on MPD itself. Example: io_uring needs kernel headers > 5.1; MPD needs kernel headers > 5.6. Remove dependencies from sub-options if they are already imposed on MPD.
MPD has 99 configurable options; of these, 44 are exposed in Buildroot's Config.in. Sort order and grouping of these options are different within the MPD project and Buildroot, which makes a comparison difficult. Reorder entries in Config.in to reflect their order in meson_options.txt. Also update at least some of the help texts to more closely resemble what is published in the MPD manual.
Changes v1 -> v2:
split test data in chunks to overcome mailing list restrictions
Andreas Ziegler (11):
package/mpd: install provided sample configuration file as mpd.conf package/mpd: remove duplicated dependencies from sub-options package/mpd: reorder config items based on order in meson_options.txt support/testing: add test data for mpd
support/testing: add test data for mpd
support/testing: add test data for mpd
support/testing: add test data for mpd
support/testing: add test data for mpd
support/testing: add test data for mpd
support/testing: add runtime test for mpd
DEVELOPERS: add entry for test_mpd
DEVELOPERS | 2 + package/mpd/Config.in | 364 +++++++++--------- package/mpd/mpd.conf | 32 -- package/mpd/mpd.mk | 2 +- support/testing/tests/package/test_mpd.py | 57 +++ .../tests/package/test_mpd/_test_data0 | Bin 0 -> 223630 bytes .../tests/package/test_mpd/_test_data1 | Bin 0 -> 223630 bytes .../tests/package/test_mpd/_test_data2 | Bin 0 -> 223630 bytes .../tests/package/test_mpd/_test_data3 | Bin 0 -> 223630 bytes .../tests/package/test_mpd/_test_data4 | Bin 0 -> 223630 bytes .../tests/package/test_mpd/_test_data5 | Bin 0 -> 223630 bytes .../tests/package/test_mpd/busybox.fragment | 4 + .../tests/package/test_mpd/post-build.sh | 6 + .../test_mpd/rootfs-overlay/etc/mpd.conf | 14 + .../test_mpd/rootfs-overlay/root/test_mpd.sh | 74 ++++ 15 files changed, 348 insertions(+), 207 deletions(-) delete mode 100644 package/mpd/mpd.conf create mode 100644 support/testing/tests/package/test_mpd.py create mode 100644 support/testing/tests/package/test_mpd/_test_data0 create mode 100644 support/testing/tests/package/test_mpd/_test_data1 create mode 100644 support/testing/tests/package/test_mpd/_test_data2 create mode 100644 support/testing/tests/package/test_mpd/_test_data3 create mode 100644 support/testing/tests/package/test_mpd/_test_data4 create mode 100644 support/testing/tests/package/test_mpd/_test_data5 create mode 100644 support/testing/tests/package/test_mpd/busybox.fragment create mode 100755 support/testing/tests/package/test_mpd/post-build.sh create mode 100644 support/testing/tests/package/test_mpd/rootfs-overlay/etc/mpd.conf create mode 100755 support/testing/tests/package/test_mpd/rootfs-overlay/root/test_mpd.sh
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/11 package/mpd: install provided sample configuration file as mpd.conf
The configuration file supplied by Buildroot is only a sample; it will not start MPD on a default installation. Usually a custom mpd.conf is supplied in a rootfs overlay.
Drop the Buildroot configuration file and install the sample supplied by MPD instead, it is more complete, contains useful examples and is updated regularly.
--- package/mpd/mpd.conf | 32 -------------------------------- package/mpd/mpd.mk | 2 +- 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 package/mpd/mpd.conf
package/mpd/mpd.conf deleted +0 -32
@@ -1,32 +0,0 @@ -# -# Sample configuration file for mpd -# This is a minimal configuration, see the manpage for more options -# - -# Directory where the music is stored -music_directory "/var/lib/mpd/music" - -# Directory where user-made playlists are stored (RW) -playlist_directory "/var/lib/mpd/playlists" - -# Database file (RW) -db_file "/var/lib/mpd/database" - -# Log file (RW) -log_file "/var/log/mpd.log" - -# Process ID file (RW) -pid_file "/var/run/mpd.pid" - -# State file (RW) -state_file "/var/lib/mpd/state" - -# User id to run the daemon as -#user "nobody" - -# TCP socket binding -bind_to_address "any" -#bind_to_address "localhost" - -# Unix socket to listen on -bind_to_address "/var/lib/mpd/socket"
package/mpd/mpd.mk +1 -1
@@ -346,7 +346,7 @@ MPD_CONF_OPTS += -Dzzip=disabled endif define MPD_INSTALL_EXTRA_FILES - $(INSTALL) -m 0644 -D package/mpd/mpd.conf $(TARGET_DIR)/etc/mpd.conf + $(INSTALL) -m 0644 -D $(@D)/doc/mpdconf.example $(TARGET_DIR)/etc/mpd.conf mkdir -p $(TARGET_DIR)/var/lib/mpd/music mkdir -p $(TARGET_DIR)/var/lib/mpd/playlists endef
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 01/11] package/mpd: install provided sample configuration file as mpd.conf
Hello Andreas,
Quoted 9 lines · Andreas Ziegler
The configuration file supplied by Buildroot is only a sample; it will not start MPD on a default installation. Usually a custom mpd.conf is supplied in a rootfs overlay.
Drop the Buildroot configuration file and install the sample supplied by MPD instead, it is more complete, contains useful examples and is updated regularly.
Signed-off-by Andreas Ziegler <[email protected]>
I am not conviced by this change. Indeed, doc/mpdconf.example in the mpd code base is basically almost entirely commented out. The options that are set by our package/mpd/mpd.conf are not set by doc/mpdconf.example (like log_file, music_directory, etc.).
So I am not sure to understand why doc/mpdconf.example is better, as it actually doesn't configure anything. The only not commented lines are:
input {
plugin "curl"
}
which is clearly a lot less than:
music_directory "/var/lib/mpd/music"playlist_directory "/var/lib/mpd/playlists"db_file "/var/lib/mpd/database"log_file "/var/log/mpd.log"pid_file "/var/run/mpd.pid"state_file "/var/lib/mpd/state"bind_to_address "any"bind_to_address "/var/lib/mpd/socket"
in our mpd.conf.
So overall I don't understand why it is an "improvement". Could you clarify?
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 01/11] package/mpd: install provided sample configuration file as mpd.conf
Hi Thomas, Everyone
Thank you for the review.
Quoted 11 lines · Thomas Petazzoni
Hello Andreas,
Quoted 8 lines · Andreas Ziegler
The configuration file supplied by Buildroot is only a sample; it will not start MPD on a default installation. Usually a custom mpd.conf is supplied in a rootfs overlay.
Drop the Buildroot configuration file and install the sample supplied by MPD instead, it is more complete, contains useful examples and is updated regularly.
Quoted 6 lines
Quoted 1 line
Signed-off-by Andreas Ziegler <[email protected]>I am not conviced by this change. Indeed, doc/mpdconf.example in the mpd code base is basically almost entirely commented out. The options that are set by our
package/mpd/mpd.confare not set by doc/mpdconf.example (likelog_file,music_directory, etc.).
Reason for switching was just because the Buildroot configuration does not start mpd, due to a missing output section [1]. Rather than fix it I would like to switch to a more complete example.
It is not more than an example, since a working mpd instance needs a custom configuration file supplied via overlay or post-build script, there are too many use cases and possible hard- and software layouts. The default script would normally never be used, unless someone just started to add and configure mpd. A highly complete and commented example would definitely help. It is also kept up-to-date automatically.
Quoted 19 lines
So I am not sure to understand why doc/mpdconf.example is better, as it actually doesn't configure anything. The only not commented lines are:
input {
plugin "curl"
}which is clearly a lot less than:
music_directory"/var/lib/mpd/music"playlist_directory"/var/lib/mpd/playlists"db_file"/var/lib/mpd/database"log_file"/var/log/mpd.log"pid_file"/var/run/mpd.pid"state_file"/var/lib/mpd/state"bind_to_address"any"bind_to_address"/var/lib/mpd/socket"
Quoted 1 line
in our mpd.conf.
The commented-out configuration items are not unusual, many default configurations contain all available parameters with their default values, all of them commented. Unless someone changes anything, the default is used. (one example: /etc/ssh/sshd_config). The single uncommented entry for libsamplerate is probably a typo.
The Buildroot mpd.conf is from 2013; at that time it represented the only valid topology for mpd: both database and output on one machine. Since version 0.20, mpd can be configured as server (database, no output), client (remote access to database, output) or standalone. You might also use mpd as a streaming only solution, with input exclusively from the internet. So which is the correct configuration to use for Buildroot?
There is one issue that still prevents the mpd supplied sample configuration to run mpd properly: not setting a value for pid_file prevents the file to be used (OK for a systemd install, not OK for sysV), which results in mpd refusing to terminate gracefully.
Mitigation: inject pid_file and log_file via POST_BUILD_HOOK for builds without systemd.
Thoughts?
Quoted 10 lines
So overall I don't understand why it is an "improvement". Could you clarify?
Thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
Kind regards,
Andreas
[1] Actually this changed in the latest version, mpd now auto-detects alsa devices, if present.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/11 package/mpd: remove duplicated dependencies from sub-options
In reply to Andreas ZieglerAfter various updates since version 0.20, most dependencies placing restrictions on sub-components are now superseded by restrictions placed on MPD itself. Example: io_uring needs kernel headers > 5.1; MPD needs kernel headers > 5.6.
Remove dependencies from sub-options if they are already imposed on MPD.
--- package/mpd/Config.in | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-)
package/mpd/Config.in +3 -16
@@ -217,15 +217,10 @@ config BR2_PACKAGE_MPD_LIBMMS config BR2_PACKAGE_MPD_LIBNFS bool "nfs" - # libnfs -> libtirpc - depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_LIBNFS help Enable Network File System (NFS) support. -comment "nfs support needs a toolchain w/ threads support" - depends on !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC) - comment "samba support needs a glibc toolchain w/ dynamic library, RPC" depends on !BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS || \ !BR2_TOOLCHAIN_HAS_NATIVE_RPC
@@ -295,18 +290,14 @@ config BR2_PACKAGE_MPD_OSS config BR2_PACKAGE_MPD_PULSEAUDIO bool "pulseaudio" depends on BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC - depends on BR2_USE_WCHAR - depends on BR2_TOOLCHAIN_HAS_THREADS depends on !BR2_STATIC_LIBS - depends on BR2_USE_MMU select BR2_PACKAGE_PULSEAUDIO help Enable pulseaudio output support. -comment "pulseaudio support needs a toolchain w/ threads, wchar, dynamic library" - depends on BR2_USE_MMU - depends on BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC - depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || !BR2_USE_WCHAR +comment "pulseaudio support needs dynamic library" + depends on !BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC + depends on BR2_STATIC_LIBS config BR2_PACKAGE_MPD_SHOUTCAST bool "shoutcast"
@@ -333,14 +324,10 @@ comment "avahi support needs a toolchain w/ dynamic library" config BR2_PACKAGE_MPD_IO_URING bool "io_uring" - depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 select BR2_PACKAGE_LIBURING help Asynchronous I/O using kernel io_uring subsystem -comment "io_uring support needs a toolchain w/ headers >= 5.1" - depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 - config BR2_PACKAGE_MPD_LIBMPDCLIENT bool "libmpdclient" select BR2_PACKAGE_MPD_TCP
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 02/11] package/mpd: remove duplicated dependencies from sub-options
Hello Andreas,
Thanks for your patch!
Quoted 8 lines · Andreas Ziegler
After various updates since version 0.20, most dependencies placing restrictions on sub-components are now superseded by restrictions placed on MPD itself. Example:
io_uringneeds kernel headers > 5.1; MPD needs kernel headers > 5.6.Remove dependencies from sub-options if they are already imposed on MPD.
Signed-off-by Andreas Ziegler <[email protected]>
Actually the general policy in Buildroot is somewhat the opposite of what you're proposing here, even though I admit our general policy may not be applied anywhere.
The reasoning for this policy is that it is either to review/verify when an option "select" another one, that all "depends on" have properly been replicated. Yes, this means potentially some duplication of "depends on" between the main package option and the sub-options, but it also allows to ensure that if we remove/change one of those "depends on" from the main package option, we don't forget to have it on the sub-option.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 02/11] package/mpd: remove duplicated dependencies from sub-options
Hi Thomas, Everyone,
Quoted 10 lines · Thomas Petazzoni
Hello Andreas,
Thanks for your patch!
Quoted 5 lines · Andreas Ziegler
After various updates since version 0.20, most dependencies placing restrictions on sub-components are now superseded by restrictions placed on MPD itself. Example:
io_uringneeds kernel headers > 5.1; MPD needs kernel headers > 5.6.
Quoted 7 lines
Quoted 3 lines
Remove dependencies from sub-options if they are already imposed on MPD.
Signed-off-by Andreas Ziegler <[email protected]>Actually the general policy in Buildroot is somewhat the opposite of what you're proposing here, even though I admit our general policy may not be applied anywhere.
OK, if this is the general policy, I will just drop this change.
Quoted 8 lines
The reasoning for this policy is that it is either to review/verify when an option "select" another one, that all "depends on" have properly been replicated. Yes, this means potentially some duplication of "depends on" between the main package option and the sub-options, but it also allows to ensure that if we remove/change one of those "depends on" from the main package option, we don't forget to have it on the sub-option.
Quoted 7 lines
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
Kind regards,
Andreas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 02/11] package/mpd: remove duplicated dependencies from sub-options
In reply to Thomas Petazzoni via buildroot[resend due to missing CC]
Hi Thomas, Everyone,
Quoted 10 lines · Thomas Petazzoni
Hello Andreas,
Thanks for your patch!
Quoted 5 lines · Andreas Ziegler
After various updates since version 0.20, most dependencies placing restrictions on sub-components are now superseded by restrictions placed on MPD itself. Example:
io_uringneeds kernel headers > 5.1; MPD needs kernel headers > 5.6.
Quoted 7 lines
Quoted 3 lines
Remove dependencies from sub-options if they are already imposed on MPD.
Signed-off-by Andreas Ziegler <[email protected]>Actually the general policy in Buildroot is somewhat the opposite of what you're proposing here, even though I admit our general policy may not be applied anywhere.
OK, if this is the general policy, I will just drop this change.
Quoted 8 lines
The reasoning for this policy is that it is either to review/verify when an option "select" another one, that all "depends on" have properly been replicated. Yes, this means potentially some duplication of "depends on" between the main package option and the sub-options, but it also allows to ensure that if we remove/change one of those "depends on" from the main package option, we don't forget to have it on the sub-option.
Quoted 7 lines
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
Kind regards,
Andreas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 3/11 package/mpd: reorder config items based on order in meson_options.txt
In reply to Andreas ZieglerMPD has 99 configurable options; of these, 44 are exposed in Buildroot's Config.in. Sort order and grouping of these options are different within the MPD project and Buildroot, which makes a comparison difficult.
Reorder entries in Config.in to reflect their order in meson_options.txt. Also update at least some of the help texts to more closely resemble what is published in the MPD manual.
--- package/mpd/Config.in | 345 +++++++++++++++++++++++------------------- 1 file changed, 187 insertions(+), 158 deletions(-)
package/mpd/Config.in +187 -158
@@ -20,26 +20,148 @@ menuconfig BR2_PACKAGE_MPD if BR2_PACKAGE_MPD -comment "Archive plugins" +# linux kernel features -config BR2_PACKAGE_MPD_BZIP2 - bool "bzip2" - select BR2_PACKAGE_BZIP2 +config BR2_PACKAGE_MPD_IO_URING + bool "io_uring" + select BR2_PACKAGE_LIBURING help - Enable bzip2 archive support. + Asynchronous I/O using kernel io_uring subsystem -config BR2_PACKAGE_MPD_SQLITE - bool "sqlite" - select BR2_PACKAGE_SQLITE +comment "Network support" + +config BR2_PACKAGE_MPD_TCP + bool "tcp sockets" + default y help - Enable sqlite database support. - If you don't use sqlite it will use an ASCII database. + Enable MPD to listen on tcp sockets. -config BR2_PACKAGE_MPD_ZZIP - bool "zzip" - select BR2_PACKAGE_ZZIPLIB + You want this on if MPD and the client(s) work + on different machines (the usual scenario). + +comment "Audio formats" + +config BR2_PACKAGE_MPD_DSD + bool "dsd" + help + Enable DSD audio support. + +comment "Database plugins" + +choice + prompt "UPnP" + default BR2_PACKAGE_MPD_UPNP_PUPNP if BR2_PACKAGE_MPD_UPNP # legacy + default BR2_PACKAGE_MPD_UPNP_DISABLED + help + Enable MPD to access a UPnP based media server. + + For further information, see + https://www.lesbonscomptes.com/upmpdcli/pages/upmpdcli-or-mpdupnp.html + +config BR2_PACKAGE_MPD_UPNP_PUPNP + bool "pupnp" + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_LIBUPNP + select BR2_PACKAGE_MPD_CURL + help + Provides UPnP database access through libupnp + (the legacy Portable SDK for UPnP devices). + + Introduces least additional dependencies. + +config BR2_PACKAGE_MPD_UPNP_NPUPNP + bool "npupnp" + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_LIBNPUPNP + select BR2_PACKAGE_MPD_CURL + help + Provides UPnP database access through libnpupnp + (a C++ reimplementation of the Portable UPnP library). + + This implementation is more modern, but also brings + additional features not needed in this context, thus + consuming more space. + +config BR2_PACKAGE_MPD_UPNP_DISABLED + bool "disabled" + help + No UPnP client functionality. + +endchoice + +config BR2_PACKAGE_MPD_LIBMPDCLIENT + bool "libmpdclient" + select BR2_PACKAGE_MPD_TCP + select BR2_PACKAGE_LIBMPDCLIENT + help + Enable support for the proxy database plugin. Provides + access to the database of another MPD instance. + +if BR2_PACKAGE_MPD_LIBSMBCLIENT || \ + BR2_PACKAGE_MPD_UPNP_PUPNP || \ + BR2_PACKAGE_MPD_UPNP_NPUPNP + +comment "Neighbour plugins" + +config BR2_PACKAGE_MPD_NEIGHBOR_DISCOVERY_SUPPORT + bool "neighbor discovery support" + help + Enable support for neighbor discovery. + This option can be used in conjunction with the smbclient + plugin to provide a list of SMB/CIFS servers or with the + UPnP plugin to provide a list of UPnP servers on the local + network. The neighbor plugin needs configuration in + mpd.conf. For further information take a look at the MPD + documentation. + +endif + +# Storage plugins not configurable, are disabled by default +# Playlist plugins not configurable, are enabled by default + +comment "Input plugins" + +config BR2_PACKAGE_MPD_CDIO_PARANOIA + bool "cdio-paranoia" + select BR2_PACKAGE_LIBCDIO_PARANOIA + help + Play audio CDs using cdio-paranoia. + +config BR2_PACKAGE_MPD_CURL + bool "curl" + select BR2_PACKAGE_MPD_TCP + select BR2_PACKAGE_LIBCURL + help + Open remote files or streams over HTTP using libcurl. + +config BR2_PACKAGE_MPD_LIBMMS + bool "mms" + select BR2_PACKAGE_LIBMMS help - Enable ZIP archive support. + Play streams with the MMS protocol using libmms. + +config BR2_PACKAGE_MPD_LIBNFS + bool "nfs" + select BR2_PACKAGE_LIBNFS + help + Allow MPD to access files on NFS servers without actually + mounting them (i.e. with libnfs in userspace, without help + from the kernel's VFS layer). + +config BR2_PACKAGE_MPD_LIBSMBCLIENT + bool "samba" + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_SAMBA4 + help + Allows MPD to access files on SMB/CIFS servers + (e.g. Samba or Microsoft Windows). + +comment "samba support needs a glibc toolchain w/ dynamic library, RPC" + depends on !BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_NATIVE_RPC comment "Commercial services"
@@ -52,30 +174,29 @@ config BR2_PACKAGE_MPD_QOBUZ help Play songs from the commercial streaming service Qobuz. -comment "Converter plugins" +comment "Archive plugins" -config BR2_PACKAGE_MPD_LIBSAMPLERATE - bool "libsamplerate" - select BR2_PACKAGE_LIBSAMPLERATE +config BR2_PACKAGE_MPD_BZIP2 + bool "bzip2" + select BR2_PACKAGE_BZIP2 help - Enable libsamplerate input support. - Select this for software sample rate conversion. + Allows to load single bzip2 compressed files using libbz2. -config BR2_PACKAGE_MPD_LIBSOXR - bool "libsoxr" - select BR2_PACKAGE_LIBSOXR +config BR2_PACKAGE_MPD_ZZIP + bool "zzip" + select BR2_PACKAGE_ZZIPLIB help - Enable libsoxr resampler support. - The SoX Resampler library performs software sample-rate - conversion. + Allows to load music files from ZIP archives using zziplib. -comment "Decoder plugins" +comment "Tag plugins" -config BR2_PACKAGE_MPD_DSD - bool "dsd" +config BR2_PACKAGE_MPD_ID3TAG + bool "id3tag" + select BR2_PACKAGE_LIBID3TAG help - Enable Digital Speech Decoder (DSD) support to play audio - files encoded in a digital speech format. + Enable ID3 support. + +comment "Decoder plugins" config BR2_PACKAGE_MPD_FAAD2 bool "faad2"
@@ -110,13 +231,6 @@ config BR2_PACKAGE_MPD_FLUIDSYNTH comment "fluidsynth support needs a toolchain w/ dynamic library" depends on BR2_STATIC_LIBS -config BR2_PACKAGE_MPD_LIBSNDFILE - bool "libsndfile" - select BR2_PACKAGE_LIBSNDFILE - help - Enable libsndfile input/streaming support. - Select this if you want to play back WAV files. - config BR2_PACKAGE_MPD_MAD bool "mad" default y
@@ -154,6 +268,13 @@ config BR2_PACKAGE_MPD_SIDPLAY help Enable C64 SID support. +config BR2_PACKAGE_MPD_LIBSNDFILE + bool "sndfile" + select BR2_PACKAGE_LIBSNDFILE + help + Enable libsndfile input/streaming support. + Select this if you want to play back WAV files. + config BR2_PACKAGE_MPD_TREMOR bool "tremor" depends on !BR2_PACKAGE_MPD_VORBIS
@@ -182,58 +303,39 @@ config BR2_PACKAGE_MPD_WAVPACK comment "Encoder plugins" +comment "for ogg/vorbis encoding enable vorbis decoder" + depends on ! BR2_PACKAGE_MPD_VORBIS + config BR2_PACKAGE_MPD_LAME bool "lame" select BR2_PACKAGE_LAME help - Enable lame (mp3) encoding support. + Encodes into MP3 using the LAME library. config BR2_PACKAGE_MPD_TWOLAME bool "twolame" select BR2_PACKAGE_TWOLAME help - Enable TwoLAME mp2 encoding. + Encodes into MP2 using the TwoLAME library. -comment "Input plugins" +comment "Filter plugins" -config BR2_PACKAGE_MPD_CDIO_PARANOIA - bool "cdio-paranoia" - select BR2_PACKAGE_LIBCDIO_PARANOIA - help - Enable cdio-paranoia support. - -config BR2_PACKAGE_MPD_CURL - bool "curl" - select BR2_PACKAGE_MPD_TCP - select BR2_PACKAGE_LIBCURL +config BR2_PACKAGE_MPD_LIBSAMPLERATE + bool "libsamplerate" + select BR2_PACKAGE_LIBSAMPLERATE help - Enable curl streaming (http) support. + libsamplerate (also known as Secret Rabbit Code) is a library + for performing sample rate conversion of audio data. -config BR2_PACKAGE_MPD_LIBMMS - bool "mms" - select BR2_PACKAGE_LIBMMS - help - Enable MMS support. + https://libsndfile.github.io/libsamplerate -config BR2_PACKAGE_MPD_LIBNFS - bool "nfs" - select BR2_PACKAGE_LIBNFS +config BR2_PACKAGE_MPD_LIBSOXR + bool "libsoxr" + select BR2_PACKAGE_LIBSOXR help - Enable Network File System (NFS) support. - -comment "samba support needs a glibc toolchain w/ dynamic library, RPC" - depends on !BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS || \ - !BR2_TOOLCHAIN_HAS_NATIVE_RPC + High quality, one-dimensional sample-rate conversion library. -config BR2_PACKAGE_MPD_LIBSMBCLIENT - bool "samba" - depends on BR2_TOOLCHAIN_USES_GLIBC - depends on !BR2_STATIC_LIBS - depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC - depends on BR2_TOOLCHAIN_HAS_SYNC_4 - select BR2_PACKAGE_SAMBA4 - help - Enable Samba support. + https://sourceforge.net/p/soxr/wiki/Home comment "Output plugins"
@@ -305,7 +407,16 @@ config BR2_PACKAGE_MPD_SHOUTCAST help Enable shoutcast streaming output support. -comment "Miscellaneous plugins" +comment "Miscellaneous libraries" + +config BR2_PACKAGE_MPD_SQLITE + bool "sqlite" + select BR2_PACKAGE_SQLITE + help + Select this to enable the sticker database. + + Stickers are pieces of information attached to songs. Some + clients use them to store ratings and other volatile data. config BR2_PACKAGE_MPD_AVAHI_SUPPORT bool "avahi (zeroconf) support"
@@ -315,6 +426,7 @@ config BR2_PACKAGE_MPD_AVAHI_SUPPORT select BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY help Enable Avahi (zeroconf) support. + Select this for multicast DNS/DNS-SD service discovery support. This allows MPD to publish service information on a local network.
@@ -322,89 +434,6 @@ config BR2_PACKAGE_MPD_AVAHI_SUPPORT comment "avahi support needs a toolchain w/ dynamic library" depends on BR2_STATIC_LIBS -config BR2_PACKAGE_MPD_IO_URING - bool "io_uring" - select BR2_PACKAGE_LIBURING - help - Asynchronous I/O using kernel io_uring subsystem - -config BR2_PACKAGE_MPD_LIBMPDCLIENT - bool "libmpdclient" - select BR2_PACKAGE_MPD_TCP - select BR2_PACKAGE_LIBMPDCLIENT - help - Enable libmpdclient support. - -config BR2_PACKAGE_MPD_NEIGHBOR_DISCOVERY_SUPPORT - bool "neighbor discovery support" - depends on BR2_PACKAGE_MPD_LIBSMBCLIENT || !BR2_PACKAGE_MPD_UPNP_DISABLED - help - Enable support for neighbor discovery. - This option can be used in conjunction with the smbclient - plugin to provide a list of SMB/CIFS servers or with the - UPnP plugin to provide a list of UPnP servers on the local - network. The neighbor plugin needs configuration in - mpd.conf. For further information take a look at the MPD - documentation. - -config BR2_PACKAGE_MPD_TCP - bool "tcp sockets" - default y - help - Enable MPD to listen on tcp sockets. - - You want this on if MPD and the client(s) work - on different machines (the usual scenario). - -choice - prompt "UPnP" - default BR2_PACKAGE_MPD_UPNP_PUPNP if BR2_PACKAGE_MPD_UPNP # legacy - default BR2_PACKAGE_MPD_UPNP_DISABLED - help - Enable MPD to access a UPnP based media server. - - For further information, see - https://www.lesbonscomptes.com/upmpdcli/pages/upmpdcli-or-mpdupnp.html - -config BR2_PACKAGE_MPD_UPNP_PUPNP - bool "pupnp" - select BR2_PACKAGE_EXPAT - select BR2_PACKAGE_LIBUPNP - select BR2_PACKAGE_MPD_CURL - help - Provides UPnP database access through libupnp - (the legacy Portable SDK for UPnP devices). - - Introduces least additional dependencies. - -config BR2_PACKAGE_MPD_UPNP_NPUPNP - bool "npupnp" - select BR2_PACKAGE_EXPAT - select BR2_PACKAGE_LIBNPUPNP - select BR2_PACKAGE_MPD_CURL - help - Provides UPnP database access through libnpupnp - (a C++ reimplementation of the Portable UPnP library). - - This implementation is more modern, but also brings - additional features not needed in this context, thus - consuming more space. - -config BR2_PACKAGE_MPD_UPNP_DISABLED - bool "disabled" - help - No UPnP client functionality. - -endchoice - -comment "Tag plugins" - -config BR2_PACKAGE_MPD_ID3TAG - bool "id3tag" - select BR2_PACKAGE_LIBID3TAG - help - Enable ID3 support. - endif comment "mpd needs a toolchain w/ C++, threads, wchar, host-gcc 10, gcc 12, headers 5.6"
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 03/11] package/mpd: reorder config items based on order in meson_options.txt
Hello Andreas,
Quoted 7 lines · Andreas Ziegler
MPD has 99 configurable options; of these, 44 are exposed in Buildroot's Config.in. Sort order and grouping of these options are different within the MPD project and Buildroot, which makes a comparison difficult.
Reorder entries in Config.in to reflect their order in meson_options.txt. Also update at least some of the help texts to more closely resemble what is published in the MPD manual.
Thanks for your patch.
The Buildroot policy in terms of sorting options in Config.in is rather "alphabetic ordering" and not "whatever order is used in the upstream meson_options.txt or configure.ac".
Note that it is very possible that alphabetic ordering is already broken, in which case it would be totally OK to fix. But we will prefer to keep alphabetic ordering vs. meson_options.txt ordering. This is most notably to have a consistent policy between all our packages.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 03/11] package/mpd: reorder config items based on order in meson_options.txt
Hi Thomas, Everyone,
Quoted 11 lines · Thomas Petazzoni
Hello Andreas,
Quoted 7 lines · Andreas Ziegler
MPD has 99 configurable options; of these, 44 are exposed in Buildroot's Config.in. Sort order and grouping of these options are different within the MPD project and Buildroot, which makes a comparison difficult.
Reorder entries in Config.in to reflect their order in meson_options.txt. Also update at least some of the help texts to more closely resemble what is published in the MPD manual.
Quoted 5 lines
Thanks for your patch.
The Buildroot policy in terms of sorting options in Config.in is rather "alphabetic ordering" and not "whatever order is used in the upstream meson_options.txt or configure.ac".
The original order in the mpd Config.in was by functional groups. These are indeed sorted alphabetical. Using the meson_options.txt order would make comparisons much easier ...
Quoted 5 lines
Note that it is very possible that alphabetic ordering is already broken, in which case it would be totally OK to fix. But we will prefer to keep alphabetic ordering vs. meson_options.txt ordering. This is most notably to have a consistent policy between all our packages.
I will leave the file as-is for now.
Quoted 7 lines
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
Kind regards,
Andreas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 4/11 support/testing: add test data for mpd (1/6)
In reply to Andreas Ziegler---
Changes v1 -> v2:
separate test data from test scripts
create archive chunks of test data that are re-combined during build
.../testing/tests/package/test_mpd/_test_data0 | Bin 0 -> 223630 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 support/testing/tests/package/test_mpd/_test_data0
support/testing/tests/package/test_mpd/_test_data0 new file binary +0 -0
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 04/11] support/testing: add test data for mpd (1/6)
Hello Andreas,
Quoted 5 lines · Andreas Ziegler
Signed-off-by Andreas Ziegler <[email protected]>---
Changes v1 -> v2:
separate test data from test scripts
create archive chunks of test data that are re-combined during build
I am sorry but unfortunately, I disagree with the addition of such significant obscure binary blobs in Buildroot, for two reasons:
1. It adds a significant weight (in terms of size) to Buildroot if each and every test comes with 1 MB of test data
2. There is no way to know/verify what this obscure binary data is. When I saw your patches the immediate thing that came to my mind is: "it looks like the xz backdoor where some obscure test data was used to sneak in some malicious code".
So I don't know what this data is, but instead you have two options:
1. Generate it at run-time during the test, if at all possible
2. Create a Buildroot package that downloads test data. "mpd" probably needs music, so you can create a Buildroot package in a br2-external inside the mpd test that downloads a bunch of music files, and puts them inside the test root filesystem.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 04/11] support/testing: add test data for mpd (1/6)
Hi Thomas, Everyone,
Quoted 20 lines · Thomas Petazzoni
Hello Andreas,
Quoted 5 lines · Andreas Ziegler
Signed-off-by Andreas Ziegler <[email protected]>---
Changes v1 -> v2:
separate test data from test scripts
create archive chunks of test data that are re-combined during buildI am sorry but unfortunately, I disagree with the addition of such significant obscure binary blobs in Buildroot, for two reasons:
1. It adds a significant weight (in terms of size) to Buildroot if each and every test comes with 1 MB of test data
2. There is no way to know/verify what this obscure binary data is. When I saw your patches the immediate thing that came to my mind is: "it looks like the xz backdoor where some obscure test data was used to sneak in some malicious code".
Quoted 8 lines
So I don't know what this data is, but instead you have two options:
1. Generate it at run-time during the test, if at all possible
2. Create a Buildroot package that downloads test data. "mpd" probably needs music, so you can create a Buildroot package in a br2-external inside the mpd test that downloads a bunch of music files, and puts them inside the test root filesystem.
I will put the test data in a repository and download it during the build. It needs to be present at the start of the system, otherwise more effort is needed to integrate it.
Any reason to use a complete package? Download via post-build.sh could also be an option ...
Quoted 7 lines
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
Kind regards,
Andreas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 04/11] support/testing: add test data for mpd (1/6)
Quoted 3 lines · Andreas Ziegler
I will put the test data in a repository and download it during the build. It needs to be present at the start of the system, otherwise more effort is needed to integrate it.
But what is that test data? Why does it need to be more special that normal music files?
Quoted 2 lines
Any reason to use a complete package? Download via
post-build.shcould also be an option ...
Because we don't want random downloads to happen during the build, as it breaks "make source", "make legal-info", it doesn't have hash-checking, etc.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 04/11] support/testing: add test data for mpd (1/6)
Quoted 8 lines · Thomas Petazzoni
Quoted 3 lines · Andreas Ziegler
I will put the test data in a repository and download it during the build. It needs to be present at the start of the system, otherwise more effort is needed to integrate it.
But what is that test data? Why does it need to be more special that normal music files?
Because of legal issues I cannot use (copyrighted) existing music files. I do not like online download sites, because it's difficult to predict what you get. So I prepared some audio files, containing test signals, which are tagged to resemble music files. The whole thing needs a structure (aka directory tree), because it is also intended to validate correct indexing by mpd.
The runtime test is just a very basic representation of what I normally do to validate the correct function of a fresh build.
Quoted 6 lines
Quoted 2 lines
Any reason to use a complete package? Download via
post-build.shcould also be an option ...Because we don't want random downloads to happen during the build, as it breaks "make source", "make legal-info", it doesn't have hash-checking, etc.
Understood.
Quoted 7 lines
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
Kind regards,
Andreas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 04/11] support/testing: add test data for mpd (1/6)
Hello,
Quoted 1 line · Andreas Ziegler
Because of legal issues I cannot use (copyrighted) existing music files. I
I'm sure you aware that there is music that you're allowed to download? Some music is in the public domain, and some music is distributed under Creative Commons or other "open-source" licenses.
Quoted 5 lines
do not like online download sites, because it's difficult to predict what you get. So I prepared some audio files, containing test signals, which are tagged to resemble music files. The whole thing needs a structure (aka directory tree), because it is also intended to validate correct indexing by mpd.
Then those test signals can be generated as part of the runtime test itself, no?
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 04/11] support/testing: add test data for mpd (1/6)
Hi Thomas, Everyone,
Quoted 9 lines · Thomas Petazzoni
Hello,
Quoted 1 line · Andreas Ziegler
Because of legal issues I cannot use (copyrighted) existing music files. I
I'm sure you aware that there is music that you're allowed to download? Some music is in the public domain, and some music is distributed under Creative Commons or other "open-source" licenses.
Yes, some of them even conveniently in github archives. But all of them untagged. Mpd uses the tags to structure the music library it build and untagged files all end up in unknown artist/unknown album.
Quoted 8 lines
Quoted 5 lines
do not like online download sites, because it's difficult to predict what you get. So I prepared some audio files, containing test signals, which are tagged to resemble music files. The whole thing needs a structure (aka directory tree), because it is also intended to validate correct indexing by mpd.
Then those test signals can be generated as part of the runtime test itself, no?
Fiona had the same idea, but I refuse to add the extra complexity of adding ffmpeg and imagemagick to a test that was originally intended to test the correct function of mpd. This approximately triples the potential failure rate (complexity of added components is of the same magnitude as mpd).
I am tempted to just throw out the whole test case, and just check if the mpd process was started ... It is not very indicative for proper functionality; most issues I usually have with mpd (apart from failed builds) are related to refusing to play music, misplaced tags and not showing albumart.
Quoted 7 lines
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
Kind regards,
Andreas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 5/11 support/testing: add test data for mpd (2/6)
In reply to Andreas Ziegler--- .../testing/tests/package/test_mpd/_test_data1 | Bin 0 -> 223630 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 support/testing/tests/package/test_mpd/_test_data1
support/testing/tests/package/test_mpd/_test_data1 new file binary +0 -0
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 6/11 support/testing: add test data for mpd (3/6)
In reply to Andreas Ziegler--- .../testing/tests/package/test_mpd/_test_data2 | Bin 0 -> 223630 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 support/testing/tests/package/test_mpd/_test_data2
support/testing/tests/package/test_mpd/_test_data2 new file binary +0 -0
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot