From 5adf93e8a4af5e6dff1196818797a3648e1d72f9 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 7 Jun 2011 11:51:21 +0100 Subject: [PATCH 1/2] cups-genppdupdate: fixed multicat support (bug #711021). It was writing an extra newline character after the URI, which caused the gutenprint.5.2 multicat process to exit. This prevented some PPDs from being updated. --- cups-genppdupdate.py.in | 4 ++-- gutenprint.spec | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cups-genppdupdate.py.in b/cups-genppdupdate.py.in index e01a322..d0d6e92 100755 --- a/cups-genppdupdate.py.in +++ b/cups-genppdupdate.py.in @@ -2,7 +2,7 @@ # $Id$ # Update CUPS PPDs for Gutenprint queues. # Copyright (C) 2002-2003 Roger Leigh (rleigh@debian.org) -# Copyright (C) 2009 Red Hat, Inc. +# Copyright (C) 2009, 2011 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -767,7 +767,7 @@ def get_ppd_fh (ppd_source_filename, filename, driver, locale, region): "w")) server_multicat_initialized = mc_proc - print >>server_multicat_initialized.stdin, "%s\n" % url + print >>server_multicat_initialized.stdin, "%s" % url server_multicat_initialized.stdin.flush () return (new_ppd_filename, server_multicat_initialized.stdout) diff --git a/gutenprint.spec b/gutenprint.spec index 30efb63..0c592bf 100644 --- a/gutenprint.spec +++ b/gutenprint.spec @@ -4,7 +4,7 @@ Name: gutenprint Summary: Printer Drivers Package Version: 5.2.7 -Release: 1%{?dist} +Release: 2%{?dist} Group: System Environment/Base URL: http://gimp-print.sourceforge.net/ Source0: http://dl.sf.net/gimp-print/gutenprint-5.2/%{version}/gutenprint-%{version}.tar.bz2 @@ -298,6 +298,12 @@ fi /bin/rm -f /var/cache/foomatic/* %changelog +* Tue Jun 7 2011 Tim Waugh 5.2.7-2 +- cups-genppdupdate: fixed multicat support (bug #711021). It was + writing an extra newline character after the URI, which caused the + gutenprint.5.2 multicat process to exit. This prevented some + PPDs from being updated. + * Thu May 05 2011 Jiri Popelka 5.2.7-1 - 5.2.7. From a374dedd23b1d8e87f9f606c1643c4029ea96e77 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 7 Jun 2011 13:17:27 +0100 Subject: [PATCH 2/2] Fix build against newer versions of gcc. --- gutenprint-build.patch | 22 ++++++++++++++++++++++ gutenprint.spec | 4 ++++ 2 files changed, 26 insertions(+) create mode 100644 gutenprint-build.patch 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.spec b/gutenprint.spec index 0c592bf..2ebb2be 100644 --- a/gutenprint.spec +++ b/gutenprint.spec @@ -18,6 +18,7 @@ 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 @@ -169,6 +170,8 @@ Epson, HP and compatible printers. %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 @@ -299,6 +302,7 @@ fi %changelog * Tue Jun 7 2011 Tim Waugh 5.2.7-2 +- Fix build against newer versions of gcc. - cups-genppdupdate: fixed multicat support (bug #711021). It was writing an extra newline character after the URI, which caused the gutenprint.5.2 multicat process to exit. This prevented some