[lsb-discuss] Re: Question of LSB DDK for printing

Till Kamppeter till.kamppeter at gmail.com
Tue Feb 12 09:53:11 PST 2008


Tatsuya Saito wrote:
> Hi, Till-san
> 
> I develop distribution independent driver package for printer driver.
> Of course, I red your good work "WritingAndPackagingPrinterDrivers"[1] to do
> it.
> Now I have some problems and a question on this document and rpmmacros for
> LSB DDK[2].
> I hope you to help.
> 
> 1) %adujst_ppds

Whas it really written that way? it must be "%adjust_ppds".

>   I try to use it, but didn't add absolute path on "*cupsFilter".
>   You wrote 
>     It also adds absolute paths to the filters in the "*cupsFilter" lines 
>     and in the "*FoomaticRIPCommandLine" lines.
>   in the document.
> 

Here I must see your spec file and your package source. Can you send me 
your source RPM? Or at least the spec file and the PPDs where the paths 
are supposed to be inserted?

>   On other hand, I can run my filter because %set_cups_links links 
>   All files in /opt/supplier/cups/lib/filter into system's CUPS filter
> directory.
>   So I think rpmmacros does not need to add absolute path in %adujst_ppds.
> 

These are two alternative methods where the driver developer can choose.

> 2) %remove_ppd_links
>   %remove_ppd_links delete symlink for ppds.
>   If other driver's ppds are in %_cupsppd(/opt/supplier/ppds/),
>   this macro also delete link.
>   In this case, CUPS cannot search other driver's ppds....
>   I think this macro needs checking existence of ppds 
>   in /opt/supplier/ppds/ before deleting.
> 

Good idea, thanks for reporting the problem.

> 3) %remove_ppd_links on rpmmacros
>   Following lines in %remove_ppd_links.
>     # Remove link to PPD file directory \
>     [ -h $ppddir/%{name} ] && rm -f $ppddir/%{name} \
>   
>   But $set_ppd_links to make symlink for ppd is written follow:
>     # Make PPD files available to CUPS \
>     ln -s %{_cupsppd} $ppddir/%{supplier} 2>/dev/null || true \
> 
>   The symlink name should be adjusted $ppddir/%{supplier}.
> 

Thanks, I will correct that.

> 4) %set_opt_paths and %init_scriptlet
>   My spec file includes these macros, but not adds /opt/supplier/bin
>   to PATH env after install.
>   It means my executable modules in /opt/supplier/bin cannot run...
> 

You must log out and log in again, or reboot to make sure that it is in 
the PATH for the whole system.

> 5) Testing on buildenv or LSB simple implementation
>   For testing, I try to print some postscript on lsb-buildenv.
>   Of course, I red your document and LSB tutorial and make environment
>   with LSB3.1 rpms and LSB DDK.
>   But I have following lpr command error...
>     lpr: connect: No such file or directory
>     jobs queued, but cannot start daemon.
>   I thought it may be my driver's problem, so tried splix driver[3] on 
>   same environment. I failed too...
>   Do you know this error case with LSB DDK?

Make sure that "lpr" is really the one of CUPS. For that the LSB package 
of CUPS must be installed in the build environment. To use printer 
drivers in the build environment the CUPS daemon of the build 
environment must run and not the one of the system. Stop the system's 
CUPS daemon by doing "/etc/init.d/cups stop" in a terminal where you did 
NOT chroot into the build environment. Then do "/etc/init.d/cups start" 
in a terminal where you DID chroot into the build environment. Note that 
if you print from your system, outside the build environment, that then 
also the CUPS daemon of the build environment is used (this way you can 
test sending print jobs from your system's applications through the 
printer drivers which you are testing).


    Till



More information about the lsb-discuss mailing list