From 93acf3de8a13e302f05231a21a96eb63190b1ea1 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Jan 09 2008 17:46:46 +0000 Subject: - Apply patch to prevent overlong PPD lines from causing failures except in strict mode (bug #405061). Needed for compatibility with older versions of foomatic (e.g. Red Hat Enterprise Linux 3/4). --- diff --git a/cups-strict-ppd-line-length.patch b/cups-strict-ppd-line-length.patch new file mode 100644 index 0000000..d393728 --- /dev/null +++ b/cups-strict-ppd-line-length.patch @@ -0,0 +1,30 @@ +diff -up cups-1.3.5/cups/ppd.c~ cups-1.3.5/cups/ppd.c +--- cups-1.3.5/cups/ppd.c~ 2007-11-30 19:29:50.000000000 +0000 ++++ cups-1.3.5/cups/ppd.c 2008-01-09 12:08:48.000000000 +0000 +@@ -2801,7 +2801,7 @@ ppd_read(cups_file_t *fp, /* I - Fil + *lineptr++ = ch; + col ++; + +- if (col > (PPD_MAX_LINE - 1)) ++ if (col > (PPD_MAX_LINE - 1) && cg->ppd_conform == PPD_CONFORM_STRICT) + { + /* + * Line is too long... +@@ -2868,7 +2868,7 @@ ppd_read(cups_file_t *fp, /* I - Fil + { + col ++; + +- if (col > (PPD_MAX_LINE - 1)) ++ if (col > (PPD_MAX_LINE - 1) && cg->ppd_conform == PPD_CONFORM_STRICT) + { + /* + * Line is too long... +@@ -2931,7 +2931,7 @@ ppd_read(cups_file_t *fp, /* I - Fil + { + col ++; + +- if (col > (PPD_MAX_LINE - 1)) ++ if (col > (PPD_MAX_LINE - 1) && cg->ppd_conform == PPD_CONFORM_STRICT) + { + /* + * Line is too long... diff --git a/cups.spec b/cups.spec index 9905ed4..fd71e05 100644 --- a/cups.spec +++ b/cups.spec @@ -44,6 +44,7 @@ Patch18: cups-str2650.patch Patch19: cups-eggcups.patch Patch20: cups-getpass.patch Patch21: cups-driverd-timeout.patch +Patch22: cups-strict-ppd-line-length.patch Patch25: cups-usb-paperout.patch Patch100: cups-lspp.patch Epoch: 1 @@ -155,6 +156,7 @@ lpd emulation. %patch19 -p1 -b .eggcups %patch20 -p1 -b .getpass %patch21 -p1 -b .driverd-timeout +%patch22 -p1 -b .strict-ppd-line-length %patch25 -p1 -b .usb-paperout %if %lspp @@ -448,6 +450,9 @@ rm -rf $RPM_BUILD_ROOT %changelog * Wed Jan 9 2008 Tim Waugh +- Apply patch to prevent overlong PPD lines from causing failures except + in strict mode (bug #405061). Needed for compatibility with older + versions of foomatic (e.g. Red Hat Enterprise Linux 3/4). - Applied upstream patch to fix cupsctl --remote-any (bug #421411, STR #2650). * Thu Jan 3 2008 Tim Waugh