Bug 512739 - foomatic ppd's should avoid perl
foomatic ppd's should avoid perl
Product: Fedora
Classification: Fedora
Component: foomatic-db (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
Depends On: 461234
Blocks: F12Target
  Show dependency treegraph
Reported: 2009-07-20 11:59 EDT by Adam Jackson
Modified: 2009-08-18 04:51 EDT (History)
3 users (show)

See Also:
Fixed In Version: 4.0-3.20090702.fc12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-08-18 04:51:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Adam Jackson 2009-07-20 11:59:45 EDT
Description of problem:

Something like a quarter of the PPDs invoke perl.  Almost all of these appear to be for stream editing to select paper size or tray, and can be trivially replaced with the equivalent sed invocation.  perl is something like 30M on disk, so this is non-trivial space for live media.

As an example, /usr/share/foomatic/db/source/PPD/Gestetner/PXL/Gestetner-Pro_906EX_PXL.ppd.gz contains:

*FoomaticRIPOptionSetting PageSize=A5: " -sPAPERSIZE=a5 -sOutputFile=- - | perl -p -e "s/\xf8\x28\xc0.\xf8\x25/\xf8\x28\xc0\x0f\xf8\x25/g""

The 'perl -p -e' here can be trivially replaced with 'sed'.
Comment 1 Matthias Clasen 2009-07-30 02:15:32 EDT
foomatic is now the last package that pulls perl onto the live cd. So getting this done would give us _big_ space savings.
Comment 2 Tim Waugh 2009-07-30 04:48:54 EDT
Examining this more closely I think it is a much bigger project than I first thought.  There are two types of PPD available from foomatic:

1. the 'manufacturer's own' PPD files, of which the one quoted is meant to be an example,
2. PPD files generated from the XML data

To actually get one of the generated PPD files you need to have invoked the foomatic CUPS driver (/usr/lib/cups/driver/foomatic, i.e. /usr/bin/foomatic-ppdfile), which is written in perl. (CUPS will do this for you as part of adding a printer.)

If you already had PPDs set up, everything you need is in C except for the filtration parts, which of course can be fixed but they are currently shipped in the same package, which will still require perl due to the foomatic CUPS driver.

So aside from re-implementing all of foomatic-db-engine in C there are two options to look at:

1. Splitting out the foomatic-db parts from the foomatic package, so the PPDs are available in a separate package which can go on the Live CD -- as in bug #461234.

2. Just not shipping foomatic on the Live CD and dropping the 'Requires: foomatic' line from system-config-printer.

The question is: is it too late for me to split foomatic into two separate source packages?
Comment 3 Matthias Clasen 2009-07-31 10:17:16 EDT
I've being doing several package splits over the last few days to help the live cd. So I think you are definitively not too late to do this.
Comment 4 Tim Waugh 2009-08-18 04:51:18 EDT

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