Bug 533221

Summary: foomatic *.xml to cups *.ppd does not work with <arg_max>/<arg_min> values
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: foomaticAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: jpopelka, rickrich, till.kamppeter, twaugh
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.0.3-8.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 531278
: 556871 (view as bug list) Environment:
Last Closed: 2010-01-27 01:07:51 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: 531278    
Bug Blocks: 556871    

Description Tim Waugh 2009-11-05 17:21:59 UTC
Also affects Fedora 12.  Will handle as an update.

+++ This bug was initially created as a clone of Bug #531278 +++

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.

--- Additional comment from rick.richardson on 2009-10-27 10:55:22 EDT ---

Created an attachment (id=366285)
HP-Color_LaserJet_2600n.ppd

--- Additional comment from rick.richardson on 2009-10-27 10:56:19 EDT ---

Created an attachment (id=366286)
foo2hp-AlignCMYK.xml

--- Additional comment from rick.richardson on 2009-10-27 11:05:40 EDT ---

$ 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.

--- Additional comment from twaugh on 2009-11-02 12:07:59 EDT ---

This is a foomatic problem.

--- Additional comment from rick.richardson on 2009-11-02 16:37:46 EDT ---

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.

--- Additional comment from twaugh on 2009-11-03 06:09:39 EDT ---

The message comes from foomatic-rip.

--- Additional comment from rick.richardson on 2009-11-03 06:54:59 EDT ---

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!!!!

--- Additional comment from twaugh on 2009-11-05 11:03:55 EDT ---

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.

--- Additional comment from rick.richardson on 2009-11-05 11:45:18 EDT ---

Thanks!  (One line fix.)

--- Additional comment from twaugh on 2009-11-05 12:03:02 EDT ---

Changing version to 10 as that is also affected.

--- Additional comment from updates on 2009-11-05 12:18:16 EDT ---

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 1 Tim Waugh 2009-11-09 11:05:28 UTC
Incorrect patch has been reverted.

Comment 2 Bug Zapper 2009-11-16 15:09:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Rick Richardson 2010-01-05 21:11:04 UTC
Bump!!!

Comment 4 Fedora Update System 2010-01-19 17:09:37 UTC
foomatic-4.0.3-8.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/foomatic-4.0.3-8.fc12

Comment 5 Fedora Update System 2010-01-21 00:13:53 UTC
foomatic-4.0.3-8.fc12 has been pushed to the Fedora 12 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/F12/FEDORA-2010-0866

Comment 6 Fedora Update System 2010-01-27 01:07:47 UTC
foomatic-4.0.3-8.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.