summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog15
-rw-r--r--debian/control4
-rw-r--r--debian/patches/01_foomatic-rip-error-out-on-problems-longer-string-buffers.patch256
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules3
5 files changed, 274 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index efcf725..2ac3773 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ foomatic-filters (4.0.4-1) UNRELEASED; urgency=low
* Merge from Ubuntu:
- Install the apport hook on Ubuntu
- Merge the changelog entries.
+ - Merge the patch (see 4.0.4-0ubuntu2 changelog entry).
- Merge most package relationships.
- Merge package descriptions (Closes: #467380)
- Turn on the insertion of PostScript code for CUPS' page accounting by
@@ -18,6 +19,7 @@ foomatic-filters (4.0.4-1) UNRELEASED; urgency=low
and to make packaging easier.
* Add myself to Uploaders as I'll help Chris in maintaining foomatic-filters.
+ * Putting under Debian Printing Group umbrella.
* Convert to 3.0 (quilt) source format.
* Convert to tiny dh7 style.
* debian/watch: update.
@@ -31,7 +33,18 @@ foomatic-filters (4.0.4-1) UNRELEASED; urgency=low
- Rework some Conflicts/Breaks
- Update debian/copyright
- -- Didier Raboud <didier@raboud.com> Mon, 19 Jul 2010 19:23:14 +0200
+ -- Didier Raboud <didier@raboud.com> Sun, 25 Jul 2010 18:59:47 +0200
+
+foomatic-filters (4.0.4-0ubuntu2) maverick; urgency=low
+
+ * debian/patches/01_foomatic-rip-error-out-on-problems-longer-string-buffers.patch:
+ Let foomatic-rip actually error out if something goes wrong. It simply
+ continued or closed silently (exit status 0) on several issues (LP:
+ 570522). Also make string buffers bigger as many of them were too small.
+ This patch contains the changes which are planned to be introduced in
+ Foomatic 4.0.5, so this can be considered a test release for 4.0.5.
+
+ -- Till Kampeter <till.kamppeter@gmail.com> Tue, 8 Jun 2010 17:47:03 +0200
foomatic-filters (4.0.4-0ubuntu1) lucid; urgency=low
diff --git a/debian/control b/debian/control
index 7066be0..d4b381d 100644
--- a/debian/control
+++ b/debian/control
@@ -1,8 +1,8 @@
Source: foomatic-filters
Section: text
Priority: optional
-Maintainer: Chris Lawrence <lawrencc@debian.org>
-Uploaders: Didier Raboud <didier@raboud.com>
+Maintainer: Debian Printing Group <debian-printing@lists.debian.org>
+Uploaders: Chris Lawrence <lawrencc@debian.org>, Didier Raboud <didier@raboud.com>
Build-Depends: debhelper (>> 7.0.50~), po-debconf, perl, libcups2-dev
Homepage: http://www.openprinting.org/
Vcs-Git: git://git.debian.org/collab-maint/foomatic-filters.git
diff --git a/debian/patches/01_foomatic-rip-error-out-on-problems-longer-string-buffers.patch b/debian/patches/01_foomatic-rip-error-out-on-problems-longer-string-buffers.patch
new file mode 100644
index 0000000..7709dab
--- /dev/null
+++ b/debian/patches/01_foomatic-rip-error-out-on-problems-longer-string-buffers.patch
@@ -0,0 +1,256 @@
+Description: Let foomatic-rip actually error out if something goes wrong. It
+ simply continued or closed silently (exit status 0) on several issues (LP:
+ #570522). Also make string buffers bigger as many of them were too small.
+ This patch contains the changes which are planned to be introduced in
+ Foomatic 4.0.5, so this can be considered a test release for 4.0.5.
+Origin: upstream
+Author: Till Kamppeter <till.kamppeter@gmail.com>
+Last-Update: 2010-06-08
+Index: foomatic-filters/ChangeLog
+===================================================================
+--- foomatic-filters.orig/ChangeLog 2010-07-19 16:40:10.000000000 +0200
++++ foomatic-filters/ChangeLog 2010-07-25 16:08:04.000000000 +0200
+@@ -1,3 +1,32 @@
++2010-06-08 Till Kamppeter <till.kamppeter@gmail.com>
++
++ * USAGE: Documentation correction.
++
++2010-06-07 Till Kamppeter <till.kamppeter@gmail.com>
++
++ * USAGE: Finally completed the documentation update to reflect that
++ the Ghostscript library is not needed any more.
++
++ * foomaticrip.c, foomaticrip.h, pdf.c: Let foomatic-rip actually
++ error out if something goes wrong. It simply continued or closed
++ silently (exit status 0) on the following events: Failure of
++ print_file() function call, failure of Ghostscript to determine
++ the number of pages of a PDF input file (causes Ubuntu bug
++ #570522), failure to start Ghostscript to render a PDF file,
++ failure to create a temporary file for extracting selected pages
++ from a PDF file, failure to run Ghostscript to extract pages from
++ a PDF file, page count result being a negative number.
++
++ * foomaticrip.c: Use EXIT_PRINTED constant and not hard-coded "0"
++ as exit value when terminating successfully.
++
++ * foomaticrip.h: Correct definition of EXIT_STARVED constant.
++
++2010-03-26 Till Kamppeter <till.kamppeter@gmail.com>
++
++ * options.c, options.h: Made some strings longer, to avoid space
++ problems.
++
+ 2010-02-15 Till Kamppeter <till.kamppeter@gmail.com>
+
+ * Tagged branch for release 4.0.4.
+Index: foomatic-filters/USAGE
+===================================================================
+--- foomatic-filters.orig/USAGE 2010-07-19 16:40:10.000000000 +0200
++++ foomatic-filters/USAGE 2010-07-25 16:08:04.000000000 +0200
+@@ -74,9 +74,8 @@
+ Foomatic runs on all systems where one can run the Perl
+ interpreter and Ghostscript.
+
+-foomatic-filters needs the Ghostscript library for foomatic-rip and
+-the Perl interpreter for beh (Backend Error Handler) and the test
+-suite.
++foomatic-filters needs the Perl interpreter for beh (Backend Error
++Handler) and the test suite.
+
+ To build foomatic-rip you need a C compiler and its standard libraries.
+
+@@ -138,9 +137,8 @@
+ a normal user.
+
+ The "configure" script will auto-detect where the programs have to be
+-installed and where the Perl interpreter and the Ghostscript library
+-are located. If "configure" fails because of something not being
+-installed, do
++installed and where the Perl interpreter is located. If "configure"
++fails because of something not being installed, do
+
+ rm -rf config.cache autom*.cache
+
+Index: foomatic-filters/foomaticrip.c
+===================================================================
+--- foomatic-filters.orig/foomaticrip.c 2010-07-19 16:40:10.000000000 +0200
++++ foomatic-filters/foomaticrip.c 2010-07-25 16:08:04.000000000 +0200
+@@ -1602,7 +1602,8 @@
+ PostScript file (all before the first page begins). */
+ optionset_copy_values(optionset("userval"), optionset("header"));
+
+- print_file(filename, 1);
++ if (!print_file(filename, 1))
++ rip_die(EXIT_PRNERR_NORETRY, "Could not print file %s\n", filename);
+ filename = strtok_r(NULL, " ", &p);
+ }
+
+@@ -1639,6 +1640,6 @@
+
+ list_free(arglist);
+
+- return 0;
++ return EXIT_PRINTED;
+ }
+
+Index: foomatic-filters/foomaticrip.h
+===================================================================
+--- foomatic-filters.orig/foomaticrip.h 2010-07-19 16:40:10.000000000 +0200
++++ foomatic-filters/foomaticrip.h 2010-07-25 16:08:04.000000000 +0200
+@@ -56,7 +56,7 @@
+ #define EXIT_JOBERR 3 /* job is defective */
+ #define EXIT_SIGNAL 4 /* terminated after catching signal */
+ #define EXIT_ENGAGED 5 /* printer is otherwise engaged (connection refused) */
+-#define EXIT_STARVED = 6; /* starved for system resources */
++#define EXIT_STARVED 6 /* starved for system resources */
+ #define EXIT_PRNERR_NORETRY_ACCESS_DENIED 7 /* bad password? bad port permissions? */
+ #define EXIT_PRNERR_NOT_RESPONDING 8 /* just doesn't answer at all (turned off?) */
+ #define EXIT_PRNERR_NORETRY_BAD_SETTINGS 9 /* interface settings are invalid */
+Index: foomatic-filters/options.c
+===================================================================
+--- foomatic-filters.orig/options.c 2010-07-19 16:40:10.000000000 +0200
++++ foomatic-filters/options.c 2010-07-25 16:08:04.000000000 +0200
+@@ -34,10 +34,10 @@
+
+ /* Values from foomatic keywords in the ppd file */
+ char printer_model [256];
+-char printer_id [128];
++char printer_id [256];
+ char driver [128];
+-char cmd [1024];
+-char cmd_pdf [1024];
++char cmd [4096];
++char cmd_pdf [4096];
+ dstr_t *postpipe = NULL; /* command into which the output of this
+ filter should be piped */
+ int ps_accounting = 1;
+@@ -751,7 +751,7 @@
+ {
+ choice_t *choice = option_find_choice(opt, "Custom");
+ char ** paramvalues = paramvalues_from_string(opt, values);
+- char width[30], height[20];
++ char width[30], height[30];
+ int pos;
+
+ assert(choice);
+@@ -1215,7 +1215,7 @@
+ }
+
+ if (!startswith(code, "%% FoomaticRIPOptionSetting"))
+- unhtmlify(choice->command, 1024, code);
++ unhtmlify(choice->command, 65536, code);
+ }
+
+ /*
+@@ -1529,10 +1529,10 @@
+ unhtmlify(postpipe->data, postpipe->alloc, value->data);
+ }
+ else if (strcmp(key, "FoomaticRIPCommandLine") == 0) {
+- unhtmlify(cmd, 1024, value->data);
++ unhtmlify(cmd, 4096, value->data);
+ }
+ else if (strcmp(key, "FoomaticRIPCommandLinePDF") == 0) {
+- unhtmlify(cmd_pdf, 1024, value->data);
++ unhtmlify(cmd_pdf, 4096, value->data);
+ }
+ else if (strcmp(key, "FoomaticRIPNoPageAccounting") == 0) {
+ /* Boolean value */
+@@ -1742,7 +1742,7 @@
+ * line */
+ if (startswith(cmd, "gs"))
+ {
+- strncpy(cmd_pdf, cmd, 1024);
++ strncpy(cmd_pdf, cmd, 4096);
+ return 1;
+ }
+
+Index: foomatic-filters/options.h
+===================================================================
+--- foomatic-filters.orig/options.h 2010-07-19 16:40:10.000000000 +0200
++++ foomatic-filters/options.h 2010-07-25 16:08:04.000000000 +0200
+@@ -55,7 +55,7 @@
+ typedef struct choice_s {
+ char value [128];
+ char text [128];
+- char command[1024];
++ char command[65536];
+ struct choice_s *next;
+ } choice_t;
+
+@@ -125,8 +125,8 @@
+ extern char jclend[256];
+ extern char jclprefix[256];
+
+-extern char cmd[1024];
+-extern char cmd_pdf[1024];
++extern char cmd[4096];
++extern char cmd_pdf[4096];
+
+ extern int ps_accounting;
+
+Index: foomatic-filters/pdf.c
+===================================================================
+--- foomatic-filters.orig/pdf.c 2010-07-19 16:40:10.000000000 +0200
++++ foomatic-filters/pdf.c 2010-07-25 16:08:04.000000000 +0200
+@@ -52,10 +52,8 @@
+ gspath, filename);
+
+ FILE *pd = popen(gscommand, "r");
+- if (!pd) {
+- _log("Failed to execute ghostscript to determine number of input pages!\n");
+- return 0;
+- }
++ if (!pd)
++ rip_die(EXIT_STARVED, "Failed to execute ghostscript to determine number of input pages!\n");
+
+ fread(output, 1, 31, pd);
+ pclose(pd);
+@@ -77,7 +75,7 @@
+ _log("Starting renderer with command: %s\n", cmd);
+ kid3 = start_process("kid3", exec_kid3, (void *)cmd, NULL, NULL);
+ if (kid3 < 0)
+- return 0;
++ rip_die(EXIT_STARVED, "Could not start renderer\n");
+
+ return 1;
+ }
+@@ -118,7 +116,7 @@
+ snprintf(filename, PATH_MAX, "%s/foomatic-XXXXXX", temp_dir());
+ mktemp(filename);
+ if (!filename[0])
+- return 0;
++ rip_die(EXIT_STARVED, "Unable to create temporary file!\n");
+
+ snprintf(filename_arg, PATH_MAX, "-sOutputFile=%s", filename);
+ snprintf(first_arg, 50, "-dFirstPage=%d", first);
+@@ -132,10 +130,8 @@
+ gspath, filename_arg, first_arg, last_arg, pdffilename);
+
+ FILE *pd = popen(gscommand, "r");
+- if (!pd) {
+- _log("Could not run ghostscript to extract the pages!\n");
+- return 0;
+- }
++ if (!pd)
++ rip_die(EXIT_STARVED, "Could not run ghostscript to extract the pages!\n");
+ pclose(pd);
+
+ return 1;
+@@ -158,7 +154,7 @@
+ else
+ {
+ if (!pdf_extract_pages(tmpfile, filename, firstpage, lastpage))
+- return 0;
++ rip_die(EXIT_STARVED, "Could not run ghostscript to extract the pages!\n");
+ dstrcatf(cmd, " < %s", tmpfile);
+ }
+
+@@ -237,7 +233,7 @@
+ page_count = pdf_count_pages(filename);
+
+ if (page_count <= 0)
+- return 0;
++ rip_die(EXIT_JOBERR, "Unable to determine number of pages, page count: %d\n", page_count);
+ _log("File contains %d pages\n", page_count);
+
+ optionset_copy_values(optionset("header"), optionset("currentpage"));
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3af16a7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01_foomatic-rip-error-out-on-problems-longer-string-buffers.patch
diff --git a/debian/rules b/debian/rules
index 06d71d5..81e1f00 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,6 @@ derives_from_ubuntu := $(shell (dpkg-vendor --derives-from Ubuntu && echo "yes")
%:
dh $@
-
override_dh_auto_configure:
dh_auto_configure -- --disable-file-converter-check
@@ -15,7 +14,7 @@ override_dh_auto_build:
override_dh_install:
dh_install
-
+
rm -f $(CURDIR)/debian/foomatic-filters/etc/foomatic/filter.conf*
cp -p debian/parseconfig.pl $(CURDIR)/debian/foomatic-filters/usr/share/foomatic
chmod +x $(CURDIR)/debian/foomatic-filters/usr/share/foomatic/parseconfig.pl