Skip to content

chore(libheif): Remove libheif#17132

Merged
reubeno merged 8 commits into
tomls/base/mainfrom
chrco/remove-libheif
May 12, 2026
Merged

chore(libheif): Remove libheif#17132
reubeno merged 8 commits into
tomls/base/mainfrom
chrco/remove-libheif

Conversation

@christopherco
Copy link
Copy Markdown
Collaborator

@christopherco christopherco commented May 11, 2026

Disable HEIF support in the six direct consumer SRPMs (GraphicsMagick, ImageMagick, glycin, imlib2, kf6-kimageformats, vips) using upstream- supported flags, then drop the libheif and rust-libheif-{rs,sys} SRPMs along with all of their subpackages from the package manifests.

No source-level patches are required; each consumer either has a clean %bcond gating libheif (ImageMagick, glycin) or auto-detects it via pkg-config / has an explicit cmake/meson flag we can flip. vips needs both the BR drop and an explicit '-Dheif=disabled' because its meson 'heif' option is type 'feature' with default 'auto' (which fails the build when libheif is absent rather than silently skipping).

Verified: all six consumers rebuild cleanly with no libheif Requires in the produced RPMs, and 'azldev comp list' no longer resolves libheif, rust-libheif-rs, or rust-libheif-sys.

Fixes: AB#19713

@christopherco christopherco changed the title Remove libheif from Azure Linux 4.0 Remove libheif May 11, 2026
Set build.without = ["libheif"] to flip the upstream %bcond_without
libheif gate, dropping the libheif build dependency, the %package heic
stanza and its %files entries — all already conditional in the spec.
Drop the libheif-devel BuildRequires (auto-detected via pkg-config — no
explicit configure flag exists). Move from inline declaration to a
dedicated comp.toml file, per repo conventions for components with
overlays.
Set build.without = ["heif"] to flip the upstream %bcond heif gate,
dropping the libheif build dependency and the glycin-heif loader from
the meson -Dloaders= list. Move from inline declaration to a dedicated
comp.toml file.
Drop the libheif-devel BuildRequires (auto-detected via pkg-config — no
explicit configure flag exists). Move from inline declaration to a
dedicated comp.toml file.
Drop the pkgconfig(libheif) BuildRequires and flip the cmake option
KIMAGEFORMATS_HEIF from ON to OFF so kimg_heif.so is not built. Move
from inline declaration to a dedicated comp.toml file.
Drop the pkgconfig(libheif) BR, the soft Recommends on vips-heif, and
strip the %package/%description/%files heif stanzas. Force meson
-Dheif=disabled — upstream defines the heif option as type='feature'
value='auto', which fails the build when libheif is absent rather than
silently skipping. Move from inline declaration to a dedicated comp.toml
file.
Both Rust crates exclusively wrap libheif and have no other downstream
consumers. Drop the components, their lock files, rendered specs, and
all 18 subpackage entries from sdk.packages.toml ahead of the libheif
SRPM removal.
All six direct consumers (GraphicsMagick, ImageMagick, glycin, imlib2,
kf6-kimageformats, vips) now build with HEIF support disabled and the
two Rust shim crates (rust-libheif-{rs,sys}) have been dropped. Remove
the libheif component, lock file, rendered spec, and the libheif,
libheif-devel, libheif-tools entries from base.packages.toml.
@christopherco christopherco force-pushed the chrco/remove-libheif branch from 6efba1e to 4d0abc1 Compare May 11, 2026 08:23
@christopherco christopherco changed the title Remove libheif feat(libheif): Remove libheif May 11, 2026
@christopherco christopherco changed the title feat(libheif): Remove libheif chore(libheif): Remove libheif May 11, 2026
@christopherco christopherco marked this pull request as ready for review May 12, 2026 04:14
Copilot AI review requested due to automatic review settings May 12, 2026 04:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes HEIF/HEIC support from Azure Linux by disabling libheif usage in its direct consumer SRPMs and then dropping the libheif (and rust-libheif-* bindings) SRPMs/subpackages from the distribution package manifests.

Changes:

  • Disable HEIF support in consumer components via upstream-supported spec toggles (bconds and meson/cmake/configure detection) and update rendered specs accordingly.
  • Remove the libheif, rust-libheif-rs, and rust-libheif-sys SRPMs (rendered specs/sources/patches) and their lock files.
  • Remove all libheif/rust-libheif-* binary subpackages from base and sdk package manifests.

Reviewed changes

Copilot reviewed 25 out of 34 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
specs/v/vips/vips.spec Drops libheif BR/subpackage and forces meson -Dheif=disabled in rendered spec.
specs/k/kf6-kimageformats/kf6-kimageformats.spec Removes libheif BR and disables HEIF plugin build in rendered spec.
specs/i/imlib2/imlib2.spec Removes libheif BR in rendered spec so HEIF loader is not built.
specs/g/GraphicsMagick/GraphicsMagick.spec Removes libheif BR in rendered spec so HEIF coder is not built.
specs/i/ImageMagick/ImageMagick.spec Loads azldev macros to flip bcond off and bumps Release in rendered spec.
specs/g/glycin/glycin.spec Loads azldev macros to flip bcond off and bumps Release/changelog in rendered spec.
specs/i/ImageMagick/ImageMagick.azl.macros Adds generated macro to disable libheif bcond for ImageMagick.
specs/g/glycin/glycin.azl.macros Adds generated macro to disable heif bcond for glycin.
base/comps/vips/vips.comp.toml New component overlays to remove libheif deps, disable meson heif feature, and remove vips-heif subpackage sections.
base/comps/kf6-kimageformats/kf6-kimageformats.comp.toml New overlays to remove libheif BR and set KIMAGEFORMATS_HEIF=OFF.
base/comps/imlib2/imlib2.comp.toml New overlay to drop libheif-devel BuildRequires.
base/comps/GraphicsMagick/GraphicsMagick.comp.toml New overlay to drop libheif-devel BuildRequires.
base/comps/ImageMagick/ImageMagick.comp.toml Disables libheif via build.without = ["libheif"].
base/comps/glycin/glycin.comp.toml Disables heif via build.without = ["heif"].
base/comps/components.toml Removes inline component stanzas for components that now have dedicated .comp.toml files and drops libheif/rust-libheif components.
base/packages/base.packages.toml Removes libheif packages from the base manifest.
base/packages/sdk.packages.toml Removes rust-libheif-* packages from the sdk manifest.
locks/vips.lock Updates input fingerprint for vips due to component config changes.
locks/kf6-kimageformats.lock Updates input fingerprint for kf6-kimageformats due to component config changes.
locks/imlib2.lock Updates input fingerprint for imlib2 due to component config changes.
locks/ImageMagick.lock Updates input fingerprint for ImageMagick due to component config changes.
locks/GraphicsMagick.lock Updates input fingerprint for GraphicsMagick due to component config changes.
locks/glycin.lock Updates input fingerprint for glycin due to component config changes.
locks/libheif.lock Removes libheif lock file.
locks/rust-libheif-rs.lock Removes rust-libheif-rs lock file.
locks/rust-libheif-sys.lock Removes rust-libheif-sys lock file.
specs/l/libheif/libheif.spec Removes rendered libheif spec.
specs/l/libheif/sources Removes rendered libheif sources metadata.
specs/l/libheif/libheif-no-hevc-tests.patch Removes libheif patch (SRPM dropped).
specs/r/rust-libheif-rs/rust-libheif-rs.spec Removes rendered rust-libheif-rs spec.
specs/r/rust-libheif-rs/sources Removes rendered rust-libheif-rs sources metadata.
specs/r/rust-libheif-sys/rust-libheif-sys.spec Removes rendered rust-libheif-sys spec.
specs/r/rust-libheif-sys/sources Removes rendered rust-libheif-sys sources metadata.
specs/r/rust-libheif-sys/libheif-sys-fix-metadata-auto.diff Removes rust-libheif-sys patch (SRPM dropped).

Comment thread specs/i/ImageMagick/ImageMagick.spec
Comment thread specs/g/glycin/glycin.spec
type = "spec-search-replace"
section = "%build"
regex = '-Dpdfium=disabled \\'
replacement = "-Dpdfium=disabled \\\n -Dheif=disabled \\"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Non-blocking) This sort of search/replace leads to a nice looking rendered spec, but it couples it to an unrelated config option.

I think the cleaner overlay would be to add something after %meson?

@reubeno reubeno merged commit e64e9c0 into tomls/base/main May 12, 2026
14 checks passed
@reubeno reubeno deleted the chrco/remove-libheif branch May 12, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants