diff --git a/foomatic-2.0.2-fontpath.patch b/foomatic-2.0.2-fontpath.patch deleted file mode 100644 index 243cfd2..0000000 --- a/foomatic-2.0.2-fontpath.patch +++ /dev/null @@ -1,11 +0,0 @@ -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 - # standard output of the PostScript programs via '-sstdout=%stderr' diff --git a/foomatic-filters-libdir.patch b/foomatic-filters-libdir.patch index feca5e8..b13a658 100644 --- a/foomatic-filters-libdir.patch +++ b/foomatic-filters-libdir.patch @@ -1,29 +1,12 @@ -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 +diff -up foomatic-filters-4.0.0/configure.ac.libdir foomatic-filters-4.0.0/configure.ac +--- foomatic-filters-4.0.0/configure.ac.libdir 2009-01-14 19:23:15.000000000 +0000 ++++ foomatic-filters-4.0.0/configure.ac 2009-01-15 10:57:55.000000000 +0000 +@@ -43,7 +43,7 @@ AC_CHECK_FUNCS([dup2 getcwd gethostname + ETCSEARCHPATH=${prefix}/etc:/usr/etc:/usr/local/etc --LIBSEARCHPATH=${prefix}/lib:/usr/lib:/usr/local/lib:${prefix}/libexec:/usr/libexec:/usr/local/libexec -+LIBSEARCHPATH=$libdir:/usr/local/lib:${prefix}/libexec:/usr/libexec:/usr/local/libexec +-LIBSEARCHPATH=${prefix}/lib:${prefix}/lib64:/usr/lib:/usr/lib64:/usr/local/lib:${prefix}/libexec:/usr/libexec:/usr/local/libexec ++LIBSEARCHPATH=${libdir}:/usr/lib:/usr/lib64:/usr/local/lib:${prefix}/libexec:/usr/libexec:/usr/local/libexec - dnl Get the operating system and version number... uname=`uname` -@@ -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 --AC_PATH_DIR(PPR,ppr,/usr/lib/ppr,$LIBSEARCHPATH) -+AC_PATH_DIR(PPR,ppr,$libdir/ppr,$LIBSEARCHPATH) - - dnl Check for /usr/lib/ppr/interfaces --AC_PATH_DIR(PPR_INTERFACES,ppr/interfaces,/usr/lib/ppr/interfaces,$LIBSEARCHPATH) -+AC_PATH_DIR(PPR_INTERFACES,ppr/interfaces,$libdir/ppr/interfaces,$LIBSEARCHPATH) - - dnl Check for /usr/lib/ppr/lib --AC_PATH_DIR(PPR_LIB,ppr/lib,/usr/lib/ppr/lib,$LIBSEARCHPATH) -+AC_PATH_DIR(PPR_LIB,ppr/lib,$libdir/ppr/lib,$LIBSEARCHPATH) - - AC_ARG_ENABLE(file-converter-check, [ --enable-file-converter-check check whether a file converter is installed [default=yes]], - [if eval "test x${enableval} = xno"; then + uversion=`uname -r | sed -e '1,$s/[[^0-9]]//g'` diff --git a/foomatic-mkstemp.patch b/foomatic-mkstemp.patch new file mode 100644 index 0000000..441b8ea --- /dev/null +++ b/foomatic-mkstemp.patch @@ -0,0 +1,24 @@ +diff -up foomatic-filters-4.0.2/pdf.c.mkstemp foomatic-filters-4.0.2/pdf.c +--- foomatic-filters-4.0.2/pdf.c.mkstemp 2009-07-02 15:52:38.960401425 +0100 ++++ foomatic-filters-4.0.2/pdf.c 2009-07-02 16:24:39.966400563 +0100 +@@ -157,6 +157,7 @@ static int pdf_extract_pages(char filena + int last) + { + void *minst; ++ int fd; + char filename_arg[PATH_MAX], first_arg[50], last_arg[50]; + const char *gs_args[] = { "", "-q", "-dNOPAUSE", "-dBATCH", + "-dPARANOIDSAFER", "-sDEVICE=pdfwrite", filename_arg, first_arg, +@@ -165,10 +166,10 @@ static int pdf_extract_pages(char filena + _log("Extracting pages %d through %d\n", first, last); + + snprintf(filename, PATH_MAX, "%s/foomatic-XXXXXX", temp_dir()); +- mktemp(filename); +- if (!filename[0]) ++ if ((fd = mkstemp(filename)) == -1) + return 0; + ++ close (fd); + if (gsapi_new_instance(&minst, NULL) < 0) + { + _log("Could not create ghostscript instance\n"); diff --git a/foomatic-sigpipe.patch b/foomatic-sigpipe.patch deleted file mode 100644 index 8c13f1b..0000000 --- a/foomatic-sigpipe.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -up foomatic-filters-3.0-20080211/foomatic-rip.in.sigpipe foomatic-filters-3.0-20080211/foomatic-rip.in ---- foomatic-filters-3.0-20080211/foomatic-rip.in.sigpipe 2008-05-07 16:40:10.000000000 +0100 -+++ foomatic-filters-3.0-20080211/foomatic-rip.in 2008-05-07 16:45:16.000000000 +0100 -@@ -3599,6 +3599,7 @@ sub getrendererhandle { - - close KID3; - -+ $SIG{PIPE} = 'DEFAULT'; - pipe KID4_IN, KID4; - KID4->autoflush(1); - $kid4 = fork(); -@@ -3779,11 +3780,15 @@ sub getrendererhandle { - # When arrived here the renderer command line was successful - # So exit with zero exit value here and inform the main process - close KID_MESSAGE; -- print KID_MESSAGE_IN "3 $EXIT_PRINTED\n"; -- close KID_MESSAGE_IN; - # Wait for postpipe/output child - waitpid($kid4, 0); -- print $logh "KID3 finished\n"; -+ if ($? != 0) { -+ print KID_MESSAGE_IN "3 $EXIT_SIGNAL\n"; -+ } else { -+ print KID_MESSAGE_IN "3 $EXIT_PRINTED\n"; -+ } -+ close KID_MESSAGE_IN; -+ print $logh "KID3 finished with $?\n"; - exit $EXIT_PRINTED; - } else { - $kidgeneration += 1; -@@ -4132,6 +4137,7 @@ sub getfileconverterhandle { - # converter - close KID1_IN; - -+ $SIG{PIPE} = 'DEFAULT'; - pipe KID2_IN, KID2; - KID2->autoflush(1); - $kid2 = fork(); -@@ -4603,6 +4609,7 @@ sub getdocgeneratorhandle { - # we are the kid; we generate the documentation page - - close KID0_IN; -+ $SIG{PIPE} = 'DEFAULT'; - - # Kill data on STDIN to satisfy PPR - if (($spooler eq 'ppr_int') || ($spooler eq 'ppr')) { -@@ -6661,6 +6668,7 @@ sub modern_system { - # 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 -+ $SIG{PIPE} = 'DEFAULT'; - eval("setpgrp()"); - # Stop catching signals - #use sigtrap qw(die normal-signals error-signals diff --git a/foomatic.spec b/foomatic.spec index e325359..ae61303 100644 --- a/foomatic.spec +++ b/foomatic.spec @@ -1,12 +1,13 @@ -%define dbver 20090110 -%define enginever 3.0-20090110 -%define filtersver 20090110 -%define hpijsver 20090110 +%define dbver_rel 4.0 +%define dbver_snap 20090819 +%define enginever 4.0.3 +%define filtersver 4.0.3 +%define hpijsver 20090701 Summary: Database of printers and printer drivers Name: foomatic -Version: 3.0.2 -Release: 71%{?dist} +Version: %{enginever} +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Libraries @@ -16,24 +17,29 @@ Group: System Environment/Libraries # tar cjf foomatic-1.9-$NOW.tar.bz2 foomatic 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 +Source1: http://www.linuxprinting.org/download/foomatic/foomatic-filters-%{filtersver}.tar.gz +Source2: http://www.linuxprinting.org/download/foomatic/foomatic-db-%{dbver_rel}-%{dbver_snap}.tar.gz Source3: http://www.linuxprinting.org/download/foomatic/foomatic-db-hpijs-%{hpijsver}.tar.gz +## PATCHES FOR FOOMATIC-FILTERS (PATCHES 1 TO 100) + # Use libdir. Patch1: foomatic-filters-libdir.patch -Patch2: foomatic-db-engine-libdir.patch -# Fix up margins for Samsung ML-2010 (bug #481211). -Patch3: foomatic-margins.patch +# Use mkstemp, not mktemp. +Patch2: foomatic-mkstemp.patch + +## PATCHES FOR FOOMATIC-DB-ENGINE (PATCHES 101 TO 200) -# Set GS_FONTPATH in gs wrapper (bug #81410). -Patch5: foomatic-2.0.2-fontpath.patch +# Use libdir. +Patch101: foomatic-db-engine-libdir.patch # Handle non-UTF-8 encodings in imported PPD files. -Patch15: foomatic-bad-utf8.patch +Patch102: foomatic-bad-utf8.patch + +## PATCHES FOR FOOMATIC-DB-HPIJS (PATCHES 201 TO 300) -Patch18: foomatic-sigpipe.patch +## PATCHES FOR FOOMATIC-DB (PATCHES 301 TO 400) Url: http://www.linuxprinting.org BuildRequires: perl >= 3:5.8.1 @@ -58,6 +64,11 @@ Conflicts: hpijs < 1.5 # We don't use the printconf hooks now, so require that they are gone. Conflicts: system-config-printer < 0.7.0 +# The foomatic oki8w driver works for printers that this old package +# use to drive: +Obsoletes: oki4linux < 2.1gst-5 +# Note: no "Provides:" as it was not a dependency of any package. + %description Foomatic is a comprehensive, spooler-independent database of printers, printer drivers, and driver descriptions. It contains utilities to @@ -75,26 +86,21 @@ The site http://www.linuxprinting.org/ is based on this database. %prep %setup -q -c -a 1 -a 2 -a 3 -pushd foomatic-filters-3.0-%{filtersver} +pushd foomatic-filters-%{filtersver} %patch1 -p1 -b .libdir -%patch5 -p1 -b .fontpath -%patch18 -p1 -b .sigpipe -./make_configure +%patch2 -p1 -b .mkstemp popd pushd foomatic-db-engine-%{enginever} chmod a+x mkinstalldirs -%patch2 -p1 -b .libdir -%patch15 -p1 -./make_configure +%patch101 -p1 -b .libdir +%patch102 -p1 popd pushd foomatic-db-hpijs-%{hpijsver} popd -pushd foomatic-db-%{dbver} -%patch3 -p1 -b .margins - +pushd foomatic-db-%{dbver_snap} cd db/source # For gutenprint printers, use gutenprint-ijs-simplified.5.2. @@ -102,7 +108,8 @@ perl -pi -e 's,>gutenprint<,>gutenprint-ijs-simplified.5.2<,' printer/*.xml # Remove references to foo2zjs, foo2oak, foo2hp and foo2qpdl (bug #208851). # Also foo2lava, foo2kyo, foo2xqx (bug #438319). -for x in zjs oak hp qpdl lava kyo xqx +# Also foo2slx and foo2hiperc (bug #518267). +for x in zjs oak hp qpdl lava kyo xqx slx hiperc do find printer -name '*.xml' |xargs grep -l "foo2${x}"|xargs rm -vf rm -f driver/foo2${x}.xml opt/foo2${x}-* @@ -125,7 +132,7 @@ export CUPS_BACKENDS=/usr/lib/cups/backend # /usr/lib NOT libdir export CUPS_FILTERS=/usr/lib/cups/filter # /usr/lib NOT libdir export CUPS_PPDS=%{_datadir}/cups/model -pushd foomatic-filters-3.0-%{filtersver} +pushd foomatic-filters-%{filtersver} %configure make PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS" popd @@ -135,20 +142,20 @@ pushd foomatic-db-engine-%{enginever} make PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS" popd -pushd foomatic-db-%{dbver} +pushd foomatic-db-%{dbver_snap} %configure make PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS" popd pushd foomatic-db-hpijs-%{hpijsver} %configure -make PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS" +make PREFIX=%{_prefix} CFLAGS="$RPM_OPTFLAGS" popd %install rm -rf $RPM_BUILD_ROOT -pushd foomatic-filters-3.0-%{filtersver} +pushd foomatic-filters-%{filtersver} eval `perl '-V:installvendorlib' '-V:installvendorarch'` mkdir -p $RPM_BUILD_ROOT/$installvendorlib export INSTALLSITELIB=$RPM_BUILD_ROOT/$installvendorlib @@ -156,7 +163,7 @@ export INSTALLSITEARCH=$RPM_BUILD_ROOT/$installvendorarch make DESTDIR=%buildroot PREFIX=%{_prefix} \ INSTALLSITELIB=$RPM_BUILD_ROOT/$installvendorlib \ INSTALLSITEARCH=$RPM_BUILD_ROOT/$installvendorarch \ - install + install-main install-cups popd pushd foomatic-db-engine-%{enginever} @@ -166,7 +173,7 @@ make DESTDIR=%buildroot PREFIX=%{_prefix} \ install popd -pushd foomatic-db-%{dbver} +pushd foomatic-db-%{dbver_snap} make DESTDIR=%buildroot PREFIX=%{_prefix} \ INSTALLSITELIB=$RPM_BUILD_ROOT/$installvendorlib \ INSTALLSITEARCH=$RPM_BUILD_ROOT/$installvendorarch \ @@ -211,6 +218,9 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/perl5/site_perl \ $RPM_BUILD_ROOT%{_libdir}/ppr \ $RPM_BUILD_ROOT%{_sysconfdir}/foomatic/filter.conf.sample find $RPM_BUILD_ROOT -name .packlist -o -name '*.xml.*' | xargs rm -f +rm -f $RPM_BUILD_ROOT%{_datadir}/foomatic/db/source/PPD/Kyocera/*.txt \ + $RPM_BUILD_ROOT%{_datadir}/foomatic/db/source/PPD/Kyocera/*.htm \ + $RPM_BUILD_ROOT%{_datadir}/cups/model/3-distribution %post /bin/rm -f /var/cache/foomatic/* @@ -221,7 +231,6 @@ rm -fr %buildroot $RPM_BUILD_DIR/%{name} %files %defattr(-,root,root) -%doc --parents */README */USAGE */ChangeLog %dir %{_sysconfdir}/foomatic %config(noreplace) %{_sysconfdir}/foomatic/filter.conf %config(noreplace) %{_sysconfdir}/foomatic/defaultspooler @@ -236,8 +245,44 @@ rm -fr %buildroot $RPM_BUILD_DIR/%{name} %{_var}/cache/foomatic %changelog -* Tue Feb 10 2009 Tim Waugh 3.0.2-71 -- Fix up margins for Samsung ML-2010 (bug #481211). +* Tue Sep 1 2009 Tim Waugh 4.0.3-1 +- 4.0.3. + +* Mon Aug 24 2009 Tim Waugh 4.0.2-7 +- Restored db-hpijs. + +* Fri Aug 21 2009 Tim Waugh 4.0.2-6 +- Updated to foomatic-db-4.0-20090819. Removed db-hpijs. + +* Thu Aug 20 2009 Tim Waugh 4.0.2-5 +- Removed references to foo2slx and foo2hiperc (bug #518267). +- Use stcolor driver for Epson Stylus Color 200 (bug #513676). +- Don't ship 3-distribution symlink as CUPS already searches + /usr/share/ppd (bug #514244). +- Remove non-PPD files from PPD directory (bug #514242). + +* Fri Jul 24 2009 Fedora Release Engineering - 4.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Jul 2 2009 Tim Waugh 4.0.2-3 +- Removed '-O0' compiler option for foomatic-filters, which had been + used for debugging purposes. + +* Thu Jul 2 2009 Tim Waugh 4.0.2-1 +- Updated db-engine to 4.0.2 (bug #503188). +- Updated foomatic-filters to 4.0.2 (bug #496521). +- Updated db-hpijs to 20090701. +- Updated db to 4.0-20090702. +- This package obsoletes oki4linux (bug #491489). +- Don't ship ChangeLog/README/USAGE for each of the 4 packages as it + comes to more than 1MB (bug #492449). +- Don't use mktemp in foomatic-rip. + +* Tue Feb 24 2009 Fedora Release Engineering - 4.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Jan 15 2009 Tim Waugh 4.0.0-1 +- 4.0.0. * Mon Jan 12 2009 Tim Waugh 3.0.2-70 - Major gutenprint version is 5.2. diff --git a/sources b/sources index 2a50ecc..5e21e17 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -cfd3335798141fa5892693b39c71f71c foomatic-db-engine-3.0-20090110.tar.gz -8948e38765cb108221cfb3d1c9af0dd0 foomatic-db-3.0-20090110.tar.gz -aa6b0fd89f33fcef91a3a7081b44fc36 foomatic-db-hpijs-20090110.tar.gz -0d8702e00187a54d5cfd4cdfbab682e1 foomatic-filters-3.0-20090110.tar.gz +2bc452f3bf81c83f8d008c95167f7f8b foomatic-db-hpijs-20090701.tar.gz +b48520c72a3690b35bb93585fd2e632a foomatic-db-4.0-20090819.tar.gz +fdb02175cc857f63bb06b25ac3b1658b foomatic-db-engine-4.0.3.tar.gz +f2fb7c48cc6b1af6f76dd0529d6dbd98 foomatic-filters-4.0.3.tar.gz