MediaProxy does not work on OpenBSD
Environment
- Installation type (OTP or From Source): From Souce
- Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE): 2.4.2
- Elixir version (
elixir -v
for from source installations, N/A for OTP): 1.11.4 - Operating system: OpenBSD 7.0
- PostgreSQL version (
psql -V
): 13.6
Bug description
When building pleroma with mediaproxy enabled against LibreSSL, I get this error during compilation:
warning: :crypto.mac/4 is undefined or private. Did you mean one of:
* cmac/3
* cmac/4
* hmac/3
* hmac/4
* hmac_init/2
lib/pleroma/web/media_proxy.ex:130: Pleroma.Web.MediaProxy.signed_url/1
which results in this error when I start pleroma:
21:18:48.611 [error] Process #PID<0.1731.0> raised an exception
** (UndefinedFunctionError) function :crypto.mac/4 is undefined or private
(crypto 4.4) :crypto.mac(:hmac, :sha, "RtODzWO8cwPxbLzhCpZE1IJuOizXwwW7OSWRiPPa
iSonucj911p8FxBrLzuI6luH", "aHR0cHM6Ly9yYWxzZWkubW9lL21lZGlhL2U5Njc5NjIwZmRlM2ViZWF
jMzdmMzBmN2ZjODVkYTU4MGMzNDI2M2MxNDFhNTBlNTBjMTAzYjk0YTA1Y2ExMGYuYmxvYg")
(pleroma 2.4.2) lib/pleroma/web/media_proxy.ex:97: Pleroma.Web.MediaProxy.base6
4_sig64/1
(pleroma 2.4.2) lib/pleroma/web/media_proxy.ex:104: Pleroma.Web.MediaProxy.enco
de_url/1
(pleroma 2.4.2) lib/pleroma/web/mastodon_api/views/account_view.ex:184: Pleroma
.Web.MastodonAPI.AccountView.do_render/2
(pleroma 2.4.2) lib/pleroma/web/mastodon_api/views/status_view.ex:338: Pleroma.
Web.MastodonAPI.StatusView.render/2
(pleroma 2.4.2) lib/pleroma/web/mastodon_api/views/status_view.ex:152: Pleroma.
Web.MastodonAPI.StatusView.render/2
(pleroma 2.4.2) lib/pleroma/web/views/streamer_view.ex:45: Pleroma.Web.Streamer
View.render/2
(pleroma 2.4.2) lib/pleroma/web/streamer.ex:300: Pleroma.Web.Streamer.push_to_s
ocket/2
I have tried MIX_ENV=prod mix deps.update --all
and MIX_ENV=prod mix deps.clean --all
, both did not work. Can anyone help me? Thank you.