public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ImageMagick] epel8: Fix EPEL 8 ImageMagick packaging and lint findings
@ 2026-11-08  7:12 Luya Tshimbalanga
  0 siblings, 0 replies; only message in thread
From: Luya Tshimbalanga @ 2026-11-08  7:12 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/ImageMagick
Branch : epel8
Commit : 3a29cc97b87f072294a52e1a9848f1495e906842
Author : Luya Tshimbalanga <luya@fedoraproject.org>
Date   : 2026-11-08T00:11:48-07:00
Stats  : +82/-19 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/ImageMagick/c/3a29cc97b87f072294a52e1a9848f1495e906842?branch=epel8

Log:
Fix EPEL 8 ImageMagick packaging and lint findings

---
diff --git a/ImageMagick.spec b/ImageMagick.spec
index 897bbdb..f56ae0b 100644
--- a/ImageMagick.spec
+++ b/ImageMagick.spec
@@ -10,7 +10,7 @@ Epoch:          1
 Epoch:          0
 %endif
 Version:        6.9.13.58
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        An X application for displaying and manipulating images
 
 %global VER %(foo=%{version}; echo ${foo:0:6})
@@ -19,6 +19,7 @@ License:        ImageMagick
 Url:            https://legacy.imagemagick.org/
 Source0:        https://download.imagemagick.org/archive/%{name}-%{VER}-%{Patchlevel}.tar.xz
 
+BuildRequires: diffutils
 BuildRequires:  pkgconfig(bzip2), pkgconfig(freetype2), pkgconfig(libjpeg), pkgconfig(libpng)
 BuildRequires:  pkgconfig(libtiff-4), giflib-devel, pkgconfig(zlib), perl-devel >= 5.8.1
 BuildRequires:  perl-generators
@@ -51,11 +52,17 @@ BuildRequires:  pkgconfig(libraw) >= 0.14.8
 BuildRequires:  pkgconfig(libzstd)
 BuildRequires:  autoconf automake gcc gcc-c++
 BuildRequires:  make
+%if 0%{?rhel} == 8
+BuildRequires:  /usr/sbin/hardlink
+%else
+BuildRequires:  /usr/bin/hardlink
+%endif
 
 Requires:       %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
 # allow smoth upgrade for 3rd party repository
 # providing latest version/soname as ImageMagick6
-Obsoletes:      %{name}6            <= %{epoch}:%{version}-%{release}
+Obsoletes:      %{name}6            < %{epoch}:%{version}-%{release}
+Provides:       %{name}6 = %{epoch}:%{version}-%{release}
 
 %description
 ImageMagick is an image display and manipulation tool for the X
@@ -64,7 +71,7 @@ and Photo CD image formats. It can resize, rotate, sharpen, color
 reduce, or add special effects to an image, and when finished you can
 either save the completed work in the original format or a different
 one. ImageMagick also includes command line programs for creating
-animated or transparent .gifs, creating composite images, creating
+animated or transparent GIF images, creating composite images, creating
 thumbnail images, and more.
 
 ImageMagick is one of your choices if you need a program to manipulate
@@ -77,7 +84,8 @@ ImageMagick-devel as well.
 Summary:        Library links and header files for ImageMagick app development
 Requires:       %{name}%{?_isa} = %{epoch}:%{version}-%{release}
 Requires:       %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
-Obsoletes:      %{name}6-devel      <= %{epoch}:%{version}-%{release}
+Obsoletes:      %{name}6-devel      < %{epoch}:%{version}-%{release}
+Provides:       %{name}6-devel = %{epoch}:%{version}-%{release}
 
 %description devel
 ImageMagick-devel contains the library links and header files you'll
@@ -92,7 +100,8 @@ however.
 
 %package libs
 Summary: ImageMagick libraries to link with
-Obsoletes: %{name}6-libs <= %{epoch}:%{version}-%{release}
+Obsoletes: %{name}6-libs < %{epoch}:%{version}-%{release}
+Provides:       %{name}6-libs = %{epoch}:%{version}-%{release}
 
 %description libs
 This packages contains a shared libraries to use within other applications.
@@ -101,20 +110,23 @@ This packages contains a shared libraries to use within other applications.
 %package djvu
 Summary: DjVu plugin for ImageMagick
 Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
-Obsoletes: %{name}6-djvu      <= %{epoch}:%{version}-%{release}
+Obsoletes: %{name}6-djvu      < %{epoch}:%{version}-%{release}
+Provides:       %{name}6-djvu = %{epoch}:%{version}-%{release}
 
 %description djvu
-This packages contains a plugin for ImageMagick which makes it possible to
-save and load DjvU files from ImageMagick and libMagickCore using applications.
+This package provides a plugin for reading and writing DjVu images with
+ImageMagick and applications using its core library.
 
 
 %package doc
-Summary: ImageMagick html documentation
-Obsoletes: %{name}6-doc <= %{epoch}:%{version}-%{release}
+Summary: ImageMagick HTML documentation
+BuildArch: noarch
+Obsoletes: %{name}6-doc < %{epoch}:%{version}-%{release}
+Provides:       %{name}6-doc = %{epoch}:%{version}-%{release}
 
 %description doc
 ImageMagick documentation, this package contains usage (for the
-commandline tools) and API (for the libraries) documentation in html format.
+command line tools) and API (for the libraries) documentation in HTML format.
 Note this documentation can also be found on the ImageMagick website:
 http://www.imagemagick.org/
 
@@ -123,7 +135,8 @@ http://www.imagemagick.org/
 Summary:        ImageMagick perl bindings
 Requires:       %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-Obsoletes:      %{name}6-perl       <= %{epoch}:%{version}-%{release}
+Obsoletes:      %{name}6-perl       < %{epoch}:%{version}-%{release}
+Provides:       %{name}6-perl = %{epoch}:%{version}-%{release}
 
 %description perl
 Perl bindings to ImageMagick.
@@ -135,7 +148,8 @@ ImageMagick.
 %package c++
 Summary:        ImageMagick Magick++ library (C++ bindings)
 Requires:       %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
-Obsoletes:      %{name}6-c++        <= %{epoch}:%{version}-%{release}
+Obsoletes:      %{name}6-c++        < %{epoch}:%{version}-%{release}
+Provides:       %{name}6-c++ = %{epoch}:%{version}-%{release}
 
 %description c++
 This package contains the Magick++ library, a C++ binding to the ImageMagick
@@ -148,7 +162,8 @@ Install ImageMagick-c++ if you want to use any applications that use Magick++.
 Summary:        C++ bindings for the ImageMagick library
 Requires:       %{name}-c++%{?_isa} = %{epoch}:%{version}-%{release}
 Requires:       %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
-Obsoletes:      %{name}6-c++-devel   <= %{epoch}:%{version}-%{release}
+Obsoletes:      %{name}6-c++-devel   < %{epoch}:%{version}-%{release}
+Provides:       %{name}6-c++-devel = %{epoch}:%{version}-%{release}
 
 %description c++-devel
 ImageMagick-devel contains the static libraries and header files you'll
@@ -208,6 +223,30 @@ make
 %install
 %make_install
 cp -a www/source %{buildroot}%{_datadir}/doc/%{name}-%{VER}
+
+# The doc subpackage installs LICENSE through %%license.
+rm -f %{buildroot}%{_docdir}/%{name}-6/LICENSE
+
+# List core modules without collecting the separate DjVu plugin's build-ID link.
+find %{buildroot}%{_libdir}/%{name}-%{VER} -type d -print \
+    | sed 's|%{buildroot}||; s|^|%%dir |' > libs-modules.list
+find %{buildroot}%{_libdir}/%{name}-%{VER} ! -type d \
+    ! -path '*/coders/djvu.*' -print \
+    | sed 's|%{buildroot}||' >> libs-modules.list
+
+# Stage clean examples so duplicate files can be hardlinked before packaging.
+mkdir -p %{buildroot}%{_docdir}/%{name}-c++-devel
+cp -pr Magick++/examples %{buildroot}%{_docdir}/%{name}-c++-devel/
+
+# Keep hardlinks within a subpackage. EPEL 8 uses the older standalone tool.
+%if 0%{?rhel} == 8
+/usr/sbin/hardlink -cv %{buildroot}%{_docdir}/%{name}-6 %{buildroot}%{_docdir}/%{name}-%{VER}
+/usr/sbin/hardlink -cv %{buildroot}%{_docdir}/%{name}-c++-devel
+%else
+/usr/bin/hardlink -tv %{buildroot}%{_docdir}/%{name}-6 %{buildroot}%{_docdir}/%{name}-%{VER}
+/usr/bin/hardlink -tv %{buildroot}%{_docdir}/%{name}-c++-devel
+%endif
+
 # Delete *ONLY* _libdir/*.la files! .la files used internally to handle plugins - BUG#185237!!!
 rm %{buildroot}%{_libdir}/*.la
 
@@ -222,6 +261,9 @@ find %{buildroot} -name "perllocal.pod" |xargs rm -f
 # Do NOT remove .la files for codecs
 # https://bugzilla.novell.com/show_bug.cgi?id=579798
 
+# Normalize the Perl extension's executable permissions.
+chmod 0755 %{buildroot}%{perl_vendorarch}/auto/Image/Magick/Q16/Q16.so
+
 # perlmagick: build files list
 echo "%defattr(-,root,root,-)" > perl-pkg-files
 find %{buildroot}/%{_libdir}/perl* -type f -print \
@@ -261,6 +303,20 @@ multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/magick-baseconf
 multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/version.h
 
 
+# Hardlink identical compatibility files within their owning subpackages.
+deduplicate_pair() {
+    if cmp -s "$1" "$2"; then
+        ln -f "$1" "$2"
+    fi
+}
+deduplicate_pair %{buildroot}%{_includedir}/%{name}-6/wand/magick_wand.h %{buildroot}%{_includedir}/%{name}-6/wand/magick-wand.h
+deduplicate_pair %{buildroot}%{_libdir}/pkgconfig/ImageMagick++.pc %{buildroot}%{_libdir}/pkgconfig/ImageMagick++-6.Q16.pc
+deduplicate_pair %{buildroot}%{_libdir}/pkgconfig/Magick++.pc %{buildroot}%{_libdir}/pkgconfig/Magick++-6.Q16.pc
+deduplicate_pair %{buildroot}%{_libdir}/pkgconfig/ImageMagick.pc %{buildroot}%{_libdir}/pkgconfig/ImageMagick-6.Q16.pc
+deduplicate_pair %{buildroot}%{_libdir}/pkgconfig/MagickCore.pc %{buildroot}%{_libdir}/pkgconfig/MagickCore-6.Q16.pc
+deduplicate_pair %{buildroot}%{_libdir}/pkgconfig/MagickWand.pc %{buildroot}%{_libdir}/pkgconfig/MagickWand-6.Q16.pc
+deduplicate_pair %{buildroot}%{_libdir}/pkgconfig/Wand.pc %{buildroot}%{_libdir}/pkgconfig/Wand-6.Q16.pc
+
 %check
 export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
 %make_build check
@@ -275,13 +331,11 @@ rm PerlMagick/demo/Generic.ttf
 %{_mandir}/man[145]/[a-z]*
 %{_mandir}/man1/%{name}.*
 
-%files libs
+%files libs -f libs-modules.list
 %doc LICENSE NOTICE AUTHORS.txt QuickStart.txt
 %{_libdir}/libMagickCore-6.Q16.so.7*
 %{_libdir}/libMagickWand-6.Q16.so.7*
-%{_libdir}/%{name}-%{VER}
 %{_datadir}/%{name}-6
-%exclude %{_libdir}/%{name}-%{VER}/modules-Q16/coders/djvu.*
 %dir %{_sysconfdir}/%{name}-6
 %config(noreplace) %{_sysconfdir}/%{name}-6/*.xml
 
@@ -309,12 +363,14 @@ rm PerlMagick/demo/Generic.ttf
 %{_mandir}/man1/MagickWand-config.*
 
 %files djvu
+%doc NOTICE AUTHORS.txt
+%license LICENSE
 %{_libdir}/%{name}-%{VER}/modules-Q16/coders/djvu.*
 
 %files doc
 %doc %{_datadir}/doc/%{name}-6
 %doc %{_datadir}/doc/%{name}-%{VER}
-%doc LICENSE
+%license LICENSE
 
 %files c++
 %doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README
@@ -322,7 +378,7 @@ rm PerlMagick/demo/Generic.ttf
 %{_libdir}/libMagick++-6.Q16.so.9*
 
 %files c++-devel
-%doc Magick++/examples
+%doc %{_docdir}/%{name}-c++-devel
 %{_bindir}/Magick++-config
 %{_includedir}/%{name}-6/Magick++
 %{_includedir}/%{name}-6/Magick++.h
@@ -338,6 +394,13 @@ rm PerlMagick/demo/Generic.ttf
 %doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
 
 %changelog
+* Sat Nov 07 2026 Luya Tshimbalanga <luya@fedoraproject.org> - 0:6.9.13.58-2
+- Backport documentation cleanup and DjVu build-ID ownership fixes
+- Make documentation noarch and hardlink duplicate documentation
+- Fix Perl permissions and provide obsolete ImageMagick6 compatibility names
+- Hardlink duplicate development files and tag the documentation license
+- Remove the redundant documentation copy of LICENSE
+
 * Sun Oct 11 2026 Luya Tshimbalanga <luya@fedoraproject.org> - 1:6.9.13.58-1
 - Update to version 6.9.13.58
 - Resolves: rhbz#2391124

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-08  7:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08  7:12 [rpms/ImageMagick] epel8: Fix EPEL 8 ImageMagick packaging and lint findings Luya Tshimbalanga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox