Bug 216154

Summary: pstops creates extra EOF
Product: [Fedora] Fedora Reporter: Steve Hanselman <steveh>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 1.2.7-1.5.fc6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-02 16:11:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 207681    
Attachments:
Description Flags
tcpdump capture of generated postscript
none
ppd file
none
out.ps
none
fail.ps
none
fails.ps none

Description Steve Hanselman 2006-11-17 15:29:31 UTC
Description of problem:

(presumably) following an update fo cups the ability to specify certain options 
via lpd is now failing.


Version-Release number of selected component (if applicable):

1.2.5

How reproducible:

Always fails now

Steps to Reproduce:
An example would be as follows:-
  fax2ps -H11.5 -W8.25 -S ../recvq/fax000000825.tif |lpr -P sales_laser -o 
OutputBin=Left -o InputSlot=Tray2

However, the following works, so it is specific to an option rather than all 
options (actually, I could be wrong, it could just be that the printer ignores 
the error rather than dying on the job as it does for outputbin) :-
fax2ps -H11.5 -W8.25 -S ../recvq/fax000000825.tif |lpr -P sales_laser -o 
InputSlot=Tray2

Actual results:
postscript job is rejected by printer and no output is produced

Expected results:
Job will run and produce output, tyaking paper fromt he specified bin and 
placing in the specified output tray.


Additional info:

Comment 1 Steve Hanselman 2006-11-17 15:30:46 UTC
Created attachment 141482 [details]
tcpdump capture of generated postscript

Comment 2 Steve Hanselman 2006-11-17 15:31:43 UTC
Also, I should add that
(a) It was working up until a few days ago
(b) the date of the ppd file is unchanged


Comment 3 Steve Hanselman 2006-11-17 15:32:44 UTC
Created attachment 141483 [details]
ppd file

Comment 4 Tim Waugh 2006-11-17 15:33:52 UTC
*** Bug 216152 has been marked as a duplicate of this bug. ***

Comment 5 Tim Waugh 2006-11-17 15:55:42 UTC
What does 'rpm -q cups' say?

Comment 6 Steve Hanselman 2006-11-17 16:17:06 UTC
cups-1.2.5-1.fc5.4


Comment 7 Tim Waugh 2006-11-17 17:45:41 UTC
Could you provide a small input file that demonstrates the problem?  Does this
exhibit the problem for instance?:

echo test | lpr -P sales_laser -o OutputBin=Left -o InputSlot=Tray2

or does it need to be something more than 'test'?

Comment 8 Steve Hanselman 2006-11-17 17:51:08 UTC
Just running down the stairs to check... 5 mins

Comment 9 Steve Hanselman 2006-11-17 17:55:19 UTC
Fails with the echo.


Comment 10 Tim Waugh 2006-11-20 12:46:22 UTC
Okay.  How about this?:

lpr -P sales_laser -o OutputBin=Left -o InputSlot=Tray2 \
  /usr/share/cups/data/testprint.ps

It should print a test page.

Comment 11 Steve Hanselman 2006-11-21 09:14:50 UTC
Nothing comes out, printer just reports processing job and then back to idle 
within a second (i.e. same as before).


Comment 12 Tim Waugh 2006-11-21 12:09:40 UTC
Created attachment 141757 [details]
out.ps

Please save this file as 'out.ps' and print it like this:

lpr -P sales_laser -o raw out.ps

Does it work?  This file was created using your PPD in conjunction with the
'pstops' filter from cups-1.2.3-1.2, with options 'OutputBin=Left
InputSlot=Tray2'.

Comment 13 Steve Hanselman 2006-11-21 12:14:28 UTC
Yes, that works fine.

Comment 14 Tim Waugh 2006-11-21 12:20:32 UTC
Created attachment 141758 [details]
fail.ps

And just to be sure, does this 'fail.ps' fail when printed in the same way?

lpr -P sales_laser -o raw fail.ps

This came from the pstops in cups-1.2.7-1.1.fc6.

Comment 16 Steve Hanselman 2006-11-21 12:26:36 UTC
Still worked, just did a quick diff and there aren't any real differences of 
note, are you sure it's the right file (was also called out.ps)

Comment 17 Tim Waugh 2006-11-21 12:44:26 UTC
Please paste these three lines into a terminal window:

PPD=/etc/cups/ppd/sales_laser.ppd \
./pstops 1 me '' 1 'OutputBin=Left InputSlot=Tray2' \
/usr/share/cups/data/testprint.ps /tmp/fails.ps

(it's one long command).  You should end up with a /tmp/fails.ps file.  Now try
printing that like this:

lpr -P sales_laser -o raw /tmp/fails.ps

Does that fail?  If so, please attach /tmp/fails.ps to this bug report.  Thanks.

Comment 18 Steve Hanselman 2006-11-21 12:50:20 UTC
Seeing an error, I'll take a quick look at pstops and see what it wants:-

[root@dell download]# which pstops
/usr/bin/pstops
[root@dell download]# cd /usr/bin
[root@dell bin]# PPD=/etc/cups/ppd/sales_laser.ppd ./pstops 1 me '' 
1 'OutputBin=Left 
InputSlot=Tray2' /usr/share/cups/data/testprint.ps /tmp/fails.ps
./pstops: page specification error:
  <pagespecs> = [modulo:]<spec>
  <spec>      = [-]pageno[@scale][L|R|U][(xoff,yoff)][,spec|+spec]
                modulo>=1, 0<=pageno<modulo
[root@dell bin]#



Comment 19 Steve Hanselman 2006-11-21 12:53:30 UTC
Ok, I see, it's teh filter one, still complaining, but it'll just take me a mo 
to figure out why.
Steve


Comment 20 Steve Hanselman 2006-11-21 12:56:00 UTC
Ok, just needed a redirect top the file, fails (which is good!), I'll attach 
and then diff to see what the changes are.


Comment 21 Tim Waugh 2006-11-21 12:57:02 UTC
Sorry, instead of './pstops' use '/usr/lib/cups/filter/pstops'.

Comment 22 Steve Hanselman 2006-11-21 12:57:26 UTC
Created attachment 141760 [details]
fails.ps

Comment 23 Steve Hanselman 2006-11-21 13:00:18 UTC
I can't see any noticable differences, let me check that it really did print 
and that they're not looking at the last one that did......

Comment 24 Tim Waugh 2006-11-21 13:03:45 UTC
Just to clarify, did you end up using this command line for attachment id=141760?:

PPD=/etc/cups/ppd/sales_laser.ppd \
/usr/lib/cups/filter/pstops 1 me '' 1 'OutputBin=Left InputSlot=Tray2' \
/usr/share/cups/data/testprint.ps /tmp/fails.ps

(sorry for giving the wrong command line in comment #17)

Comment 25 Steve Hanselman 2006-11-21 13:05:22 UTC
Bit of confusion, but fails.ps doesn't print and out.ps does, ok, there's two 
EOF's in the fails.ps


Comment 26 Steve Hanselman 2006-11-21 13:06:30 UTC
Yes, (almost) I was lazy so I cd'd to the filter directory and had to add a 
redirect > before the output filename.


Comment 27 Tim Waugh 2006-11-21 13:14:32 UTC
Could you try the attachment from comment #14 again please?  Yes, it's also
called out.ps.  The extra EOF was what I thought might be the problem, so it
would be good to just check what the attachment from comment #14 does.  Thanks.

Comment 28 Steve Hanselman 2006-11-21 13:18:51 UTC
14 fails, they weren't taking off the printed ones.... (don't comment!)

So the extra EOF is the issue.


Comment 29 Tim Waugh 2006-11-21 14:28:32 UTC
Okay, thanks for double-checking!  Reported upstream.

Comment 31 Tim Waugh 2006-12-07 10:18:44 UTC
Please try cups-1.2.6-1.3.fc5 from updates-testing.

e.g. yum --enablerepo=updates-testing update 'cups*'


Comment 32 Tim Waugh 2006-12-13 14:05:51 UTC
Have you had a chance to try this test update?

Comment 33 Steve Hanselman 2006-12-13 14:07:49 UTC
Sorry, distracted!

I'll try it now.

Steve

Comment 34 Steve Hanselman 2006-12-13 14:45:08 UTC
Yes, all sorted, close this entry.

Thanks for sorting it.

Regards

Steve


Comment 35 Fedora Update System 2007-01-02 16:03:49 UTC
Fixed in update: cups-1.2.7-1.5.fc6