From e49cf0ec38007af444fb13974cfe094255d2b3fe Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 16 Jan 2023 19:03:43 +0100 Subject: [PATCH 1/9] python/build/libs.py: update Boost to 1.81.0 --- python/build/libs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index 4f35588e8..a4a6b6cbf 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -450,7 +450,7 @@ jack = JackProject( ) boost = BoostProject( - 'https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2', - '1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0', + 'https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2', + '71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa', 'include/boost/version.hpp', ) From c1780ac6570506d85d51990d71eaff9edcb1badc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 16 Jan 2023 19:06:07 +0100 Subject: [PATCH 2/9] python/build/libs.py: update CURL to 7.87.0 --- python/build/libs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index a4a6b6cbf..c9cebf372 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -393,8 +393,8 @@ openssl = OpenSSLProject( ) curl = CmakeProject( - 'https://curl.se/download/curl-7.86.0.tar.xz', - '2d61116e5f485581f6d59865377df4463f2e788677ac43222b496d4e49fb627b', + 'https://curl.se/download/curl-7.87.0.tar.xz', + 'ee5f1a1955b0ed413435ef79db28b834ea5f0fb7c8cfb1ce47175cc3bee08fff', 'lib/libcurl.a', [ '-DBUILD_CURL_EXE=OFF', From 60d04052c533d5e28700a4a47ba10d7461abcfa8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 16 Jan 2023 19:41:36 +0100 Subject: [PATCH 3/9] NEWS: mention the GCC13 fixes --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index 84f657064..d9579fc02 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.23.12 (not yet released) * tags - fix crash bug due to race condition +* fix build failures with GCC 13 ver 0.23.11 (2022/11/28) * database From 0948c607b6947627569923c43bf131376369ef23 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 16 Jan 2023 19:42:32 +0100 Subject: [PATCH 4/9] lib/curl/meson.build: require CURL 7.55.0 or later For CURLINFO_CONTENT_LENGTH_DOWNLOAD_T (commit 4efd0a9f77d2). --- NEWS | 2 ++ src/lib/curl/meson.build | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d9579fc02..375220511 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.23.12 (not yet released) +* input + - curl: require CURL 7.55.0 or later * tags - fix crash bug due to race condition * fix build failures with GCC 13 diff --git a/src/lib/curl/meson.build b/src/lib/curl/meson.build index a0f9647fb..e1cc8adcf 100644 --- a/src/lib/curl/meson.build +++ b/src/lib/curl/meson.build @@ -1,4 +1,4 @@ -curl_dep = dependency('libcurl', version: '>= 7.33', required: get_option('curl')) +curl_dep = dependency('libcurl', version: '>= 7.55', required: get_option('curl')) conf.set('ENABLE_CURL', curl_dep.found()) if not curl_dep.found() subdir_done() From ad7d47a8baf7e5f4e2a4e5925cf3231e39967010 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 17 Jan 2023 11:48:47 +0100 Subject: [PATCH 5/9] output/PipeWire: use PW_KEY_TARGET_OBJECT with PipeWire 0.3.64 Closes https://github.com/MusicPlayerDaemon/MPD/issues/1721 --- NEWS | 2 ++ src/output/plugins/PipeWireOutputPlugin.cxx | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 375220511..f940f5988 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ ver 0.23.12 (not yet released) - curl: require CURL 7.55.0 or later * tags - fix crash bug due to race condition +* output + - pipewire: adjust to PipeWire 0.3.64 API change * fix build failures with GCC 13 ver 0.23.11 (2022/11/28) diff --git a/src/output/plugins/PipeWireOutputPlugin.cxx b/src/output/plugins/PipeWireOutputPlugin.cxx index e2c8215eb..aa5b0eb66 100644 --- a/src/output/plugins/PipeWireOutputPlugin.cxx +++ b/src/output/plugins/PipeWireOutputPlugin.cxx @@ -523,7 +523,13 @@ PipeWireOutput::Open(AudioFormat &audio_format) pw_properties_setf(props, PW_KEY_REMOTE_NAME, "%s", remote); if (target != nullptr && target_id == PW_ID_ANY) - pw_properties_setf(props, PW_KEY_NODE_TARGET, "%s", target); + pw_properties_setf(props, +#if PW_CHECK_VERSION(0, 3, 64) + PW_KEY_TARGET_OBJECT, +#else + PW_KEY_NODE_TARGET, +#endif + "%s", target); #ifdef PW_KEY_NODE_RATE /* ask PipeWire to change the graph sample rate to ours From 15a1973e2862832c99062f7d660f07ee3c795d05 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 17 Jan 2023 17:38:19 +0100 Subject: [PATCH 6/9] decoder/mad: fix integer underflow with very small files When drop_start_samples and drop_end_samples overlap and are greater than the actual number of samples, the `num_samples` calculation in SubmitPCM() could underflow. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1712 --- NEWS | 2 ++ src/decoder/plugins/MadDecoderPlugin.cxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f940f5988..ec219f9f5 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.23.12 (not yet released) * input - curl: require CURL 7.55.0 or later +* decoder + - mad: fix integer underflow with very small files * tags - fix crash bug due to race condition * output diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx index b76a93a29..2fede13d4 100644 --- a/src/decoder/plugins/MadDecoderPlugin.cxx +++ b/src/decoder/plugins/MadDecoderPlugin.cxx @@ -843,7 +843,7 @@ MadDecoder::SynthAndSubmit() noexcept size_t pcm_length = synth.pcm.length; if (drop_end_samples && current_frame == max_frames - drop_end_frames - 1) { - if (drop_end_samples >= pcm_length) + if (i + drop_end_samples >= pcm_length) return DecoderCommand::STOP; pcm_length -= drop_end_samples; From 3cacb56bb7dd10dede9f6786c21203d662e99e57 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 17 Jan 2023 18:47:50 +0100 Subject: [PATCH 7/9] fs/StandardDirectory: don't fall back to getpwuid() without $HOME If the environment variable $HOME does not exist, don't attempt to obtain it from /etc/passwd; without $HOME, the calling process indicates that it does not wish MPD to access the home directory. This also prevents MPD from attempting to load `/root/.config/mpd/mpd.conf` if MPD got started as global systemd service. Reading from there makes no sense, only /etc/mpd.conf shall be used then. This piece of code was initially added by commit 5d857921783996. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1687 --- meson.build | 1 - src/fs/StandardDirectory.cxx | 14 +------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/meson.build b/meson.build index 467297e0f..ae8a7a14b 100644 --- a/meson.build +++ b/meson.build @@ -205,7 +205,6 @@ enable_daemon = not is_windows and not is_android and get_option('daemon') conf.set('ENABLE_DAEMON', enable_daemon) conf.set('HAVE_GETPWNAM_R', compiler.has_function('getpwnam_r')) -conf.set('HAVE_GETPWUID_R', compiler.has_function('getpwuid_r')) conf.set('HAVE_INITGROUPS', compiler.has_function('initgroups')) conf.set('HAVE_FNMATCH', compiler.has_function('fnmatch')) diff --git a/src/fs/StandardDirectory.cxx b/src/fs/StandardDirectory.cxx index ad0ae2118..1ff5de098 100644 --- a/src/fs/StandardDirectory.cxx +++ b/src/fs/StandardDirectory.cxx @@ -34,7 +34,6 @@ #include #else #include -#include #include #endif @@ -80,15 +79,6 @@ public: return result != nullptr; } - bool ReadByUid(uid_t uid) { -#ifdef HAVE_GETPWUID_R - getpwuid_r(uid, &pw, buf.data(), buf.size(), &result); -#else - result = getpwuid(uid); -#endif - return result != nullptr; - } - const passwd *operator->() { assert(result != nullptr); return result; @@ -375,10 +365,8 @@ GetHomeDir() noexcept if (const auto home = getenv("HOME"); IsValidPathString(home) && IsValidDir(home)) return AllocatedPath::FromFS(home); - - if (PasswdEntry pw; pw.ReadByUid(getuid())) - return SafePathFromFS(pw->pw_dir); #endif + return nullptr; } From b3897df682ce7d22002d8feb124e585cfb3eeb08 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 17 Jan 2023 18:53:15 +0100 Subject: [PATCH 8/9] decoder/mad: add assert() --- src/decoder/plugins/MadDecoderPlugin.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx index 2fede13d4..7e34c25b1 100644 --- a/src/decoder/plugins/MadDecoderPlugin.cxx +++ b/src/decoder/plugins/MadDecoderPlugin.cxx @@ -798,6 +798,8 @@ MadDecoder::UpdateTimerNextFrame() noexcept DecoderCommand MadDecoder::SubmitPCM(size_t i, size_t pcm_length) noexcept { + assert(i <= pcm_length); + size_t num_samples = pcm_length - i; mad_fixed_to_24_buffer(output_buffer, synth.pcm, From d91da9679801224847c30147f5914785b6f8f240 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 17 Jan 2023 18:54:47 +0100 Subject: [PATCH 9/9] release v0.23.12 --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ec219f9f5..b6322e829 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -ver 0.23.12 (not yet released) +ver 0.23.12 (2023/01/17) * input - curl: require CURL 7.55.0 or later * decoder