Skip to content

Commit df47118

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 271cde2 commit df47118

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
@@ -200,7 +204,7 @@ function compile_libjxl() {
200204
JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62"
201205
JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0"
202206
: "${LIBJXL_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libjxl.json)}"
203-
if [[ "${update:-}" ]] || [[ "$LIBJXL_REVISION" != "$(grep 'libjxl' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
207+
if [[ "$LIBJXL_REVISION" != "$(grep 'libjxl' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
204208
msg_info "Recompiling libjxl"
205209
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
206210
$STD git clone https://github.com/libjxl/libjxl.git "$SOURCE"
@@ -277,9 +281,8 @@ function compile_libheif() {
277281

278282
function compile_libraw() {
279283
SOURCE=${SOURCE_DIR}/libraw
280-
local update
281284
: "${LIBRAW_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libraw.json)}"
282-
if [[ "${update:-}" ]] || [[ "$LIBRAW_REVISION" != "$(grep 'libraw' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
285+
if [[ "$LIBRAW_REVISION" != "$(grep 'libraw' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
283286
msg_info "Recompiling libraw"
284287
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
285288
$STD git clone https://github.com/libraw/libraw.git "$SOURCE"
@@ -300,7 +303,8 @@ function compile_libraw() {
300303
function compile_imagemagick() {
301304
SOURCE=$SOURCE_DIR/imagemagick
302305
: "${IMAGEMAGICK_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/imagemagick.json)}"
303-
if [[ "${update:-}" ]] || [[ "$IMAGEMAGICK_REVISION" != "$(grep 'imagemagick' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
306+
if [[ "$IMAGEMAGICK_REVISION" != "$(grep 'imagemagick' ~/.immich_library_revisions | awk '{print $2}')" ]] ||
307+
! grep -q 'DMAGICK_LIBRAW' /usr/local/lib/ImageMagick-7*/config-Q16HDRI/configure.xml; then
304308
msg_info "Recompiling ImageMagick"
305309
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
306310
$STD git clone https://github.com/ImageMagick/ImageMagick.git "$SOURCE"
@@ -320,7 +324,7 @@ function compile_imagemagick() {
320324
function compile_libvips() {
321325
SOURCE=$SOURCE_DIR/libvips
322326
: "${LIBVIPS_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libvips.json)}"
323-
if [[ "${update:-}" ]] || [[ "$LIBVIPS_REVISION" != "$(grep 'libvips' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
327+
if [[ "$LIBVIPS_REVISION" != "$(grep 'libvips' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
324328
msg_info "Recompiling libvips"
325329
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
326330
$STD git clone https://github.com/libvips/libvips.git "$SOURCE"

0 commit comments

Comments
 (0)