amazonlinux / amazon-linux-2023

Amazon Linux 2023
https://aws.amazon.com/linux/amazon-linux-2023/
Other
523 stars 39 forks source link

[Package Request] - libvips #295

Open jpaas opened 1 year ago

jpaas commented 1 year ago

What package is missing from Amazon Linux 2022? Please describe and include package name. libvips - a fast image processing library

Is this an update to existing package or new package request? new

Is this package available in Amazon Linux 2? If it is available via external sources such as EPEL, please specify. It isn't for Amazon Linux 2023

Any additional information you'd like to include. (use-cases, etc) It's a pretty common image processing library. In our case we have a Rails app that uses ruby-vips.

thayoz commented 6 months ago

any update ?

armoona commented 3 months ago

Any update on this?

jcmaciel commented 3 months ago

any update?

daniejstriata commented 3 months ago

Missing these dependencies to build VIPS in COPR from Fedora:

No matching package to install: 'nifticlib-devel'
No matching package to install: 'pkgconfig(cfitsio)'
No matching package to install: 'pkgconfig(cgif)'
No matching package to install: 'pkgconfig(libheif)'
No matching package to install: 'pkgconfig(libhwy)'
No matching package to install: 'pkgconfig(libjxl)'
No matching package to install: 'pkgconfig(matio)'
No matching package to install: 'pkgconfig(openslide)'
No matching package to install: 'pkgconfig(spng)'
jcmaciel commented 3 months ago

Missing these dependencies to build VIPS in COPR from Fedora:

No matching package to install: 'nifticlib-devel'
No matching package to install: 'pkgconfig(cfitsio)'
No matching package to install: 'pkgconfig(cgif)'
No matching package to install: 'pkgconfig(libheif)'
No matching package to install: 'pkgconfig(libhwy)'
No matching package to install: 'pkgconfig(libjxl)'
No matching package to install: 'pkgconfig(matio)'
No matching package to install: 'pkgconfig(openslide)'
No matching package to install: 'pkgconfig(spng)'

LIbsvips is out from Amazon Linux 2023

jcmaciel commented 3 months ago

@stewartsmith and @nmeyerhans please, any update for this package?

Many Rails apps are so dependent this :(

jcupitt commented 3 months ago

Hello, libvips maintainer here.

No matching package to install: 'nifticlib-devel' No matching package to install: 'pkgconfig(cfitsio)' No matching package to install: 'pkgconfig(cgif)' No matching package to install: 'pkgconfig(libheif)' No matching package to install: 'pkgconfig(libhwy)' No matching package to install: 'pkgconfig(libjxl)' No matching package to install: 'pkgconfig(matio)' No matching package to install: 'pkgconfig(openslide)' No matching package to install: 'pkgconfig(spng)'

Some of these libraries are for very specialised formats which almost no one will need, and which are not hardened against malicious files.

I would only add these ones:

No matching package to install: 'pkgconfig(cgif)' No matching package to install: 'pkgconfig(libheif)' No matching package to install: 'pkgconfig(libhwy)' No matching package to install: 'pkgconfig(libjxl)' No matching package to install: 'pkgconfig(spng)'

cgif: a fast GIF writer from shopify. libheif: the usual HEIC and AVIF library. libhwy: Google's SIMD library, used to accelerate loops. libjxl: the usual JXL library, could possibly be omitted. libspng: a better replacement for libpng.

ozbenh commented 2 months ago

I like the idea of trimming it. We'll have to evaluate the risk (CVE trends)

TLSDwyer commented 1 month ago

This would also be important for our rails app. Since it's missing it will play a big role in whether we can even use this service or have to move to something else. Any updates?

david-trujillo commented 1 month ago

any update?

daveharris commented 1 month ago

While we wait for an official package, it's very easy to just install from source ...

#!/bin/bash

INSTALL_DIR=/usr/local

if [ ! -e ${INSTALL_DIR}/bin/vips ]; then

  VIPS_VERSION=8.15.2

  # Dependencies
  dnf --quiet --assumeyes update
  dnf --quiet --assumeyes groupinstall "Development Tools"
  dnf --quiet --assumeyes install wget tar meson pkgconf-pkg-config expat-devel glib2-devel

  # Optional dependencies
  dnf --quiet --assumeyes install libjpeg-turbo-devel libpng-devel giflib-devel

  cd /tmp/
  wget https://github.com/libvips/libvips/releases/download/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.xz
  tar -xf vips-${VIPS_VERSION}.tar.xz
  cd vips-${VIPS_VERSION}
  meson setup build --prefix ${INSTALL_DIR}
  cd build
  meson compile # Takes ~2 mins on a t4g.micro
  meson install

  cd /tmp
  rm -rf /tmp/vips-${VIPS_VERSION}*

  echo "${INSTALL_DIR}/lib64" | tee /etc/ld.so.conf.d/local-lib64.conf
  ldconfig

  echo "Installed $(vips --version)"
fi
jcupitt commented 1 month ago

Nice! Though you can remove giflib -- libvips has it's own GIF loader now.

armoona commented 3 weeks ago

@daveharris

This is very useful, thank you!

Do you know how to add webp support in this script?

daveharris commented 3 weeks ago

@armoona According to the docs you just need to fulfil the libwebp dependency, which appears to come from the libwebp-devel package on Amazon Linux 2023.

$ dnf info libwebp-devel
Last metadata expiration check: 0:06:12 ago on Tue 10 Sep 2024 09:35:05 PM UTC.
Available Packages
Name         : libwebp-devel
Version      : 1.2.4
Release      : 1.amzn2023.0.6
Architecture : aarch64
Size         : 37 k
Source       : libwebp-1.2.4-1.amzn2023.0.6.src.rpm
Repository   : amazonlinux
Summary      : Development files for libwebp, a library for the WebP format
URL          : http://webmproject.org/
License      : BSD
Description  : WebP is an image format that does lossy compression of digital
             : photographic images. WebP consists of a codec based on VP8, and a
             : container based on RIFF. Webmasters, web developers and browser
             : developers can use WebP to compress, archive and distribute digital
             : images more efficiently.

HTH

armoona commented 3 weeks ago

@daveharris Thank you!