From 5abd8235fe2f45bf17a81403833ceb0a46cb3c0a Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Tue, 12 Jun 2012 12:06:04 +0200 Subject: [PATCH] Revert "5.2.8" This reverts commit 3170ea5f51c52a5d75884fbb28318f8cf2af87b7. libgutenprint bumped soname. libgutenprint.so.2 -> libgutenprint.so.3 --- .gitignore | 1 - gutenprint-build.patch | 22 +++++++++++ gutenprint-device-ids.patch | 71 ++++++++++++++++------------------- gutenprint-null-pointer.patch | 32 ++++++++++++++++ gutenprint.spec | 50 ++++++++++++++---------- sources | 2 +- 6 files changed, 117 insertions(+), 61 deletions(-) create mode 100644 gutenprint-build.patch create mode 100644 gutenprint-null-pointer.patch diff --git a/.gitignore b/.gitignore index 6aeff32..5e0926b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,3 @@ gutenprint-5.2.4.tar.bz2 gutenprint-5.2.5.tar.bz2 gutenprint-5.2.6.tar.bz2 /gutenprint-5.2.7.tar.bz2 -/gutenprint-5.2.8.tar.bz2 diff --git a/gutenprint-build.patch b/gutenprint-build.patch new file mode 100644 index 0000000..6b17a40 --- /dev/null +++ b/gutenprint-build.patch @@ -0,0 +1,22 @@ +diff -up gutenprint-5.2.7/src/cups/commandtocanon.c.build gutenprint-5.2.7/src/cups/commandtocanon.c +--- gutenprint-5.2.7/src/cups/commandtocanon.c.build 2011-06-07 13:32:37.372042304 +0100 ++++ gutenprint-5.2.7/src/cups/commandtocanon.c 2011-06-07 13:32:41.270970750 +0100 +@@ -13,6 +13,7 @@ + + #include + #include ++#include + #include + + +diff -up gutenprint-5.2.7/src/cups/commandtoepson.c.build gutenprint-5.2.7/src/cups/commandtoepson.c +--- gutenprint-5.2.7/src/cups/commandtoepson.c.build 2007-12-24 17:19:20.000000000 +0000 ++++ gutenprint-5.2.7/src/cups/commandtoepson.c 2011-06-07 13:32:35.656073794 +0100 +@@ -30,6 +30,7 @@ + + #include + #include ++#include + #include + #include + diff --git a/gutenprint-device-ids.patch b/gutenprint-device-ids.patch index 30a1f19..fddbaea 100644 --- a/gutenprint-device-ids.patch +++ b/gutenprint-device-ids.patch @@ -1,45 +1,38 @@ -diff -up gutenprint-5.2.8/src/xml/printers.xml.device-ids gutenprint-5.2.8/src/xml/printers.xml ---- gutenprint-5.2.8/src/xml/printers.xml.device-ids 2012-05-31 02:57:53.000000000 +0200 -+++ gutenprint-5.2.8/src/xml/printers.xml 2012-06-12 10:03:16.344274655 +0200 -@@ -149,16 +149,16 @@ - +diff -up gutenprint-5.2.7/src/xml/printers.xml.device-ids gutenprint-5.2.7/src/xml/printers.xml +--- gutenprint-5.2.7/src/xml/printers.xml.device-ids 2011-05-01 16:44:04.000000000 +0100 ++++ gutenprint-5.2.7/src/xml/printers.xml 2011-10-11 11:52:59.723682593 +0100 +@@ -137,17 +137,17 @@ + + + +- ++ - + + + + - + - - - - + - + - - - + - + - + -@@ -188,7 +188,7 @@ - - - -- -+ - - - -@@ -200,7 +200,7 @@ - - - +@@ -174,7 +174,7 @@ + + + - -+ - ++ -@@ -407,6 +407,7 @@ + +@@ -313,6 +313,7 @@ @@ -47,7 +40,7 @@ diff -up gutenprint-5.2.8/src/xml/printers.xml.device-ids gutenprint-5.2.8/src/x -@@ -425,7 +426,7 @@ +@@ -331,7 +332,7 @@ @@ -56,7 +49,7 @@ diff -up gutenprint-5.2.8/src/xml/printers.xml.device-ids gutenprint-5.2.8/src/x -@@ -487,7 +488,7 @@ +@@ -389,7 +390,7 @@ @@ -65,16 +58,16 @@ diff -up gutenprint-5.2.8/src/xml/printers.xml.device-ids gutenprint-5.2.8/src/x -@@ -521,7 +522,7 @@ +@@ -422,7 +423,7 @@ + - - + -@@ -625,6 +626,7 @@ +@@ -522,6 +523,7 @@ @@ -82,7 +75,7 @@ diff -up gutenprint-5.2.8/src/xml/printers.xml.device-ids gutenprint-5.2.8/src/x -@@ -903,7 +905,7 @@ +@@ -785,7 +787,7 @@ @@ -91,7 +84,7 @@ diff -up gutenprint-5.2.8/src/xml/printers.xml.device-ids gutenprint-5.2.8/src/x -@@ -1036,9 +1038,9 @@ +@@ -918,9 +920,9 @@ @@ -103,7 +96,7 @@ diff -up gutenprint-5.2.8/src/xml/printers.xml.device-ids gutenprint-5.2.8/src/x -@@ -1208,19 +1210,19 @@ +@@ -1090,19 +1092,19 @@ @@ -128,7 +121,7 @@ diff -up gutenprint-5.2.8/src/xml/printers.xml.device-ids gutenprint-5.2.8/src/x -@@ -1228,15 +1230,15 @@ +@@ -1110,15 +1112,15 @@ diff --git a/gutenprint-null-pointer.patch b/gutenprint-null-pointer.patch new file mode 100644 index 0000000..2198234 --- /dev/null +++ b/gutenprint-null-pointer.patch @@ -0,0 +1,32 @@ +diff -up gutenprint-5.2.7/src/escputil/escputil.c.null-pointer gutenprint-5.2.7/src/escputil/escputil.c +--- gutenprint-5.2.7/src/escputil/escputil.c.null-pointer 2010-12-11 23:04:07.000000000 +0100 ++++ gutenprint-5.2.7/src/escputil/escputil.c 2011-07-25 17:52:56.999202508 +0200 +@@ -1340,10 +1340,14 @@ do_new_status(status_cmd_t cmd, char *bu + const char *ind; + const stp_string_list_t *color_list = NULL; + stp_parameter_t desc; +- const stp_vars_t *printvars = stp_printer_get_defaults(printer); +- stp_describe_parameter(printvars, "ChannelNames", &desc); +- if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST) +- color_list = desc.bounds.str; ++ const stp_vars_t *printvars = NULL; ++ if (printer) ++ { ++ printvars = stp_printer_get_defaults(printer); ++ stp_describe_parameter(printvars, "ChannelNames", &desc); ++ if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST) ++ color_list = desc.bounds.str; ++ } + STP_DEBUG(printf("New format bytes: %d bytes\n", bytes)); + if (cmd == CMD_STATUS) + printf(_("Printer Name: %s\n"), +@@ -1428,7 +1432,8 @@ do_new_status(status_cmd_t cmd, char *bu + } + i += total_param_count + 2; + } +- stp_parameter_description_destroy(&desc); ++ if (printer) ++ stp_parameter_description_destroy(&desc); + exit(0); + } + diff --git a/gutenprint.spec b/gutenprint.spec index 15d271d..9abc7e7 100644 --- a/gutenprint.spec +++ b/gutenprint.spec @@ -2,11 +2,11 @@ Name: gutenprint Summary: Printer Drivers Package -Version: 5.2.8 -Release: 1%{?dist} +Version: 5.2.7 +Release: 11%{?dist} Group: System Environment/Base URL: http://gimp-print.sourceforge.net/ -Source0: http://downloads.sourceforge.net/sourceforge/gimp-print/gutenprint-%{version}.tar.bz2 +Source0: http://dl.sf.net/gimp-print/gutenprint-5.2/%{version}/gutenprint-%{version}.tar.bz2 # Post-install script to update foomatic PPDs. Source1: gutenprint-foomaticppdupdate # Post-install script to update CUPS native PPDs. @@ -16,22 +16,24 @@ Patch1: gutenprint-O6.patch Patch2: gutenprint-selinux.patch Patch3: gutenprint-postscriptdriver.patch Patch4: gutenprint-device-ids.patch +Patch5: gutenprint-null-pointer.patch +Patch6: gutenprint-build.patch License: GPLv2+ - +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: cups-libs >= 1.1.22-0.rc1.9.10, cups >= 1.1.22-0.rc1.9.10 BuildRequires: gettext-devel,cups-devel,pkgconfig,gimp-devel BuildRequires: libtiff-devel,libjpeg-devel,libpng-devel BuildRequires: foomatic,gtk2-devel %if %{build_with_ijs_support} -BuildRequires: ghostscript-devel +BuildRequires: ghostscript-devel %endif BuildRequires: gimp BuildRequires: chrpath -Obsoletes: gimp-print-utils < 4.2.7-25 -Provides: gimp-print-utils = 4.2.7-25 +Obsoletes: gimp-print-utils <= 4.2.7-25 +Provides: gimp-print-utils = 4.2.7-25 # Make sure we get postscriptdriver tags. -BuildRequires: python-cups, cups +BuildRequires: python-cups, cups ## NOTE ## # The README file in this package contains suggestions from upstream @@ -55,8 +57,8 @@ Summary: Library development files for gutenprint Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: gtk2-devel -Obsoletes: gimp-print-devel < 4.2.7-25 -Provides: gimp-print-devel = 4.2.7-25 +Obsoletes: gimp-print-devel <= 4.2.7-25 +Provides: gimp-print-devel = 4.2.7-25 %description devel This package contains headers and libraries required to build applications that @@ -67,8 +69,8 @@ Summary: GIMP plug-in for gutenprint Group: System Environment/Base Requires: %{name} = %{version}-%{release} Requires: gimp -Obsoletes: gimp-print-plugin < 4.2.7-25 -Provides: gimp-print-plugin = 4.2.7-25 +Obsoletes: gimp-print-plugin <= 4.2.7-25 +Provides: gimp-print-plugin = 4.2.7-25 %description plugin This package contains the gutenprint GIMP plug-in. @@ -78,11 +80,10 @@ Summary: Foomatic printer database information for gutenprint Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} Requires(post): foomatic -# python-cups is required for the update script (bug #246865) -Requires(post): python-cups +Requires(post): system-config-printer-libs Requires: foomatic-db -Obsoletes: gimp-print < 4.2.7-25 -Provides: gimp-print = 4.2.7-25 +Obsoletes: gimp-print <= 4.2.7-25 +Provides: gimp-print = 4.2.7-25 %description foomatic This package contains a database of printers,printer drivers, @@ -170,9 +171,11 @@ Epson, HP and compatible printers. # HP Color LaserJet 2500/4550 (bug #659044). # Brother hl-2035 (bug #651603#c3) # Canon PIXMA MP250 (bug #744087). -# Canon PIXMA Pro9000mk2. %patch4 -p1 -b .device-ids +# Avoid null pointer access in escputil (bug #659120). +%patch5 -p1 -b .null-pointer # Fix build against new versions of gcc. +%patch6 -p1 -b .build cp %{SOURCE2} src/cups/cups-genppdupdate.in @@ -188,6 +191,7 @@ cp %{SOURCE2} src/cups/cups-genppdupdate.in make %{?_smp_mflags} %install +rm -rf %{buildroot} make DESTDIR=%{buildroot} install mkdir -p %{buildroot}%{_sbindir} @@ -219,6 +223,9 @@ do done +%clean +rm -rf %{buildroot} + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -230,6 +237,7 @@ exit 0 %files -f %{name}.lang +%defattr(-, root, root,-) %doc COPYING %{_bindir}/escputil %{_mandir}/man1/escputil.1* @@ -249,6 +257,7 @@ exit 0 %doc COPYING AUTHORS NEWS README doc/FAQ.html doc/gutenprint-users-manual.odt doc/gutenprint-users-manual.pdf %files devel +%defattr(-,root,root,-) %doc ChangeLog doc/developer/reference-html doc/developer/gutenprint.pdf %doc doc/gutenprint doc/gutenprintui2 %{_includedir}/gutenprint/ @@ -259,20 +268,24 @@ exit 0 %exclude %{_libdir}/*.la %files plugin +%defattr(-, root, root,-) %{_libdir}/gimp/*/plug-ins/gutenprint %files foomatic +%defattr(-, root, root,-) %doc %{_sbindir}/gutenprint-foomaticppdupdate %{_datadir}/foomatic/db/source/driver/* %{_datadir}/foomatic/db/source/opt/* %files extras +%defattr(-, root, root,-) %doc %{_bindir}/testpattern %{_datadir}/gutenprint/samples/* %files cups +%defattr(-, root, root,-) %doc %{_datadir}/cups/calibrate.ppm %{_cups_serverbin}/filter/* @@ -292,9 +305,6 @@ fi /bin/rm -f /var/cache/foomatic/* %changelog -* Tue Jun 12 2012 Jiri Popelka 5.2.8-1 -- 5.2.8 - * Tue Apr 03 2012 Nils Philippsen - 5.2.7-11 - rebuild against gimp 2.8.0 release candidate diff --git a/sources b/sources index 82aa585..5dc5a1f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5ed64c0f994245852da8e9fa6a137060 gutenprint-5.2.8.tar.bz2 +b19029972bf28f6efd693270daf8f5de gutenprint-5.2.7.tar.bz2