Bug 531278 - foomatic *.xml to cups *.ppd does not work with <arg_max>/<arg_min> values
Summary: foomatic *.xml to cups *.ppd does not work with <arg_max>/<arg_min> values
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: foomatic
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 533221
TreeView+ depends on / blocked
 
Reported: 2009-10-27 14:53 UTC by Rick Richardson
Modified: 2010-01-27 01:07 UTC (History)
3 users (show)

Fixed In Version: 4.0.3-5.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 533221 (view as bug list)
Environment:
Last Closed: 2010-01-27 01:07:32 UTC
Type: ---


Attachments (Terms of Use)
HP-Color_LaserJet_2600n.ppd (40.85 KB, application/vnd.cups-ppd)
2009-10-27 14:55 UTC, Rick Richardson
no flags Details
foo2hp-AlignCMYK.xml (2.06 KB, text/xml)
2009-10-27 14:56 UTC, Rick Richardson
no flags Details

Description Rick Richardson 2009-10-27 14:53:22 UTC
This works on Fedora 10 with cups-1.3.10-5.fc10.i386.

It does not work with Fedora 11 and later with cups-1.4.1-4.fc11.i586.

F10:

f10# grep "foo2hp2600-wrapper " /var/log/messages 
Oct 26 19:15:33 localhost foo2hp2600-wrapper: foo2hp2600-wrapper -z0 -b1 -p1 -s7 -m1 -d1 -n1 -Oc=0 -Om=0 -Oy=0 -Gdefault

f10# grep "foo2hp2600-wrapper " /var/log/cups/error_log 
D [26/Oct/2009:19:15:33 -0500] [Job 3] renderer command: foo2hp2600-wrapper -z0  -b1 -p1 -s7 -m1   -d1 -n1 -Oc=0 -Om=0 -Oy=0 -Gdefault 
D [26/Oct/2009:19:15:33 -0500] [Job 3] Starting process 4566: "foo2hp2600-wrapper   -z0  -b1 -p1 -s7 -m1   -d1 -n1 -Oc=0 -Om=0 -Oy=0 -Gdefault "
D [26/Oct/2009:19:15:36 -0500] [Job 3] Process 4566 ending: "foo2hp2600-wrapper   -z0  -b1 -p1 -s7 -m1   -d1 -n1 -Oc=0 -Om=0 -Oy=0 -Gdefault "

F11:

f11#  grep "foo2hp2600-wrapper " /var/log/messages
Oct 27 06:28:04 localhost foo2hp2600-wrapper: foo2hp2600-wrapper -z0 -b1 -p1 -m1 -s7 -d1 -Gdefault

f11# grep "foo2hp2600-wrapper " /var/log/cups/error_log 
D [27/Oct/2009:06:28:04 -0500] [Job 3] Starting renderer with command: "foo2hp2600-wrapper -z0   -b1  -p1 -m1 -s7   -d1 -Gdefault "

Note the lack of "-Oc=0 -Om=0 -Oy=0" in the foo2hp2600-wrapper line!

I think is it because the XML using <arg_max>100</arg_max> and
<arg_min>-100</arg_min> (ref. foomatic-db/opt/foo2hp-AlignCMYK.xml)
doesn’t get translated to a (possibly depracated?) *.ppd syntax (HP-
Color_LaserJet_2600n.ppd).  But I could be wrong...

I note that the lx5000 and others are the same way...

foo2hp-AlignCMYK.xml:
    <option type="int" id="opt/foo2hp-AlignC">
        <!-- A multilingual <comments> block can appear here, too;
           it should be treated as documentation for the user. -->
        <arg_longname> <en>Alignment Offset Cyan</en> </arg_longname>
        <arg_shortname> <en>alignc</en> </arg_shortname>
        <arg_execution>
            <arg_group>Alignment (in rows)</arg_group>
            <arg_order>220</arg_order>
            <arg_spot>A</arg_spot>
            <arg_required />
            <arg_substitution />
            <arg_proto>-Oc=%s </arg_proto>
        </arg_execution>
        <constraints>
            <constraint sense="true">
            <driver>foo2hp</driver>
            <arg_defval>0</arg_defval>
            </constraint>
        </constraints>
        <arg_max>100</arg_max>
    <arg_min>-100</arg_min>
    </option>

HP-Color_LaserJet_2600n.ppd
    {snip}

    *OpenGroup: Alignment (in rows)/Alignment (in rows)

    *OpenUI *alignc/Alignment Offset Cyan: PickOne
    *FoomaticRIPOption alignc: int CmdLine A
    *FoomaticRIPOptionPrototype alignc: "-Oc=%s "
    *FoomaticRIPOptionRange alignc: -100 100
    *OrderDependency: 220 AnySetup *alignc
    *Defaultalignc: 0
    *FoomaticRIPDefaultalignc: 0
    *alignc -100/-100: "%% FoomaticRIPOptionSetting: alignc=-100"
    *alignc -98/-98: "%% FoomaticRIPOptionSetting: alignc=-98"
    *alignc -96/-96: "%% FoomaticRIPOptionSetting: alignc=-96"
    *alignc -94/-94: "%% FoomaticRIPOptionSetting: alignc=-94"

    {snip}

    *CloseUI: *alignc

    {snip for magenta and yellow)}

Repeat By:
    $ wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
    $ tar zxf foo2zjs.tar.gz
    $ cd foo2zjs
    $ make
    $ ./getweb 2600n    # Get HP Color LaserJet 2600n .ICM files
    $ su
    $ make install

    Use
        URI=file:/home/USERNAME/prn
    and
        $ touch ~/prn
        $ su
        # grep File /etc/cups/cupsd.conf
        FileDevice Yes
    if you don't have a HP CLJ 1600/2600/CP1215 printer.

Comment 1 Rick Richardson 2009-10-27 14:55:22 UTC
Created attachment 366285 [details]
HP-Color_LaserJet_2600n.ppd

Comment 2 Rick Richardson 2009-10-27 14:56:19 UTC
Created attachment 366286 [details]
foo2hp-AlignCMYK.xml

Comment 3 Rick Richardson 2009-10-27 15:05:40 UTC
$ cupstestppd HP-Color_LaserJet_2600n.ppd                   
HP-Color_LaserJet_2600n.ppd: PASS
        WARN    Non-standard size name "EnvB5"!
                REF: Page 187, section B.2.
        WARN    Nup shares a common prefix with NupOrient
                REF: Page 15, section 3.2.
passes, tho.

Comment 4 Tim Waugh 2009-11-02 17:07:59 UTC
This is a foomatic problem.

Comment 5 Rick Richardson 2009-11-02 21:37:46 UTC
So it is the interaction between cups and foomatic?  Because cups says

f11# grep "foo2hp2600-wrapper " /var/log/cups/error_log 
D [27/Oct/2009:06:28:04 -0500] [Job 3] Starting renderer with command:
"foo2hp2600-wrapper -z0   -b1  -p1 -m1 -s7   -d1 -Gdefault "

Note the lack of "-Oc=0 -Om=0 -Oy=0" in the foo2hp2600-wrapper line.

Comment 6 Tim Waugh 2009-11-03 11:09:39 UTC
The message comes from foomatic-rip.

Comment 7 Rick Richardson 2009-11-03 11:54:59 UTC
OK, it is foomatic writing into the cups error_log.  I think that foomatic would prepend "foomatic: ..." onto the debug message since it is writing to the cups error_log!!!!

Comment 8 Tim Waugh 2009-11-05 16:03:55 UTC
No, it isn't writing directly to the error log.

Reported upstream:
  http://bugs.linux-foundation.org/show_bug.cgi?id=399

Changing version to 11 as that is also affected.

Comment 9 Rick Richardson 2009-11-05 16:45:18 UTC
Thanks!  (One line fix.)

Comment 10 Tim Waugh 2009-11-05 17:03:02 UTC
Changing version to 10 as that is also affected.

Comment 11 Fedora Update System 2009-11-05 17:18:16 UTC
foomatic-4.0.3-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/foomatic-4.0.3-2.fc11

Comment 12 Rick Richardson 2009-11-05 22:55:38 UTC
$ grep foo2hp /var/log/messages
Nov  5 16:52:19 dual foo2hp2600-wrapper: foo2hp2600-wrapper -z0 -b1 -c -p1 -m1 -s7 -d1 -Oy=0 -Om=0 -Oc=0 -n1 -Gdefault
Nov  5 16:52:19 dual foo2hp2600-wrapper: foo2zjs-icc2ps -o /usr/share/foo2hp/icm/hpclj2600n-1.icm -t0 > /tmp/icc7152.crd.ps
Nov  5 16:52:21 dual foo2hp2600-wrapper: gs -sPAPERSIZE=letter -g5100x6600 -r600x600 -sDEVICE=bitcmyk -dCOLORSCREEN -dMaxBitmap=500000000  /tmp/icc7152.usecie.ps /tmp/icc7152.crd.ps /tmp/icc7152.selcrd.ps
Nov  5 16:52:21 dual foo2hp2600-wrapper: foo2hp -r600x600 -g5100x6600 -p1 -m1 -n1 -d1 -s7 -c -b1 -u 86x80 -l 86x80   -B -A 
  
$ rpm -q foomatic
foomatic-4.0.3-2.fc11.i586
$ 

Works good on FC11.  Thanks, again!

Comment 13 Fedora Update System 2009-11-07 00:23:15 UTC
foomatic-4.0.3-2.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update foomatic'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-10741

Comment 14 Fedora Update System 2009-11-07 00:24:30 UTC
foomatic-4.0.3-2.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update foomatic'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-11142

Comment 15 Tim Waugh 2009-11-09 11:04:45 UTC
Patch was incorrect and caused foomatic-rip to segfault in some situations, reverted.

Comment 16 Bug Zapper 2009-11-18 12:18:08 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 17 Till Kamppeter 2010-01-15 23:55:54 UTC
Please try the improved patch which I have posted to the upstream bug report now.

Comment 18 Tim Waugh 2010-01-19 17:04:46 UTC
Thanks.  Updated package on its way to updates-testing...

Comment 19 Fedora Update System 2010-01-21 00:07:04 UTC
foomatic-4.0.3-5.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update foomatic'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-12207

Comment 20 Rick Richardson 2010-01-21 00:40:42 UTC
$ rpm -q foomatic
foomatic-4.0.3-5.fc11.i586

$ root grep "foo2hp2600-wrapper " /var/log/cups/error_log 
D [20/Jan/2010:18:38:11 -0600] [Job 1883] Starting renderer with command: "foo2hp2600-wrapper -z0   -b1 -c -p1 -m1 -s7   -d1 -Oy=0 -Om=0 -Oc=40 -n1 -Gdefault "

Great Job!

Comment 21 Fedora Update System 2010-01-27 01:07:21 UTC
foomatic-4.0.3-5.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.