From 70b62123db55cedf71ce2e328f58a1c993d33d82 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sat, 14 Jun 2025 22:45:46 -0400 Subject: [PATCH] Improve libjemalloc detection Instead of using dpgk-architecture (in `dpkg-dev`), directly find the file with ldconfig -p, a grep, an awk, and head -n1 to find the first instance. This is not very pretty but should work universally. --- debian/jellyfin-server.postinst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/debian/jellyfin-server.postinst b/debian/jellyfin-server.postinst index b6a8efb..7c98787 100644 --- a/debian/jellyfin-server.postinst +++ b/debian/jellyfin-server.postinst @@ -19,8 +19,6 @@ CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME} LOGDATA=${JELLYFIN_LOG_DIRECTORY-/var/log/$NAME} CACHEDATA=${JELLYFIN_CACHE_DIRECTORY-/var/cache/$NAME} -MULTIARCH_ARCH="$( dpkg-architecture -qDEB_HOST_MULTIARCH )" - case "$1" in configure) # create jellyfin group if it does not exist @@ -53,7 +51,7 @@ case "$1" in done # Install libjemalloc.so symlink into /usr/lib/jellyfin - ln -sf /usr/lib/${MULTIARCH_ARCH}/libjemalloc.so.2 /usr/lib/jellyfin/libjemalloc.so + ln -sf $( ldconfig -p | grep libjemalloc | awk '{print $NF}' | head -n1 ) /usr/lib/jellyfin/libjemalloc.so # Install jellyfin symlink into /usr/bin ln -sf /usr/lib/jellyfin/bin/jellyfin /usr/bin/jellyfin