From owner-freebsd-questions@FreeBSD.ORG Fri Apr 25 12:12:24 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E674BF3; Fri, 25 Apr 2014 12:12:24 +0000 (UTC) Received: from forward7l.mail.yandex.net (forward7l.mail.yandex.net [IPv6:2a02:6b8:0:1819::7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Certum Level IV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 485BD1A69; Fri, 25 Apr 2014 12:12:24 +0000 (UTC) Received: from smtp3h.mail.yandex.net (smtp3h.mail.yandex.net [84.201.186.20]) by forward7l.mail.yandex.net (Yandex) with ESMTP id DFB9EBC106B; Fri, 25 Apr 2014 16:12:11 +0400 (MSK) Received: from smtp3h.mail.yandex.net (localhost [127.0.0.1]) by smtp3h.mail.yandex.net (Yandex) with ESMTP id 2CEC51B439C3; Fri, 25 Apr 2014 16:12:11 +0400 (MSK) Received: from 78.108.203.86.tel.ru (78.108.203.86.tel.ru [78.108.203.86]) by smtp3h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id VPiDyQOmcN-CA1uiMnc; Fri, 25 Apr 2014 16:12:10 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 85c820c8-9f6c-4d49-bec4-abffe820e37a Message-ID: <535A511A.8050205@passap.ru> Date: Fri, 25 Apr 2014 16:12:10 +0400 From: Boris Samorodov Organization: =?UTF-8?B?0JfQkNCeICLQktCQ0KDQoiI=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: "O. Hartmann" Subject: Re: print/cups: since update to 1.7.1: error : Send-Document client-error-document-format-not-supported References: <20140408154210.1aec26a8.ohartman@zedat.fu-berlin.de> <534476FE.4020109@passap.ru> <20140411130833.0d4cd2f2.ohartman@zedat.fu-berlin.de> <2456953.yOakfpjjYJ@lumiwa.farms.net> <20140412151604.0c90adc4.ohartman@zedat.fu-berlin.de> <534AC039.5080109@passap.ru> <20140422084841.6dbb4204.ohartman@zedat.fu-berlin.de> In-Reply-To: <20140422084841.6dbb4204.ohartman@zedat.fu-berlin.de> X-Enigmail-Version: 1.6 Content-Type: multipart/mixed; boundary="------------020007090608060200070702" Cc: Max Brazhnikov , freebsd-questions@freebsd.org, FreeBSD Ports X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 12:12:24 -0000 This is a multi-part message in MIME format. --------------020007090608060200070702 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 22.04.2014 10:48, O. Hartmann пишет: > On Sun, 13 Apr 2014 20:50:01 +0400 > Boris Samorodov wrote: > >> 12.04.2014 17:16, O. Hartmann пишет: >>> On Fri, 11 Apr 2014 08:19:45 -0400 >>> Ajtim wrote: >>> >>>> On Friday 11 April 2014 13:08:33 O. Hartmann wrote: >>>>> On Wed, 09 Apr 2014 02:23:58 +0400 >>>>> >>>>> Boris Samorodov wrote: >>>>>> 09.04.2014 00:25, O. Hartmann пишет: >>>>>>> On Tue, 08 Apr 2014 23:16:33 +0400 >>>>>>> >>>>>>> Boris Samorodov wrote: >>>>>>>> 08.04.2014 17:42, O. Hartmann пишет: >>>>>>>>> Since the update of print/cups from 1.5.X to 1.7.1 >>>>>>>> >>>>>>>> How did you do it? >>>>>>> >>>>>>> As it is reported in /usr/ports/UPDATING. I delete first cups-image, >>>>>>> then did the update which reeled in all the new stuff automatically. >>>>>> >>>>>> OK, lets start from some obvious things. >>>>>> Did you restart cupsd while experimenting? >>>>> >>>>> No. >>>>> >>>>>> Give an output for: >>>>>> ----- >>>>>> % type lpr >>>>> >>>>> lpr is /usr/local/bin/lpr >>>>> pkg which /usr/local/bin/lpr >>>>> /usr/local/bin/lpr was installed by package cups-base-1.7.1 >>>>> >>>>>> % ls -l /usr/local/etc/cups >>>>> >>>>> -r--r--r-- 1 root wheel 2807 11 Apr 11:58 cups-browsed.conf >>>>> -rw-r----- 1 root cups 3197 8 Apr 17:15 cups-files.conf >>>>> -rw-r----- 1 root cups 3197 8 Apr 17:15 cups-files.conf.bak >>>>> -rw-r----- 1 root wheel 3137 11 Apr 12:02 cups-files.conf.sample >>>>> -r--r--r-- 1 root wheel 9521 11 Apr 11:50 cups-pdf.conf >>>>> -r--r--r-- 1 root wheel 9521 11 Apr 11:50 cups-pdf.conf.sample >>>>> -rw-r----- 1 root cups 3442 8 Apr 17:22 cupsd.conf >>>>> -rw-r----- 1 root cups 5098 8 Apr 17:20 cupsd.conf.O >>>>> -rw-r----- 1 root cups 3442 8 Apr 17:22 cupsd.conf.bak >>>>> -rw-r----- 1 root wheel 4492 11 Apr 12:02 cupsd.conf.default >>>>> -r--r--r-- 1 root wheel 4492 11 Apr 12:02 cupsd.conf.sample >>>>> drwxr-xr-x 2 root wheel 512 11 Apr 12:02 interfaces >>>>> -r--r--r-- 1 root wheel 1875 8 Apr 19:17 mime.convs >>>>> -r--r--r-- 1 root wheel 1874 11 Apr 12:02 mime.convs.sample >>>>> -r--r--r-- 1 root wheel 6456 8 Apr 19:18 mime.types >>>>> -r--r--r-- 1 root wheel 6455 11 Apr 12:02 mime.types.sample >>>>> drwxr-xr-x 2 root cups 512 11 Apr 12:02 ppd >>>>> -rw------- 1 root cups 4134 8 Apr 17:33 printers.conf >>>>> -rw------- 1 root cups 4134 8 Apr 14:58 printers.conf.O >>>>> -rw------- 1 root cups 4134 8 Apr 17:22 printers.conf.bak >>>>> -rw-r--r-- 1 root cups 946 11 Apr 11:53 pstoraster.convs >>>>> -r--r--r-- 1 root wheel 778 11 Apr 12:04 pstotiff.convs >>>>> -r--r--r-- 1 root wheel 2084 11 Apr 12:04 pstotiff.types >>>>> -r--r--r-- 1 root wheel 284 11 Apr 11:49 snmp.conf >>>>> -r--r--r-- 1 root wheel 284 11 Apr 12:02 snmp.conf.sample >>>>> drwx------ 2 root cups 512 11 Apr 12:02 ssl >>>>> >>>>>> % make -C /usr/ports/print/cups-client pretty-print-config >>>>> >>>>> -GNUTLS (whoops ... this is not the default, isn't it?) >>>>> >>>>> ==> corrected that with a new recompilation with rmconfig preceded. >>>>> >>>>>> % grep CUPS /etc/make.conf >>>>> >>>>> NULL (menas: no output) >>>>> >>>>>> % pkg info -x cups hp foo gut >>>>> >>>>> cups-base-1.7.1 >>>>> cups-client-1.7.1 >>>>> cups-filters-1.0.52 >>>>> cups-image-1.7.1 >>>>> cups-pdf-2.6.1_1 >>>>> cups-pstoraster-8.15.4_7 >>>>> cups-samba-6.0_7 >>>>> gutenprint-cups-5.2.8_1 >>>>> libgnomecups-0.2.3_5,1 >>>>> linux-f10-cups-libs-1.3.11_1 >>>>> foomatic-db-hpijs-1.4 >>>>> hplip-3.14.1 >>>>> kdevelop-php-1.6.0_1 >>>>> kdevelop-php-docs-1.6.0_1 >>>>> php5-5.4.27 >>>>> swhplugins-0.4.15_4 >>>>> foomatic-db-20140331 >>>>> foomatic-db-engine-4.0.11,2 >>>>> foomatic-db-hpijs-1.4 >>>>> foomatic-filters-4.0.17 >>>>> gimp-gutenprint-5.2.8 >>>>> gutenprint-base-5.2.8 >>>>> gutenprint-cups-5.2.8_1 >>>>> gutenprint-ijs-5.2.8 >>>>> >>>>>> ----- >>>>>> >>>>>> Stop cupsd, move temporary /var/log/cups/*_log to another location. >>>>>> Start cupsd and look for suspicious messages at /var/log/cups/* files. >>>>> >>>>> Nothing suspicious so far. With print/cups-filters installed, the whole cups >>>>> printing system is corrupted and doesn't print a single sheet of paper >>>>> (PDF/PS) normal es expected. >>>>> >>>>> >>>>> Prior to this task, I recompiled, as you suggested, first all cups ports and >>>>> afterwards hplip/foomatic. I also installed print/cups-filters before >>>>> recompiling hplip/foomatic. >>>> >>>> It works for me now (FreeBSD 10.0-RELEASE): >>>> >>>> I did deinstall cups* and hplip. Than installed cups and patched hplip. First >>>> I used as usual hp-business_inkjet_3000-hpijs-pcl3.ppd.gz and it didn't work >>>> It printed:%PDF-1.4 >>>> and jobs processing never stopped. Than I removed device and installed again >>>> with -3000-ps.ppd.gz and it works but cannot print test page. >>>> >>> >>> I tried alternatives, but it is with all (known to me) usefull drivers for the >>> specific printer the same result: empty pages, print job stuck in queue. I also tried >>> most recent hplip-3.14.4 but I doubt this is the reason. >>> >>> I can print PDF and PS, as reported, when deinstalling/removing print/cups-filters >>> using clients like xpdf, xdvi or printing directly via lpr -PPRINTER_NAME jobfile.ps. >>> This fails when print/cups-filter is installed. >> >> This is rather strange. But may be this is because you use hplip which >> I've never used before. >> >>> Have you tried to deinstall by intention cups-filters and check whether the formerly >>> used driver works for you? >> >> Yes, I tested cups-1.7.0 for several months with no ill-effects (HP, >> OKI and Epson printers). >> >>> I also deinstalled everything related to hplip and cups (cups, cups-XXX, hplip, qpdf, >>> foomatic-XXX) and reinstalled first print/cups which reels in all cups-ports and then >>> print/hplip, which reels in qpdf and foomatic-filters. This should ensure the propper >>> chain of dependencies. But it fails. I then recompiled approx 260 ports by "portmaster >>> -f hplip" on my workstation and ~ 170 ports the same way on the server (gutenprint and >>> other gimp realted stuff aren't installed on the server). I had no success. >>> >>> I'd like to figure out what part of the duo cups and hplip is the culprit, but it >>> seems not to be easy if one is dependend on a working printing system. >> >> Since I didn't use (and test) print/hplip I gave it a try. I didn't >> manage to print via command line using hplip (i.e. just >> "lpr -P test_file" ended with almost blank line and >> the tast waiting at the printer's query. >> >> Further analysis showed that foomatic-rip-hplip doesn't like PDF files >> which new CUPS uses by default. It expects a PS file: >> ----- >> File: >> Reading PostScript input ... >> PID 29404 (/usr/local/libexec/cups/filter/pstopdf) exited with no errors. >> Job does not start with "%!", is it PostScript? >> ----- >> >> After switching from HP's foomatic-rip-hplip to native foomatic-rip >> all is fine: >> ----- >> PID 75535 (/usr/local/libexec/cups/filter/pstopdf) exited with no errors. >> Filetype: PDF >> ----- >> >> So, I fixed an error which I managed to reproduce. Please, try the >> attached file, recompile print/hplip and report back. The patch uses >> a native foomatic-rip where foomatic-rip-hplip was used. >> > > Hello all. > > After several updates had been committed to the ports tree and several update/upgrade > runs these days, I ran into the very same problem as before with print/cups and > print/hplip and the phenomenon is the same as described in this thread. > > The only solution for this malfunction is Boris' patch to print/hplip Makefile > > [...] > @@ -161,5 +161,6 @@ > ${MKDIR} ${STAGEDIR}${PREFIX}/etc/hp > ${INSTALL_DATA} ${WRKSRC}/hplip.conf > ${STAGEDIR}${PREFIX}/etc/hp/hplip.conf.sample ${STRIP_CMD} > ${STRIP_FILES:S,^,${STAGEDIR}${PREFIX}/,} > + ${LN} -sf ${LOCALBASE}/bin/foomatic-rip > ${STAGEDIR}${PREFIX}/libexec/cups/filter/foomatic-rip-hplip > [...] > > With this patched line, hplip works as normal again. > > Is there a permanent solution underway? (CCing pritn/hplip maintainer) Max, can you take a look at the problem? Thanks! The proposed patch is attached. -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve --------------020007090608060200070702 Content-Type: text/plain; charset=UTF-8; name="hplip-fix-printing-with-cups-1.7.x.diff.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="hplip-fix-printing-with-cups-1.7.x.diff.txt" SW5kZXg6IE1ha2VmaWxlCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIE1ha2VmaWxlCShyZXZpc2lvbiAz NTA5MTApCisrKyBNYWtlZmlsZQkod29ya2luZyBjb3B5KQpAQCAtMjgsNyArMjksNiBAQAog CiBHTlVfQ09ORklHVVJFPQl5ZXMKIENPTkZJR1VSRV9BUkdTPQktLWVuYWJsZS1mb29tYXRp Yy1wcGQtaW5zdGFsbCBcCi0JCS0tZW5hYmxlLWZvb21hdGljLXJpcC1ocGxpcC1pbnN0YWxs IFwKIAkJLS1lbmFibGUtaHBpanMtaW5zdGFsbCBcCiAJCS0td2l0aC1jdXBzYmFja2VuZGRp cj0ke1BSRUZJWH0vbGliZXhlYy9jdXBzL2JhY2tlbmQgXAogCQktLXdpdGgtY3Vwc2ZpbHRl cmRpcj0ke1BSRUZJWH0vbGliZXhlYy9jdXBzL2ZpbHRlciBcCkBAIC0xNjEsNSArMTYxLDYg QEAKIAkke01LRElSfSAke1NUQUdFRElSfSR7UFJFRklYfS9ldGMvaHAKIAkke0lOU1RBTExf REFUQX0gJHtXUktTUkN9L2hwbGlwLmNvbmYgJHtTVEFHRURJUn0ke1BSRUZJWH0vZXRjL2hw L2hwbGlwLmNvbmYuc2FtcGxlCiAJJHtTVFJJUF9DTUR9ICR7U1RSSVBfRklMRVM6UyxeLCR7 U1RBR0VESVJ9JHtQUkVGSVh9Lyx9CisJJHtMTn0gLXNmICR7TE9DQUxCQVNFfS9iaW4vZm9v bWF0aWMtcmlwICR7U1RBR0VESVJ9JHtQUkVGSVh9L2xpYmV4ZWMvY3Vwcy9maWx0ZXIvZm9v bWF0aWMtcmlwLWhwbGlwCiAKIC5pbmNsdWRlIDxic2QucG9ydC5taz4K --------------020007090608060200070702--