From e0acb72e3ec53671133faf88d1a31c6c345812f18dabe0c0afc0d153b6120c5b Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Mon, 19 Jun 2017 08:41:15 +0000 Subject: [PATCH 1/2] Accepting request 503283 from home:NicoK:branches:Printing include a fix from AUR that fixes the segfaults users were seeing since GCC7 (or earlier?) on x86_64 OBS-URL: https://build.opensuse.org/request/show/503283 OBS-URL: https://build.opensuse.org/package/show/Printing/epson-inkjet-printer-escpr?expand=0&rev=33 --- bug_x86_64.patch | 98 ++++++++++++++++++++++++++++++ epson-inkjet-printer-escpr.changes | 6 ++ epson-inkjet-printer-escpr.spec | 4 ++ 3 files changed, 108 insertions(+) create mode 100644 bug_x86_64.patch diff --git a/bug_x86_64.patch b/bug_x86_64.patch new file mode 100644 index 0000000..9386fe2 --- /dev/null +++ b/bug_x86_64.patch @@ -0,0 +1,98 @@ +diff -Naur epson-inkjet-printer-escpr-1.6.9/src/filter.c epson-inkjet-printer-escpr-1.6.9-fixed/src/filter.c +--- epson-inkjet-printer-escpr-1.6.9/src/filter.c 2016-09-21 03:55:30.000000000 +0200 ++++ epson-inkjet-printer-escpr-1.6.9-fixed/src/filter.c 2016-10-07 22:07:23.965463021 +0200 +@@ -34,6 +34,8 @@ + #include "epson-protocol.h" + #include "epson-escpr-api.h" + #include "epson-escpr-mem.h" ++#include "epson-escpr-services.h" ++#include "epson-escpage.h" + + #include "err.h" + #include "mem.h" +@@ -42,6 +44,11 @@ + #include "libprtX.h" + #include "optBase.h" + #include "linux_cmn.h" ++#include "xfifo.h" ++ ++extern EPS_ERR_CODE SetupJobAttrib (const EPS_JOB_ATTRIB*); ++extern EPS_ERR_CODE SendStartJob (); ++extern EPS_ERR_CODE PrintBand (const EPS_UINT8*, EPS_UINT32, EPS_UINT32*); + + #define WIDTH_BYTES(bits) (((bits) + 31) / 32 * 4) + +@@ -380,10 +387,10 @@ + }else{ + debug_msg("pageStartJob() success"); + } +- ++ + printJob.jobStatus = EPS_STATUS_ESTABLISHED; +- int printHeight = 0; +-/////////////////////////////////////////////////////////////////////////////////////////////////////////// ++ EPS_UINT32 printHeight = 0; ++/////////////////////////////////////////////////////////////////////////////////////////////////////////// + + print_area_x = printJob.printableAreaWidth; + print_area_y = printJob.printableAreaHeight; +@@ -535,7 +542,7 @@ + memcpy(rever_buf + k*3, startpage + pos + (bandBmp.widthBytes - 6) - k*3, 3); + } + } +- PrintBand (rever_buf, bandBmp.widthBytes, &printHeight); ++ PrintBand ((const EPS_UINT8 *)rever_buf, bandBmp.widthBytes, &printHeight); + pos -= bandBmp.widthBytes; + } + +@@ -642,17 +649,17 @@ + } + } + } +- ++ + band_line_count ++; +- ++ + if (band_line_count >= band_line) + { + printHeight = band_line_count; + PrintBand (bandBmp.bits, bandBmp.widthBytes, &printHeight); + #if (HAVE_PPM) + fp = fopen(ppmfilename, "a+"); +- int i=0; +- for(i=0; i + #include "mem.h" ++#include "err.h" + + void * + mem_malloc (unsigned int size, bool_t crit) diff --git a/epson-inkjet-printer-escpr.changes b/epson-inkjet-printer-escpr.changes index 7dcc2f3..1ded78e 100644 --- a/epson-inkjet-printer-escpr.changes +++ b/epson-inkjet-printer-escpr.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 12 22:31:03 UTC 2017 - nico.kruber@gmail.com + +- add bug_x86_64.patch which should fix the segfault that some + users are experiencing + ------------------------------------------------------------------- Tue Apr 18 07:58:26 UTC 2017 - nico.kruber@gmail.com diff --git a/epson-inkjet-printer-escpr.spec b/epson-inkjet-printer-escpr.spec index 9be73c9..c37f1b0 100644 --- a/epson-inkjet-printer-escpr.spec +++ b/epson-inkjet-printer-escpr.spec @@ -51,6 +51,9 @@ Summary: Epson ESC/P-R Inkjet Printer Driver License: GPL-2.0 Group: Hardware/Printing Source0: epson-inkjet-printer-escpr-%{version}-1lsb3.2.tar.gz +# PATCH-FIX-UPSTREAM bug_x86_64.patch -- fix a segfault on x64_64 (probably manifested with GCC7 use) +# https://aur.archlinux.org/cgit/aur.git/plain/bug_x86_64.patch?h=epson-inkjet-printer-escpr +Patch0: bug_x86_64.patch # This software is a filter program used with CUPS: Requires: cups # Install into this non-root directory (required when norootforbuild is used): @@ -75,6 +78,7 @@ installed package see the PPD files in this directory: %prep # Be quiet when unpacking: %setup -q +%patch0 -p1 %build # Set our preferred architecture-specific flags for the compiler and linker: From 2d0286aa3a535dda5995665f81fea6cabe4f9d4a1bd6e2058fbe375396009bb7 Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Mon, 19 Jun 2017 12:30:20 +0000 Subject: [PATCH 2/2] Accepting request 504639 from home:bmwiedemann:branches:Printing call gzip -n to make build fully reproducible OBS-URL: https://build.opensuse.org/request/show/504639 OBS-URL: https://build.opensuse.org/package/show/Printing/epson-inkjet-printer-escpr?expand=0&rev=34 --- epson-inkjet-printer-escpr.changes | 5 +++++ epson-inkjet-printer-escpr.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/epson-inkjet-printer-escpr.changes b/epson-inkjet-printer-escpr.changes index 1ded78e..0272154 100644 --- a/epson-inkjet-printer-escpr.changes +++ b/epson-inkjet-printer-escpr.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Jun 18 16:31:54 UTC 2017 - bwiedemann@suse.com + +- call gzip -n to make build fully reproducible + ------------------------------------------------------------------- Mon Jun 12 22:31:03 UTC 2017 - nico.kruber@gmail.com diff --git a/epson-inkjet-printer-escpr.spec b/epson-inkjet-printer-escpr.spec index c37f1b0..49e9ca8 100644 --- a/epson-inkjet-printer-escpr.spec +++ b/epson-inkjet-printer-escpr.spec @@ -123,7 +123,7 @@ set +x for p in *.ppd do echo -n "$p: " grep -E -v '^\*UIConstraints:|^\*NonUIConstraints:|^\*cupsFilter:' $p | cupstestppd - || true - gzip $p + gzip -n9 $p done # Switch back to the usual build log messages: set -x