and use update-alternatives for selecting configurations.
OBS-URL: https://build.opensuse.org/package/show/graphics/ImageMagick?expand=0&rev=417
This commit is contained in:
parent
1e7f7887e8
commit
63be6bc53f
@ -8,6 +8,7 @@ Thu Feb 28 11:44:05 UTC 2019 - pgajdos@suse.com
|
|||||||
* ImageMagick-config-SUSE (preferred)
|
* ImageMagick-config-SUSE (preferred)
|
||||||
- provides configuration provided by SUSE (with security
|
- provides configuration provided by SUSE (with security
|
||||||
restrictions)
|
restrictions)
|
||||||
|
and use update-alternatives for selecting configurations.
|
||||||
- deleted patches
|
- deleted patches
|
||||||
- ImageMagick-disable-insecure-coders.patch (renamed)
|
- ImageMagick-disable-insecure-coders.patch (renamed)
|
||||||
- added patches
|
- added patches
|
||||||
|
114
ImageMagick.spec
114
ImageMagick.spec
@ -27,7 +27,8 @@
|
|||||||
%define cwandver 6
|
%define cwandver 6
|
||||||
%define cxxlibver 4
|
%define cxxlibver 4
|
||||||
%define libspec -%{maj}_Q%{quantum_depth}HDRI
|
%define libspec -%{maj}_Q%{quantum_depth}HDRI
|
||||||
%define config_dir ImageMagick%{libspec}%{clibver}
|
%define config_dir ImageMagick-7
|
||||||
|
%define config_spec config-7
|
||||||
# bsc#1088463
|
# bsc#1088463
|
||||||
%define urw_base35_fonts 0
|
%define urw_base35_fonts 0
|
||||||
|
|
||||||
@ -171,7 +172,7 @@ Summary: C runtime library for ImageMagick
|
|||||||
Group: Productivity/Graphics/Other
|
Group: Productivity/Graphics/Other
|
||||||
Recommends: ghostscript
|
Recommends: ghostscript
|
||||||
Suggests: %{name}-extra = %{version}
|
Suggests: %{name}-extra = %{version}
|
||||||
Requires: imagick-config = %{version}
|
Requires: imagick-%{config_spec} = %{version}
|
||||||
Recommends: %{name}-config-SUSE = %{version}
|
Recommends: %{name}-config-SUSE = %{version}
|
||||||
|
|
||||||
%package -n libMagickWand%{libspec}%{cwandver}
|
%package -n libMagickWand%{libspec}%{cwandver}
|
||||||
@ -201,32 +202,19 @@ Group: Documentation/HTML
|
|||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%package config-upstream
|
%package %{config_spec}-upstream
|
||||||
Summary: Upstream Configuration Files
|
Summary: Upstream Configuration Files
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Provides: imagick-config = %{version}
|
Provides: imagick-%{config_spec}
|
||||||
Conflicts: %{name}-config-SUSE
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
|
|
||||||
%description config-upstream
|
%package %{config_spec}-SUSE
|
||||||
ImageMagick configuration as provided by upstream. It does not
|
|
||||||
provide any security restrictions. ImageMagick will be vulnerable
|
|
||||||
for example by ImageTragick or PS/PDF coder issues. It should
|
|
||||||
be used in trusted environment. Version or maintenance updates
|
|
||||||
will not overwrite user changes in system configuration.
|
|
||||||
|
|
||||||
%package config-SUSE
|
|
||||||
Summary: Upstream Configuration Files
|
Summary: Upstream Configuration Files
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Provides: imagick-config = %{version}
|
Provides: imagick-%{config_spec}
|
||||||
Conflicts: %{name}-config-upstream
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
%description config-SUSE
|
|
||||||
ImageMagick configuration as provide by SUSE. It is more security
|
|
||||||
aware than config-upstream variant. It does disable some coders,
|
|
||||||
that are insecure by design to prevent user to use them
|
|
||||||
inadvertently. Configuration can be subject of change by future
|
|
||||||
version and maintenance updates and system changes will not be
|
|
||||||
preserved.
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
ImageMagick is a robust collection of tools and libraries to read,
|
ImageMagick is a robust collection of tools and libraries to read,
|
||||||
@ -326,6 +314,22 @@ support multiple generations of an image in memory at one time.
|
|||||||
%description doc
|
%description doc
|
||||||
HTML documentation for ImageMagick library and scene examples.
|
HTML documentation for ImageMagick library and scene examples.
|
||||||
|
|
||||||
|
%description %{config_spec}-upstream
|
||||||
|
ImageMagick configuration as supplied by upstream. It does not
|
||||||
|
provide any security restrictions. ImageMagick will be vulnerable
|
||||||
|
for example by ImageTragick or PS/PDF coder issues. It should
|
||||||
|
be used in trusted environment. Version or maintenance updates
|
||||||
|
will not overwrite user changes in system configuration.
|
||||||
|
|
||||||
|
%description %{config_spec}-SUSE
|
||||||
|
ImageMagick configuration as provide by SUSE. It is more security
|
||||||
|
aware than config-upstream variant. It does disable some coders,
|
||||||
|
that are insecure by design to prevent user to use them
|
||||||
|
inadvertently. Configuration can be subject of change by future
|
||||||
|
version and maintenance updates and system changes will not be
|
||||||
|
preserved.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n ImageMagick-%{source_version}
|
%setup -q -n ImageMagick-%{source_version}
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
@ -344,7 +348,6 @@ sed -i 's:\.t1:.otf:' config/type-urw-base35.xml.in
|
|||||||
# make library binary package parallel installable
|
# make library binary package parallel installable
|
||||||
export MODULES_DIRNAME="modules%{libspec}%{clibver}"
|
export MODULES_DIRNAME="modules%{libspec}%{clibver}"
|
||||||
export SHAREARCH_DIRNAME="config%{libspec}%{clibver}"
|
export SHAREARCH_DIRNAME="config%{libspec}%{clibver}"
|
||||||
export CONFIGURE_RELATIVE_PATH="%{config_dir}"
|
|
||||||
%if %{debug_build}
|
%if %{debug_build}
|
||||||
export CFLAGS="%{optflags} -O0"
|
export CFLAGS="%{optflags} -O0"
|
||||||
export CXXFLAGS="%{optflags} -O0"
|
export CXXFLAGS="%{optflags} -O0"
|
||||||
@ -396,9 +399,6 @@ make -j1 perl-build
|
|||||||
# mostly because */demo is used later with %check
|
# mostly because */demo is used later with %check
|
||||||
# polutting dir with .libs etc.
|
# polutting dir with .libs etc.
|
||||||
cp -r Magick++/demo Magick++/examples
|
cp -r Magick++/demo Magick++/examples
|
||||||
%if 0%{?suse_version} < 1315
|
|
||||||
rm -r Magick++/examples/.deps
|
|
||||||
%endif
|
|
||||||
cp -r PerlMagick/demo PerlMagick/examples
|
cp -r PerlMagick/demo PerlMagick/examples
|
||||||
# other improvements
|
# other improvements
|
||||||
chmod -x PerlMagick/demo/*.pl
|
chmod -x PerlMagick/demo/*.pl
|
||||||
@ -442,6 +442,8 @@ mv -t %{buildroot}%{_sysconfdir}/%{name}* %{buildroot}%{_datadir}/%{name}*/*.xml
|
|||||||
mv %{buildroot}%{_sysconfdir}/%{config_dir}{,-upstream}
|
mv %{buildroot}%{_sysconfdir}/%{config_dir}{,-upstream}
|
||||||
cp -r %{buildroot}%{_sysconfdir}/%{config_dir}{-upstream,-SUSE}
|
cp -r %{buildroot}%{_sysconfdir}/%{config_dir}{-upstream,-SUSE}
|
||||||
patch --dir %{buildroot}%{_sysconfdir}/%{config_dir}-SUSE < %{PATCH0}
|
patch --dir %{buildroot}%{_sysconfdir}/%{config_dir}-SUSE < %{PATCH0}
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives/
|
||||||
|
ln -sf %{_sysconfdir}/alternatives/%{config_dir} %{buildroot}%{_sysconfdir}/%{config_dir}
|
||||||
# symlink header file relative to /usr/include/ImageMagick-7/
|
# symlink header file relative to /usr/include/ImageMagick-7/
|
||||||
# so that inclusions like wand/*.h and magick/*.h work
|
# so that inclusions like wand/*.h and magick/*.h work
|
||||||
ln -s ./MagickCore %{buildroot}%{_includedir}/%{name}-%{maj}/magick
|
ln -s ./MagickCore %{buildroot}%{_includedir}/%{name}-%{maj}/magick
|
||||||
@ -469,22 +471,23 @@ sed -i 's:%{buildroot}::' %{buildroot}/%{_libdir}/ImageMagick-%{mfr_version}/con
|
|||||||
%post -n libMagick++%{libspec}%{cxxlibver} -p /sbin/ldconfig
|
%post -n libMagick++%{libspec}%{cxxlibver} -p /sbin/ldconfig
|
||||||
%postun -n libMagick++%{libspec}%{cxxlibver} -p /sbin/ldconfig
|
%postun -n libMagick++%{libspec}%{cxxlibver} -p /sbin/ldconfig
|
||||||
|
|
||||||
%post config-upstream
|
%post %{config_spec}-upstream
|
||||||
ln -sf %{_sysconfdir}/%{config_dir}-upstream %{_sysconfdir}/%{config_dir}
|
%{_sbindir}/update-alternatives --install %{_sysconfdir}/%{config_dir} %{config_dir} %{_sysconfdir}/%{config_dir}-upstream 1
|
||||||
|
|
||||||
%postun config-upstream
|
%postun %{config_spec}-upstream
|
||||||
rm -f %{_sysconfdir}/%{config_dir}
|
if [ ! -d %{_sysconfdir}/%{config_dir}-upstream ] ; then
|
||||||
|
%{_sbindir}/update-alternatives --remove %{config_dir} %{_sysconfdir}/%{config_dir}-upstream
|
||||||
|
fi
|
||||||
|
|
||||||
%post config-SUSE
|
%post %{config_spec}-SUSE
|
||||||
ln -sf %{_sysconfdir}/%{config_dir}-SUSE %{_sysconfdir}/%{config_dir}
|
%{_sbindir}/update-alternatives --install %{_sysconfdir}/%{config_dir} %{config_dir} %{_sysconfdir}/%{config_dir}-SUSE 10
|
||||||
|
|
||||||
%postun config-SUSE
|
%postun %{config_spec}-SUSE
|
||||||
rm -f %{_sysconfdir}/%{config_dir}
|
if [ ! -d %{_sysconfdir}/%{config_dir}-SUSE ] ; then
|
||||||
|
%{_sbindir}/update-alternatives --remove %{config_dir} %{_sysconfdir}/%{config_dir}-SUSE
|
||||||
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%if 0%{?suse_version} < 1315
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%endif
|
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc ChangeLog NEWS.txt
|
%doc ChangeLog NEWS.txt
|
||||||
%{_bindir}/[^MW]*
|
%{_bindir}/[^MW]*
|
||||||
@ -492,9 +495,6 @@ rm -f %{_sysconfdir}/%{config_dir}
|
|||||||
%exclude %{_mandir}/man1/*-config.1%{ext_man}
|
%exclude %{_mandir}/man1/*-config.1%{ext_man}
|
||||||
|
|
||||||
%files -n libMagickCore%{libspec}%{clibver}
|
%files -n libMagickCore%{libspec}%{clibver}
|
||||||
%if 0%{?suse_version} < 1315
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%endif
|
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc ChangeLog NEWS.txt
|
%doc ChangeLog NEWS.txt
|
||||||
%{_libdir}/libMagickCore*.so.%{clibver}*
|
%{_libdir}/libMagickCore*.so.%{clibver}*
|
||||||
@ -514,16 +514,10 @@ rm -f %{_sysconfdir}/%{config_dir}
|
|||||||
%{_libdir}/ImageMagick*/config*
|
%{_libdir}/ImageMagick*/config*
|
||||||
|
|
||||||
%files -n libMagickWand%{libspec}%{cwandver}
|
%files -n libMagickWand%{libspec}%{cwandver}
|
||||||
%if 0%{?suse_version} < 1315
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%endif
|
|
||||||
%{_libdir}/libMagickWand*.so.%{cwandver}*
|
%{_libdir}/libMagickWand*.so.%{cwandver}*
|
||||||
|
|
||||||
%if !%{debug_build}
|
%if !%{debug_build}
|
||||||
%files extra
|
%files extra
|
||||||
%if 0%{?suse_version} < 1315
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%endif
|
|
||||||
%{_libdir}/ImageMagick*/modules*/*/wmf.so
|
%{_libdir}/ImageMagick*/modules*/*/wmf.so
|
||||||
# don't remove la files, see bnc#579798
|
# don't remove la files, see bnc#579798
|
||||||
%if 0%{?suse_version} > 1315
|
%if 0%{?suse_version} > 1315
|
||||||
@ -535,9 +529,6 @@ rm -f %{_sysconfdir}/%{config_dir}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%if 0%{?suse_version} < 1315
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%endif
|
|
||||||
%{_libdir}/libMagickCore*.so
|
%{_libdir}/libMagickCore*.so
|
||||||
%{_libdir}/libMagickWand*.so
|
%{_libdir}/libMagickWand*.so
|
||||||
%dir %{_includedir}/ImageMagick*
|
%dir %{_includedir}/ImageMagick*
|
||||||
@ -554,28 +545,16 @@ rm -f %{_sysconfdir}/%{config_dir}
|
|||||||
%exclude %{_mandir}/man1/Magick++-config.1%{ext_man}
|
%exclude %{_mandir}/man1/Magick++-config.1%{ext_man}
|
||||||
|
|
||||||
%files -n perl-PerlMagick
|
%files -n perl-PerlMagick
|
||||||
%if 0%{?suse_version} < 1315
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%endif
|
|
||||||
%doc PerlMagick/README.txt
|
%doc PerlMagick/README.txt
|
||||||
%doc PerlMagick/examples
|
%doc PerlMagick/examples
|
||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
%{perl_vendorarch}/auto/Image
|
%{perl_vendorarch}/auto/Image
|
||||||
%{perl_vendorarch}/Image
|
%{perl_vendorarch}/Image
|
||||||
%if 0%{?suse_version} < 1315
|
|
||||||
%{_localstatedir}/adm/perl-modules/ImageMagick
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n libMagick++%{libspec}%{cxxlibver}
|
%files -n libMagick++%{libspec}%{cxxlibver}
|
||||||
%if 0%{?suse_version} < 1315
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%endif
|
|
||||||
%{_libdir}/libMagick++*.so.%{cxxlibver}*
|
%{_libdir}/libMagick++*.so.%{cxxlibver}*
|
||||||
|
|
||||||
%files -n libMagick++-devel
|
%files -n libMagick++-devel
|
||||||
%if 0%{?suse_version} < 1315
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%endif
|
|
||||||
%doc Magick++/examples
|
%doc Magick++/examples
|
||||||
%doc Magick++/NEWS Magick++/README Magick++/AUTHORS
|
%doc Magick++/NEWS Magick++/README Magick++/AUTHORS
|
||||||
%{_libdir}/libMagick++*.so
|
%{_libdir}/libMagick++*.so
|
||||||
@ -586,17 +565,18 @@ rm -f %{_sysconfdir}/%{config_dir}
|
|||||||
%{_mandir}/man1/Magick++-config.1%{ext_man}
|
%{_mandir}/man1/Magick++-config.1%{ext_man}
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%if 0%{?suse_version} < 1315
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%endif
|
|
||||||
%{_defaultdocdir}/%{name}-%{maj}
|
%{_defaultdocdir}/%{name}-%{maj}
|
||||||
|
|
||||||
%files config-upstream
|
%files %{config_spec}-upstream
|
||||||
%dir %{_sysconfdir}/ImageMagick*-upstream/
|
%dir %{_sysconfdir}/ImageMagick*-upstream/
|
||||||
%config(noreplace) %{_sysconfdir}/ImageMagick*-upstream/*
|
%config(noreplace) %{_sysconfdir}/ImageMagick*-upstream/*
|
||||||
|
%{_sysconfdir}/%{config_dir}
|
||||||
|
%ghost %{_sysconfdir}/alternatives/%{config_dir}
|
||||||
|
|
||||||
%files config-SUSE
|
%files %{config_spec}-SUSE
|
||||||
%dir %{_sysconfdir}/ImageMagick*-SUSE/
|
%dir %{_sysconfdir}/ImageMagick*-SUSE/
|
||||||
%config %{_sysconfdir}/ImageMagick*-SUSE/*
|
%config %{_sysconfdir}/ImageMagick*-SUSE/*
|
||||||
|
%{_sysconfdir}/%{config_dir}
|
||||||
|
%ghost %{_sysconfdir}/alternatives/%{config_dir}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user