From 85d4867b9eb8cb782b224ff76c80483845fec77a Mon Sep 17 00:00:00 2001 From: gordonb3 Date: Mon, 10 Jul 2023 18:47:44 +0200 Subject: [PATCH] handle changed dependencies and config files --- .../Fix.build.with.ffmpeg-4.patch | 75 +++++++++++++++++++ etc/ssh/sshd_config.d/permitrootlogin.conf | 3 + systemd/etc/systemd/logind.conf | 10 ++- 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 etc/portage/patches/media-sound/forked-daapd-26.4/Fix.build.with.ffmpeg-4.patch create mode 100644 etc/ssh/sshd_config.d/permitrootlogin.conf diff --git a/etc/portage/patches/media-sound/forked-daapd-26.4/Fix.build.with.ffmpeg-4.patch b/etc/portage/patches/media-sound/forked-daapd-26.4/Fix.build.with.ffmpeg-4.patch new file mode 100644 index 0000000..6d0618e --- /dev/null +++ b/etc/portage/patches/media-sound/forked-daapd-26.4/Fix.build.with.ffmpeg-4.patch @@ -0,0 +1,75 @@ +From 528a175d997cda5983add3b22f53d3a91b2b6453 Mon Sep 17 00:00:00 2001 +From: ejurgensen +Date: Wed, 3 Jul 2019 20:29:31 +0200 +Subject: [PATCH] [main] Conditionally disable functions deprecated by ffmpeg 4.0 + +--- a/src/main.c ++++ b/src/main.c +@@ -446,7 +446,7 @@ + } + #endif + +- ++#if (LIBAVCODEC_VERSION_MAJOR < 58) || ((LIBAVCODEC_VERSION_MAJOR == 58) && (LIBAVCODEC_VERSION_MINOR < 18)) + static int + ffmpeg_lockmgr(void **pmutex, enum AVLockOp op) + { +@@ -477,6 +477,7 @@ + + return 1; + } ++#endif + + int + main(int argc, char **argv) +@@ -660,6 +661,8 @@ + DPRINTF(E_INFO, L_MAIN, "Initialized with libav %s\n", av_version); + #endif + ++// The following was deprecated with ffmpeg 4.0 = avcodec 58.18, avformat 58.12, avfilter 7.16 ++#if (LIBAVCODEC_VERSION_MAJOR < 58) || ((LIBAVCODEC_VERSION_MAJOR == 58) && (LIBAVCODEC_VERSION_MINOR < 18)) + ret = av_lockmgr_register(ffmpeg_lockmgr); + if (ret < 0) + { +@@ -668,9 +671,14 @@ + ret = EXIT_FAILURE; + goto ffmpeg_init_fail; + } +- ++#endif ++#if (LIBAVFORMAT_VERSION_MAJOR < 58) || ((LIBAVFORMAT_VERSION_MAJOR == 58) && (LIBAVFORMAT_VERSION_MINOR < 12)) + av_register_all(); ++#endif ++#if (LIBAVFILTER_VERSION_MAJOR < 7) || ((LIBAVFILTER_VERSION_MAJOR == 7) && (LIBAVFILTER_VERSION_MINOR < 16)) + avfilter_register_all(); ++#endif ++ + #if HAVE_DECL_AVFORMAT_NETWORK_INIT + avformat_network_init(); + #endif +@@ -985,9 +993,12 @@ + #if HAVE_DECL_AVFORMAT_NETWORK_INIT + avformat_network_deinit(); + #endif +- av_lockmgr_register(NULL); + ++#if (LIBAVCODEC_VERSION_MAJOR < 58) || ((LIBAVCODEC_VERSION_MAJOR == 58) && (LIBAVCODEC_VERSION_MINOR < 18)) ++ av_lockmgr_register(NULL); + ffmpeg_init_fail: ++#endif ++ + DPRINTF(E_LOG, L_MAIN, "Exiting.\n"); + conffile_unload(); + logger_deinit(); +--- a/src/transcode.c ++++ b/src/transcode.c +@@ -731,7 +731,7 @@ open_decoder(unsigned int *stream_index, struct decode_ctx *ctx, enum AVMediaTyp + if ((*stream_index < 0) || (!decoder)) + { + if (!ctx->settings.silent) +- DPRINTF(E_LOG, L_XCODE, "No stream data or decoder for '%s'\n", ctx->ifmt_ctx->filename); ++ DPRINTF(E_LOG, L_XCODE, "No stream data or decoder for stream #%d\n", *stream_index); + return NULL; + } + + diff --git a/etc/ssh/sshd_config.d/permitrootlogin.conf b/etc/ssh/sshd_config.d/permitrootlogin.conf new file mode 100644 index 0000000..c6aab42 --- /dev/null +++ b/etc/ssh/sshd_config.d/permitrootlogin.conf @@ -0,0 +1,3 @@ +# Allow root to log in over ssh +PermitRootLogin yes + diff --git a/systemd/etc/systemd/logind.conf b/systemd/etc/systemd/logind.conf index b3cfa49..521b18a 100644 --- a/systemd/etc/systemd/logind.conf +++ b/systemd/etc/systemd/logind.conf @@ -18,9 +18,15 @@ #KillOnlyUsers= #KillExcludeUsers=root #InhibitDelayMaxSec=5 +#UserStopDelaySec=10 #HandlePowerKey=poweroff +#HandlePowerKeyLongPress=ignore +#HandleRebootKey=reboot +#HandleRebootKeyLongPress=poweroff #HandleSuspendKey=suspend +#HandleSuspendKeyLongPress=hibernate #HandleHibernateKey=hibernate +#HandleHibernateKeyLongPress=ignore #HandleLidSwitch=suspend #HandleLidSwitchExternalPower=suspend #HandleLidSwitchDocked=ignore @@ -28,13 +34,15 @@ #SuspendKeyIgnoreInhibited=no #HibernateKeyIgnoreInhibited=no #LidSwitchIgnoreInhibited=yes +#RebootKeyIgnoreInhibited=no #HoldoffTimeoutSec=30s #IdleAction=ignore #IdleActionSec=30min #RuntimeDirectorySize=10% +#RuntimeDirectoryInodesMax= #RemoveIPC=yes #InhibitorsMax=8192 #SessionsMax=8192 -#UserTasksMax=33% +#StopIdleSessionSec=infinity HandlePowerKey=ignore