Subject: pkg/15942: pkgsrc/print/apsfilter: Fails printing PDF with acroread (i386)
To: None <gnats-bugs@gnats.netbsd.org>
From: Markus W Kilbinger <kilbi@rad.rwth-aachen.de>
List: netbsd-bugs
Date: 03/17/2002 12:58:32
>Number:         15942
>Category:       pkg
>Synopsis:       apsfilter's call of acroread fails under i386 linux emulation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 17 03:59:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Markus W Kilbinger
>Release:        NetBSD 1.5.3_RC1 and -current / i386
>Organization:
>Environment:
System: NetBSD zentrum 1.5.3_RC1 NetBSD 1.5.3_RC1 (ZENTRUM) #0: Tue Mar 12 07:17:40 MET 2002 root@lkegw:/amd/lwle5.radiologie/usr/src-1.5/sys/arch/i386/compile/ZENTRUM i386
Architecture: i386
Machine: i386
>Description:
	apsfilter's regular call (in 7.1.1 and 7.2.2) to convert PDF
	data into postscript

          acroread4 $ACROREAD_OPTS -pairs "$APS_TMPDIR/pdf" /dev/stdout

        fails with a 'permission denied' on reading "$APS_TMPDIR/pdf".
        Replacing "/dev/stdout" with some real file makes acroread
        work. -> Any kind of i386 linux emulation problem?
>How-To-Repeat:
	Install apsfilter and acroread, install at least one printer
	and try to print a PDF file with it.
>Fix:
	The following diff is at least one (avoid using of
	'/dev/stdout'):

--- apsfilter.dist      Sun Mar 17 11:34:00 2002
+++ apsfilter   Sun Mar 17 12:28:16 2002
@@ -1028,9 +1028,9 @@
 
     cat > "$APS_TMPDIR/pdf"
     if find_filter acroread4; then
-       eval acroread4 $ACROREAD_OPTS -pairs "$APS_TMPDIR/pdf" /dev/stdout
+       cat "$APS_TMPDIR/pdf" | eval acroread4 $ACROREAD_OPTS
     elif find_filter acroread; then
-       eval acroread $ACROREAD_OPTS -pairs "$APS_TMPDIR/pdf" /dev/stdout
+       cat "$APS_TMPDIR/pdf" | eval acroread $ACROREAD_OPTS
     elif find_filter pdftops; then
        pdftops ${PDFTOPS_OPTS:--q} -paperw $WIDTH_POINTS \
            -paperh $HEIGHT_POINTS "$APS_TMPDIR/pdf" -
>Release-Note:
>Audit-Trail:
>Unformatted: