mpd: update to 0.23.17
authorAlexandru Ardelean <redacted>
Wed, 22 Apr 2026 09:19:58 +0000 (12:19 +0300)
committerAlexandru Ardelean <redacted>
Wed, 6 May 2026 18:05:36 +0000 (21:05 +0300)
Drop 020-string-view.patch: mpd 0.23.17 uses std::string_view directly
in src/tag/GenParseName.cxx, making the patch redundant.

Changes since 0.23.16:
- Optimize the "albumart" command to send larger chunks when available
- Explicitly disallow 'idle' and 'noidle' commands in command lists
- Require libnfs 4.0 or later for NFS storage support
- Trigger inotify database update after symlink creation
- Prefer FFmpeg over sndfile and audiofile for DTS-WAV support
- Add support for libfmt 11.1

Signed-off-by: Alexandru Ardelean <redacted>
sound/mpd/Makefile
sound/mpd/files/mpd.init
sound/mpd/patches/020-string-view.patch [deleted file]
sound/mpd/test.sh [new file with mode: 0644]

index d70d501737750664f284ad236a93510b1376df1a..45abd2a6be5ca9f719abae446e4b39521ea63f0c 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpd
-PKG_VERSION:=0.23.16
-PKG_RELEASE:=2
+PKG_VERSION:=0.23.17
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.23
-PKG_HASH:=9668e36df80de485683c962d02845bf314d8a08e6141af7afeff76401e32b2c1
+PKG_HASH:=a86f4fe811695743b08db82a9f1a840b8918bb4f46b06f48aa1d8d1b5386dff2
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=GPL-2.0-or-later
index f89049d6cc5570b42ab986e29e9f26a12b1baa4e..93bffd1e5fa54a165fb40c79dcb3a3e27dd0bccd 100644 (file)
@@ -18,7 +18,8 @@ start_service() {
        local pld lport
 
        #create mpd directories from config
-       pld=$(grep ^playlist_directory "$CONFIGFILE" | cut -d "\"" -f 2 | sed "s/~/\/root/g")
+       pld=$(grep ^playlist_directory "$CONFIGFILE" | head -1 | cut -d '"' -f 2 | sed "s/~/\/root/g")
+       [ -z "$pld" ] && pld="/tmp/mpd"
        if [ ! -d "$pld" ]; then
                mkdir -m 0755 -p "$pld"
                chown $USER:$GROUP $pld
diff --git a/sound/mpd/patches/020-string-view.patch b/sound/mpd/patches/020-string-view.patch
deleted file mode 100644 (file)
index 75ad50e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/src/tag/GenParseName.cxx
-+++ b/src/tag/GenParseName.cxx
-@@ -21,7 +21,13 @@
- #include <cstdlib>
- #include <map>
-+#if __has_include("<string_view>")
- #include <string_view>
-+using std::string_view;
-+#else
-+#include <boost/utility/string_view.hpp>
-+using boost::string_view;
-+#endif
- #include <stdio.h>
-@@ -41,7 +47,7 @@ main(int argc, char **argv)
-       FILE *out = fopen(argv[1], "w");
--      std::map<std::string_view, TagType> names;
-+      std::map<string_view, TagType> names;
-       for (unsigned i = 0; i < unsigned(TAG_NUM_OF_ITEM_TYPES); ++i)
-               names[tag_item_names[i]] = TagType(i);
diff --git a/sound/mpd/test.sh b/sound/mpd/test.sh
new file mode 100644 (file)
index 0000000..4e0c413
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+_mpd_test() {
+       # Version check
+       mpd --version | grep -F "$2"
+
+       # Confirm the binary reports at least one supported output plugin;
+       # "null" is always compiled in and safe for testing.
+       mpd --version | grep -i "null"
+
+       # Test playlist_directory parsing logic from the init script:
+       # explicit value
+       _cfg=/tmp/mpd-pldtest.conf
+       printf 'playlist_directory "/tmp/mpd-pld-explicit"\n' > "$_cfg"
+       _pld=$(grep ^playlist_directory "$_cfg" | head -1 | cut -d '"' -f 2 | sed "s/~/\/root/g")
+       [ -z "$_pld" ] && _pld="/tmp/mpd"
+       [ "$_pld" = "/tmp/mpd-pld-explicit" ] || {
+               echo "FAIL: pld='$_pld', expected /tmp/mpd-pld-explicit"
+               rm -f "$_cfg"; exit 1
+       }
+
+       # Test default fallback when playlist_directory is absent
+       printf '# playlist_directory commented out\n' > "$_cfg"
+       _pld=$(grep ^playlist_directory "$_cfg" | head -1 | cut -d '"' -f 2 | sed "s/~/\/root/g")
+       [ -z "$_pld" ] && _pld="/tmp/mpd"
+       [ "$_pld" = "/tmp/mpd" ] || {
+               echo "FAIL: pld='$_pld', expected /tmp/mpd default"
+               rm -f "$_cfg"; exit 1
+       }
+       rm -f "$_cfg"
+
+       # Set playlist_directory in the installed config so the init script
+       # has a valid path to create on first service start.
+       grep -q ^playlist_directory /etc/mpd.conf || \
+               printf '\nplaylist_directory "/tmp/mpd"\n' >> /etc/mpd.conf
+}
+
+case "$1" in
+mpd-full|mpd-mini)
+       _mpd_test "$@"
+       ;;
+esac
git clone https://git.99rst.org/PROJECT