merge with master tizen_2.1 2.1b_release accepted/tizen/20130520.101725 accepted/tizen_2.1/20130425.024406 submit/tizen/20130517.045829 submit/tizen_2.1/20130424.224753
authorJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:08:48 +0000 (01:08 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:08:48 +0000 (01:08 +0900)
cups-filters.manifest
debian/changelog
libcupsfilters1.manifest
packaging/cups-filters.spec
packaging/tizen_fix_ignore_sigpipe.patch [new file with mode: 0644]

index 9041fef..b771fc9 100644 (file)
@@ -1,8 +1,5 @@
 <manifest>
-    <request>
-        <domain name="cups"/>
-    </request>
-       <assign>
-               <filesystem path="/usr/lib/libcupsfilters.so.1" label="_" />
-       </assign>
+       <request>
+               <domain name="mobileprint"/>
+       </request>
 </manifest>
index ed8a081..da5a3b0 100644 (file)
@@ -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 <gangheok.kim@samsung.com>  Tue, 05 Feb 2013 14:20:33 +0900
+
 cups-filters (1.0.25-2slp2) unstable; urgency=low
 
   * Applied missing OOM patch
index 4301800..75b0fa5 100644 (file)
@@ -1,5 +1,5 @@
 <manifest>
     <request>
-        <domain name="cups"/>
+        <domain name="_"/>
     </request>
 </manifest>
index f649dd1..4dd3574 100644 (file)
@@ -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 (file)
index 0000000..e19edaa
--- /dev/null
@@ -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 <cupsfilters/image.h>
+ #include <math.h>
+ #include <ctype.h>
++#include <signal.h>
+ #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 <config.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <signal.h>
+ #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 <assert.h>
+ #include "fontembed/sfnt.h"
+ #include <fontconfig/fontconfig.h>
++#include <signal.h>
+ /*
+  * 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));
+ }