Commit Graph

2124 Commits

Author SHA1 Message Date
Max Kellermann c83ab0dc58 unix/SignalHandlers: shut down if parent process dies in --no-daemon mode
By default, if the parent of a process dies, the process gets SIGHUP
and is supposed to shut down.  This however doesn't work for MPD,
because MPD redefines SIGHUP with a different meaning (like most
daemons do).

To work around this, we configure the kernel to send SIGTERM instead
of SIGHUP.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1706
2023-03-06 13:00:07 +01:00
Max Kellermann 04e60d67ae command/playlist: allow range in "playlistmove"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1689
2023-03-06 12:01:45 +01:00
Max Kellermann 9bcba41cd6 Merge branch 'pipewire-lock' of https://github.com/ncfavier/MPD
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1753
2023-03-06 10:06:03 +01:00
Max Kellermann 5c5e522fcd output/jack: remove DLL support
This effectively reverts commit 0f02bbc2fe which was a horrible
kludge for JACK support on Windows.  Maintaining this kludge doesn't
seem worth the trouble (the JACK version was never updated), and
apparently nobody uses this.
2023-03-06 08:10:00 +01:00
Max Kellermann d5fafa1340 output/PipeWire: map tags "Date" and "Comment" 2023-03-06 07:48:25 +01:00
Max Kellermann c94eee6199 Merge branch 'master' of https://github.com/lerenwe/MPD-Windows-With-Libsample 2023-02-23 14:44:06 +01:00
Max Kellermann c30c293d6f input/async: check for errors in Seek()
Fixes a busy loop in BufferingInputStream::RunThreadLocked() because
the method never learns that seeking is ignored, even though the HTTP
stream is already broken and can never be read; nobody cared to check
for errors.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1727
2023-01-28 07:44:59 +01:00
Max Kellermann 3cc770a00b remove obsolete Boost dependency
Boost makes building a piece of software much more difficult than
necessary.  It's a huge library, and just uncompressing it takes a
considerable amount of time. MPD only used a tiny fraction of it, yet
its header bloat made the MPD build very slow.  Locating Boost was
difficult due to its arcane build system and its resistance to use
pkg-config; it's always a special case.  MPD could never use features
of newer Boost versions because Linux distributions always shipped old
Boost versions.  Boost made everything complicated and slow.

So, finally, after getting rid of GLib (commit ccdb94b06c), switching
to C++ and using Boost (commit 0801b3f495), we've finally get rid of
it 8 years later.

Unfortunately, I had to reimplement parts of it along the way
(e.g. IntrusiveList).  Kind of NIH, but on the other hand, compiling
MPD has become much easier for users.
2023-01-23 15:06:58 +01:00
Max Kellermann b1422fbda4 release v0.23.12
-----BEGIN PGP SIGNATURE-----
 
 iQJBBAABCgArFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmPG4OcNHG1heEBibGFy
 Zy5kZQAKCRAjbopYxttFElGQD/4lXFixr2fJuAWFYyFT4ebr2w7sPyhXwjlt5uCL
 HTaMxTgQbhMmkHbGEO96UbF7gROGfq+dyvYTEmjWcVPTr/US3M8/mjT9T/DCLj6+
 kF7rZM5ft6npqVxqikg/TQcUgoiSsgfI7dEK/vcXELPyx78bCaq0M0sd2GZvwiiM
 vK9cxxDJ/RkF2dtfXRfGTJlihgQxaiuBZx8Bi3wJjbjvi/Lg85cu3iot9zFy5iDN
 gNzC39dnPYv261lAT/LLNpzLYQzIFE5ul+8ucRNPo+mMS/odSPRdL9XYFDtarsqP
 3Va83DChg7S6/GWfDeW81mQYPDuZ+1rPqbV5zEGimPsDWP9RugzPpZiFJlZrh8w7
 MJp66RYxUWQpracRZIW4zMRiSzGSI3OXbvhx6qBmsn1CuQ19TkovWuRleD4lpfFv
 dFzKHrdatJivM3xvq6CSg8ws+Q6f/j5sw1gzfvOofPlpybtvIrCvlvw78sKLW5n1
 Ecwc+xN38bIVL3E2Ae6zeYQwArpB4+gKT3Wb+r3bjXz7YQYpETI3IbX0vixbl8pP
 9O4ZKot/khOCaQBiZ5hHmiDmF5kxofLnJE4qgGX/c87ZaMUsu7hoKzksy9v7Z9wj
 PNTshhWk1WrSwM1JnVjD5Ahz+Oe43UsKsGZ8Kturbuu+61uTX4QcmYpbaNilGnwk
 J0cLyw==
 =MW7q
 -----END PGP SIGNATURE-----

Merge tag 'v0.23.12'

release v0.23.12
2023-01-17 18:58:04 +01:00
Max Kellermann d91da96798 release v0.23.12 2023-01-17 18:54:47 +01:00
Max Kellermann 15a1973e28 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
2023-01-17 17:41:37 +01:00
Max Kellermann ad7d47a8ba output/PipeWire: use PW_KEY_TARGET_OBJECT with PipeWire 0.3.64
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1721
2023-01-17 11:50:09 +01:00
Max Kellermann 0948c607b6 lib/curl/meson.build: require CURL 7.55.0 or later
For CURLINFO_CONTENT_LENGTH_DOWNLOAD_T (commit 4efd0a9f77).
2023-01-16 19:42:48 +01:00
Max Kellermann 60d04052c5 NEWS: mention the GCC13 fixes 2023-01-16 19:41:37 +01:00
Max Kellermann 8a7b7dffec Merge branch 'v0.23.x' 2023-01-06 08:12:38 +01:00
gd abb28593ce TagBuilder::RemoveType: added missing tag pool lock before call to tag_pool_put_item 2022-12-29 08:43:10 +01:00
Max Kellermann 115693b046 increment version number to 0.23.12 2022-12-29 08:42:02 +01:00
Mike Bremford 6adff85fd6 Added "searchcount" command, a case-insensitive "count"
The `count` command isn't case-insensitive.  This adds `searchcount`
which is a case-insensitive version of `count`.
2022-12-18 08:29:14 +01:00
Max Kellermann 7f3868727b Log, client/Response, io/BufferedOutputStream: drop support for libfmt < 7
Remove some compatibility code.
2022-11-28 20:17:16 +01:00
Max Kellermann 8fe29f5728 release v0.23.11
-----BEGIN PGP SIGNATURE-----
 
 iQJBBAABCgArFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmOE2gINHG1heEBibGFy
 Zy5kZQAKCRAjbopYxttFEiugD/9OKEBR9tfrJvtVGuO2INtaMeAzlZ9swFYCkphF
 i2R7H9/9E0AvtgyFi/6EDNgFCBbnUzSIGbtdc78EwHE6GxeK/Q9G1fo9AC+6I8Ww
 2ScEV9NKIMGTbsRvoomKnGZWpvNTpadPlLa02bckXpKK3wQUPhLb8RAH3newZ0RC
 OXs+mzSRReRKpjUBxZsI+6f+aajM6/PoiOmBbrNbYbsSlkpKtLeW8ptkQxPME12B
 QD9e7yf9ZndYfoHJdmmPxfvIGIEDATCs8MzY8tFUYkhdbEk0C0aRZQTODQS3DATp
 0wrmlJzmceiN2nhKjthg1bvC+jobPywIuDZdrEuyFumN/EZxldKAUCezduV+Dohm
 UPkQp5yiSTZRZVYQMEOSW6cMndC7URFrtn643+jV7SGkTmmV6nVOyg4e9GR1BakT
 rY0nZGr7dwEInODkA5lXMhph3u8aZa2Mfo5B8m2aloGVHYOX1t3bH07ym5oJiviq
 eiQx/bMpaS6ECCSnmHPGDl0NHHWDiPGv96EyPO2N9oeWiNuZz/Fla0N99Mi/JbVI
 EpSHF89F+bfiw5qIeet93ZrXjwQjMuC6zofZ1jbVFek2eKszCZSNdx233VLz170G
 edyN5Vxy3r24YBy/nrZVXPRxsj65KOxF1TZ9SzHKmfnuU45a+JZjZuWz5yedPn2/
 3fy7oA==
 =eLEd
 -----END PGP SIGNATURE-----

Merge tag 'v0.23.11'

release v0.23.11
2022-11-28 17:00:38 +01:00
Max Kellermann 9866adff95 release v0.23.11 2022-11-28 16:55:46 +01:00
Max Kellermann cac88e8be5 python/build/libs.py: re-enable verbose error strings
This compile-time option is not about debug logging, but about
curl_easy_strerror().

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1670
2022-11-28 16:12:17 +01:00
Max Kellermann e9f6a3482c db/Configured: add default "cache_directory" setting 2022-11-28 14:24:52 +01:00
Max Kellermann 5d2e80f188 db/Configured: use GetAppCacheDir() instead of GetUserCacheDir() 2022-11-28 14:20:15 +01:00
Max Kellermann eaecbcafb2 PlaylistFile: disallow backslash in playlist names on Windows
The function spl_valid_name() should verify playlist names and prevent
path traversal, but it failed to do so on Windows, because it forgot
to check for backslashes.

This buggy piece of code was already present when stored playlists
were initially implemented in 2006 by commit 08003904d7, and
even during the many rounds of code refactoring, nobody ever bothered
to verify it.  D'oh!

(Thanks, Paul Arzelier)
2022-11-28 09:53:49 +01:00
Max Kellermann 73b5d0a9b9 system/Error: truncate the snprintf() return value
snprintf() does not return the (truncated) length actually written,
but the length that would be needed if the buffer were large enough.
This API usage mistake in FormatLastError() can lead to overflow of
the stack buffer, crashing the process (Windows only).

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1676
2022-11-28 09:42:37 +01:00
Max Kellermann d7f545721b lib/icu/Canonicalize: use unorm2_normalize() instead of u_strFoldCase()
unorm2_normalize() can case-fold as well, plus it applies Unicode
normalization which MPD should do for proper string comparisons.
2022-11-15 20:53:29 +01:00
Max Kellermann a0a11be79b Merge branch 'v0.23.x' 2022-11-08 14:36:09 +01:00
Max Kellermann 32bddfabea archive/plugins/meson.build: do not generate empty library
If no archive library was found, return from the "plugins" directory
without creating "libarchive_plugins.a".  Empty static libraries are
unsupported on some operating systems such as macOS.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1650
2022-11-03 20:36:00 +01:00
Max Kellermann 01c9c4507f python/build/libs.py: update OpenSSL to 3.0.7
Punycode hooray!
2022-11-03 10:28:13 +01:00
Max Kellermann 8c9d7bf07e increment version number to 0.23.11 2022-10-20 19:09:03 +02:00
Max Kellermann b4e3891912 Merge branch 'config_curl_conn_timeout' of https://github.com/geneticdrift/MPD 2022-10-16 11:45:19 +02:00
Max Kellermann d6d0f78e93 release v0.23.10
-----BEGIN PGP SIGNATURE-----
 
 iQJBBAABCgArFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmNJ2e0NHG1heEBibGFy
 Zy5kZQAKCRAjbopYxttFEjBYEACk4QtVnD52sGtz0CwThFYzekvkZHOBcP2fYOH7
 rVcQaNmV7Fpnv+iz+k7zrqhs/A8FgQq6KUNpUn3gzxae4KsA7i1yEpopIqfzRh71
 eVrjTGijMirddehsxKbkjZ1TZy5S+SkZ+Bu965qzXUZuIrErKm4m5xqkIxXBHMEc
 twK9BSCqlTT2vpND5cmX90T/NBDgZd3uQxQP2ohWjVXvg9ou2gtns18ZdYUVRTym
 rLqRLfx1rG1lS8hzKqUqt9YxbWSD606T4giC2vYg2+2OFA9VFh3TNCSaFgWEJMZe
 ou6iaX+aSoCP+H6nktxfYravwdmHvBseRtrOouxPd8Br2k1eSQGXEVlZVTKrpBME
 OZnncEGqN27GggYH1RyVZ6showJ7G05HOhGFDDs8ABR0EbAbNkGvhrjl8cGXONYH
 ScTBbvqkTrhRMOOSmiAp7X1eLJ4QICAfhCV85YzSV93u69egO1MQLYzVYUurOOyt
 TuT+XbUD+Irk3DrHvhxs/IE+ciIvilFsvCmeNjCAyH4ZPvvHt/AIskQNyF3Jj720
 XKjtq6rMF9bizut/kboPgsVQoFbnj7ncCaIZ90h27obeqqiXajTx7ixJldvwDbrp
 yKQY6xDdm7DZChqYF0KKWWzLt2BoAzqVPW3zgRfJRqb9HtQ+ZVJuljvV8bBVFKN1
 zIA4Nw==
 =GQl1
 -----END PGP SIGNATURE-----

Merge tag 'v0.23.10'

release v0.23.10
2022-10-14 23:56:33 +02:00
Max Kellermann e4c8ebe056 release v0.23.10 2022-10-14 23:51:41 +02:00
Max Kellermann 76b25a1377 output/alsa: add nullptr check for snd_pcm_name() return value
It is not explicitly documented whether snd_pcm_name() is allowed to
return NULL:
https://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#ga5031edc0422df8db1f70af056a12dd77

But apparently this is legal:
0222f45d11/src/pcm/pcm.c (L2761-L2762)

That's ... surprising!

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1645
2022-10-14 23:14:30 +02:00
Max Kellermann 209e4e940e Merge branch 'queue_save_with_append' of https://github.com/geneticdrift/MPD 2022-10-02 11:41:17 +02:00
BurroCargado df71b07e9d storage/curl: fix can't get timestamp of remote file 2022-09-29 18:19:03 +02:00
Max Kellermann b0d6c0e7cb Merge branch 'v0.23.x' 2022-09-28 13:08:34 +02:00
Max Kellermann 76efea3aa7 decoder/ffmpeg: add libfmt formatter for AVSampleFormat
Fixes compiler warning because formatting unscoped enums is deprecated
since libfmt 9.
2022-09-28 11:34:33 +02:00
Max Kellermann 45599e7840 Merge branch 'v0.23.x' 2022-09-27 20:40:41 +02:00
Max Kellermann 8d9b0c42cb Merge branch 'reflection' of https://github.com/jcorporation/MPD 2022-09-27 20:35:17 +02:00
Max Kellermann cd253e470a Merge branch 'starts_with' of https://github.com/jcorporation/MPD 2022-09-27 20:05:38 +02:00
Max Kellermann 512cd7b0de Merge branch 'ConsumeMode' of https://github.com/jcorporation/MPD 2022-09-21 11:36:25 +02:00
jcorporation 48a936ef5b Add ConsumeMode oneshot, closes #925 2022-09-20 20:26:49 +02:00
Max Kellermann 15ff7c4cad Merge branch 'fix-oggflac-serial' of https://github.com/anthonyde/MPD into v0.23.x 2022-09-20 14:44:13 +02:00
Max Kellermann d5d25d78da Merge branch 'v0.23.x' 2022-09-06 21:15:42 +02:00
Max Kellermann 84f43ccde8 LogInit: default to stderr on Windows
Don't require "log_file" setting, for "--no-config" operation.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1600
2022-09-06 21:04:53 +02:00
Max Kellermann e77b3fa46f increment version number to 0.23.10 2022-09-06 20:23:50 +02:00
Max Kellermann 4f041694d3 release v0.23.9
-----BEGIN PGP SIGNATURE-----
 
 iQJBBAABCgArFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmL+ZuYNHG1heEBibGFy
 Zy5kZQAKCRAjbopYxttFEmxjD/4sJEq9DroRRK2qnVL1c6rwdzAL05LQwXGfWMCY
 /eIfoYGgu+PPN65Xf/A7qEvsXXSpuDzq0jTzdmtSvQwfKgg5jy72Qn+LN0dmoSRn
 mqQoqPFFxr7URf7QhL/6/EKcKYSexu/dxLnnuOC/yB/32WB+JINGNLWABrCpFMW0
 4kbVSC6t/e07bfBxNoYKx+kSxX88n82v5LNjkPctx0oU0gRoyRZds273uuKHOIYQ
 KFHHuaW9eNT0x/JrrsBD0ASXcp/9CfyVvyoag4bqJIc6Bg4fJTEZ9QPy9SUF2R8L
 0QCG2DBqFoht7Xqyo7qe5vYy2lww/flVrH/UwB1V7xfWzbuv3qUYs2pRnFmPKjQx
 23FRBkmC3tWmno+pZFaYmzprRKQK7WS9DJUzaQ8DCjNVpncadNPDRvz13BZjVLAE
 LeAFxPZ3B3yrDIjNRGl9LEySMJs7M4jrqzXQZuWS3+O9IZV19ajGczWmFCyQOyu4
 F7bj9tfy1yhUjMYOiUIxXsWvxZSVIo8wK1payCJzvKTobnUUeDfDucnD/lpVRMF8
 HyJsaZrXwFIClBmK8nCh3LiB5Dh9nxl8xjtmrCiPVzGZvj5qnzMkZWF+C4wxblnZ
 XTVmHFrpdcI3nK4BzLVrxF+3A08gPkIHta9boqrMhfX4gPWkKmD1vH/+u2OD2BIY
 I2MASg==
 =tk1U
 -----END PGP SIGNATURE-----

Merge tag 'v0.23.9'

release v0.23.9
2022-08-18 18:23:12 +02:00
Max Kellermann 12147f6d58 release v0.23.9 2022-08-18 18:20:54 +02:00