From b20bc5228bc99a7924bf099c39a5cf5bc58b8f00 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 13 Aug 2013 15:20:40 +0100 Subject: [PATCH 1/5] 1.0.36. Removed files in conflict with ghostscript-cups. --- .gitignore | 1 + cups-filters-lookup.patch | 27 ---- cups-filters-man.patch | 179 -------------------------- cups-filters-page-label.patch | 229 ---------------------------------- cups-filters.spec | 30 ++--- sources | 2 +- 6 files changed, 18 insertions(+), 450 deletions(-) delete mode 100644 cups-filters-lookup.patch delete mode 100644 cups-filters-man.patch delete mode 100644 cups-filters-page-label.patch diff --git a/.gitignore b/.gitignore index b4808c8..e1ab8a3 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /cups-filters-1.0.33.tar.xz /cups-filters-1.0.34.tar.xz /cups-filters-1.0.35.tar.xz +/cups-filters-1.0.36.tar.xz diff --git a/cups-filters-lookup.patch b/cups-filters-lookup.patch deleted file mode 100644 index 95ed1bd..0000000 --- a/cups-filters-lookup.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up cups-filters-1.0.34/utils/cups-browsed.c.lookup cups-filters-1.0.34/utils/cups-browsed.c ---- cups-filters-1.0.34/utils/cups-browsed.c.lookup 2013-06-26 16:23:38.000000000 +0200 -+++ cups-filters-1.0.34/utils/cups-browsed.c 2013-06-26 16:24:28.491804795 +0200 -@@ -990,23 +990,6 @@ found_cups_printer (const char *remote_h - debug_printf("cups-browsed: browsed queue name is %s\n", - local_resource + 9); - -- /* Does the host need resolving? */ -- if (host[strspn (host, "0123456789.")] == '\0') { -- /* Yes. Resolve it. */ -- struct addrinfo hints, *addr; -- memset(&hints, 0, sizeof(struct addrinfo)); -- hints.ai_family = AF_UNSPEC; -- hints.ai_socktype = SOCK_DGRAM; -- hints.ai_flags = 0; -- hints.ai_protocol = 0; -- if (!getaddrinfo (host, NULL, &hints, &addr)) { -- getnameinfo (addr->ai_addr, addr->ai_addrlen, -- host, sizeof(host), -- NULL, 0, 0); -- freeaddrinfo (addr); -- } -- } -- - generate_local_queue(host, port, local_resource, info ? info : "", "", ""); - } - diff --git a/cups-filters-man.patch b/cups-filters-man.patch deleted file mode 100644 index efc5011..0000000 --- a/cups-filters-man.patch +++ /dev/null @@ -1,179 +0,0 @@ -diff -up cups-filters-1.0.35/Makefile.am.man cups-filters-1.0.35/Makefile.am ---- cups-filters-1.0.35/Makefile.am.man 2013-05-15 20:46:22.000000000 +0200 -+++ cups-filters-1.0.35/Makefile.am 2013-07-01 14:03:58.395572035 +0200 -@@ -618,7 +618,6 @@ EXTRA_DIST += \ - # UTILS - # ===== - --EXTRA_DIST += utils/cups-browsed.in - sbin_PROGRAMS = \ - cups-browsed - cups_browsed_SOURCES = \ -@@ -636,6 +635,11 @@ cups_browsed_LDADD = \ - $(GLIB_LIBS) - initrcdir = $(INITDDIR) - initrc_SCRIPTS = utils/cups-browsed -+man_MANS = \ -+ utils/cups-browsed.8 \ -+ utils/cups-browsed.conf.5 -+EXTRA_DIST += utils/cups-browsed.in \ -+ $(man_MANS) - - # === - # PPD -diff -up cups-filters-1.0.35/utils/cups-browsed.8.man cups-filters-1.0.35/utils/cups-browsed.8 ---- cups-filters-1.0.35/utils/cups-browsed.8.man 2013-07-01 14:03:58.404571910 +0200 -+++ cups-filters-1.0.35/utils/cups-browsed.8 2013-07-01 14:03:58.404571910 +0200 -@@ -0,0 +1,56 @@ -+.\"Text automatically generated by txt2man -+.TH cups-browsed 8 "29 June 2013" "" "" -+.SH NAME -+\fBcups-browsed \fP- A daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers -+\fB -+.SH SYNOPSIS -+.nf -+.fam C -+\fBcups-browsed\fP [\fB-v\fP | \fB-d\fP | \fB--debug\fP] -+ -+.fam T -+.fi -+.fam T -+.fi -+.SH DESCRIPTION -+\fBcups-browsed\fP has three independently switchable functions: -+.IP 1. 4 -+Browse Bonjour broadcasts of remote printers and create/remove local -+raw queues pointing to these printers. -+.IP 2. 4 -+Browse CUPS broadcasts of remote printers and create/remove local raw -+queues pointing to these printers. -+.IP 3. 4 -+Broadcast local queues with the CUPS protocol. -+.SH OPTIONS -+.TP -+.B -+\fB-v\fP, \fB-d\fP, \fB--debug\fP -+Debug mode -+.SH FILES -+/etc/cups/cups-browsed.conf -+.SH NOTES -+Please take references to cups 1.6.x to include newer versions. -+Similarily, cups 1.5.x is intended to encompass older versions too. -+.PP -+In environments with only cups 1.6.x servers and clients (plus -+\fBcups-browsed\fP on either server or client or both) the function described in 1. -+enables the automatic discovery of remote queues and their display in -+printing dialogues of applications and with command line tools. -+.PP -+The facility provided by 3. means that servers running cups 1.6.x plus -+\fBcups-browsed\fP can broadcast their local queues so that clients with cups -+1.5.x get these queues automatically available. The outcome of 2. is -+that clients running cups 1.6.x plus \fBcups-browsed\fP can use the CUPS -+broadcasts from servers with cups 1.5.x. As with browsing of Bonjour -+broadcasts, the created local raw queues are available to applications -+and command line tools. -+.SH SEE ALSO -+ -+\fBcups-browsed.conf\fP(5) -+.PP -+/usr/share/doc/\fBcups-filters\fP/README -+.SH AUTHOR -+The authors of \fBcups-browsed\fP are listed in /usr/share/doc/\fBcups-filters\fP/AUTHORS. -+.PP -+This manual page was written for the Debian Project, but it may be used by others. -diff -up cups-filters-1.0.35/utils/cups-browsed.conf.5.man cups-filters-1.0.35/utils/cups-browsed.conf.5 ---- cups-filters-1.0.35/utils/cups-browsed.conf.5.man 2013-07-01 14:03:58.404571910 +0200 -+++ cups-filters-1.0.35/utils/cups-browsed.conf.5 2013-07-01 14:03:58.404571910 +0200 -@@ -0,0 +1,92 @@ -+.\"Text automatically generated by txt2man -+.TH cups-browsed.conf 5 "29 June 2013" "" "" -+.SH NAME -+\fBcups-browsed.conf \fP- server configuration file for cups-browsed -+\fB -+.SH DESCRIPTION -+The cups-browsed.conf file configures the cups-browsed daemon. It is normally -+located in the /etc/cups directory. Each line in the file can be a -+configuration directive, a blank line, or a comment. Comment lines start -+with the # character. -+.SH DIRECTIVES -+ -+The BrowseAllow directive specifies a system or network to accept -+CUPS browse packets from. The default is to accept browse packets from -+all hosts when BrowseRemoteProtocols uses the CUPS protocol. -+.PP -+.nf -+.fam C -+ BrowseAllow 192.168.7.20 -+ BrowseAllow 192.168.7.0/24 -+ BrowseAllow 192.168.7.0/255.255.255.0 -+ -+ -+.fam T -+.fi -+The BrowsePoll directive polls a server for available printers once -+every 60 seconds. Multiple BrowsePoll directives can be specified -+to poll multiple servers. The default port to connect to is 631. -+BrowsePoll works independently of whether CUPS browsing is activated -+in BrowseRemoteProtocols. -+.PP -+.nf -+.fam C -+ BrowsePoll 192.168.7.20 -+ BrowsePoll 192.168.7.65:631 -+ BrowsePoll host.example.com:631 -+ -+ -+.fam T -+.fi -+The BrowseLocalProtocols directive specifies the protocols to use -+when advertising local shared printers on the network. The default -+is "none". Control of advertising of local shared printers using -+dnssd is done in /etc/cups/cupsd.conf. -+.PP -+.nf -+.fam C -+ BrowseLocalProtocols none -+ BrowseLocalProtocols CUPS -+ -+ -+.fam T -+.fi -+The BrowseRemoteProtocols directive specifies the protocols to use -+when finding remote shared printers on the network. Multiple -+protocols can be specified by separating them with spaces. -+The default is "dnssd cups". -+.PP -+.nf -+.fam C -+ BrowseRemoteProtocols none -+ BrowseRemoteProtocols CUPS dnssd -+ BrowseRemoteProtocols CUPS -+ BrowseRemoteProtocols dnssd -+ -+.fam T -+.fi -+The BrowseProtocols directive specifies the protocols to use when -+finding remote shared printers on the network and advertising local -+shared printers. "dnssd" is ignored for BrowseLocalProtocols. Multiple -+protocols can be specified by separating them with spaces. The -+default is "none" for BrowseLocalProtocols and "dnssd cups" for -+BrowseRemoteProtocols. -+.PP -+.nf -+.fam C -+ BrowseProtocols none -+ BrowseProtocols CUPS dnssd -+ BrowseProtocols CUPS -+ BrowseProtocols dnssd -+ -+.fam T -+.fi -+.SH SEE ALSO -+ -+\fBcups-browsed\fP(8) -+.PP -+/usr/share/doc/cups-filters/README -+.SH AUTHOR -+The authors of cups-browsed are listed in /usr/share/doc/cups-filters/AUTHORS. -+.PP -+This manual page was written for the Debian Project, but it may be used by others. diff --git a/cups-filters-page-label.patch b/cups-filters-page-label.patch deleted file mode 100644 index 2008e99..0000000 --- a/cups-filters-page-label.patch +++ /dev/null @@ -1,229 +0,0 @@ -diff -up cups-filters-1.0.35/filter/pdftopdf/pdftopdf.cc.page-label cups-filters-1.0.35/filter/pdftopdf/pdftopdf.cc ---- cups-filters-1.0.35/filter/pdftopdf/pdftopdf.cc.page-label 2013-04-09 19:14:42.000000000 +0100 -+++ cups-filters-1.0.35/filter/pdftopdf/pdftopdf.cc 2013-07-24 08:49:23.919081384 +0100 -@@ -9,6 +9,8 @@ - #include - #include - #include -+#include -+#include - #include - - #include "pdftopdf_processor.h" -@@ -402,8 +404,27 @@ void getParameters(ppd_file_t *ppd,int n - param.reverse=ppdDefaultOrder(ppd); - } - -- // TODO: pageLabel (not used) -- // param.pageLabel=cupsGetOption("page-label",num_options,options); // strdup? -+ std::string rawlabel; -+ char *classification = getenv("CLASSIFICATION"); -+ if (classification) -+ rawlabel.append (classification); -+ -+ if ( (val=cupsGetOption("page-label", num_options, options)) != NULL) { -+ if (!rawlabel.empty()) -+ rawlabel.append (" - "); -+ rawlabel.append(cupsGetOption("page-label",num_options,options)); -+ } -+ -+ std::ostringstream cookedlabel; -+ for (std::string::iterator it = rawlabel.begin(); -+ it != rawlabel.end (); -+ ++it) { -+ if (*it < 32 || *it > 126) -+ cookedlabel << "\\" << std::oct << std::setfill('0') << std::setw(3) << (unsigned int) *it; -+ else -+ cookedlabel.put (*it); -+ } -+ param.pageLabel = cookedlabel.str (); - - if ( (val=cupsGetOption("page-set",num_options,options)) != NULL) { - if (strcasecmp(val,"even")==0) { -diff -up cups-filters-1.0.35/filter/pdftopdf/pdftopdf_processor.cc.page-label cups-filters-1.0.35/filter/pdftopdf/pdftopdf_processor.cc ---- cups-filters-1.0.35/filter/pdftopdf/pdftopdf_processor.cc.page-label 2013-02-15 17:37:59.000000000 +0000 -+++ cups-filters-1.0.35/filter/pdftopdf/pdftopdf_processor.cc 2013-07-24 09:50:04.437720618 +0100 -@@ -80,12 +80,8 @@ void ProcessingParameters::dump() const - fprintf(stderr,"evenDuplex: %s\n", - (evenDuplex)?"true":"false"); - --/* -- // std::string pageLabel; // or NULL? must stay/dup! -- ... -- ... -- --*/ -+ fprintf(stderr,"pageLabel: %s\n", -+ pageLabel.empty () ? "(none)" : pageLabel.c_str()); - - fprintf(stderr,"bookletMode: "); - BookletMode_dump(booklet); -@@ -206,6 +202,10 @@ bool processPDFTOPDF(PDFTOPDF_Processor - page->mirror(); - } - -+ if (!param.pageLabel.empty()) { -+ page->add_label(param.page, param.pageLabel); -+ } -+ - // place border - if ( (param.border!=BorderType::NONE)&&(iAadd_border_rect(rect,param.border,1.0/pgedit.scale); - } - -+ if (!param.pageLabel.empty()) { -+ page->add_label(param.page, param.pageLabel); -+ } -+ - if (!param.fitplot) { - curpage->add_subpage(page,pgedit.xpos+xpos,pgedit.ypos+ypos,pgedit.scale,&rect); - } else { -diff -up cups-filters-1.0.35/filter/pdftopdf/pdftopdf_processor.h.page-label cups-filters-1.0.35/filter/pdftopdf/pdftopdf_processor.h ---- cups-filters-1.0.35/filter/pdftopdf/pdftopdf_processor.h.page-label 2012-11-15 15:58:39.000000000 +0000 -+++ cups-filters-1.0.35/filter/pdftopdf/pdftopdf_processor.h 2013-07-24 08:49:23.920081389 +0100 -@@ -20,7 +20,7 @@ struct ProcessingParameters { - border(NONE), - reverse(false), - --// pageLabel(NULL), -+ pageLabel(), - evenPages(true),oddPages(true), - - mirror(false), -@@ -60,7 +60,7 @@ struct ProcessingParameters { - NupParameters nup; - bool reverse; - -- // std::string pageLabel; // or NULL? must stay/dup! -+ std::string pageLabel; - bool evenPages,oddPages; - IntervalSet pageRange; - -@@ -105,6 +105,7 @@ public: - virtual void add_subpage(const std::shared_ptr &sub,float xpos,float ypos,float scale,const PageRect *crop=NULL) =0; - virtual void mirror() =0; - virtual void rotate(Rotation rot) =0; -+ virtual void add_label(const PageRect &rect, const std::string label) =0; - }; - - // TODO: ... error output? -diff -up cups-filters-1.0.35/filter/pdftopdf/qpdf_pdftopdf_processor.cc.page-label cups-filters-1.0.35/filter/pdftopdf/qpdf_pdftopdf_processor.cc ---- cups-filters-1.0.35/filter/pdftopdf/qpdf_pdftopdf_processor.cc.page-label 2013-03-14 20:32:42.000000000 +0000 -+++ cups-filters-1.0.35/filter/pdftopdf/qpdf_pdftopdf_processor.cc 2013-07-24 08:49:23.920081389 +0100 -@@ -257,6 +257,94 @@ void QPDF_PDFTOPDF_PageHandle::rotate(Ro - } - // }}} - -+void QPDF_PDFTOPDF_PageHandle::add_label(const PageRect &_rect, const std::string label) // {{{ -+{ -+ assert(isExisting()); -+ -+ PageRect rect = ungetRect (_rect, *this, rotation, page); -+ -+ assert (rect.left <= rect.right); -+ assert (rect.bottom <= rect.top); -+ -+ // TODO: Only add in the font once, not once per page. -+ QPDFObjectHandle font = page.getOwningQPDF()->makeIndirectObject ( -+ QPDFObjectHandle::parse( -+ "<<" -+ " /Type /Font" -+ " /Subtype /Type1" -+ " /Name /pagelabel-font" -+ " /BaseFont /Helvetica" // TODO: support UTF-8 labels? -+ ">>")); -+ QPDFObjectHandle resources = page.getKey ("/Resources"); -+ QPDFObjectHandle rfont = resources.getKey ("/Font"); -+ rfont.replaceKey ("/pagelabel-font", font); -+ -+ double margin = 2.25; -+ double height = 12; -+ -+ std::string boxcmd = "q\n"; -+ -+ // White filled rectangle (top) -+ boxcmd += " 1 1 1 rg\n"; -+ boxcmd += " " + QUtil::double_to_string(rect.left + margin) + " " + -+ QUtil::double_to_string(rect.top - height - 2 * margin) + " " + -+ QUtil::double_to_string(rect.right - rect.left - 2 * margin) + " " + -+ QUtil::double_to_string(height + 2 * margin) + " re f\n"; -+ -+ // White filled rectangle (bottom) -+ boxcmd += " " + QUtil::double_to_string(rect.left + margin) + " " + -+ QUtil::double_to_string(rect.bottom + height + margin) + " " + -+ QUtil::double_to_string(rect.right - rect.left - 2 * margin) + " " + -+ QUtil::double_to_string(height + 2 * margin) + " re f\n"; -+ -+ // Black outline (top) -+ boxcmd += " 0 0 0 RG\n"; -+ boxcmd += " " + QUtil::double_to_string(rect.left + margin) + " " + -+ QUtil::double_to_string(rect.top - height - 2 * margin) + " " + -+ QUtil::double_to_string(rect.right - rect.left - 2 * margin) + " " + -+ QUtil::double_to_string(height + 2 * margin) + " re S\n"; -+ -+ // Black outline (bottom) -+ boxcmd += " " + QUtil::double_to_string(rect.left + margin) + " " + -+ QUtil::double_to_string(rect.bottom + height + margin) + " " + -+ QUtil::double_to_string(rect.right - rect.left - 2 * margin) + " " + -+ QUtil::double_to_string(height + 2 * margin) + " re S\n"; -+ -+ // Black text (top) -+ boxcmd += " 0 0 0 rg\n"; -+ boxcmd += " BT\n"; -+ boxcmd += " /pagelabel-font 12 Tf\n"; -+ boxcmd += " " + QUtil::double_to_string(rect.left + 2 * margin) + " " + -+ QUtil::double_to_string(rect.top - height - margin) + " Td\n"; -+ boxcmd += " (" + label + ") Tj\n"; -+ boxcmd += " ET\n"; -+ -+ // Black text (bottom) -+ boxcmd += " BT\n"; -+ boxcmd += " /pagelabel-font 12 Tf\n"; -+ boxcmd += " " + QUtil::double_to_string(rect.left + 2 * margin) + " " + -+ QUtil::double_to_string(rect.bottom + height + 2 * margin) + " Td\n"; -+ boxcmd += " (" + label + ") Tj\n"; -+ boxcmd += " ET\n"; -+ -+ boxcmd += "Q\n"; -+ -+ assert(page.getOwningQPDF()); // existing pages are always indirect -+ static const char *pre="%pdftopdf q\n" -+ "q\n", -+ *post="%pdftopdf Q\n" -+ "Q\n"; -+ -+ QPDFObjectHandle stm1=QPDFObjectHandle::newStream(page.getOwningQPDF(), -+ pre), -+ stm2=QPDFObjectHandle::newStream(page.getOwningQPDF(), -+ std::string(post) + boxcmd); -+ -+ page.addPageContents(stm1,true); // before -+ page.addPageContents(stm2,false); // after -+} -+// }}} -+ - void QPDF_PDFTOPDF_PageHandle::debug(const PageRect &rect,float xpos,float ypos) // {{{ - { - assert(!isExisting()); -@@ -264,7 +352,7 @@ void QPDF_PDFTOPDF_PageHandle::debug(con - } - // }}} - -- -+// }}} - void QPDF_PDFTOPDF_Processor::closeFile() // {{{ - { - pdf.reset(); -diff -up cups-filters-1.0.35/filter/pdftopdf/qpdf_pdftopdf_processor.h.page-label cups-filters-1.0.35/filter/pdftopdf/qpdf_pdftopdf_processor.h ---- cups-filters-1.0.35/filter/pdftopdf/qpdf_pdftopdf_processor.h.page-label 2012-11-15 15:58:39.000000000 +0000 -+++ cups-filters-1.0.35/filter/pdftopdf/qpdf_pdftopdf_processor.h 2013-07-24 08:49:23.920081389 +0100 -@@ -11,6 +11,7 @@ public: - virtual void add_subpage(const std::shared_ptr &sub,float xpos,float ypos,float scale,const PageRect *crop=NULL); - virtual void mirror(); - virtual void rotate(Rotation rot); -+ virtual void add_label(const PageRect &rect, const std::string label); - - void debug(const PageRect &rect,float xpos,float ypos); - private: diff --git a/cups-filters.spec b/cups-filters.spec index f269589..6e42331 100644 --- a/cups-filters.spec +++ b/cups-filters.spec @@ -3,8 +3,8 @@ Summary: OpenPrinting CUPS filters and backends Name: cups-filters -Version: 1.0.35 -Release: 6%{?dist} +Version: 1.0.36 +Release: 1%{?dist} # For a breakdown of the licensing, see COPYING file # GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*, @@ -22,10 +22,7 @@ Url: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz Source1: cups-browsed.service -Patch1: cups-filters-man.patch -Patch2: cups-filters-lookup.patch -Patch3: cups-filters-page-label.patch -Patch4: cups-filters-textfilters.patch +Patch1: cups-filters-textfilters.patch Requires: cups-filters-libs%{?_isa} = %{version}-%{release} @@ -100,14 +97,9 @@ This is the development package for OpenPrinting CUPS filters and backends. %prep %setup -q -%patch1 -p1 -b .man -%patch2 -p1 -b .lookup - -# Added support for page-label (bug #987515). -%patch3 -p1 -b .page-label # Set cost for text filters to 200 (bug #988909). -%patch4 -p1 -b .textfilters +%patch1 -p1 -b .textfilters %build # work-around Rpath @@ -125,6 +117,11 @@ make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} +# Avoid conflicts with ghostscript < 9.08 +rm -f %{buildroot}%{_datadir}/ppd/cupsfilters/pxl{color,mono}.ppd +rm -f %{buildroot}%{_cups_serverbin}/filter/gsto* +sed -i -e '/gstoraster/d' %{buildroot}%{_datadir}/cups/mime/cupsfilters.convs + # https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc mkdir __doc mv %{buildroot}%{_datadir}/doc/cups-filters/* __doc @@ -204,18 +201,23 @@ fi %files libs %doc __doc/COPYING fontembed/README -%attr(0755,root,root) %{_libdir}/libcupsfilters.so.* -%attr(0755,root,root) %{_libdir}/libfontembed.so.* +%{_libdir}/libcupsfilters.so.* +%{_libdir}/libfontembed.so.* %files devel %{_includedir}/cupsfilters %{_includedir}/fontembed +%{_datadir}/cups/ppdc/escp.h %{_libdir}/pkgconfig/libcupsfilters.pc %{_libdir}/pkgconfig/libfontembed.pc %{_libdir}/libcupsfilters.so %{_libdir}/libfontembed.so %changelog +* Tue Aug 13 2013 Tim Waugh - 1.0.36-1 +- 1.0.36 (without ghostscript filters, which are still in + ghostscript-cups). + * Tue Jul 30 2013 Tim Waugh - 1.0.35-6 - Set cost for text filters to 200 so that the paps filter gets preference for the time being (bug #988909). diff --git a/sources b/sources index aa01467..82461f9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f722074dfa8efd3fcb8502cede13a608 cups-filters-1.0.35.tar.xz +595c41a7e16136fc8c0fed1d35f583f6 cups-filters-1.0.36.tar.xz From 1eb9c826de18ebe1cf5c926a43f325eade968c34 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 21 Aug 2013 11:31:37 +0100 Subject: [PATCH 2/5] Upstream patch to re-work filter costs (bug #998977). No longer need text filter costs patch as paps gets used by default now if installed. Resolves: rhbz#998977 (cherry picked from commit 6d976f67d4860bf5fab9979cf2ab9b39da0c9a10) --- cups-filters-filter-costs.patch | 71 +++++++++++++++++++++++++++++++++ cups-filters-textfilters.patch | 22 ---------- cups-filters.spec | 13 ++++-- 3 files changed, 80 insertions(+), 26 deletions(-) create mode 100644 cups-filters-filter-costs.patch delete mode 100644 cups-filters-textfilters.patch diff --git a/cups-filters-filter-costs.patch b/cups-filters-filter-costs.patch new file mode 100644 index 0000000..cba17ef --- /dev/null +++ b/cups-filters-filter-costs.patch @@ -0,0 +1,71 @@ +diff -up cups-filters-1.0.36/mime/cupsfilters.convs.filter-costs cups-filters-1.0.36/mime/cupsfilters.convs +--- cups-filters-1.0.36/mime/cupsfilters.convs.filter-costs 2013-07-29 20:45:51.000000000 +0100 ++++ cups-filters-1.0.36/mime/cupsfilters.convs 2013-08-21 11:24:23.708994885 +0100 +@@ -42,32 +42,32 @@ + # if it comes from an encrypted PDF file, we simply override pstopdf and the + # PDF workflow. + +-application/postscript application/pdf 100 pstopdf ++application/postscript application/pdf 0 pstopdf + application/vnd.adobe-reader-postscript application/vnd.cups-postscript 66 pstops + + application/pdf application/vnd.cups-pdf 66 pdftopdf +-application/x-cshell application/pdf 0 texttopdf +-application/x-csource application/pdf 0 texttopdf +-application/x-perl application/pdf 0 texttopdf +-application/x-shell application/pdf 0 texttopdf +-text/plain application/pdf 0 texttopdf +-text/html application/pdf 0 texttopdf +-image/gif application/vnd.cups-pdf 33 imagetopdf +-image/png application/vnd.cups-pdf 33 imagetopdf +-image/jpeg application/vnd.cups-pdf 33 imagetopdf +-image/tiff application/vnd.cups-pdf 33 imagetopdf +-image/x-bitmap application/vnd.cups-pdf 33 imagetopdf +-image/x-photocd application/vnd.cups-pdf 33 imagetopdf +-image/x-portable-anymap application/vnd.cups-pdf 33 imagetopdf +-image/x-portable-bitmap application/vnd.cups-pdf 33 imagetopdf +-image/x-portable-graymap application/vnd.cups-pdf 33 imagetopdf +-image/x-portable-pixmap application/vnd.cups-pdf 33 imagetopdf +-image/x-sgi-rgb application/vnd.cups-pdf 33 imagetopdf +-image/x-xbitmap application/vnd.cups-pdf 33 imagetopdf +-image/x-xpixmap application/vnd.cups-pdf 33 imagetopdf +-image/x-xwindowdump application/vnd.cups-pdf 33 imagetopdf +-image/x-sun-raster application/vnd.cups-pdf 33 imagetopdf +-application/vnd.cups-pdf-banner application/pdf 33 bannertopdf ++application/x-cshell application/pdf 32 texttopdf ++application/x-csource application/pdf 32 texttopdf ++application/x-perl application/pdf 32 texttopdf ++application/x-shell application/pdf 32 texttopdf ++text/plain application/pdf 32 texttopdf ++text/html application/pdf 32 texttopdf ++image/gif application/vnd.cups-pdf 65 imagetopdf ++image/png application/vnd.cups-pdf 65 imagetopdf ++image/jpeg application/vnd.cups-pdf 65 imagetopdf ++image/tiff application/vnd.cups-pdf 65 imagetopdf ++image/x-bitmap application/vnd.cups-pdf 65 imagetopdf ++image/x-photocd application/vnd.cups-pdf 65 imagetopdf ++image/x-portable-anymap application/vnd.cups-pdf 65 imagetopdf ++image/x-portable-bitmap application/vnd.cups-pdf 65 imagetopdf ++image/x-portable-graymap application/vnd.cups-pdf 65 imagetopdf ++image/x-portable-pixmap application/vnd.cups-pdf 65 imagetopdf ++image/x-sgi-rgb application/vnd.cups-pdf 65 imagetopdf ++image/x-xbitmap application/vnd.cups-pdf 65 imagetopdf ++image/x-xpixmap application/vnd.cups-pdf 65 imagetopdf ++image/x-xwindowdump application/vnd.cups-pdf 65 imagetopdf ++image/x-sun-raster application/vnd.cups-pdf 65 imagetopdf ++application/vnd.cups-pdf-banner application/pdf 32 bannertopdf + image/urf application/pdf 0 urftopdf + + ######################################################################## +@@ -84,8 +84,8 @@ application/vnd.cups-pdf application/vnd + # Raster filters... + # + +-application/vnd.cups-pdf application/vnd.cups-raster 66 gstoraster +-application/vnd.cups-postscript application/vnd.cups-raster 100 gstoraster ++application/vnd.cups-pdf application/vnd.cups-raster 99 gstoraster ++application/vnd.cups-postscript application/vnd.cups-raster 200 gstoraster + application/vnd.cups-pdf application/vnd.cups-raster 100 pdftoraster + image/gif application/vnd.cups-raster 100 imagetoraster + image/png application/vnd.cups-raster 100 imagetoraster +diff -up cups-filters-1.0.36/NEWS.filter-costs cups-filters-1.0.36/NEWS diff --git a/cups-filters-textfilters.patch b/cups-filters-textfilters.patch deleted file mode 100644 index bd44876..0000000 --- a/cups-filters-textfilters.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up cups-filters-1.0.35/mime/cupsfilters.convs.textfilters cups-filters-1.0.35/mime/cupsfilters.convs ---- cups-filters-1.0.35/mime/cupsfilters.convs.textfilters 2013-07-29 16:08:25.244864850 +0100 -+++ cups-filters-1.0.35/mime/cupsfilters.convs 2013-07-29 16:09:40.030216976 +0100 -@@ -46,12 +46,12 @@ application/postscript application/pdf - application/vnd.adobe-reader-postscript application/vnd.cups-postscript 66 pstops - - application/pdf application/vnd.cups-pdf 66 pdftopdf --application/x-cshell application/pdf 0 texttopdf --application/x-csource application/pdf 0 texttopdf --application/x-perl application/pdf 0 texttopdf --application/x-shell application/pdf 0 texttopdf --text/plain application/pdf 0 texttopdf --text/html application/pdf 0 texttopdf -+application/x-cshell application/pdf 200 texttopdf -+application/x-csource application/pdf 200 texttopdf -+application/x-perl application/pdf 200 texttopdf -+application/x-shell application/pdf 200 texttopdf -+text/plain application/pdf 200 texttopdf -+text/html application/pdf 200 texttopdf - image/gif application/vnd.cups-pdf 33 imagetopdf - image/png application/vnd.cups-pdf 33 imagetopdf - image/jpeg application/vnd.cups-pdf 33 imagetopdf diff --git a/cups-filters.spec b/cups-filters.spec index 6e42331..46fc32b 100644 --- a/cups-filters.spec +++ b/cups-filters.spec @@ -4,7 +4,7 @@ Summary: OpenPrinting CUPS filters and backends Name: cups-filters Version: 1.0.36 -Release: 1%{?dist} +Release: 2%{?dist} # For a breakdown of the licensing, see COPYING file # GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*, @@ -22,7 +22,7 @@ Url: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz Source1: cups-browsed.service -Patch1: cups-filters-textfilters.patch +Patch1: cups-filters-filter-costs.patch Requires: cups-filters-libs%{?_isa} = %{version}-%{release} @@ -98,8 +98,8 @@ This is the development package for OpenPrinting CUPS filters and backends. %prep %setup -q -# Set cost for text filters to 200 (bug #988909). -%patch1 -p1 -b .textfilters +# Upstream patch to re-work filter costs (bug #998977). +%patch1 -p1 -b .filter-costs %build # work-around Rpath @@ -214,6 +214,11 @@ fi %{_libdir}/libfontembed.so %changelog +* Wed Aug 21 2013 Tim Waugh - 1.0.36-2 +- Upstream patch to re-work filter costs (bug #998977). No longer need + text filter costs patch as paps gets used by default now if + installed. + * Tue Aug 13 2013 Tim Waugh - 1.0.36-1 - 1.0.36 (without ghostscript filters, which are still in ghostscript-cups). From 79fa2c0fa8d178fc2ece25bee2567dd885f8b1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarom=C3=ADr=20Kon=C4=8Dick=C3=BD?= Date: Thu, 29 Aug 2013 11:35:12 +0200 Subject: [PATCH 3/5] 1.0.37 --- .gitignore | 1 + cups-browsed.service | 10 ----- cups-filters-filter-costs.patch | 71 --------------------------------- cups-filters.spec | 15 +++---- sources | 2 +- 5 files changed, 8 insertions(+), 91 deletions(-) delete mode 100644 cups-browsed.service delete mode 100644 cups-filters-filter-costs.patch diff --git a/.gitignore b/.gitignore index e1ab8a3..99ed6a1 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /cups-filters-1.0.34.tar.xz /cups-filters-1.0.35.tar.xz /cups-filters-1.0.36.tar.xz +/cups-filters-1.0.37.tar.xz diff --git a/cups-browsed.service b/cups-browsed.service deleted file mode 100644 index 144956c..0000000 --- a/cups-browsed.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Make remote CUPS printers available locally -After=cups.service avahi-daemon.service -Wants=cups.service avahi-daemon.service - -[Service] -ExecStart=/usr/sbin/cups-browsed - -[Install] -WantedBy=multi-user.target diff --git a/cups-filters-filter-costs.patch b/cups-filters-filter-costs.patch deleted file mode 100644 index cba17ef..0000000 --- a/cups-filters-filter-costs.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -up cups-filters-1.0.36/mime/cupsfilters.convs.filter-costs cups-filters-1.0.36/mime/cupsfilters.convs ---- cups-filters-1.0.36/mime/cupsfilters.convs.filter-costs 2013-07-29 20:45:51.000000000 +0100 -+++ cups-filters-1.0.36/mime/cupsfilters.convs 2013-08-21 11:24:23.708994885 +0100 -@@ -42,32 +42,32 @@ - # if it comes from an encrypted PDF file, we simply override pstopdf and the - # PDF workflow. - --application/postscript application/pdf 100 pstopdf -+application/postscript application/pdf 0 pstopdf - application/vnd.adobe-reader-postscript application/vnd.cups-postscript 66 pstops - - application/pdf application/vnd.cups-pdf 66 pdftopdf --application/x-cshell application/pdf 0 texttopdf --application/x-csource application/pdf 0 texttopdf --application/x-perl application/pdf 0 texttopdf --application/x-shell application/pdf 0 texttopdf --text/plain application/pdf 0 texttopdf --text/html application/pdf 0 texttopdf --image/gif application/vnd.cups-pdf 33 imagetopdf --image/png application/vnd.cups-pdf 33 imagetopdf --image/jpeg application/vnd.cups-pdf 33 imagetopdf --image/tiff application/vnd.cups-pdf 33 imagetopdf --image/x-bitmap application/vnd.cups-pdf 33 imagetopdf --image/x-photocd application/vnd.cups-pdf 33 imagetopdf --image/x-portable-anymap application/vnd.cups-pdf 33 imagetopdf --image/x-portable-bitmap application/vnd.cups-pdf 33 imagetopdf --image/x-portable-graymap application/vnd.cups-pdf 33 imagetopdf --image/x-portable-pixmap application/vnd.cups-pdf 33 imagetopdf --image/x-sgi-rgb application/vnd.cups-pdf 33 imagetopdf --image/x-xbitmap application/vnd.cups-pdf 33 imagetopdf --image/x-xpixmap application/vnd.cups-pdf 33 imagetopdf --image/x-xwindowdump application/vnd.cups-pdf 33 imagetopdf --image/x-sun-raster application/vnd.cups-pdf 33 imagetopdf --application/vnd.cups-pdf-banner application/pdf 33 bannertopdf -+application/x-cshell application/pdf 32 texttopdf -+application/x-csource application/pdf 32 texttopdf -+application/x-perl application/pdf 32 texttopdf -+application/x-shell application/pdf 32 texttopdf -+text/plain application/pdf 32 texttopdf -+text/html application/pdf 32 texttopdf -+image/gif application/vnd.cups-pdf 65 imagetopdf -+image/png application/vnd.cups-pdf 65 imagetopdf -+image/jpeg application/vnd.cups-pdf 65 imagetopdf -+image/tiff application/vnd.cups-pdf 65 imagetopdf -+image/x-bitmap application/vnd.cups-pdf 65 imagetopdf -+image/x-photocd application/vnd.cups-pdf 65 imagetopdf -+image/x-portable-anymap application/vnd.cups-pdf 65 imagetopdf -+image/x-portable-bitmap application/vnd.cups-pdf 65 imagetopdf -+image/x-portable-graymap application/vnd.cups-pdf 65 imagetopdf -+image/x-portable-pixmap application/vnd.cups-pdf 65 imagetopdf -+image/x-sgi-rgb application/vnd.cups-pdf 65 imagetopdf -+image/x-xbitmap application/vnd.cups-pdf 65 imagetopdf -+image/x-xpixmap application/vnd.cups-pdf 65 imagetopdf -+image/x-xwindowdump application/vnd.cups-pdf 65 imagetopdf -+image/x-sun-raster application/vnd.cups-pdf 65 imagetopdf -+application/vnd.cups-pdf-banner application/pdf 32 bannertopdf - image/urf application/pdf 0 urftopdf - - ######################################################################## -@@ -84,8 +84,8 @@ application/vnd.cups-pdf application/vnd - # Raster filters... - # - --application/vnd.cups-pdf application/vnd.cups-raster 66 gstoraster --application/vnd.cups-postscript application/vnd.cups-raster 100 gstoraster -+application/vnd.cups-pdf application/vnd.cups-raster 99 gstoraster -+application/vnd.cups-postscript application/vnd.cups-raster 200 gstoraster - application/vnd.cups-pdf application/vnd.cups-raster 100 pdftoraster - image/gif application/vnd.cups-raster 100 imagetoraster - image/png application/vnd.cups-raster 100 imagetoraster -diff -up cups-filters-1.0.36/NEWS.filter-costs cups-filters-1.0.36/NEWS diff --git a/cups-filters.spec b/cups-filters.spec index 46fc32b..5f5cb91 100644 --- a/cups-filters.spec +++ b/cups-filters.spec @@ -3,8 +3,8 @@ Summary: OpenPrinting CUPS filters and backends Name: cups-filters -Version: 1.0.36 -Release: 2%{?dist} +Version: 1.0.37 +Release: 1%{?dist} # For a breakdown of the licensing, see COPYING file # GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*, @@ -20,9 +20,6 @@ License: GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT Group: System Environment/Base Url: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz -Source1: cups-browsed.service - -Patch1: cups-filters-filter-costs.patch Requires: cups-filters-libs%{?_isa} = %{version}-%{release} @@ -98,9 +95,6 @@ This is the development package for OpenPrinting CUPS filters and backends. %prep %setup -q -# Upstream patch to re-work filter costs (bug #998977). -%patch1 -p1 -b .filter-costs - %build # work-around Rpath ./autogen.sh @@ -135,7 +129,7 @@ rm -f %{buildroot}%{_bindir}/ttfread # systemd unit file mkdir -p %{buildroot}%{_unitdir} -install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir} +install -p -m 644 utils/cups-browsed.service %{buildroot}%{_unitdir} %post %systemd_post cups-browsed.service @@ -214,6 +208,9 @@ fi %{_libdir}/libfontembed.so %changelog +* Thu Aug 29 2013 Jaromír Končický - 1.0.37-1 +- 1.0.37. + * Wed Aug 21 2013 Tim Waugh - 1.0.36-2 - Upstream patch to re-work filter costs (bug #998977). No longer need text filter costs patch as paps gets used by default now if diff --git a/sources b/sources index 82461f9..cff09b2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -595c41a7e16136fc8c0fed1d35f583f6 cups-filters-1.0.36.tar.xz +210e5cb70e9474b91dd2ab4291a5e48e cups-filters-1.0.37.tar.xz From 7c929ddc4fbca9341907194f5c24e3959212546f Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Wed, 4 Sep 2013 12:55:15 +0200 Subject: [PATCH 4/5] 1.0.38 --- .gitignore | 1 + cups-filters.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 99ed6a1..3800326 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /cups-filters-1.0.35.tar.xz /cups-filters-1.0.36.tar.xz /cups-filters-1.0.37.tar.xz +/cups-filters-1.0.38.tar.xz diff --git a/cups-filters.spec b/cups-filters.spec index 5f5cb91..3fbe196 100644 --- a/cups-filters.spec +++ b/cups-filters.spec @@ -3,7 +3,7 @@ Summary: OpenPrinting CUPS filters and backends Name: cups-filters -Version: 1.0.37 +Version: 1.0.38 Release: 1%{?dist} # For a breakdown of the licensing, see COPYING file @@ -208,6 +208,9 @@ fi %{_libdir}/libfontembed.so %changelog +* Wed Sep 04 2013 Jiri Popelka - 1.0.38-1 +- 1.0.38 + * Thu Aug 29 2013 Jaromír Končický - 1.0.37-1 - 1.0.37. diff --git a/sources b/sources index cff09b2..11520f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -210e5cb70e9474b91dd2ab4291a5e48e cups-filters-1.0.37.tar.xz +bf9b6f34b3445ebc16b13cbb0c249ae1 cups-filters-1.0.38.tar.xz From 53a2c3f321995a4a8ccb6b689136b58b1704f2cb Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 17 Sep 2013 15:00:54 +0100 Subject: [PATCH 5/5] Fix landscape printing for PDFs (bug #768811). Resolves: rhbz#768811 --- cups-filters-pdf-landscape.patch | 41 ++++++++++++++++++++++++++++++++ cups-filters.spec | 10 +++++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 cups-filters-pdf-landscape.patch diff --git a/cups-filters-pdf-landscape.patch b/cups-filters-pdf-landscape.patch new file mode 100644 index 0000000..a3df684 --- /dev/null +++ b/cups-filters-pdf-landscape.patch @@ -0,0 +1,41 @@ +diff -up cups-filters-1.0.38/filter/pdftops.c.pdf-landscape cups-filters-1.0.38/filter/pdftops.c +--- cups-filters-1.0.38/filter/pdftops.c.pdf-landscape 2013-09-03 15:33:54.000000000 +0100 ++++ cups-filters-1.0.38/filter/pdftops.c 2013-09-17 14:58:59.460506475 +0100 +@@ -273,6 +273,7 @@ main(int argc, /* I - Number of comm + *pstops_options, /* Options for pstops filter */ + *pstops_end; /* End of pstops filter option */ + const char *cups_serverbin; /* CUPS_SERVERBIN environment variable */ ++ const char *content_type; /* CONTENT_TYPE environment variable */ + #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) + struct sigaction action; /* Actions for POSIX signals */ + #endif /* HAVE_SIGACTION && !HAVE_SIGSET */ +@@ -438,6 +439,7 @@ main(int argc, /* I - Number of comm + * Build the command-line for the pdftops or gs filter... + */ + ++ content_type = getenv("CONTENT_TYPE"); + if (renderer == PDFTOPS) + { + pdf_argv[0] = (char *)"pdftops"; +@@ -630,7 +632,9 @@ main(int argc, /* I - Number of comm + * which contain pages of different sizes can be printed correctly + */ + +- pdf_argv[pdf_argc++] = (char *)"-origpagesizes"; ++ /* Only do this for unprocessed PDF files */ ++ if (content_type && !strstr (content_type, "/vnd.cups-")) ++ pdf_argv[pdf_argc++] = (char *)"-origpagesizes"; + } + #endif /* HAVE_POPPLER_PDFTOPS_WITH_ORIGPAGESIZES */ + else if (renderer == ACROREAD) +@@ -640,7 +644,9 @@ main(int argc, /* I - Number of comm + * which contain pages of different sizes can be printed correctly + */ + +- pdf_argv[pdf_argc++] = (char *)"-choosePaperByPDFPageSize"; ++ /* Only do this for unprocessed PDF files */ ++ if (content_type && !strstr (content_type, "/vnd.cups-")) ++ pdf_argv[pdf_argc++] = (char *)"-choosePaperByPDFPageSize"; + } + + /* diff --git a/cups-filters.spec b/cups-filters.spec index 3fbe196..23810b2 100644 --- a/cups-filters.spec +++ b/cups-filters.spec @@ -4,7 +4,7 @@ Summary: OpenPrinting CUPS filters and backends Name: cups-filters Version: 1.0.38 -Release: 1%{?dist} +Release: 2%{?dist} # For a breakdown of the licensing, see COPYING file # GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*, @@ -21,6 +21,8 @@ Group: System Environment/Base Url: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz +Patch1: cups-filters-pdf-landscape.patch + Requires: cups-filters-libs%{?_isa} = %{version}-%{release} # Obsolete cups-php (bug #971741) @@ -95,6 +97,9 @@ This is the development package for OpenPrinting CUPS filters and backends. %prep %setup -q +# Fix landscape printing for PDFs (bug #768811). +%patch1 -p1 -b .pdf-landscape + %build # work-around Rpath ./autogen.sh @@ -208,6 +213,9 @@ fi %{_libdir}/libfontembed.so %changelog +* Tue Sep 17 2013 Tim Waugh - 1.0.38-2 +- Fix landscape printing for PDFs (bug #768811). + * Wed Sep 04 2013 Jiri Popelka - 1.0.38-1 - 1.0.38