From 05951ac1a00f8dcce679a9898c096e9dfbf65804 Mon Sep 17 00:00:00 2001 From: Jinkun Jang Date: Sat, 16 Mar 2013 01:08:48 +0900 Subject: [PATCH] merge with master --- cups-filters.manifest | 9 ++-- debian/changelog | 8 +++ libcupsfilters1.manifest | 2 +- packaging/cups-filters.spec | 6 ++- packaging/tizen_fix_ignore_sigpipe.patch | 92 ++++++++++++++++++++++++++++++++ 5 files changed, 109 insertions(+), 8 deletions(-) create mode 100644 packaging/tizen_fix_ignore_sigpipe.patch diff --git a/cups-filters.manifest b/cups-filters.manifest index 9041fef..b771fc9 100644 --- a/cups-filters.manifest +++ b/cups-filters.manifest @@ -1,8 +1,5 @@ - - - - - - + + + diff --git a/debian/changelog b/debian/changelog index ed8a081..da5a3b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +cups-filters (1.0.25-3) unstable; urgency=low + + * Fixed pdftoraster,pdftoijs,imagetopdf,texttopdf to ignore SIGPIPE + * Git: external/cups-filters + * Tag: cups-filters_1.0.25-3 + + -- GangHeok Kim Tue, 05 Feb 2013 14:20:33 +0900 + cups-filters (1.0.25-2slp2) unstable; urgency=low * Applied missing OOM patch diff --git a/libcupsfilters1.manifest b/libcupsfilters1.manifest index 4301800..75b0fa5 100644 --- a/libcupsfilters1.manifest +++ b/libcupsfilters1.manifest @@ -1,5 +1,5 @@ - + diff --git a/packaging/cups-filters.spec b/packaging/cups-filters.spec index f649dd1..4dd3574 100644 --- a/packaging/cups-filters.spec +++ b/packaging/cups-filters.spec @@ -3,12 +3,13 @@ Summary: cups-filters Name: cups-filters Version: 1.0.25 -Release: 2 +Release: 3 License: GPL Group: System Environment/Daemons Source0: %{name}-%{version}.tar.gz Url: http://www.cups.org Patch1: tizen-pdftoraster-oom-fix.patch +Patch2: tizen_fix_ignore_sigpipe.patch Requires(post): eglibc Requires: libcupsfilters1 @@ -74,6 +75,9 @@ This package provides the CUPS headers and development environment. # OOM can be happened in using pdftoraster, becuase 600dpi use huge memory(about 1.6G) # This patch fixes pdftoraster to use about 400M in 600dpi printing. %patch1 -p1 +# CUPS daemon is launced and exited frequently +# Fixed that pdftoraster ignore SIGPIPE +%patch2 -p1 %build ./autogen.sh diff --git a/packaging/tizen_fix_ignore_sigpipe.patch b/packaging/tizen_fix_ignore_sigpipe.patch new file mode 100644 index 0000000..e19edaa --- /dev/null +++ b/packaging/tizen_fix_ignore_sigpipe.patch @@ -0,0 +1,92 @@ +diff -urN cups-filters.orig/filter/imagetopdf.c cups-filters/filter/imagetopdf.c +--- cups-filters.orig/filter/imagetopdf.c 2013-02-05 14:49:33.165014130 +0900 ++++ cups-filters/filter/imagetopdf.c 2013-02-05 14:51:33.465014116 +0900 +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #if CUPS_VERSION_MAJOR < 1 \ + || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2) +@@ -712,6 +713,19 @@ + + setbuf(stderr, NULL); + ++#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) ++ struct sigaction action; /* Actions for POSIX signals */ ++#endif /* HAVE_SIGACTION && !HAVE_SIGSET */ ++ #ifdef HAVE_SIGSET ++ sigset(SIGPIPE, SIG_IGN); ++#elif defined(HAVE_SIGACTION) ++ memset(&action, 0, sizeof(action)); ++ action.sa_handler = SIG_IGN; ++ sigaction(SIGPIPE, &action, NULL); ++#else ++ signal(SIGPIPE, SIG_IGN); ++#endif /* HAVE_SIGSET */ ++ + /* + * Check command-line... + */ +diff -urN cups-filters.orig/filter/pdftoijs.cxx cups-filters/filter/pdftoijs.cxx +--- cups-filters.orig/filter/pdftoijs.cxx 2013-02-05 14:49:33.161014130 +0900 ++++ cups-filters/filter/pdftoijs.cxx 2013-02-05 14:52:58.129014106 +0900 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #ifdef HAVE_CPP_POPPLER_VERSION_H + #include "cpp/poppler-version.h" + #endif +@@ -294,6 +295,19 @@ + globalParams = new GlobalParams(); + parseOpts(argc, argv); + ++#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) ++ struct sigaction action; /* Actions for POSIX signals */ ++#endif /* HAVE_SIGACTION && !HAVE_SIGSET */ ++ #ifdef HAVE_SIGSET ++ sigset(SIGPIPE, SIG_IGN); ++#elif defined(HAVE_SIGACTION) ++ memset(&action, 0, sizeof(action)); ++ action.sa_handler = SIG_IGN; ++ sigaction(SIGPIPE, &action, NULL); ++#else ++ signal(SIGPIPE, SIG_IGN); ++#endif /* HAVE_SIGSET */ ++ + if (argc == 6) { + /* stdin */ + int fd; +diff -urN cups-filters.orig/filter/texttopdf.c cups-filters/filter/texttopdf.c +--- cups-filters.orig/filter/texttopdf.c 2013-02-05 14:49:33.165014130 +0900 ++++ cups-filters/filter/texttopdf.c 2013-02-05 14:53:47.893014100 +0900 +@@ -33,6 +33,7 @@ + #include + #include "fontembed/sfnt.h" + #include ++#include + + /* + * Globals... +@@ -157,6 +158,18 @@ + main(int argc, /* I - Number of command-line arguments */ + char *argv[]) /* I - Command-line arguments */ + { ++#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) ++ struct sigaction action; /* Actions for POSIX signals */ ++#endif /* HAVE_SIGACTION && !HAVE_SIGSET */ ++ #ifdef HAVE_SIGSET ++ sigset(SIGPIPE, SIG_IGN); ++#elif defined(HAVE_SIGACTION) ++ memset(&action, 0, sizeof(action)); ++ action.sa_handler = SIG_IGN; ++ sigaction(SIGPIPE, &action, NULL); ++#else ++ signal(SIGPIPE, SIG_IGN); ++#endif /* HAVE_SIGSET */ + return (TextMain("texttopdf", argc, argv)); + } + -- 2.7.4