From a2ce4352c8401db0a511a0324e96ed0f7b8d1be7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Sep 2022 17:54:05 +0200 Subject: [PATCH 1/4] python/build/libs.py: update Boost to 1.80.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 3409c63f6..9f5389226 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -445,7 +445,7 @@ jack = JackProject( ) boost = BoostProject( - 'https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2', - '475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39', + 'https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2', + '1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0', 'include/boost/version.hpp', ) From 88d92aceaba644c8831c71efc4fe0193059cb084 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Sep 2022 17:50:56 +0200 Subject: [PATCH 2/4] python/build/libs.py: update libFLAC to 1.4.0 --- python/build/libs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index 9f5389226..0a502c84a 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -43,13 +43,15 @@ opus = AutotoolsProject( ) flac = AutotoolsProject( - 'http://downloads.xiph.org/releases/flac/flac-1.3.4.tar.xz', - '8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737', + 'http://downloads.xiph.org/releases/flac/flac-1.4.0.tar.xz', + 'af41c0733c93c237c3e52f64dd87e3b0d9af38259f1c7d11e8cbf583c48c2506', 'lib/libFLAC.a', [ '--disable-shared', '--enable-static', + '--disable-stack-smash-protection', '--disable-xmms-plugin', '--disable-cpplibs', '--disable-doxygen-docs', + '--disable-programs', ], subdirs=['include', 'src/libFLAC'], ) From 9ab9b97f204a0088271daaf71cbff4b6ea1d1a8a Mon Sep 17 00:00:00 2001 From: Anthony DeRossi Date: Wed, 14 Sep 2022 17:56:23 -0700 Subject: [PATCH 3/4] encoder/flac: only set a serial number for oggflac This fixes a bug introduced in 87fa6bca where the FLAC encoder fails to initialize unless libFLAC is built with Ogg support. When libFLAC is built without Ogg support, FLAC__stream_encoder_set_ogg_serial_number unconditionally returns false. --- src/encoder/plugins/FlacEncoderPlugin.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/encoder/plugins/FlacEncoderPlugin.cxx b/src/encoder/plugins/FlacEncoderPlugin.cxx index d55715db5..1fec31dd5 100644 --- a/src/encoder/plugins/FlacEncoderPlugin.cxx +++ b/src/encoder/plugins/FlacEncoderPlugin.cxx @@ -38,6 +38,7 @@ class FlacEncoder final : public Encoder { FLAC__StreamEncoder *const fse; const unsigned compression; + const bool oggflac; PcmBuffer expand_buffer; @@ -122,7 +123,7 @@ flac_encoder_init(const ConfigBlock &block) } static void -flac_encoder_setup(FLAC__StreamEncoder *fse, unsigned compression, +flac_encoder_setup(FLAC__StreamEncoder *fse, unsigned compression, bool oggflac, const AudioFormat &audio_format) { unsigned bits_per_sample; @@ -157,7 +158,7 @@ flac_encoder_setup(FLAC__StreamEncoder *fse, unsigned compression, throw FormatRuntimeError("error setting flac sample rate to %d", audio_format.sample_rate); - if (!FLAC__stream_encoder_set_ogg_serial_number(fse, + if (oggflac && !FLAC__stream_encoder_set_ogg_serial_number(fse, GenerateSerial())) throw FormatRuntimeError("error setting ogg serial number"); } @@ -166,11 +167,12 @@ FlacEncoder::FlacEncoder(AudioFormat _audio_format, FLAC__StreamEncoder *_fse, u :Encoder(_oggchaining), audio_format(_audio_format), fse(_fse), compression(_compression), + oggflac(_oggflac), output_buffer(8192) { /* this immediately outputs data through callback */ - auto init_status = _oggflac ? + auto init_status = oggflac ? FLAC__stream_encoder_init_ogg_stream(fse, nullptr, WriteCallback, nullptr, nullptr, nullptr, @@ -209,7 +211,7 @@ PreparedFlacEncoder::Open(AudioFormat &audio_format) throw std::runtime_error("FLAC__stream_encoder_new() failed"); try { - flac_encoder_setup(fse, compression, audio_format); + flac_encoder_setup(fse, compression, oggflac, audio_format); } catch (...) { FLAC__stream_encoder_delete(fse); throw; @@ -222,7 +224,7 @@ void FlacEncoder::SendTag(const Tag &tag) { /* re-initialize encoder since flac_encoder_finish resets everything */ - flac_encoder_setup(fse, compression, audio_format); + flac_encoder_setup(fse, compression, oggflac, audio_format); FLAC__StreamMetadata *metadata = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT); FLAC__StreamMetadata_VorbisComment_Entry entry; From 7ab0dfc8ce56dacee9206b4c429a6c4bd94394b4 Mon Sep 17 00:00:00 2001 From: jcorporation Date: Tue, 27 Sep 2022 20:05:29 +0200 Subject: [PATCH 4/4] Sets the curl proxy ssl verify options to the values of the host configuration options This fixes #1616 --- src/input/plugins/CurlInputPlugin.cxx | 2 ++ src/lib/curl/Request.hxx | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx index cc2606714..864ea57ff 100644 --- a/src/input/plugins/CurlInputPlugin.cxx +++ b/src/input/plugins/CurlInputPlugin.cxx @@ -439,6 +439,8 @@ CurlInputStream::InitEasy() request->SetVerifyPeer(verify_peer); request->SetVerifyHost(verify_host); request->SetOption(CURLOPT_HTTPHEADER, request_headers.Get()); + request->SetProxyVerifyPeer(verify_peer); + request->SetProxyVerifyHost(verify_host); } void diff --git a/src/lib/curl/Request.hxx b/src/lib/curl/Request.hxx index fcd68ca8e..ce22f90fb 100644 --- a/src/lib/curl/Request.hxx +++ b/src/lib/curl/Request.hxx @@ -123,6 +123,14 @@ public: easy.SetVerifyPeer(value); } + void SetProxyVerifyHost(bool value) { + easy.SetOption(CURLOPT_PROXY_SSL_VERIFYHOST, value ? 2L : 0L); + } + + void SetProxyVerifyPeer(bool value) { + easy.SetOption(CURLOPT_PROXY_SSL_VERIFYPEER, value); + } + void SetNoBody(bool value=true) { easy.SetNoBody(value); }