Commit 5248cd4a authored by Didier Raboud's avatar Didier Raboud

Imported Upstream version 4.0-20090301

parent b26a2184
This diff is collapsed.
......@@ -149,13 +149,13 @@ AC_OUTPUT_FILES:=Makefile makeDefaults makeMan \
foomatic-addpjloptions foomatic-compiledb foomatic-fix-xml \
foomatic-nonumericalids foomatic-replaceoldprinterids \
foomatic-ppd-options foomatic-printermap-to-gutenprint-xml \
foomatic-extract-text foomatic-searchprinter
foomatic-extract-text foomatic-searchprinter foomatic-ppd-to-xml
# User programs and helper programs
BINFILES:=foomatic-printjob foomatic-configure \
foomatic-combo-xml foomatic-perl-data \
foomatic-ppdfile foomatic-compiledb \
foomatic-ppd-options foomatic-searchprinter
foomatic-ppd-options foomatic-searchprinter foomatic-ppd-to-xml
# Administrative commands, only useful for admins
SBINFILES:=foomatic-kitload \
......@@ -252,9 +252,9 @@ clean: lib/Makefile remove-trash
rm -f $(BINFILES:=.1) $(SBINFILES:=.8)
# Remove links from inplace installation
rm -f foomatic-rip foomatic-datafile man
# Remove foomatic-filters-ppds-<version>.tar.gz package
rm -rf foomatic-filters-ppds foomatic-filters-ppds-[0-9]*
rm -rf foomatic-filters-ppds*.tar.gz
# Remove foomatic-ppds-<version>.tar.gz package
rm -rf foomatic-ppds foomatic-ppds-[0-9]*
rm -rf foomatic-ppds*.tar.gz
distclean: clean
rm -f $(AC_OUTPUT_FILES) config.log config.status config.cache
......@@ -333,44 +333,6 @@ lib/Foomatic/ Makefile makeDefaults
./makeDefaults $(INPLACE)
if [ x$(INPLACE) = x--inplace ] ; then touch .testing-stamp ; fi
# Make foomatic-filters-ppds-<version>.tar.gz
filters-ppds: inplace
# Generate the package name
local_libdir=$(LOCAL_LIBDIR); \
packagename=foomatic-filters-ppds-$${local_libdir##*foomatic-db-}; \
( echo $${packagename} | \
perl -e "(<> =~ m:/: ? exit 1 : exit 0)" ) || \
packagename=foomatic-filters-ppds-`date +%Y%m%d`; \
rm -rf $${packagename} ppd; \
mkdir -p $${packagename}/share; \
mkdir -p $${packagename}/bin; \
mkdir -p $${packagename}/share/man/man1; \
./foomatic-compiledb -t ppd -j 1 || exit 1; \
sleep 10; \
( cd ppd; \
for file in `ls -1 *.ppd`; do \
make=$${file%%-*}; \
mkdir -p $$make || exit 1; \
mv $$file $$make/ || exit 1; \
done; \
rm -f *.ppd || exit 1; \
); \
mv ppd $${packagename}/share || exit 1; \
${INSTALL} -m 755 $(LOCAL_FOOMATIC_RIP) $${packagename}/bin || exit 1; \
local_foomatic_rip=$(LOCAL_FOOMATIC_RIP); \
foomatic_filters_root=$${local_foomatic_rip%/*}; \
${INSTALL} -m 755 $${foomatic_filters_root}/foomatic-gswrapper \
$${packagename}/bin || exit 1; \
${INSTALL} -m 644 $${foomatic_filters_root}/*.1 $${packagename}/share/man/man1 \
|| exit 1; \
${INSTALL} -m 755 foomatic-filters-ppds-install $${packagename}/install || exit 1; \
${INSTALL} -m 644 foomatic-filters-ppds-README $${packagename}/README || exit 1; \
${INSTALL} -m 644 COPYING $${packagename}/COPYING || exit 1; \
chmod -R a+rX,go-w $${packagename} || exit 1; \
rm -f $${packagename}.tar.gz || exit 1; \
unset GZIP; \
tar -cf - $${packagename} | gzip > $${packagename}.tar.gz || exit 1
.PHONY: all defaults check-config build install install-bin \
man inplace testing clean inplace-clean testing-clean distclean \
This source diff could not be displayed because it is too large. You can view the blob instead.
Building the foomatic-filters-ppds package
The foomatic-filters-ppds package is a simple way to use Foomatic
Till Kamppeter <>
This package is intended to be a complete but simplified version of
Foomatic which does not need any compilation of C programs nor any Perl
libraries except the standard ones coming with the Perl
interpreter. Also "make" is not needed to use this package.
This file describes how to build the package.
What is required
You need at least
To include support for HPIJS
To include support for Gutenprint
Gutenprint from
How to build
Uncompress all foomatic packages in one directory:
tar -xvzf foomatic-db-engine*.tar.gz
tar -xvzf foomatic-filters*.tar.gz
tar -xvzf foomatic-db*.tar.gz
Build the packages:
cd foomatic-filters*
make_configure # (only if you downloaded from CVS)
make inplace
cd ..
cd foomatic-db-engine*
make_configure # (only if you downloaded from CVS)
make inplace
cd ..
Add support for HPIJS (optional):
tar -xvzf foomatic-db-hoijs*.tar.gz
cd foomatic-db-hoijs*
make_configure # (only if you downloaded from CVS)
make inplace
cd ../foomatic-db-engine*
./foomatic-kitload -f -k ../foomatic-db-hoijs*/db/source/
cd ..
Add support for Gutenprint (optional, <...> is the Gutenprint source
code directory):
cd foomatic-db-engine*
./foomatic-kitload -f -k <...>/src/foomatic/foomatic-db/gutenprint
./foomatic-kitload -f -k <...>/src/foomatic/foomatic-db/gutenprint-ijs
cd ..
Exclude unwished drivers or printers from being packaged by deleting
their XML files:
cd foomatic-db*/db/source
rm -f driver/hpdj.xml
rm -f driver/stp.xml
rm -f driver/lxm3200?.xml
rm -f driver/lxm3200.xml
cd ../../..
Clean up:
cd foomatic-db-engine*
Now build the complete package:
make filters-ppds
This will take some time for getting all PPD files built, as result
one gets a tarball with a name like
This is the ready-to-use package. Read its README file to know how to
use it.
See also the bugtracker at
See also the bugtracker at, product
- Possibility for users to have their personal default options
(.lpoptions file as in CUPS, due to the Foomatic options having the same
......@@ -8,8 +9,6 @@ See also the bugtracker at
- Write a few key lint-like and transforming tools for the xml data.
- Fold foomatic-gswrapper into the foomatic-rip
- Improve ascii support to lpdomatic and pdq files. ASCII should
simply be a matter of observing the ascii bit in the printer $dat
and sending either crlf-ed text or postscriptifying and running
......@@ -19,8 +18,3 @@ See also the bugtracker at
the possibility to pass text directly to the printer, one should
consider the optional use or the "pr" filter.
- PDQ file versioning is still unsatisfactory. I changed from a
checksum to the current timestamp. So now it's sequential, but
changes all every time. Other spoolers' code needs a version story
in the first place.
This diff is collapsed.
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word/])
......@@ -42,7 +42,7 @@ AC_SUBST($1)dnl
dnl [, PATH]])
[for ac_dir in $2
AC_PATH_DIR($1, [$]ac_dir, , $4)
This diff is collapsed.
dnl Process this file with autoconf to produce a configure script.
AC_INIT([footmatic-db-engine], 3.0.2)
AC_INIT([footmatic-db-engine], 4.0.0)
dnl If the user didn't specify the $sysconfdir on the command line, let it
......@@ -112,9 +112,9 @@ fi
dnl dislabel ghostscript check
AC_MSG_CHECKING(GhostScript check)
AC_MSG_CHECKING(Ghostscript check)
AC_ARG_ENABLE( gscheck,
[ --disable-gscheck disable checking GhostScript for security flaw],
[ --disable-gscheck disable checking Ghostscript for security flaw],
if test "$enableval" = "yes" ; then
......@@ -131,19 +131,19 @@ AC_SUBST(GSCHECK)
echo GS "$GS"
if test "$GS" != "GHOSTSCRIPT_NOT_FOUND" -a "$GSCHECK" != "no" ; then
if $GS -q -dBATCH -dNOPAUSE -dSAFER -dPARANOIDSAFER -sDEVICE=nullpage -sOutputFile=- $srcdir/gsQuit ; then
if $GS -q -dBATCH -dNOPAUSE -dSAFER -dPARANOIDSAFER -sDEVICE=nullpage -sOutputFile=- $srcdir/gsTest 1>/dev/null 2>/dev/null ; then
WARNING: '($GS) -dSAFER -dPARANOIDSAFER ' allows files to be read
Please read README.GhostScriptSecurityProblem
and fix your distribution of GhostScript
Please read README.GhostscriptSecurityProblem
and fix your distribution of Ghostscript
OR use:
configure --disable-gscheck
] )
AC_MSG_ERROR(GhostScript security hole found!)
AC_MSG_ERROR(Ghostscript security hole found!)
AC_MSG_RESULT(no GhostScript security hole found)
AC_MSG_RESULT(no Ghostscript security hole found)
AC_MSG_ERROR(Error with: $GS -q -dSAFER -dPARANOIDSAFER -sDEVICE=nullpage -sOutputFile=- )
......@@ -151,7 +151,7 @@ configure --disable-gscheck
AC_MSG_CHECKING(how to redirect GhostScript output to fd 3)
AC_MSG_CHECKING(how to redirect Ghostscript output to fd 3)
if test "$DEVFD3" = "" ; then
v=`( if test -d /dev/fd ; then echo 3 >/dev/fd/3; fi) 3>&1 1>&2`
if test "$v" != "" ; then
......@@ -298,7 +298,7 @@ foomatic-getpjloptions foomatic-addpjloptions
foomatic-compiledb foomatic-fix-xml
foomatic-nonumericalids foomatic-replaceoldprinterids
foomatic-ppd-options foomatic-printermap-to-gutenprint-xml
foomatic-extract-text foomatic-searchprinter
foomatic-extract-text foomatic-searchprinter foomatic-ppd-to-xml
dnl Finished
foomatic-db-engine for Debian
Note that the structure of the OpenPrinting (foomatic) printer
configuration system in Debian (and upstream) has changed from the 2.0
series. There are 3 core packages:
* foomatic-db: Contains the foomatic printer database.
* foomatic-db-engine (this package): Contains the foomatic-configure script.
* foomatic-filters: Contains the filter scripts for various backend
printing systems.
In addition, the new foomatic-db-hpijs package includes the database
entries for printers supported by the HPIJS print filter developed by
Hewlett-Packard for their non-PostScript printers.
The foomatic-bin package is provided for upgrade purposes from
Foomatic 2.0, and can be purged after its dependencies have been
If you want a GUI to configure your printer, you may want to try
"foomatic-gui," a GNOME-based printer configuration tool that works
with Foomatic and all of the spoolers it supports.
** How to configure a queue manually *
The command "foomatic-configure" handles this. Set up the queue as follows:
foomatic-configure -n <queue-name> -N <description> -L <location>
-c <connection> -p <printer> -d <driver> -s <spooler>
queue-name: What you want the queue to be called.
description: A human-readable description of the queue.
location: The physical location of the printer.
connection: How the printer is connected. e.g.:
Parallel port: file:/dev/lp0
USB port: file:/dev/usb/lp0
IPP/CUPS: ipp://
Samba/Windows: smb://WORKGROUP/PC/Canon
JetDirect: socket://
printer: The printer database name. Generally:
driver: The driver backend to use. For most modern printers, one of:
hpijs (if you have foomatic-db-hpijs installed)
gutenprint (if you have foomatic-db-gutenprint installed)
Your best bet on these two items is looking them up in the database at
OpenPrinting ( or looking through the
XML files in /usr/share/foomatic/db/source/printer/
spooler: one of: cups, lpd, lprng, ppd, direct, ppr, pdq, gnulpr
(You can omit the -s option and it will try to guess.)
** Notes for CUPS users **
IMPORTANT: If your printer filter is not working (dumping raw
PostScript to the printer) immediately after setting up a queue with
foomatic-configure, you may need to reload the CUPS daemon. e.g. use:
# invoke-rc.d cupsys reload
There used to be a package called "cupsomatic-ppd" that provided PPD
files for all printers supported by CUPS. A similar package called
"foomatic-filters-ppds" is now available in Debian.
This package saves the step of using foomatic-configure to generate
and install a PPD file for your printer and driver. Perhaps more
importantly, it provides an easy way to select printers from within
CUPS's web-based administration tool. However, it is also 15 MB when
compressed, so is not recommended unless you need to use the CUPS web
interface to initially set up printers.
-- Chris Lawrence <>, Tue Jul 1 19:15:43 2003
Possible future plans:
- Complete the manpages.
- Package foomatic-filters-ppds?
- Provide a simple way to generate custom debian packages containing
datafiles for selected printers/drivers?
This diff is collapsed.
Source: foomatic-db-engine
Section: text
Priority: optional
Maintainer: Chris Lawrence <>
Standards-Version: 3.6.1
Build-Depends: debhelper (>> 4), perl, libxml2-dev
Package: foomatic-db-engine
Architecture: any
Pre-Depends: bash (>= 2.05)
Depends: ${perl:Depends}, ${shlibs:Depends}, foomatic-db, foomatic-filters, wget | curl
Recommends: netcat
Suggests: foomatic-db-hpijs, foomatic-db-gutenprint, foomatic-gui
Conflicts: foomatic-bin (<< 2.9), foomatic-db (<< 2.9)
Replaces: foomatic-bin (<< 2.9)
Description: OpenPrinting printer support - programs
Foomatic is a printing system designed to make it easier to set up
common printers for use with Debian (and other operating systems).
It provides the "glue" between a print spooler (like CUPS or lpr) and
your actual printer, by telling your computer how to process files
sent to the printer.
This package contains the architecture-dependent programs needed to
set up and maintain the foomatic system. You will also need one or
more database packages. The foomatic-db package includes drivers for
most common printers using Ghostscript as the print processor, as
well as some common glue code used in other filter systems.
foomatic-db-hpijs includes support for photo-quality printing with
Hewlett-Packard and some other consumer inkjets using the HPIJS
backend developed by HP.
foomatic-db-gutenprint includes support for photo-quality printing
with many consumer inkjets (including those from HP and Epson).
foomatic-gui provides a GNOME-based setup tool for Foomatic printer
queues using the command-line tools provided in this package.
Home Page:
Package: foomatic-bin
Architecture: all
Depends: foomatic-db (>> 2.9), foomatic-db-hpijs, foomatic-db-engine, foomatic-filters
Description: OpenPrinting printer support - transition package
Release 3.0 of foomatic has reorganized the foomatic printing system.
This package is provided to facilitate a smooth upgrade from Foomatic
2.0 or earlier.
Once you have installed the dependencies of this package, this
package can be safely purged from your system.
Home Page:
This is the Debian prepackaged version of the foomatic printing utils.
It was originally packaged by Manfred Wassmann <>.
It is now maintained by Chris Lawrence <>.
The current package was produced from sources obtained from:
Upstream Authors: Founder: Grant Taylor <>,
Current maintainer: Till Kamppeter <>
"This package and also the other Foomatic packages needed to run this
are under the GPL. See"
On Debian systems, the complete text of the GNU General Public License
can be found in `/usr/share/common-licenses/GPL'.
foomatic-bin for Debian
The foomatic-bin package is provided for upgrade purposes from
Foomatic 2.0; it can safely be purged from your system after its
dependencies have been installed.
For additional information on the Foomatic printing system, please see
/usr/share/doc/foomatic-db-engine/README.Debian or
-- Chris Lawrence <>, Tue, 10 Jun 2003 17:49:37 -0500
In your bug report, please include the following information:
- The spooler you are using (CUPS, lpd, LPRng, etc.).
- The printer make and model.
- Which driver you are using (hpijs, Gutenprint, cdj*, etc.).
- How you installed the printer PPD file (foomatic-configure, manually
following the HOWTO's instructions, foomatic-gui, etc.).
If you are using CUPS and have just installed a new non-PostScript
printer, please try reloading the CUPS daemon before filing a report; use:
# invoke-rc.d cupsys reload
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
config.status: configure
# Add here commands to configure the package.
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
CFLAGS="${CFLAGS}" NC=/bin/nc ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
build: build-stamp
build-stamp: config.status
# Add here commands to compile the package.
#/usr/bin/docbook-to-man debian/foomatic-db-engine.sgml > foomatic-db-engine.1
touch build-stamp
rm -f build-stamp
# Add here commands to clean up after the build process.
-$(MAKE) distclean
rm -f config.log config.cache config.sub config.guess foomatic-ppdload
install: build
dh_clean -k
# Add here commands to install the package into
# debian/foomatic-db-engine.
# Set NOECHO= to get debugging output from the Perl installation
$(MAKE) install DESTDIR=$(CURDIR)/debian/foomatic-db-engine PERL_INSTALLDIRS=vendor VENDORPREFIX=/usr PERLPREFIX=/usr
(cd $(CURDIR)/debian/foomatic-db-engine/usr/share/man/man1; ln -s foomatic-ppdfile.1.gz foomatic-datafile.1.gz)
rm -rf $(CURDIR)/debian/foomatic-db-engine/usr/lib
# Build architecture-independent files here.
binary-indep: build install
dh_testdir -i
dh_testroot -i
rm -f debian/foomatic-bin.manpages debian/foomatic-bin.config debian/foomatic-bin.postinst debian/foomatic-bin.templates
dh_installchangelogs -i ChangeLog
dh_installdocs -i
dh_installexamples -i
# dh_install
dh_install -i debian/presubj usr/share/bug/foomatic-bin
# dh_installmenu
dh_installdebconf -i
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman -i
dh_link -i
dh_strip -i
dh_compress -i
dh_fixperms -i
dh_perl -i
# dh_python
# dh_makeshlibs
dh_installdeb -i
dh_shlibdeps -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installchangelogs -a ChangeLog
dh_installdocs -a
dh_installexamples -a
# dh_install
dh_install -a debian/presubj usr/share/bug/foomatic-db-engine
# dh_installmenu
dh_installdebconf -a
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman -a
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_perl -a
# dh_python
# dh_makeshlibs
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
......@@ -52,8 +52,8 @@ EOF
my $opt = {};
my $debug = 0;
my $exclusions =
{ 'PAPER'=>1, # already handled by GhostScript/PS
'RESOLUTION'=>1, # already handled by GhostScript/PS
{ 'PAPER'=>1, # already handled by Ghostscript/PS
'RESOLUTION'=>1, # already handled by Ghostscript/PS
'LANG'=>1, # only affects printer display
'PERSONALITY'=>1,# the page description language
# is set by the driver
This diff is collapsed.
......@@ -61,34 +61,18 @@ if (($opt_t eq "ppd") || ($opt_t eq "cups") || ($opt_t eq "ppr")) {
print STDERR "\nStoring files in directory $destdir.\n";
mkdir $destdir, 0777 or $force or die "\nCannot make destination directory (If the directory already exists and you\nwant to proceed anyway, use the \"-f\" option)!\n";
# Compute the overview
# Compute the overview (only printer/driver combos which give a PPD)
$db->get_overview(1, ($filetype eq "ppd" ? 2 : 0));
# Which drivers should be processed?
my @driverlist;
if (@ARGV) {
@driverlist = grep {isdrivervalid($_)} @ARGV;
} else {
@driverlist = grep {isdrivervalid($_)} $db->get_driverlist();
# Subprocess to compute all p/d combinations
# Find all printer/driver combinations
my @combos;
if (open COMB, '-|') {
while(<COMB>) {
push (@combos, $_);
close COMB; # wait for child end
} else {
my $driver;
for $driver (@driverlist) {
my $printer;
for $printer ($db->get_printers_for_driver($driver)) {
# Note this combo...
print STDOUT "$printer,$driver\n";
for my $printer (@{$db->{"overview"}}) {
my $poid = $printer->{'id'};
for my $driver (@{$printer->{'drivers'}}) {
if (!@ARGV || Foomatic::DB::member($driver, @ARGV)) {
push (@combos, "$poid,$driver\n");
exit 0; # end of subprocessing
# OK, spawn n manager processes
......@@ -204,15 +188,3 @@ sub spawn_child {
exit (0);
sub isdrivervalid {
my ($driver) = @_;
# Check whether the driver has a valid command line
if ($filetype ne 'xml') {
my $driverentry = $db->get_driver($driver);
if ($driverentry->{'cmd'}) {return 1;}
return 0;
} else {
return 1;
This package contains all PPD files which can be generated from the
Foomatic database, the filter scripts needed to use the PPDs:
"foomatic-rip", "foomatic-gswrapper", and their man pages.
Note: You will need the printer drivers corresponding to the PPDs.
This package is easy to install: simply log in as "root" and run
"./install". Use "./install --prefix /usr" to get the filter scripts
and the man pages into sub-directories of /usr instead of
sub-directories of /usr/local. Use "./install --gzip" to compress the
PPDs (CUPS also understands compressed PPDs).
"./install --help" lists all options of the installer.
Now you can set up print queues as shown on the documentation pages of
the OpenPrinting web site (
But instead of downloading the PPD files from the OpenPrinting web
site you get them from
on your machine. The scripts "foomatic-rip" and "foomatic-gswrapper"
are already correctly installed on your system.
If you are using CUPS, you can also set up a queue for every printer
supported by OpenPrinting with the help of the web interface of
CUPS. To do so and if you are using CUPS 1.1.x or older, you have to
restart the CUPS daemon so that your newly installed PPD files get
known to CUPS. Use one of the following commands, depending on your
killall -HUP cupsd
/etc/init.d/cups restart
sudo /etc/init.d/cups restart
/etc/rc.d/init.d/cups restart
/sbin/init.d/cups restart
/etc/software/init.d/cups restart
The registration of the PPDs will take several minutes. In this time
you will not get back your prompt and you will not be able to access
your CUPS system.
Then go to http://localhost:631/ with an arbitrary web browser and