From 59e53b05f9acad81f8d3284fa02fb3322fbc94c4 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Sep 05 2008 12:51:03 +0000 Subject: Sync to rawhide package. --- diff --git a/.cvsignore b/.cvsignore index 1148fee..5d5a592 100644 --- a/.cvsignore +++ b/.cvsignore @@ -49,3 +49,7 @@ foomatic-filters-3.0-20071218.tar.gz foomatic-db-engine-3.0-20071218.tar.gz foomatic-db-3.0-20071218.tar.gz foomatic-db-hpijs-20071218.tar.gz +foomatic-db-engine-3.0-20080904.tar.gz +foomatic-filters-3.0-20080904.tar.gz +foomatic-db-3.0-20080904.tar.gz +foomatic-db-hpijs-20080904.tar.gz diff --git a/foomatic-2.0.2-fontpath.patch b/foomatic-2.0.2-fontpath.patch index f0ef360..243cfd2 100644 --- a/foomatic-2.0.2-fontpath.patch +++ b/foomatic-2.0.2-fontpath.patch @@ -1,10 +1,11 @@ ---- foomatic-filters-3.0-20070614/foomatic-gswrapper.in.fontpath 2007-06-14 08:20:15.000000000 +0100 -+++ foomatic-filters-3.0-20070614/foomatic-gswrapper.in 2007-06-14 10:33:10.000000000 +0100 -@@ -24,6 +24,7 @@ +diff -up foomatic-filters-3.0-20080710/foomatic-gswrapper.in.fontpath foomatic-filters-3.0-20080710/foomatic-gswrapper.in +--- foomatic-filters-3.0-20080710/foomatic-gswrapper.in.fontpath 2008-07-10 08:20:17.000000000 +0100 ++++ foomatic-filters-3.0-20080710/foomatic-gswrapper.in 2008-09-02 13:14:12.000000000 +0100 +@@ -24,6 +24,7 @@ my $execpath = "@EXECPATH@"; # Get execution path from config file $execpath = $conf{execpath} if defined(%conf) and defined $conf{execpath}; $ENV{'PATH'} = $execpath; +$ENV{'GS_FONTPATH'} = '/usr/share/fonts'; - # Check whether we have a GhostScript version with redirection of the + # Check whether we have a Ghostscript version with redirection of the # standard output of the PostScript programs via '-sstdout=%stderr' diff --git a/foomatic-459847.patch b/foomatic-459847.patch deleted file mode 100644 index 3763c2e..0000000 --- a/foomatic-459847.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up foomatic-db-20080211/db/source/printer/HP-LaserJet_4345_MFP.xml.459847 foomatic-db-20080211/db/source/printer/HP-LaserJet_4345_MFP.xml ---- foomatic-db-20080211/db/source/printer/HP-LaserJet_4345_MFP.xml.459847 2008-09-02 11:06:58.000000000 +0100 -+++ foomatic-db-20080211/db/source/printer/HP-LaserJet_4345_MFP.xml 2008-09-02 11:07:27.000000000 +0100 -@@ -1,6 +1,6 @@ - - HP -- LaserJet 4345 mfp -+ LaserJet 4345 MFP - - - diff --git a/foomatic-ampathxml.patch b/foomatic-ampathxml.patch deleted file mode 100644 index 6f51984..0000000 --- a/foomatic-ampathxml.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- foomatic-db-engine-3.0.1/acinclude.m4.ampathxml 2002-10-11 02:16:34.000000000 +0100 -+++ foomatic-db-engine-3.0.1/acinclude.m4 2004-08-13 18:28:13.166722758 +0100 -@@ -1,3 +1,4 @@ -+AC_DEFUN([AM_PATH_XML],[exit 1]) - dnl AC_PATH_DIR(VARIABLE, DIR-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]]) - AC_DEFUN(AC_PATH_DIR, - [# Extract the first word of "$2", so it can be a program name with args. ---- foomatic-db-engine-3.0.1/Makefile.in.ampathxml 2004-08-13 21:18:44.303809139 +0100 -+++ foomatic-db-engine-3.0.1/Makefile.in 2004-08-13 21:19:12.302452644 +0100 -@@ -53,7 +53,7 @@ - ## C settings - CC=@CC@ - CFLAGS=@CFLAGS@ --XML_CFLAGS=@XML_CFLAGS@ -+XML_CFLAGS=@XML_CPPFLAGS@ - XML_LIBS=@XML_LIBS@ - - ## Settings for Perl diff --git a/foomatic-busyloop.patch b/foomatic-busyloop.patch deleted file mode 100644 index aaa0df3..0000000 --- a/foomatic-busyloop.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -U0 foomatic-db-engine-3.0-20080211/ChangeLog.busyloop foomatic-db-engine-3.0-20080211/ChangeLog -diff -up foomatic-db-engine-3.0-20080211/lib/Foomatic/DB.pm.busyloop foomatic-db-engine-3.0-20080211/lib/Foomatic/DB.pm ---- foomatic-db-engine-3.0-20080211/lib/Foomatic/DB.pm.busyloop 2008-02-11 21:14:29.000000000 +0000 -+++ foomatic-db-engine-3.0-20080211/lib/Foomatic/DB.pm 2008-09-02 13:19:24.000000000 +0100 -@@ -4180,8 +4180,10 @@ EOFPGSZ - # ShortNickName too long? Remove last words from model name. - $parts{'model'} =~ - s/(?<=[a-zA-Z0-9])[^a-zA-Z0-9]+[a-zA-Z0-9]*$//; -- $shortnickname = -+ my $new = - "$parts{'make'} $parts{'model'}, $parts{'driver'}"; -+ last if ($new == $shortnickname); -+ $shortnickname = $new; - } - if (length($shortnickname) > 31) { - # If nothing else helps ... diff --git a/foomatic-clean-up-on-cancel.patch b/foomatic-clean-up-on-cancel.patch deleted file mode 100644 index 2dbd185..0000000 --- a/foomatic-clean-up-on-cancel.patch +++ /dev/null @@ -1,312 +0,0 @@ -diff -up foomatic-filters-3.0-20080211/foomatic-rip.in.clean-up-on-cancel foomatic-filters-3.0-20080211/foomatic-rip.in ---- foomatic-filters-3.0-20080211/foomatic-rip.in.clean-up-on-cancel 2008-02-11 21:16:36.000000000 +0000 -+++ foomatic-filters-3.0-20080211/foomatic-rip.in 2008-03-13 11:42:35.000000000 +0000 -@@ -155,19 +155,19 @@ my $EXIT_PRNERR_NORETRY = 2; # printer - my $EXIT_JOBERR = 3; # job is defective - my $EXIT_SIGNAL = 4; # terminated after catching signal - my $EXIT_ENGAGED = 5; # printer is otherwise engaged (connection -- # refused) -+ # refused) - my $EXIT_STARVED = 6; # starved for system resources - my $EXIT_PRNERR_NORETRY_ACCESS_DENIED = 7; # bad password? bad port -- # permissions? -+ # permissions? - my $EXIT_PRNERR_NOT_RESPONDING = 8; # just doesn't answer at all -- # (turned off?) -+ # (turned off?) - my $EXIT_PRNERR_NORETRY_BAD_SETTINGS = 9; # interface settings are invalid - my $EXIT_PRNERR_NO_SUCH_ADDRESS = 10; # address lookup failed, may be -- # transient -+ # transient - my $EXIT_PRNERR_NORETRY_NO_SUCH_ADDRESS = 11; # address lookup failed, not -- # transient -+ # transient - my $EXIT_INCAPABLE = 50; # printer wants (lacks) features -- # or resources -+ # or resources - # Standard Unix signal names - #my SIGHUP = 1; - #my SIGINT = 2; -@@ -181,6 +181,21 @@ my $EXIT_INCAPABLE = 50; - - my $ESPIPE = 29; # the errno value when seeking a pipe or socket - -+# The modern_shell() function will register the PIDs of all shell calls, -+# so that rip_die() can kill these processes -+my %pids; -+ -+# $kidgeneration stays 0 for the main process, child processes of the -+# main process get $kidgeneration = 1, their children 2, ... -+my $kidgeneration = 0; -+ -+# Catch signals -+my $retval = $EXIT_PRINTED; -+use sigtrap qw(handler set_exit_canceled normal-signals -+ handler set_exit_error error-signals -+ handler set_exit_prnerr USR1 -+ handler set_exit_prnerr_noretry USR2 -+ handler set_exit_engaged TTIN); - - - ## Some important variables -@@ -2153,7 +2168,7 @@ if ($debug) { - } - - -- -+ - ## From here on we have to repeat all the rest of the program for - ## every file to print - -@@ -3538,13 +3553,8 @@ sub getrendererhandle { - - print $logh "${added_lf}Starting renderer\n"; - -- # Catch signals -+ # Reset return value of the renderer - $retval = $EXIT_PRINTED; -- use sigtrap qw(handler set_exit_prnerr USR1 -- handler set_exit_prnerr_noretry USR2 -- handler set_exit_engaged TTIN); -- -- # Variables for the kid processes reporting their state - - # Set up a pipe for the kids to pass their exit stat to the main process - pipe KID_MESSAGE, KID_MESSAGE_IN; -@@ -3585,6 +3595,8 @@ sub getrendererhandle { - return ( *KID3, $kid3 ); - - } else { -+ $kidgeneration += 1; -+ - close KID3; - - pipe KID4_IN, KID4; -@@ -3774,6 +3786,8 @@ sub getrendererhandle { - print $logh "KID3 finished\n"; - exit $EXIT_PRINTED; - } else { -+ $kidgeneration += 1; -+ - # child, trailing task on the pipe; we write jcl stuff - close KID4; - close KID3_IN; -@@ -4112,6 +4126,8 @@ sub getfileconverterhandle { - return ( *KID1_IN, $kid1 ); - - } else { -+ $kidgeneration += 1; -+ - # We go on reading the job data and stuff it into the file - # converter - close KID1_IN; -@@ -4253,6 +4269,8 @@ sub getfileconverterhandle { - print $logh "KID1 finished\n"; - exit $EXIT_PRINTED; - } else { -+ $kidgeneration += 1; -+ - # child, first part of the pipe, reading in the data from - # standard input and stuffing it into the file converter - # after putting in the already read data (in $alreadyread) -@@ -4580,6 +4598,8 @@ sub getdocgeneratorhandle { - return ( *KID0_IN, $kid0 ); - } - -+ $kidgeneration += 1; -+ - # we are the kid; we generate the documentation page - - close KID0_IN; -@@ -4867,66 +4887,100 @@ sub rip_die { - my $errmsg = "$!"; - my $errcod = $! + 0; - -- # Close the documentation page generator (if it was used) -- if ($docgeneratorpid) { -- if ($kid0) { -- print $logh "Killing process $kid0 (KID0)\n"; -- kill(9, $kid0); -+ # Log that we are dying ... -+ print $logh "Process dying with \"$message\", exit stat: $exitstat\n\terror: $errmsg ($errcod)\n"; -+ -+ print $logh "Cleaning up ...\n"; -+ foreach my $killsignal (15, 9) { -+ -+ # Kill all registered subshells -+ foreach my $pid (keys %pids) { -+ print $logh "Killing process $pid ($pids{$pid}) and its subprocesses with signal $killsignal\n"; -+ # This call kills the process group with group ID $pid, the -+ # group which was formed from the initial process $pid which -+ # contains $pid and all its subprocesses -+ kill(-$killsignal, $pid); -+ # If the system does not support process groups and therefore -+ # the call above does not kill anything, kill at least $pid -+ kill($killsignal, $pid); - } -- $docgeneratorpid = 0; -- } - -- # Close the file converter (if it was used) -- if ($fileconverterpid) { -+ # Close the documentation page generator (if it was used) -+ if ($kid0) { -+ print $logh "Killing process $kid0 (KID0) with signal $killsignal\n"; -+ kill($killsignal, $kid0); -+ } -+ -+ # Close the file converter (if it was used) - if ($kid2) { -- print $logh "Killing process $kid2 (KID2)\n"; -- kill(9, $kid2); -+ print $logh "Killing process $kid2 (KID2) with signal $killsignal\n"; -+ kill($killsignal, $kid2); - } - if ($kid1) { -- print $logh "Killing process $kid1 (KID1)\n"; -- kill(9, $kid1); -+ print $logh "Killing process $kid1 (KID1) with signal $killsignal\n"; -+ kill($killsignal, $kid1); - } -- $fileconverterpid = 0; -- } - -- # Close the renderer -- if ($rendererpid) { -+ # Close the renderer - if ($kid4) { -- print $logh "Killing process $kid4 (KID4)\n"; -- kill(9, $kid4); -+ print $logh "Killing process $kid4 (KID4) with signal $killsignal\n"; -+ kill($killsignal, $kid4); - } - if ($kid3) { -- print $logh "Killing process $kid3 (KID3)\n"; -- kill(9, $kid3); -+ print $logh "Killing process $kid3 (KID3) with signal $killsignal\n"; -+ kill($killsignal, $kid3); - } -- $rendererpid = 0; -+ -+ # Wait some time for the processes to close -+ sleep(5 - $kidgeneration) if $killsignal != 9; - } - -- print $logh "Process dying with \"$message\", exit stat: $exitstat\n\terror: $errmsg ($errcod)\n"; -- if ($spooler eq 'ppr_int') { -- # Special error handling for PPR intefaces -- $message =~ s/\\/\\\\/; -- $message =~ s/\"/\\\"/; -- my @messagelines = split("\n", $message); -- my $firstline = "TRUE"; -- for my $line (@messagelines) { -- modern_system("lib/alert $printer $firstline \"$line\""); -- $firstline = "FALSE"; -+ # Do the debug dump and the PPR error handling only from the main process -+ if ($kidgeneration == 0) { # We are the main process -+ -+ if ($spooler eq 'ppr_int') { -+ # Special error handling for PPR intefaces -+ $message =~ s/\\/\\\\/; -+ $message =~ s/\"/\\\"/; -+ my @messagelines = split("\n", $message); -+ my $firstline = "TRUE"; -+ for my $line (@messagelines) { -+ modern_system("lib/alert $printer $firstline \"$line\""); -+ $firstline = "FALSE"; -+ } -+ } else { -+ print STDERR $message . "\n"; -+ } -+ if ($debug) { -+ use Data::Dumper; -+ local $Data::Dumper::Purity=1; -+ local $Data::Dumper::Indent=1; -+ print $logh Dumper($dat); - } -- } else { -- print STDERR $message . "\n"; -- } -- if ($debug) { -- use Data::Dumper; -- local $Data::Dumper::Purity=1; -- local $Data::Dumper::Indent=1; -- print $logh Dumper($dat); - } -+ -+ ## The End -+ print $logh "${added_lf}Closing foomatic-rip.\n"; -+ close $logh; -+ - exit $exitstat; - } - - # Signal handling routines - -+sub do_nothing { -+} -+ -+sub set_exit_canceled { -+ $retval = $EXIT_PRINTED; -+ rip_die ("Caught termination signal: Job canceled", $retval); -+} -+ -+sub set_exit_error { -+ $retval = $EXIT_SIGNAL; -+ rip_die ("Caught error signal: Error in renderer, driver, or foomatic-rip", $retval); -+} -+ - sub set_exit_prnerr { - $retval = $EXIT_PRNERR; - } -@@ -6592,20 +6646,36 @@ sub read_attribute_file { - sub modern_system { - my (@list) = @_; - -- if (($modern_shell =~ /.+/) && ($modern_shell ne '/bin/sh')) { -- # a "modern" shell other than the default shell was specified -- my $pid = fork(); -- -- ($pid < 0) && die "failed to fork()"; -- -- if ($pid == 0) { # child, execute the commands under a modern shell -- exec($modern_shell, "-c", @list); -- die "exec($modern_shell, \"-c\", @list);"; -- } else { # parent, wait for the child -- waitpid($pid, 0); -- } -- } else { # the system shell is "modern" enough. -- system(@list); -+ if ($modern_shell |~ /.+/) { -+ # No "modern" shell other than the default shell was specified -+ $modern_shell = '/bin/sh'; -+ } -+ -+ my $pid = fork(); -+ ($pid < 0) && die "failed to fork()"; -+ -+ if ($pid == 0) { # child, execute the commands under a modern shell -+ # If the system supports process groups, we create a process -+ # group of this subshell process. All the children of this -+ # process (calls of external filters, renderers, or drivers) -+ # will be members of this process group and so by killing this -+ # process group we can kill all subprocesses and so we can -+ # cleanly cancel print jobs -+ eval("setpgrp()"); -+ # Stop catching signals -+ #use sigtrap qw(die normal-signals error-signals -+ # handler do_nothing USR1 USR2 TTIN); -+ exec($modern_shell, "-c", @list); -+ rip_die("exec($modern_shell, \"-c\", @list);", -+ $EXIT_PRNERR_NORETRY_BAD_SETTINGS); -+ } else { # parent, register child's PID, wait for the child, and -+ # unregister the PID -+ $pids{$pid} = substr(join(" ", @list), 0, 100) . -+ (length(join(" ", @list)) > 100 ? "..." : ""); -+ print $logh "Starting process $pid: \"$pids{$pid}\"\n"; -+ waitpid($pid, 0); -+ print $logh "Process $pid ending: \"$pids{$pid}\"\n"; -+ delete $pids{$pid}; - } - } - diff --git a/foomatic-db-engine-xml-cflags.patch b/foomatic-db-engine-xml-cflags.patch deleted file mode 100644 index 633bf01..0000000 --- a/foomatic-db-engine-xml-cflags.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- foomatic-db-engine-3.0.2/Makefile.in.xml2 2004-09-24 09:00:41.126334697 +0100 -+++ foomatic-db-engine-3.0.2/Makefile.in 2004-09-24 09:09:37.677826957 +0100 -@@ -53,7 +53,7 @@ - ## C settings - CC=@CC@ - CFLAGS=@CFLAGS@ --XML_CFLAGS=@XML_CPPFLAGS@ -+XML_CFLAGS=@XML_CFLAGS@ - XML_LIBS=@XML_LIBS@ - - ## Settings for Perl diff --git a/foomatic-filters-libdir.patch b/foomatic-filters-libdir.patch index 79327e3..feca5e8 100644 --- a/foomatic-filters-libdir.patch +++ b/foomatic-filters-libdir.patch @@ -1,6 +1,7 @@ ---- foomatic-filters-3.0-20070614/configure.ac.libdir 2007-06-14 08:20:15.000000000 +0100 -+++ foomatic-filters-3.0-20070614/configure.ac 2007-06-14 10:30:50.000000000 +0100 -@@ -13,7 +13,7 @@ +diff -up foomatic-filters-3.0-20080710/configure.ac.libdir foomatic-filters-3.0-20080710/configure.ac +--- foomatic-filters-3.0-20080710/configure.ac.libdir 2008-07-10 08:20:16.000000000 +0100 ++++ foomatic-filters-3.0-20080710/configure.ac 2008-09-02 13:13:36.000000000 +0100 +@@ -13,7 +13,7 @@ AC_PROG_LN_S AC_PROG_MAKE_SET ETCSEARCHPATH=${prefix}/etc:/usr/etc:/usr/local/etc @@ -9,7 +10,7 @@ dnl Get the operating system and version number... uname=`uname` -@@ -47,13 +47,13 @@ +@@ -47,13 +47,13 @@ dnl Check for /usr/lib/cups/backend AC_PATH_DIR(CUPS_BACKENDS,cups/backend,/usr/lib/cups/backend,$LIBSEARCHPATH) dnl Check for /usr/lib/ppr diff --git a/foomatic-hpclj9500mfp.patch b/foomatic-hpclj9500mfp.patch deleted file mode 100644 index fa66c68..0000000 --- a/foomatic-hpclj9500mfp.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -U0 foomatic-db-20080211/ChangeLog.hpclj9500mfp foomatic-db-20080211/ChangeLog -diff -up foomatic-db-20080211/db/source/printer/HP-Color_LaserJet_9500_MFP.xml.hpclj9500mfp foomatic-db-20080211/db/source/printer/HP-Color_LaserJet_9500_MFP.xml ---- foomatic-db-20080211/db/source/printer/HP-Color_LaserJet_9500_MFP.xml.hpclj9500mfp 2008-09-02 16:47:46.000000000 +0100 -+++ foomatic-db-20080211/db/source/printer/HP-Color_LaserJet_9500_MFP.xml 2008-09-02 16:48:14.000000000 +0100 -@@ -1,6 +1,6 @@ - - HP -- ColorLaserJet 9500 MFP -+ Color LaserJet 9500 MFP - - - diff --git a/foomatic-ieee1284.patch b/foomatic-ieee1284.patch deleted file mode 100644 index 1302d8b..0000000 --- a/foomatic-ieee1284.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- foomatic-db-20070614/db/source/printer/HP-PhotoSmart_380.xml.ieee1284 2007-06-14 11:55:00.000000000 +0100 -+++ foomatic-db-20070614/db/source/printer/HP-PhotoSmart_380.xml 2007-06-14 11:55:13.000000000 +0100 -@@ -24,7 +24,13 @@ - - - -- -+ -+ HP -+ Photosmart 380 series_BT -+ 385 -+ PCL,DW-PCL,DESKJET,DYN -+ -+ - A - hpijs - diff --git a/foomatic-ppdload-ppd.patch b/foomatic-ppdload-ppd.patch deleted file mode 100644 index d8d20fc..0000000 --- a/foomatic-ppdload-ppd.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- foomatic-db-20031218/db/source/driver/ppd.xml.ppdload-ppd 2003-12-19 16:28:30.329536790 +0000 -+++ foomatic-db-20031218/db/source/driver/ppd.xml 2003-12-19 16:19:55.317656589 +0000 -@@ -0,0 +1,16 @@ -+ -+ Postscript PPD -+ http://www.adobe.com/products/printerdrivers/winppd.html -+ -+ -+ cat %A%Z -+ -+ -+ PPD Postscript driver. You can use foomatic-ppdload to add ppd information -+for a particular printer into the foomatic database. Then, when you use that printer -+together with this driver with any Foomatic backend, the options defined in the PPD -+file will be available. -+ -+ -+ -+ diff --git a/foomatic-ppdload.patch b/foomatic-ppdload.patch deleted file mode 100644 index d741e0f..0000000 --- a/foomatic-ppdload.patch +++ /dev/null @@ -1,201 +0,0 @@ ---- foomatic-db-engine-3.0-20031217/foomatic-ppdload.in.ppdload 2003-12-19 15:26:40.360620848 +0000 -+++ foomatic-db-engine-3.0-20031217/foomatic-ppdload.in 2003-12-19 15:26:56.289725866 +0000 -@@ -0,0 +1,118 @@ -+#!@PERL@ -+ -+use Getopt::Std; -+getopts("hdR:"); -+help() if $opt_h; -+ -+use Foomatic::PPD; -+use Foomatic::Defaults; -+ -+my $file; -+my $printer; -+ -+if ($opt_R) { # Remove entry -+ $printer = $opt_R; -+} else { # Add entry -+ $file = $ARGV[0]; -+ $printer = $ARGV[1]; -+} -+ -+if (!$opt_R) { # Add entry -+ -+ if (! -f "$libdir/db/source/printer/$printer.xml") { -+ die "Printer $printer does not seem to exist in the database!\n"; -+ } -+ -+ if (! -f $file) { -+ die "The PPD file you specified, $file, does not seem to exist!\n"; -+ } -+ -+ # Load the PPD -+ my $p = new Foomatic::PPD $file, $printer; -+ -+ if ($opt_d) { -+ # Parser PPD structure dump -+ use Data::Dumper; -+ local $Data::Dumper::Purity=1; -+ local $Data::Dumper::Indent=1; -+ print Dumper($p); -+ } else { -+ # Normal behavior, save as various option files by ID -+ my @opts = $p->foo_options(); -+ for (@opts) { -+ my ($id, $xml) = ($_->{'id'}, $_->{'xml'}); -+ -+ my $ofile = "$libdir/db/source/opt/$id.xml"; -+ open TMP, ">$ofile" or die "Cannot write $ofile!\n"; -+ print STDERR "Writing $ofile\n"; -+ print TMP join('',@{$xml}); -+ close TMP; -+ } -+ -+ # Add this printer to the ppd driver -+ -+ # Read the driver entry file -+ open PPDENTRY, "< $libdir/db/source/driver/ppd.xml" or -+ die "Cannot read $libdir/db/source/driver/ppd.xml!\n"; -+ print STDERR "Reading $libdir/db/source/driver/ppd.xml\n"; -+ $ppdentry = join('', ); -+ close PPDENTRY; -+ -+ # Either we've got it already -+ my $found = -+ ($ppdentry =~ m![\s\n]*printer/$printer[\s\n]*!s); -+ -+ # Or we need to append a new item and write the file -+ if (! $found) { -+ $ppdentry =~ s!^(\s*)!$1 \n$1 printer/$printer\n$1 \n$1!m; -+ open PPDENTRY, "> $libdir/db/source/driver/ppd.xml" or -+ die "Cannot write $libdir/db/source/driver/ppd.xml!\n"; -+ print STDERR "Writing $libdir/db/source/driver/ppd.xml\n"; -+ print PPDENTRY $ppdentry; -+ close PPDENTRY; -+ } else { -+ print STDERR "Printer $printer already registered as supported by the \"ppd\" driver!\n"; -+ } -+ } -+} else { # Remove entry -+ # Read the driver entry file -+ open PPDENTRY, "< $libdir/db/source/driver/ppd.xml" or -+ die "Cannot read $libdir/db/source/driver/ppd.xml!\n"; -+ print STDERR "Reading $libdir/db/source/driver/ppd.xml\n"; -+ $ppdentry = join('', ); -+ close PPDENTRY; -+ -+ # Do we have the requested entry? -+ my $found = -+ ($ppdentry =~ m![\s\n]*printer/$printer[\s\n]*!s); -+ -+ # Then we have to remove it and to write the file -+ if ($found) { -+ $ppdentry =~ s!\n+\s*[\s\n]*printer/$printer[\s\n]*\s*\n+!\n!sg; -+ open PPDENTRY, "> $libdir/db/source/driver/ppd.xml" or -+ die "Cannot write $libdir/db/source/driver/ppd.xml!\n"; -+ print STDERR "Writing $libdir/db/source/driver/ppd.xml\n"; -+ print PPDENTRY $ppdentry; -+ close PPDENTRY; -+ } else { -+ print STDERR "Printer $printer not registered as supported by the \"ppd\" driver!\n"; -+ } -+ # Remove the option entries -+ system("rm -f $libdir/db/source/opt/ppd-${printer}-*.xml"); -+} -+ -+exit(0); -+ -+sub help { -+ select STDERR; -+ print "\n"; -+ print "Usage: foomatic-ppdload filename.ppd printer-id\n"; -+ print " foomatic-ppdload -R printer-id\n"; -+ print "\n"; -+ print " The first form adds the printer with the ID printer-id\n"; -+ print " and the PPD file filename.ppd to the \"ppd\" driver,\n"; -+ print " the second form removes the printer with the ID\n"; -+ print " printer-id from the \"ppd\" driver.\n"; -+ print "\n"; -+ exit(1); -+} ---- foomatic-db-engine-3.0-20031217/foomatic-ppdload.8.in.ppdload 2003-12-19 15:26:45.290034426 +0000 -+++ foomatic-db-engine-3.0-20031217/foomatic-ppdload.8.in 2003-12-19 15:26:56.034756198 +0000 -@@ -0,0 +1,47 @@ -+.\" This -*- nroff -*- source file is part of foomatic. -+.\" -+.TH FOOMATIC-PPDLOAD 8 "2001-05-07" "Foomatic Project" -+.SH NAME -+foomatic-ppdload \- -+.SH SYNOPSIS -+.B foomatic-ppdload \-h -+ -+.B foomatic-ppdload -+\fIfilename.ppd printer-id\fR -+ -+.B foomatic-ppdload \-R -+\fIprinter-id\fR -+ -+.SH DESCRIPTION -+.B foomatic-ppdload -+takes a ppd filename and a printer ID as arguments. It -+parses a PPD file and writes option data into the foomatic database -+for use with the foomatic "ppd" driver and that printer. -+ -+With the \fB-R\fR option you can remove a printer from the "ppd" -+driver, and with \fB-h\fR a short help text is shown. -+ -+Right now, it will handle Boolean and PickOne options that go in the -+Prolog, DocumentSetup, or PageSetup spots. Also, PPD interoption -+constraints (not to be confused with foomatic option to printer and -+driver mapping constraints) are not supported by foomatic. And of -+course, the interesting color and font information from the PPD has -+no place in the current foomatic schema. All this will change over -+time. -+ -+ -+.\".SH SEE ALSO -+.\".IR foomatic-XXX (1), -+ -+.SH EXIT STATUS -+.B foomatic-ppdload -+returns ... -+ -+.SH AUTHOR -+Manfred Wassmann <\fImanolo@NCC-1701.B.Shuttle.de\fR> for the foomatic -+project using output from the associated binary. -+ -+.SH BUGS -+There are several limitations, but it's an interesting experiment. -+ -+Please send bug reports to foomatic-devel@linuxprinting.org. ---- foomatic-db-engine-3.0-20031217/configure.ac.ppdload 2003-12-19 15:27:03.188905120 +0000 -+++ foomatic-db-engine-3.0-20031217/configure.ac 2003-12-19 15:27:21.165766554 +0000 -@@ -280,7 +280,7 @@ - foomatic-configure foomatic-printjob foomatic-kitload - foomatic-ppdfile foomatic-preferred-driver foomatic-cleanupdrivers - foomatic-getpjloptions foomatic-addpjloptions --foomatic-compiledb foomatic-fix-xml -+foomatic-compiledb foomatic-fix-xml foomatic-ppdload - foomatic-nonumericalids foomatic-replaceoldprinterids - foomatic-ppd-options - ) ---- foomatic-db-engine-3.0-20031217/Makefile.in.ppdload 2003-12-19 15:27:25.217284580 +0000 -+++ foomatic-db-engine-3.0-20031217/Makefile.in 2003-12-19 15:28:09.349034667 +0000 -@@ -145,6 +145,7 @@ - foomatic-kitload foomatic-ppdfile foomatic-preferred-driver \ - foomatic-cleanupdrivers foomatic-getpjloptions \ - foomatic-addpjloptions foomatic-compiledb foomatic-fix-xml \ -+ foomatic-ppdload \ - foomatic-nonumericalids foomatic-replaceoldprinterids \ - foomatic-ppd-options - -@@ -155,7 +156,7 @@ - foomatic-ppd-options - - # Administrative commands, only useful for admins --SBINFILES:=foomatic-kitload \ -+SBINFILES:=foomatic-kitload foomatic-ppdload \ - foomatic-getpjloptions foomatic-addpjloptions \ - foomatic-preferred-driver foomatic-fix-xml \ - foomatic-nonumericalids foomatic-replaceoldprinterids diff --git a/foomatic-ppdopts b/foomatic-ppdopts deleted file mode 100755 index e9cb92e..0000000 --- a/foomatic-ppdopts +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/perl - -use Getopt::Std; -getopts("hr:"); -help() if $opt_h; -$libdir=$opt_r if $opt_r; - -use Foomatic::PPD; -use Foomatic::Defaults; - -my $file = $ARGV[0]; -my $printer = $ARGV[1]; -my $driver = $ARGV[2]; - -if (! -f "$libdir/db/source/printer/$printer.xml") { - die "Printer $printer does not seem to exist in the database!\n"; -} - -if (! -f $file) { - die "The PPD file you specified, $file, does not seem to exist!\n"; -} - -# Load the PPD -my $p = new Foomatic::PPD $file, $printer; - -# Normal behavior, save as various option files by ID -my @opts = $p->foo_options(); -for (@opts) { - my ($id, $xml) = ($_->{'id'}, $_->{'xml'}); - my $ofile = "$libdir/db/source/opt/$id.xml"; - if (-f "$ofile") { die "Output file $ofile already exists\n"; } - open TMP, ">$ofile" or die "Cannot write $ofile!\n"; - print STDERR "Writing $ofile\n"; - # Fix section> - print TMP join('',@{$xml}); - close TMP; -} -exit(0); - -sub help { - select STDERR; - print "\n"; - print "Usage: foomatic-ppdopts filename.ppd printer-id\n"; - print "\n"; - exit(1); -} diff --git a/foomatic.spec b/foomatic.spec index b1815f4..b1a2174 100644 --- a/foomatic.spec +++ b/foomatic.spec @@ -1,12 +1,12 @@ -%define dbver 20080211 -%define enginever 3.0-20080211 -%define filtersver 20080211 -%define hpijsver 20080211 +%define dbver 20080904 +%define enginever 3.0-20080904 +%define filtersver 20080904 +%define hpijsver 20080904 Summary: Foomatic printer database. Name: foomatic Version: 3.0.2 -Release: 62%{?dist} +Release: 65%{?dist} License: GPLv2+ Group: System Environment/Libraries @@ -14,7 +14,7 @@ Group: System Environment/Libraries # NOW=`date '+%Y%m%d'` # cvs -d:pserver:anonymous@cvs.linuxprinting.org:/usr/local/cvs export -D $NOW foomatic # tar cjf foomatic-1.9-$NOW.tar.bz2 foomatic -Source0: http://www.linuxprinting.org/download/foomatic/foomatic-db-engine-%{enginever}.tar.gz +Source0: http://www.openprinting.org/download/foomatic/foomatic-db-engine-%{enginever}.tar.gz Source1: http://www.linuxprinting.org/download/foomatic/foomatic-filters-3.0-%{filtersver}.tar.gz Source2: http://www.linuxprinting.org/download/foomatic/foomatic-db-3.0-%{dbver}.tar.gz @@ -27,29 +27,11 @@ Patch2: foomatic-db-engine-libdir.patch # Set GS_FONTPATH in gs wrapper (bug #81410). Patch5: foomatic-2.0.2-fontpath.patch -# Reinstate ppdload long enough for me to work around its disappearance. -Patch6: foomatic-ppdload.patch -Patch7: foomatic-ppdload-ppd.patch - -# Fix 3.0.2 build. -Patch10: foomatic-db-engine-xml-cflags.patch - -# Make foomatic-db-engine build. -Patch14: foomatic-ampathxml.patch - # Handle non-UTF-8 encodings in imported PPD files. Patch15: foomatic-bad-utf8.patch -# Missing IEEE 1284 IDs. -Patch16: foomatic-ieee1284.patch - -Patch17: foomatic-clean-up-on-cancel.patch Patch18: foomatic-sigpipe.patch -Patch19: foomatic-459847.patch -Patch20: foomatic-busyloop.patch -Patch21: foomatic-hpclj9500mfp.patch - Url: http://www.linuxprinting.org BuildRequires: perl >= 3:5.8.1 BuildRequires: perl(ExtUtils::MakeMaker) @@ -93,7 +75,6 @@ The site http://www.linuxprinting.org/ is based on this database. pushd foomatic-filters-3.0-%{filtersver} %patch1 -p1 -b .libdir %patch5 -p1 -b .fontpath -%patch17 -p1 -b .clean-up-on-cancel %patch18 -p1 -b .sigpipe ./make_configure popd @@ -101,11 +82,7 @@ popd pushd foomatic-db-engine-%{enginever} chmod a+x mkinstalldirs %patch2 -p1 -b .libdir -%patch6 -p1 -b .ppdload -%patch14 -p1 -b .ampathxml -%patch10 -p1 -b .xml-cflags %patch15 -p1 -%patch20 -p1 -b .busyloop ./make_configure popd @@ -113,11 +90,6 @@ pushd foomatic-db-hpijs-%{hpijsver} popd pushd foomatic-db-%{dbver} -%patch7 -p1 -b .ppdload-ppd - -%patch16 -p1 -b .ieee1284 -%patch19 -p1 -b .459847 -%patch21 -p1 -b .hpclj9500mfp cd db/source @@ -228,6 +200,8 @@ ln -sf ../../../bin/foomatic-rip %{buildroot}/usr/lib/cups/filter/foomatic-rip mkdir $RPM_BUILD_ROOT%{_datadir}/foomatic/db/source/PPD/Custom mkdir -p $RPM_BUILD_ROOT%{_var}/cache/foomatic +echo cups > $RPM_BUILD_ROOT%{_sysconfdir}/foomatic/defaultspooler + # Remove things we don't ship. rm -rf $RPM_BUILD_ROOT%{_libdir}/perl5/site_perl \ $RPM_BUILD_ROOT%{_libdir}/ppr \ @@ -246,6 +220,7 @@ rm -fr %buildroot $RPM_BUILD_DIR/%{name} %doc --parents */README */USAGE */ChangeLog %dir %{_sysconfdir}/foomatic %config(noreplace) %{_sysconfdir}/foomatic/filter.conf +%config(noreplace) %{_sysconfdir}/foomatic/defaultspooler %{_bindir}/* %{_sbindir}/* %{_prefix}/lib*/perl5/vendor_perl/*/Foomatic @@ -257,16 +232,38 @@ rm -fr %buildroot $RPM_BUILD_DIR/%{name} %{_var}/cache/foomatic %changelog -* Tue Sep 2 2008 Tim Waugh 3.0.2-62 +* Thu Sep 4 2008 Tim Waugh 3.0.2-65 +- Removed ampathxml and xml-cflags patches. +- Updated db-hpijs to 20080904. +- Updated db to 20080904. +- Updated filters to 3.0-20080904. +- Updated db-engine to 3.0-20080904. + +* Wed Sep 3 2008 Tim Waugh +- Finally remove ppdload. + +* Tue Sep 2 2008 Tim Waugh 3.0.2-64 - Fixed typo in HP-Color_LaserJet_9500_MFP.xml. -* Tue Sep 2 2008 Tim Waugh 3.0.2-61 +* Tue Sep 2 2008 Tim Waugh 3.0.2-63 - Avoid busy-looping when trying to shorten long PPD nicknames. -* Tue Sep 2 2008 Tim Waugh 3.0.2-60 +* Tue Sep 2 2008 Tim Waugh 3.0.2-62 +- Removed patch fuzz. - Fixed PPD generation for HP LaserJet 4345 MFP (bug #459847). -* Thu May 8 2008 Tim Waugh +* Thu Jul 10 2008 Tim Waugh 3.0.2-61 +- Updated db-hpijs to 20080710. +- Updated db to 20080710. +- Updated filters to 3.0-20080710. +- Updated db-engine to 3.0-20080710. +- Ship a defaultspooler file to avoid the need for spooler + auto-detection (bug #454684). + +* Thu May 8 2008 Tim Waugh 3.0.2-60 +- Updated filters to 3.0-20080507. + +* Wed May 7 2008 Tim Waugh - Avoid busy-looping when the CUPS backend stops (bug #445555). * Tue Apr 1 2008 Tim Waugh 3.0.2-59 diff --git a/sources b/sources index 144ca96..7aaec0d 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -5d827cd3d95807c28609d49a5c412c29 foomatic-db-3.0-20080211.tar.gz -ba8b08913589568f85548998f6321f95 foomatic-db-engine-3.0-20080211.tar.gz -58bef426f769219592b6b0c81357a04a foomatic-db-hpijs-20080211.tar.gz -97b517e94ac85534cdc84a446a872bc2 foomatic-filters-3.0-20080211.tar.gz +d46d1a26a8199c8c5c618ad2cd17a68a foomatic-db-engine-3.0-20080904.tar.gz +ce3332981735ce5b50932640a6107220 foomatic-filters-3.0-20080904.tar.gz +758ac14a7068a3c2016608d35c8994c7 foomatic-db-3.0-20080904.tar.gz +a46f919c711547181d651509d771967e foomatic-db-hpijs-20080904.tar.gz