mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-05 17:12:37 +01:00
Discourse: build libvips 8.18 for its image worker (#18430)
Discourse enabled libvips image processing by default and its worker refuses anything older than 8.18; Debian 13 ships 8.16, so the service failed to boot after an update and on fresh installs. Build the latest libvips release from source like discourse_docker does, on install and on update when a new release is out.
This commit is contained in:
committed by
GitHub
parent
96710d22f2
commit
e2b09a9fcd
@@ -58,6 +58,17 @@ function update_script() {
|
||||
$STD git pull origin main
|
||||
msg_ok "Updated Discourse"
|
||||
|
||||
if check_for_gh_release "libvips" "libvips/libvips"; then
|
||||
ensure_dependencies meson ninja-build pkg-config libglib2.0-dev libexpat1-dev libjpeg-dev libpng-dev libwebp-dev libtiff-dev libheif-dev libjxl-dev librsvg2-dev libcgif-dev libexif-dev liblcms2-dev liborc-0.4-dev libimagequant-dev libpango1.0-dev
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "libvips" "libvips/libvips" "prebuild" "latest" "/opt/libvips" "vips-*.tar.xz"
|
||||
msg_info "Building libvips"
|
||||
cd /opt/libvips
|
||||
$STD meson setup build --prefix=/usr/local --libdir=lib --buildtype=release -Dmodules=disabled -Dmagick=disabled -Dexamples=false
|
||||
$STD ninja -C build install
|
||||
ldconfig
|
||||
msg_ok "Built libvips"
|
||||
fi
|
||||
|
||||
msg_info "Updating Dependencies"
|
||||
RUBY_TARGET=$(grep -A1 '^RUBY VERSION' /opt/discourse/Gemfile.lock | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n1)
|
||||
RUBY_VERSION="${RUBY_TARGET:-4.0.7}" RUBY_INSTALL_RAILS="false" setup_ruby
|
||||
|
||||
@@ -25,9 +25,36 @@ $STD apt install -y \
|
||||
gsfonts \
|
||||
brotli \
|
||||
nginx \
|
||||
redis-server
|
||||
redis-server \
|
||||
meson \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
libglib2.0-dev \
|
||||
libexpat1-dev \
|
||||
libjpeg-dev \
|
||||
libpng-dev \
|
||||
libwebp-dev \
|
||||
libtiff-dev \
|
||||
libheif-dev \
|
||||
libjxl-dev \
|
||||
librsvg2-dev \
|
||||
libcgif-dev \
|
||||
libexif-dev \
|
||||
liblcms2-dev \
|
||||
liborc-0.4-dev \
|
||||
libimagequant-dev \
|
||||
libpango1.0-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "libvips" "libvips/libvips" "prebuild" "latest" "/opt/libvips" "vips-*.tar.xz"
|
||||
|
||||
msg_info "Building libvips"
|
||||
cd /opt/libvips
|
||||
$STD meson setup build --prefix=/usr/local --libdir=lib --buildtype=release -Dmodules=disabled -Dmagick=disabled -Dexamples=false
|
||||
$STD ninja -C build install
|
||||
ldconfig
|
||||
msg_ok "Built libvips"
|
||||
|
||||
msg_info "Cloning Discourse"
|
||||
$STD git clone --depth 1 https://github.com/discourse/discourse.git /opt/discourse
|
||||
msg_ok "Cloned Discourse"
|
||||
|
||||
Reference in New Issue
Block a user