Skip to content

Commit 9e7deb0

Browse files
committed
allow for Debian 12 to 13 upgrade
some small changes to allow a user who manually-upgraded their Immich LXC to Trixie to simply run the update function just the same as those who installed Immich freshly on Trixie - check for presence of libmimalloc2.0 and replace with libmimalloc3 - check if Imagemagick is built with a specific CPPFLAG, and trigger a recompile if it wasn't
1 parent fae8e7b commit 9e7deb0

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

ct/immich.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ function update_script() {
3232
PNPM_VERSION="$(curl -fsSL "https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/package.json" | jq -r '.packageManager | split("@")[1]')"
3333
NODE_VERSION="22" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
3434

35+
if grep -q '13' /etc/os-release && dpkg -l | grep -q "libmimalloc2.0"; then
36+
$STD apt-get update && $STD apt-get install -y libmimalloc3
37+
fi
38+
3539
STAGING_DIR=/opt/staging
3640
BASE_DIR=${STAGING_DIR}/base-images
3741
SOURCE_DIR=${STAGING_DIR}/image-source
@@ -201,7 +205,7 @@ function compile_libjxl() {
201205
JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62"
202206
JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0"
203207
: "${LIBJXL_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libjxl.json)}"
204-
if [[ "${update:-}" ]] || [[ "$LIBJXL_REVISION" != "$(grep 'libjxl' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
208+
if [[ "$LIBJXL_REVISION" != "$(grep 'libjxl' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
205209
msg_info "Recompiling libjxl"
206210
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
207211
$STD git clone https://github.com/libjxl/libjxl.git "$SOURCE"
@@ -278,9 +282,8 @@ function compile_libheif() {
278282

279283
function compile_libraw() {
280284
SOURCE=${SOURCE_DIR}/libraw
281-
local update
282285
: "${LIBRAW_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libraw.json)}"
283-
if [[ "${update:-}" ]] || [[ "$LIBRAW_REVISION" != "$(grep 'libraw' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
286+
if [[ "$LIBRAW_REVISION" != "$(grep 'libraw' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
284287
msg_info "Recompiling libraw"
285288
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
286289
$STD git clone https://github.com/libraw/libraw.git "$SOURCE"
@@ -301,7 +304,8 @@ function compile_libraw() {
301304
function compile_imagemagick() {
302305
SOURCE=$SOURCE_DIR/imagemagick
303306
: "${IMAGEMAGICK_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/imagemagick.json)}"
304-
if [[ "${update:-}" ]] || [[ "$IMAGEMAGICK_REVISION" != "$(grep 'imagemagick' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
307+
if [[ "$IMAGEMAGICK_REVISION" != "$(grep 'imagemagick' ~/.immich_library_revisions | awk '{print $2}')" ]] ||
308+
! grep -q 'DMAGICK_LIBRAW' /usr/local/lib/ImageMagick-7*/config-Q16HDRI/configure.xml; then
305309
msg_info "Recompiling ImageMagick"
306310
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
307311
$STD git clone https://github.com/ImageMagick/ImageMagick.git "$SOURCE"
@@ -321,7 +325,7 @@ function compile_imagemagick() {
321325
function compile_libvips() {
322326
SOURCE=$SOURCE_DIR/libvips
323327
: "${LIBVIPS_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libvips.json)}"
324-
if [[ "${update:-}" ]] || [[ "$LIBVIPS_REVISION" != "$(grep 'libvips' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
328+
if [[ "$LIBVIPS_REVISION" != "$(grep 'libvips' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
325329
msg_info "Recompiling libvips"
326330
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
327331
$STD git clone https://github.com/libvips/libvips.git "$SOURCE"

0 commit comments

Comments
 (0)