Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: perthie on August 31, 2009, 06:21:10 PM

Title: Two CUPS Bugs
Post by: perthie on August 31, 2009, 06:21:10 PM
1. The icon for cups.tcel is a 32x32 PNG. In some cases, it will conflict with the adjoining icon, causing the launch bar to scramble.

2. The command "/etc/init.d/cups status" always reports that the CUPS scheduler is not running.  This appears to be caused by TC's use of the busybox "ps" command, which fails to identify the cupsd process.
Title: Re: Two CUPS Bugs
Post by: Juanito on August 31, 2009, 08:35:46 PM
Thanks for the feedback.

I'd started making icons at 30x30 as I've noticed that there is sometimes a problem. I did however think that 32x32 was the standard.

I'm just waiting for cups-4 to be officially released before recompiling the cups and related extensions.
Title: Re: Two CUPS Bugs
Post by: perthie on September 02, 2009, 07:13:37 AM
Here is something to consider. Many printer installer scripts want to use the folders /usr/lib/cups and /usr/share/cups/model.  The TC implementation of CUPS has these in /usr/local.  This means that the scripts have to be modified.

For example, Brother supplies Linux drivers for many of their printers. These will work successfully in TC, but only after some hacking.
Title: Re: Two CUPS Bugs
Post by: Juanito on September 02, 2009, 07:53:08 AM
Almost all of the tinycore extensions are compiled to /usr/local, which would tend to suggest that we either use a symlink to /usr/local or hack the other side of the equation...
Title: Re: Two CUPS Bugs
Post by: perthie on September 02, 2009, 08:46:33 AM
Good call. Symlinking makes the Brother installers work perfectly. The two links are:

/usr/lib/cups -> /usr/local/lib/cups
/usr/share/cups -> /usr/local/share/cups

Title: Re: Two CUPS Bugs
Post by: curaga on September 04, 2009, 12:50:50 PM
cups 1.4 was released Aug 28? Or is it some other version?
Title: Re: Two CUPS Bugs
Post by: Juanito on September 04, 2009, 09:57:24 PM
Already downloaded - I'll start compiling cups-4 soon.

Note that the idea will be to make two extensions - libcups and cups (everything except libcups) so that people who use extensions like, for example, samba without cups do not need to load all of cups due to the compiled dependency on libcups.
Title: Re: Two CUPS Bugs
Post by: Juanito on September 11, 2009, 06:52:36 AM
OK, so I got cups-4 working with the existing version of hplip.

As per the above, I will plan to separate libcups from the cups extension - does anybody have an opinion on the help files and templates associated with the browser interface? I was thinking to leave them in as cups is somewhat non-obvious and users would probably find them helpful...
Title: Re: Two CUPS Bugs
Post by: Juanito on September 11, 2009, 08:08:46 AM
2. The command "/etc/init.d/cups status" always reports that the CUPS scheduler is not running.  This appears to be caused by TC's use of the busybox "ps" command, which fails to identify the cupsd process.

This seems to be due to the following line:
Code: [Select]
pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
Note that when cups is running:
Code: [Select]
$ ps | grep cupsd
 7290 root     /usr/local/sbin/cupsd -C /etc/cups/cupsd.conf

Since tinycore does not have the "match" command, I suspect things fail due to this - note that "sudo /etc/init.d/cups stop" does not work either.

Maybe somebody could suggest a replacement line?
Title: Re: Two CUPS Bugs
Post by: jpeters on September 11, 2009, 11:48:42 AM
try pid=`ps ax | awk '{if (match($3, ".*/cupsd$") || $3 == "cupsd") print $1}'`
Title: Re: Two CUPS Bugs
Post by: Juanito on September 11, 2009, 12:01:25 PM
That does indeed fix it - excellent, thanks  :)
Title: Re: Two CUPS Bugs
Post by: ^thehatsrule^ on September 11, 2009, 04:01:56 PM
Usually `pidof` can be used
Title: Re: Two CUPS Bugs
Post by: Juanito on September 12, 2009, 07:04:48 AM
For example, Brother supplies Linux drivers for many of their printers. These will work successfully in TC, but only after some hacking.

The existing cups extension contains foomatic-rip as I initially needed this to use the hpijs_hpoj extension. The hplip extension uses it's own version of foomatic, so it would not neccessarily be required (for me at least) in a new version of cups.

Do the Brother printer drivers require foomatic-rip?

I was thinking of dropping foomatic-rip or compiling it as a separate extension - if the Brother drivers do not require foomatic, it would make sense for it to be a separate extension. This also has the benefit of removing the perl5 dependency...

Title: Re: Two CUPS Bugs
Post by: perthie on September 12, 2009, 09:01:44 AM
The problem with Brother printers has been solved. Their installers use the Debian post-install script to create the key files (the filter and the PPD) and want to use paths like /usr/lib/cups. So it's just a matter of symlinking the correct paths, running the installer and extracting the driver files into a TCE. After that, the symlinks are not needed.  Unfortunately, each Brother model needs its own TCE.

The Brother drivers do not use foomatic-rip. My sense of foomatic-rip is that it's been made largely obsolete by newer packages like Gutenprint and HPLIP.  However, you still need it to use the built-in Ghostscript drivers. FWIW, there is a new compiled version of foomatic-rip that eliminates the need for Perl.

I've had a look at CUPS 1.4 - lots of changes! I couldn't get it to compile so the Printer Maintenance option would show.

Title: Re: Two CUPS Bugs
Post by: Juanito on September 12, 2009, 09:37:47 AM
The Brother drivers do not use foomatic-rip. My sense of foomatic-rip is that it's been made largely obsolete by newer packages like Gutenprint and HPLIP.  However, you still need it to use the built-in Ghostscript drivers. FWIW, there is a new compiled version of foomatic-rip that eliminates the need for Perl.

I compiled the latest foomatic-rip, as you say it doen't need perl, but it does need libgs (also non-negligible in size).

Quote
I've had a look at CUPS 1.4 - lots of changes! I couldn't get it to compile so the Printer Maintenance option would show.

I have a drop-down box with things like "print test page" showing - is this what you mean?
Title: Re: Two CUPS Bugs
Post by: perthie on September 12, 2009, 12:35:08 PM
My mistake. I didn't have usb-utils installed, so I didn't get a full compile.

Title: Re: Two CUPS Bugs
Post by: Juanito on September 14, 2009, 06:44:26 AM
Compiling the latest version of hplip and using cups-1.4, I've managed to print without foomatic-rip/foomatic-rip-hplip and without a ppd installed.

It seems hpcups.drv and/or ../filter/hpcups somehow makes up a driver/ppd dynamically.

So - no perl5 dep and no ppd - happy days  :)

..but still plenty of testing to do.
Title: Re: Two CUPS Bugs
Post by: perthie on September 14, 2009, 07:11:58 AM
This is the same technique as Gutenprint's dynamic PPDs. There are two key files something like:

Code: [Select]
/usr/local/lib/cups/driver/drv
CUPS runs it to generate HP PPDs on-the-fly. I believe that it is now included in CUPS 1.4.

Code: [Select]
/usr/local/share/cups/drv/hp/hpijs.drv
This is the file of printer information that CUPS uses to create the PPDs. It will be coming from your HPLIP package.

If foomatic-rip is replaced with the compiled version, maybe Perl isn't needed at all to set up a printer.

Title: Re: Two CUPS Bugs
Post by: Juanito on September 14, 2009, 11:11:35 AM
If foomatic-rip is replaced with the compiled version, maybe Perl isn't needed at all to set up a printer.

I tested the C version of foomatic-rip with an old version of hplip and it seemed to work OK, so I'll post it once I get everything tidied away.