commit be4cee0a93442fb9fc3df23a89e1e96a2d731f27 Author: CentOS Sources Date: Fri Aug 2 17:21:10 2019 -0400 import gutenprint-5.2.14-3.el8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..65d1dca --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/gutenprint-5.2.14.tar.bz2 diff --git a/.gutenprint.metadata b/.gutenprint.metadata new file mode 100644 index 0000000..293338b --- /dev/null +++ b/.gutenprint.metadata @@ -0,0 +1 @@ +821707451bd6c8602ff9273bd9531bc5550e81c9 SOURCES/gutenprint-5.2.14.tar.bz2 diff --git a/SOURCES/cups-genppdupdate.py.in b/SOURCES/cups-genppdupdate.py.in new file mode 100755 index 0000000..d65e618 --- /dev/null +++ b/SOURCES/cups-genppdupdate.py.in @@ -0,0 +1,1078 @@ +#!/usr/bin/python3 +# $Id$ +# Update CUPS PPDs for Gutenprint queues. +# Copyright (C) 2002-2003 Roger Leigh (rleigh@debian.org) +# Copyright (C) 2009, 2011, 2014 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import getopt +import glob +import io +import os +import re +import stat +import subprocess +import sys +from functools import reduce + +global optargs +global debug +global verbose +global interactive +global quiet +global no_action +global reset_defaults +global version +global micro_version +global use_static_ppd +global file_version + +global ppd_dir +global ppd_root_dir +global ppd_base_dir +global ppd_out_dir +global gzext +global updated_ppd_count +global skipped_ppd_count +global failed_ppd_count +global exit_after_parse_args +global languages + +global serverdir +global driver_bin +global driver_version +global server_multicat +global server_multicat_initialized + +global ppd_files +global languagemappings + +def help(): + print (""" +Usage: %s [OPTION]... [PPD_FILE]... +Update CUPS+Gutenprint PPD files. + + -d flags Enable debugging + -h Display this help text + -n No-action. Don't overwrite any PPD files. + -q Quiet mode. No messages except errors. + -s ppd_dir Use ppd_dir as the source PPD directory. + -p ppd_dir Update PPD files in ppd_dir. + -P driver Use the specified driver binary to generate PPD files. + -v Verbose messages. + -N Reset options to defaults. + -o out_dir Output PPD files to out_dir. + -r version Use PPD files for Gutenprint major.minor version. + -f Ignore new PPD file safety checks. + -i Prompt (interactively) for each PPD file. + -l language Language choice (Gutenprint 5.1 or below). + Choices: %s + Or -loriginal to preserve original language + with Gutenprint 5.2 or above +""" % (sys.argv[0], + reduce (lambda x,y: "%s %s" % (x,y), languages))) + sys.exit (0) + +def die_if_not_directory (dir): + try: + st = os.stat (dir) + if not stat.S_ISDIR (st.st_mode): + os.chdir (dir) + except OSError as err: + (e, s) = err.args + print ("%s: invalid directory: %s" % (dir, s)) + sys.exit (1) + +def get_driver_version(): + global server_multicat + global driver_version + + def run_with_arg (arg): + try: + p = subprocess.Popen ([driver_bin, arg], + stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, + shell=False) + (stdout, stderr) = p.communicate () + except OSError: + return None + + if stdout != None: + stdout = stdout.decode () + + return stdout + + stdout = run_with_arg ("org.gutenprint.extensions") + if stdout == None: + return + for line in stdout.split ("\n"): + if line == "org.gutenprint.multicat": + server_multicat = 1 + break + + stdout = run_with_arg ("VERSION") + if stdout == None: + return + + driver_version = stdout.strip () + +def parse_options(): + try: + opts, args = getopt.getopt (sys.argv[1:], "d:hnqs:vNo:p:P:r:ifl:") + except getopt.GetoptError: + help () + + global optargs + global debug + global verbose + global interactive + global quiet + global no_action + global reset_defaults + global version + global micro_version + global use_static_ppd + global file_version + global ppd_dir + global ppd_out_dir + global ppd_base_dir + global ppd_root_dir + global serverdir + global driver_bin + global driver_version + global server_multicat + global languages + optargs = dict() + for opt, optarg in opts: + optargs[opt[1]] = optarg + + if 'n' in optargs: + no_action = 1 + + if 'd' in optargs: + try: + debug = int (optargs['d']) + except ValueError: + d = 0 + + if 'v' in optargs: + verbose = 1 + quiet = 0 + + if 'q' in optargs: + verbose = 0 + quiet = 1 + + if 'N' in optargs: + reset_defaults = 1 + + if 'o' in optargs: + opt_o = optargs['o'] + die_if_not_directory (opt_o) + ppd_out_dir = opt_o + + if 'r' in optargs: + opt_r = optargs['r'] + if version != opt_r: + version = opt_r + if 's' in optargs: + opt_s = optargs['s'] + die_if_not_directory (opt_s) + ppd_base_dir = opt_s + driver_bin = "" + server_multicat = 0 + use_static_ppd = "yes" + else: + ppd_base_dir = ppd_root_dir + "/gutenprint/" + version + driver_bin = serverdir + "/driver/gutenprint." + version + + driver_version = "" + # If user specifies version, we're not going to be able to check + # for an exact match. + file_version = '"' + version + if os.access (driver_bin, os.X_OK): + get_driver_version () + use_static_ppd = "no" + file_version = "\"%s\"$" % driver_version + else: + print ("Gutenprint %s does not appear to be installed!" % + version) + sys.exit (1) + + if 's' in optargs: + opt_s = optargs['s'] + die_if_not_directory (opt_s) + ppd_base_dir = opt_s + driver_bin = "" + server_multicat = 0 + driver_version = "" + use_static_ppd = "yes" + + if 'p' in optargs: + opt_p = optargs['p'] + die_if_not_directory (opt_p) + ppd_dir = opt_p + + if 'P' in optargs: + opt_P = optargs['P'] + if os.access (opt_P, os.X_OK): + driver_bin = opt_P + get_driver_version () + use_static_ppd = "no" + else: + print ("%s: invalid executable" % opt_P) + + if 'h' in optargs: + help () + + if ('l' in optargs and + optargs['l'].lower () != "original" and + optargs['l'].lower () not in languages): + print ("Unknown language '%s'" % optargs['l'], file=sys.stderr) + + if 'i' in optargs: + interactive = 1 + + if exit_after_parse_args: + sys.exit (0) + + if verbose and driver_version != "": + print ("Updating PPD files from Gutenprint %s" % driver_version) + + return args + +def update_ppd (ppd_source_filename): + global ppd_dest_filename + global ppd_out_dir + global optargs + global languagemappings + global interactive + global server_multicat + global no_action + global quiet, verbose + global reset_defaults + + ppd_dest_filename = ppd_source_filename + if ppd_out_dir: + ppd_dest_filename = "%s/%s" % (ppd_out_dir, + os.path.basename (ppd_dest_filename)) + + orig = open (ppd_source_filename, encoding="utf-8") + orig_metadata = os.fstat (orig.fileno ()) + if debug & 1: + print ("Source Filename: %s" % ppd_source_filename) + + filename = "" + driver = "" + gutenprintdriver = "" + locale = "" + lingo = "" + region = "" + valid = 0 + orig_locale = "" + for line in orig.readlines (): + line.rstrip () + if line.find ("*StpLocale:") != -1: + match = re.search ("\*StpLocale:\s*\"(.*)\"$", line) + if match: + groups = match.groups () + if len (groups) >= 1: + locale = groups[0] + orig_locale = locale + valid = 1 + elif line.startswith ("*LanguageVersion"): + match = re.search ("^\*LanguageVersion:\s*(.*)$", line) + if match: + groups = match.groups () + if len (groups) >= 1: + lingo = groups[0] + elif line.startswith ("*StpDriverName:"): + match = re.search ("^\*StpDriverName:\s*\"(.*)\"$", line) + if match: + groups = match.groups () + if len (groups) >= 1: + driver = groups[0] + valid = 1 + elif line.find ("*%End of ") != -1 and driver == "": + match = re.search ("^\*%End of\s*(.*).ppd$", line) + if match: + groups = match.groups () + if len (groups) >= 1: + driver = groups[0] + elif line.startswith ("*StpPPDLocation:"): + match = re.search ("^\*StpPPDLocation:\s*\"(.*)\"$", line) + if match: + groups = match.groups () + if len (groups) >= 1: + filename = groups[0] + valid = 1 + elif line.startswith ("*%Gutenprint Filename:"): + valid = 1 + + if filename and driver and lingo and locale: + break + + if not valid and line.startswith ("*OpenUI"): + break + + if not valid: + #print (("Skipping %s: not a Gutenprint PPD file" % + # ppd_source_filename), file=sys.stderr) + return -1 + + if ('l' in optargs and + optargs['l'] != "" and + optargs['l'].lower () != "original"): + locale = optargs['l'] + orig_locale = locale + + if debug & 2: + print ("Gutenprint Filename: %s" % filename) + if 'l' in optargs: + print ("Locale: %s (from -l)" % locale) + else: + print ("Locale: %s" % locale) + + print ("Language: %s" % lingo) + print ("Driver: %s" % driver) + + if locale: + # Split into the language and territory. + s = locale.split ("_", 1) + locale = s[0] + try: + region = s[1] + except IndexError: + region = "" + else: + # Split into the language and territory. + s = lingo.split ("_", 1) + locale = s[0] + try: + region = s[1] + except IndexError: + region = "" + + # Convert language into language code. + locale = languagemappings.get (lingo.lower (), "C") + + if debug & 2: + print ("Base Locale: %s" % locale) + print ("Region: %s" % region) + + # Read in the new PPD, decompressing it if needed... + (new_ppd_filename, source_fd) = get_ppd_fh (ppd_source_filename, + filename, + driver, + locale, + region) + if source_fd == None: + print ("Unable to retrieve PPD file!") + return 0 + + if interactive: + inp = input ("Update PPD %s from %s [nyq]? " % ppd_source_filename) + inp = inp.lower () + if inp.startswith ("q"): + if server_multicat: + source_fd.detach () + else: + source_fd.close () + + print ("Skipping all...") + return -2 + elif not inp.startswith ("y"): + if server_multicat: + source_fd.detach () + else: + source_fd.close () + + print ("Skipping...") + return -1 + + # Extract the default values from the original PPD... + + orig.seek (0) + (odt, oopt, ores, odef, unused) = get_ppd_data (orig, 1, 0, 1, 1, 0) + (ndt, nopt, nres, ndef, source_data) = get_ppd_data (source_fd, + 1, 1, 1, 1, 1) + + # Close original and temporary files... + + orig.close () + if server_multicat: + source_fd.detach () + else: + source_fd.close () + + orig_default_types = odt + new_default_types = ndt + defaults = odef + new_defaults = ndef + options = nopt + resolution_map = nres + old_resolution_map = dict() + for key, value in resolution_map.items (): + old_resolution_map[value] = key + + # Store previous language in the PPD file so that -l original works + # correctly. + + if orig_locale != "": + lines = source_data.rstrip ().split ("\n") + source_data = "" + for line in lines: + m = re.search ("(\*StpLocale:\s*\")(.*)(\")", line) + if m: + groups = m.groups () + line = groups[0] + orig_locale + groups[2] + + source_data += line + "\n" + + if debug & 4: + print ("Options (Old->New Default Type):") + keys = list(options.keys ()) + keys.sort () + for t in keys: + old_type = orig_default_types.get (t, "(New)") + new_type = new_default_types.get (t) + if old_type != new_type: + out = " %s (%s -> %s) : " % (t, old_type, new_type) + else: + out = " %s (%s) : " % (t, new_type) + + dft = defaults.get ("Default%s" % t) + for opt in options.get (t, []): + if dft != None and dft == opt: + out += "*" + + out += "%s " % opt + + print (out) + + if len (list(resolution_map.keys ())) > 0: + print ("Resolution Map:") + keys = list(resolution_map.keys ()) + keys.sort () + for key in keys: + print (" %s: %s" % (key, resolution_map[key])) + + if len (list(old_resolution_map.keys ())) > 0: + print ("Old Resolution Map:") + keys = list(old_resolution_map.keys ()) + keys.sort () + for key in keys: + print (" %s: %s" % (key, old_resolution_map[key])) + + print ("Non-UI Defaults:") + keys = list(defaults.keys ()) + keys.sort () + for key in keys: + xkey = key + if xkey.startswith ("Default"): + xkey = xkey[7:] + if xkey not in options: + print (" %s: %s" % (key, defaults[key])) + + print ("Default Types of dropped options:") + keys = list(orig_default_types.keys ()) + keys.sort () + for t in keys: + if t not in options: + print (" %s: %s" % (t, orig_default_types[t])) + + if no_action: + if not quiet or verbose: + if ppd_dest_filename == ppd_source_filename: + print ("Would update %s using %s" % (ppd_source_filename, + new_ppd_filename)) + else: + print ("Would update %s to %s using %s" % (ppd_source_filename, + ppd_dest_filename, + new_ppd_filename)) + + return 0 + + if not reset_defaults: + # Update source buffer with old defaults... + + # Loop through each default in turn. + keys = list(defaults.keys ()) + keys.sort () + for default_option in keys: + default_option_value = defaults[default_option] + option = default_option + if option.startswith ("Default"): + # Strip off `Default' + option = option[7:] + + # Check method is valid + orig_method = orig_default_types.get (option) + new_method = new_default_types.get (option) + new_default = new_defaults.get (default_option) + if (orig_method == None or new_method == None or + orig_method != new_method): + continue + + if (new_default != None and + default_option_value == new_default): + if verbose: + print ("%s: Preserve *%s (%s)" % (ppd_source_filename, + default_option, + default_option_value)) + + continue + + if new_method == "PickOne": + next_default = False + + # Check the old setting is valid + for opt in options.get (option, []): + def_option = default_option_value + odef_option = def_option + if (option == "Resolution" and + def_option in old_resolution_map): + if debug & 4: + print (("Intermapping old resolution %s to %s" % + def_option, old_resolution_map[def_option])) + + def_option = old_resolution_map[def_option] + + dopts = [def_option] + if def_option != odef_option: + dopts.append (odef_option) + + for dopt in dopts: + valid = False + if dopt == opt: + valid = True + elif (option == "Resolution" and + dopt in resolution_map): + dopt = resolution_map[dopt] + if dopt == opt: + valid = True + + if valid: + # Valid option + + # Set the option in the new PPD + lines = source_data.rstrip ().split ("\n") + source_data = "" + attr = "*%s" % default_option + for line in lines: + if line.startswith (attr): + line = "%s:%s" % (attr, dopt) + + source_data += line + "\n" + + if verbose: + print ("%s: Set *%s to %s" % + (ppd_source_filename, + default_option, + dopt)) + + next_default = True + break + if next_default: + break + + if next_default: + continue + + print (("Warning: %s: Invalid option: *%s: %s. Using default " + "setting %s." % (ppd_source_filename, default_option, + defaults[default_option], + new_defaults[default_option]))) + continue + + print (("Warning: %s: PPD OpenUI method %s not understood." % + (ppd_source_filename, new_default_types[default_option]))) + + # Write new PPD... + tmpnew = "%s.new" % ppd_dest_filename + try: + newppd = open (tmpnew, "w") + except IOError as err: + (e, s) = err.args + print ("Can't create %s: %s" % (tmpnew, s)) + return 0 + + newppd.writelines (source_data) + try: + newppd.close () + except IOError as err: + (e, s) = err.args + print ("Can't write to %s: %s" % (tmpnew, s)) + return 0 + + chcon = subprocess.Popen (["chcon", "--reference=%s" % ppd_dest_filename, + tmpnew], shell=False, + stdin=subprocess.DEVNULL, + stdout=subprocess.DEVNULL, + stderr=subprocess.STDOUT) + chcon.communicate () + + try: + os.rename (tmpnew, ppd_dest_filename) + except OSError as err: + (e, s) = err.args + print ("Can't rename %s to %s: %s" % (tmpnew, ppd_dest_filename, s)) + try: + os.unlink (tmpnew) + except OSError: + pass + + return 0 + + try: + os.chown (ppd_dest_filename, + orig_metadata.st_uid, + orig_metadata.st_gid) + except OSError: + pass + + try: + os.chmod (ppd_dest_filename, + orig_metadata.st_mode & 0o777) + except OSError: + pass + + if not quiet or verbose: + if ppd_dest_filename == ppd_source_filename: + print ("Updated %s using %s" % (ppd_source_filename, + new_ppd_filename)) + else: + print ("Updated %s to %s using %s" % (ppd_source_filename, + ppd_dest_filename, + new_ppd_filename)) + + # All done! + return 1 + +def get_ppd_data (fh, types, opts, resolutions, defaults, data): + options_map = dict() + defaults_map = dict() + resolution_map = dict() + default_types = dict() + cur_opt = "" + optionlist = [] + source_data = "" + + if reset_defaults: + types = 0 + opts = 0 + resolutions = 0 + defaults = 0 + + if resolutions or types or opts or defaults or data: + while True: + line = fh.readline () + if line == '': + break + if line == "*%*%EOFEOF\n": + break + source_data += line + line = line.strip () + + if (types or opts) and line.startswith ("*OpenUI"): + m = re.search ("^\*OpenUI\s\*(\w+).*:\s(\w+)", + line) + if m: + groups = m.groups () + key = groups[0] + value = groups[1] + default_types[key] = value + cur_opt = key + elif opts and line.startswith ("*CloseUI"): + if cur_opt != "": + options_map[cur_opt] = optionlist + cur_opt = "" + + optionlist = [] + elif opts and line.startswith ("*%s" % cur_opt): + m = re.search ("^\*%s\s*(\w+)[\/:]" % cur_opt, line) + if m: + groups = m.groups() + if len (groups) >= 1: + value = m.groups ()[0] + optionlist.append (value) + elif resolutions and line.startswith ("*StpResolutionMap:"): + s = line.split (None, 3) + if len (s) == 3: + new = s[1] + old = s[2] + resolution_map[old] = new + elif defaults and line.startswith ("*Default"): + m = re.search ("^\*(\w+):\s*(\w+)", line) + if m: + groups = m.groups () + key = groups[0] + value = groups[1] + defaults_map[key] = value + + return (default_types, options_map, resolution_map, + defaults_map, source_data) + +def get_ppd_fh (ppd_source_filename, filename, driver, locale, region): + global use_static_ppd + global driver_version + global optargs + global driver_bin + global debug + global server_multicat, server_multicat_initialized + global gzext + + if use_static_ppd == "no" and driver_version != "": + if re.search (".*/([^/]*)(.sim)(.ppd)?(.gz)?$", filename): + simplified = "simple" + else: + simplified = "expert" + + opt_r = optargs.get ('r') + if opt_r: + try: + opt_r = float (opt_r) + except ValueError: + opt_r = None + + url_list = [] + if (((opt_r != None and opt_r < 5.2) or + ('l' in optargs and optargs['l'] != "")) and + locale != ""): + if region: + url_list.append ("gutenprint.%s://%s/%s/%s_%s" % + version, driver, simplified, locale, region) + url_list.append ("gutenprint.%s://%s/%s/%s" % + version, driver, simplified, locale) + + url_list.append ("gutenprint.%s://%s/%s" % (version, driver, + simplified)) + for url in url_list: + new_ppd_filename = url + if debug & 8: + if server_multicat: + cat = "" + else: + cat = "%s cat " % driver_bin + + print (("Trying %s%s for %s, %s, %s, %s" % + (cat, url, driver, simplified, locale, region))) + + if server_multicat: + try: + if not server_multicat_initialized: + mc_proc = subprocess.Popen ([driver_bin, + "org.gutenprint.multicat"], + shell=False, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL) + server_multicat_initialized = mc_proc + + mc_in = io.TextIOWrapper (server_multicat_initialized.stdin) + print ("%s" % url, file=mc_in) + mc_in.flush () + mc_in.detach () + return (new_ppd_filename, + io.TextIOWrapper (server_multicat_initialized.stdout)) + except OSError: + pass + + try: + proc = subprocess.Popen ([driver_bin, "cat", url], + shell=False, + stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL) + return (new_ppd_filename, io.TextIOWrapper (proc.stdout)) + except OSError: + pass + + # Otherwise fall through and try to find a static PPD + + # Search for a PPD matching our criteria... + + new_ppd_filename = find_ppd (filename, driver, locale, region) + if not new_ppd_filename: + # There wasn't a valid source PPD file, so give up. + print (("%s: no valid candidate for replacement. Skipping" % + ppd_source_filename), file=sys.stderr) + print (("%s: please upgrade this PPD manually" % + ppd_source_filename), file=sys.stderr) + return ("", None) + + if debug & 1: + print ("Candidate PPD: %s" % new_ppd_filename) + + suffix = "\\" + gzext # Add '\' so the regexp matches the '.' + if new_ppd_filename.endswith (".gz"): + # Decompress input buffer + try: + proc = subprocess.Popen (['gunzip', '-c', new_ppd_filename], + shell=False, + stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL) + except OSError as err: + (e, s) = err.args + print ("can't open for decompression: %s" % s) + sys.exit (1) + + return (new_ppd_filename, io.TextIOWrapper (proc.stdout)) + else: + return (new_ppd_filename, open (new_ppd_filename)) + +def find_ppd (gutenprintfilename, drivername, lang, region): + global file_version + global optargs + global ppd_base_dir + global ppd_root_dir + global debug + + key = '^\\*FileVersion:[ ]*' + file_version + match = re.search (".*/([^/]+\.[0-9]+\.[0-9]+)(\.sim)?(\.ppd)?(\.gz)?$", + gutenprintfilename) + if not match: + return None + + stored_name = match.groups ()[0] + if re.search (".*/([^/]*)(\.sim)(\.ppd)?(\.gz)?$", gutenprintfilename): + simplified = ".sim" + else: + simplified = "" + + stored_dir = os.path.dirname (gutenprintfilename) + + current_best_file = "" + current_best_time = 0 + if 's' in optargs: + basedirs = [optargs['s']] + else: + basedirs = [ppd_base_dir, stored_dir, ppd_root_dir] + + lingos = [] + if region != "": + lingos.append ("%s_%s/" % (lang, region)) + + lingos.append ("%s/" % lang) + if lang != "C": + lingos.append ("C/") + + lingos.append ("en/") + lingos.append ("") + lingos.append ("Global/") + bases = ["stp-%s.%s%s" % (drivername, version, simplified), + "%s.%s%s" % (drivername, version, simplified)] + if stored_name not in bases: + bases.append (stored_name) + + bases.append (drivername) + + # All possible candidates, in order of usefulness and gzippedness + for lingo in lingos: + for suffix in (".ppd%s" % gzext, + ".ppd"): + for base in bases: + for basedir in basedirs: + if basedir == "" or base == "": + continue + + fn = "%s/%s%s%s" % (basedir, lingo, base, suffix) + if debug & 8: + print (("Trying %s for %s, %s, %s" % + (fn, gutenprintfilename, lang, region))) + + try: + st = os.stat (fn) + except OSError: + continue + + if ('f' in optargs or + (stat.S_ISREG (st.st_mode) and + st.st_uid == 0)): + # Check that the file is a valid Gutenprint PPD file + # of the correct version. + if fn.endswith (".gz"): + cmdline = "gunzip -c '%s' | grep '%s'" % (fn, key) + else: + cmdline = "cat '%s' | grep '%s'" % (fn, key) + + try: + p = subprocess.Popen (cmdline, + stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL) + except OSError: + new_file_version = "" + else: + (stdin, stderr) = p.communicate () + new_file_version = stdin.decode ().rstrip () + + if new_file_version != "": + if debug & 8: + print ((" Format valid: time %s best %s " + "prev %s cur %s!" % + (st.st_mtime, current_best_time, + current_best_file, fn))) + + if st.st_mtime > current_best_time: + current_best_time = st.st_mtime + current_best_file = fn + if debug & 8: + print (("***current_best_file " + " is %s" % fn), file=sys.stderr) + elif debug & 8: + print (" Format invalid") + else: + if (not stat.S_ISDIR (st.st_mode) and + not fn.endswith ("/")): + print (("%s: not a regular file, " + "or insecure ownership and " + "permissions. Skipped" % fn), + file=sys.stderr) + + if current_best_file: + return current_best_file + + # Yikes! Cannot find a valid PPD file! + return None + +debug=0 +verbose=0 +interactive=0 +quiet=0 +no_action=0 +reset_defaults=0 +version="@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@" +micro_version="@GUTENPRINT_VERSION@" +use_static_ppd="@BUILD_CUPS_PPDS@" +file_version='"@VERSION@"$' + +ppd_dir = "@cups_conf_serverroot@/ppd" +ppd_root_dir = "@cups_conf_datadir@/model"; +ppd_base_dir = ppd_root_dir + "/gutenprint/" + version +ppd_out_dir = "" +gzext = ".gz" +updated_ppd_count = 0 +skipped_ppd_count = 0 +failed_ppd_count = 0 +exit_after_parse_args = 0 +languages=["Global", "C"] + "@ALL_LINGUAS@".split (' ') + +serverdir = "@cups_conf_serverbin@" +driver_bin = serverdir + "/driver/gutenprint." + version +driver_version = "" +server_multicat = 0 +server_multicat_initialized = 0 + +if os.access (driver_bin, os.X_OK): + get_driver_version () + +ppd_files = [] +languagemappings = { "chinese": "cn", + "danish": "da", + "dutch": "nl", + "english": "en", + "finnish": "fi", + "french": "fr", + "german": "de", + "greek": "el", + "hungarian": "hu", + "italian": "it", + "japanese": "jp", + "norwegian": "no", + "polish": "pl", + "portuguese": "pt", + "russian": "ru", + "slovak": "sk", + "spanish": "es", + "swedish": "sv", + "turkish": "tr" } + +# Check command-line options... +args = parse_options() + +# Set a secure umask... +os.umask (0o177) + + +# Find all in-use Gutenprint PPD files... +# For case-insensitive filesystems, use only one of .ppd and .PPD +# (bug 1929738) + +for f in args: + if (os.access (f, os.F_OK) and + (f.lower ().endswith (".ppd") or + f.find ("/") != -1)): + ppd_files.append (f) + elif os.access ("%s/%s" % (ppd_dir, f), os.F_OK): + ppd_files.append ("%s/%s" % (ppd_dir, f)) + elif os.access ("%s/%s.ppd" % (ppd_dir, f), os.F_OK): + ppd_files.append ("%s/%s.ppd" % (ppd_dir, f)) + elif os.access ("%s/%s.PPD" % (ppd_dir, f), os.F_OK): + ppd_files.append ("%s/%s.PPD" % (ppd_dir, f)) + else: + print (("Cannot find file %s/%s, %s/%s.ppd, or %s/%s.PPD" % + ppd_dir, f, ppd_dir, f, ppd_dir, f), file=sys.stderr) + +if len (args) == 0: + ppdtmp = glob.glob ("%s/*.ppd" % ppd_dir) + ppdtmp += glob.glob ("%s/*.PPD" % ppd_dir) + ppd_map = dict() + for each in ppdtmp: + ppd_map[each] = 1 + + for f in ppdtmp: + if f.endswith (".PPD"): + g = f[:-4] + ".ppd" + if g not in ppd_map: + ppd_files.append (f) + else: + ppd_files.append (f) + +# Update each of the Gutenprint PPDs, where possible... + +for ppd_file in ppd_files: + status = update_ppd (ppd_file) + if status == -2: + break + elif status == 0: + failed_ppd_count += 1 + elif status == 1: + updated_ppd_count += 1 + elif status == -1: + skipped_ppd_count += 1 + +if (not quiet) or verbose: + if len (ppd_files) == 0: + print ("No Gutenprint PPD files to update.") + elif updated_ppd_count > 0: + plural = "" + if updated_ppd_count != 1: + plural = "s" + + print ("Updated %d PPD file%s" % (updated_ppd_count, plural)) + if (('o' not in optargs) or + optargs['o'] != ""): + print ("Restart cupsd for the changes to take effect.") + else: + if failed_ppd_count > 0: + print ("Failed to update any PPD files") + else: + print ("Did not update any PPD files") + +sys.exit (failed_ppd_count > 0) diff --git a/SOURCES/gutenprint-O6.patch b/SOURCES/gutenprint-O6.patch new file mode 100644 index 0000000..fbdb356 --- /dev/null +++ b/SOURCES/gutenprint-O6.patch @@ -0,0 +1,281 @@ +diff -up gutenprint-5.2.12-pre3/configure.ac.O6 gutenprint-5.2.12-pre3/configure.ac +--- gutenprint-5.2.12-pre3/configure.ac.O6 2016-10-14 10:41:54.290398824 +0200 ++++ gutenprint-5.2.12-pre3/configure.ac 2016-10-14 10:44:04.921328215 +0200 +@@ -638,27 +638,6 @@ AH_TEMPLATE(PKGMODULEDIR,, [Package modu + PKGMODULEDIR="${PACKAGE_LIB_DIR}/${GUTENPRINT_RELEASE_VERSION}/modules" + AC_DEFINE_UNQUOTED(PKGMODULEDIR, ["$PKGMODULEDIR"]) + +-dnl Compiler flags +-if test x$ac_compiler_gnu = "xyes"; then +- STP_ADD_COMPILER_ARGS([-Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=131072],, [GNUCFLAGS]) +- if test x${USE_MAINTAINER_MODE} = xyes ; then +- STP_ADD_COMPILER_ARGS([-D_POSIX_C_SOURCE=200809L -std=c99 -pedantic -Waggregate-return -Wcast-qual -Wshadow -Wredundant-decls],, [GNUCFLAGS]) +- fi +- if test x$ENABLE_DEBUG = xyes ; then +- STP_ADD_COMPILER_ARG([-g]) +- else +- STP_ADD_FIRST_COMPILER_ARG([-O6 -O3 -O2 -O1 -O]) +- fi +-else +- if test x$ENABLE_DEBUG = xyes ; then +- STP_ADD_COMPILER_ARG([-g]) +- else +- STP_ADD_FIRST_COMPILER_ARG([-O]) +- fi +-fi +-if test x$ENABLE_PROFILE = xyes ; then +- STP_ADD_COMPILER_ARG([-pg]) +-fi + AC_SUBST(GNUCFLAGS) + + AH_TEMPLATE([HAVE_GCC_ATTRIBUTES], +diff -up gutenprint-5.2.12-pre3/configure.O6 gutenprint-5.2.12-pre3/configure +--- gutenprint-5.2.12-pre3/configure.O6 2016-10-14 10:41:54.293398800 +0200 ++++ gutenprint-5.2.12-pre3/configure 2016-10-14 10:53:25.392709079 +0200 +@@ -17651,246 +17651,6 @@ cat >>confdefs.h <<_ACEOF + #define PKGMODULEDIR "$PKGMODULEDIR" + _ACEOF + +- +-if test x$ac_compiler_gnu = "xyes"; then +- +- for stp_ac_arg in -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=131072 ; do +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5 +-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${GNUCFLAGS} ${stp_ac_arg}" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- GNUCFLAGS="${stp_newCFLAGS}" +- +- done +- +- if test x${USE_MAINTAINER_MODE} = xyes ; then +- +- for stp_ac_arg in -D_POSIX_C_SOURCE=200809L -std=c99 -pedantic -Waggregate-return -Wcast-qual -Wshadow -Wredundant-decls ; do +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5 +-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${GNUCFLAGS} ${stp_ac_arg}" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- GNUCFLAGS="${stp_newCFLAGS}" +- +- done +- +- fi +- if test x$ENABLE_DEBUG = xyes ; then +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -g" >&5 +-$as_echo_n "checking if ${CC} supports -g... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} -g" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- CFLAGS="${stp_newCFLAGS}" +- +- else +- +- for stp_ac_arg in -O6 -O3 -O2 -O1 -O ; do +- stp_ac_save_CFLAGS="${CFLAGS}" +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5 +-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} ${stp_ac_arg}" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- CFLAGS="${stp_newCFLAGS}" +- +- test "${stp_ac_save_CFLAGS}" != "${CFLAGS}" && break +- done +- +- fi +-else +- if test x$ENABLE_DEBUG = xyes ; then +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -g" >&5 +-$as_echo_n "checking if ${CC} supports -g... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} -g" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- CFLAGS="${stp_newCFLAGS}" +- +- else +- +- for stp_ac_arg in -O ; do +- stp_ac_save_CFLAGS="${CFLAGS}" +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5 +-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} ${stp_ac_arg}" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- CFLAGS="${stp_newCFLAGS}" +- +- test "${stp_ac_save_CFLAGS}" != "${CFLAGS}" && break +- done +- +- fi +-fi +-if test x$ENABLE_PROFILE = xyes ; then +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -pg" >&5 +-$as_echo_n "checking if ${CC} supports -pg... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} -pg" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- CFLAGS="${stp_newCFLAGS}" +- +-fi +- +- +- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__ syntax" >&5 + $as_echo_n "checking if $CC supports __attribute__ syntax... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/SOURCES/gutenprint-manpage.patch b/SOURCES/gutenprint-manpage.patch new file mode 100644 index 0000000..07689ad --- /dev/null +++ b/SOURCES/gutenprint-manpage.patch @@ -0,0 +1,27 @@ +diff -up gutenprint-5.2.9/man/escputil.1.in.manpage gutenprint-5.2.9/man/escputil.1.in +--- gutenprint-5.2.9/man/escputil.1.in.manpage 2013-06-27 15:02:09.997386927 +0100 ++++ gutenprint-5.2.9/man/escputil.1.in 2013-06-27 15:08:16.236046768 +0100 +@@ -20,6 +20,7 @@ escputil \- maintain Epson Stylus inkjet + .SH SYNOPSIS + .B escputil + [ \fI\-P\fP \fIprinter\fP | \fI\-r\fP \fIdevice\fP ] [ \fI\-m\fP \fImodel\fP ] [ ++\fI\-S\fP ] [ \fI\-C\fP ] [ \fI\-p\fP ] [ + \fI\-u\fP ] [ \fI\-c\fP | \fI\-n\fP | \fI\-a\fP | \fI\-i\fP | \fI\-d\fP | + \fI\-o\fP | \fI\-s\fP | \fI\-l\fP | \fI\-M\fP | \fI\-h\fP ] [ \fI\-q\fP ] + .SH DESCRIPTION +@@ -46,6 +47,15 @@ Specify the precise printer model for he + .B \-u, \-\-new + The printer is a new printer (Stylus Color 740 or newer). + .TP ++.B \-S, \-\-short\-name ++Print the short name of the printer with \-\-identify. ++.TP ++.B \-C, \-\-choices ++Specify the number of pattern choices for alignment. ++.TP ++.B \-p, \-\-patterns ++Specify the number of sets of patterns for alignment. ++.TP + .B \-c, \-\-clean\-head + Clean the print head. This can also be performed from the printer + front panel. diff --git a/SOURCES/gutenprint-menu.patch b/SOURCES/gutenprint-menu.patch new file mode 100644 index 0000000..2c76a41 --- /dev/null +++ b/SOURCES/gutenprint-menu.patch @@ -0,0 +1,11 @@ +--- gutenprint-5.0.0/src/gimp2/print-print.c.menu 2007-03-02 17:08:51.000000000 +0000 ++++ gutenprint-5.0.0/src/gimp2/print-print.c 2007-03-02 17:09:10.000000000 +0000 +@@ -43,7 +43,7 @@ + (BAD_CONST_CHAR) copy, + (BAD_CONST_CHAR) VERSION " - " RELEASE_DATE, + /* Do not translate the prefix "" */ +- (BAD_CONST_CHAR) N_("/File/Print..."), ++ (BAD_CONST_CHAR) N_("/File/Send/Print..."), + (BAD_CONST_CHAR) types, + GIMP_PLUGIN, + n_args, 0, diff --git a/SOURCES/gutenprint-postscriptdriver.patch b/SOURCES/gutenprint-postscriptdriver.patch new file mode 100644 index 0000000..ac7f920 --- /dev/null +++ b/SOURCES/gutenprint-postscriptdriver.patch @@ -0,0 +1,99 @@ +diff -up gutenprint-5.2.6/src/main/gutenprint-internal.h.postscriptdriver gutenprint-5.2.6/src/main/gutenprint-internal.h +--- gutenprint-5.2.6/src/main/gutenprint-internal.h.postscriptdriver 2010-08-04 02:33:56.000000000 +0200 ++++ gutenprint-5.2.6/src/main/gutenprint-internal.h 2010-08-11 16:11:19.000000000 +0200 +@@ -56,6 +56,8 @@ extern void stpi_init_printer(void); + #define BUFFER_FLAG_FLIP_X 0x1 + #define BUFFER_FLAG_FLIP_Y 0x2 + extern stp_image_t* stpi_buffer_image(stp_image_t* image, unsigned int flags); ++extern stp_list_t *stp_paths_copy_with_prefix(stp_list_t* list, ++ const char *prefix); + + #define STPI_ASSERT(x,v) \ + do \ +diff -up gutenprint-5.2.6/src/main/module.c.postscriptdriver gutenprint-5.2.6/src/main/module.c +--- gutenprint-5.2.6/src/main/module.c.postscriptdriver 2006-09-30 17:02:59.000000000 +0200 ++++ gutenprint-5.2.6/src/main/module.c 2010-08-11 16:13:43.000000000 +0200 +@@ -151,12 +151,20 @@ int stp_module_load(void) + } + else + { ++ const char *prefix = getenv("DESTDIR"); + #ifdef USE_LTDL + stp_path_split(dir_list, getenv("LTDL_LIBRARY_PATH")); + stp_path_split(dir_list, lt_dlgetsearchpath()); + #else + stp_path_split(dir_list, PKGMODULEDIR); + #endif ++ if (prefix) ++ { ++ stp_list_t *prefix_list; ++ prefix_list = stp_paths_copy_with_prefix(dir_list, prefix); ++ stp_list_destroy(dir_list); ++ dir_list = prefix_list; ++ } + } + #ifdef USE_LTDL + file_list = stp_path_search(dir_list, ".la"); +diff -up gutenprint-5.2.6/src/main/path.c.postscriptdriver gutenprint-5.2.6/src/main/path.c +--- gutenprint-5.2.6/src/main/path.c.postscriptdriver 2008-06-01 16:41:18.000000000 +0200 ++++ gutenprint-5.2.6/src/main/path.c 2010-08-11 16:13:43.000000000 +0200 +@@ -158,7 +158,17 @@ stpi_data_path(void) + if (getenv("STP_DATA_PATH")) + stp_path_split(dir_list, getenv("STP_DATA_PATH")); + else +- stp_path_split(dir_list, PKGXMLDATADIR); ++ { ++ const char *prefix = getenv("DESTDIR"); ++ stp_path_split(dir_list, PKGXMLDATADIR); ++ if (prefix) ++ { ++ stp_list_t *prefix_list; ++ prefix_list = stp_paths_copy_with_prefix(dir_list, prefix); ++ stp_list_destroy(dir_list); ++ dir_list = prefix_list; ++ } ++ } + return dir_list; + } + +@@ -226,6 +236,40 @@ stp_path_split(stp_list_t *list, /* List + } + } + ++/* ++ * Split a PATH-type string (colon-delimited) into separate ++ * directories. ++ */ ++stp_list_t * ++stp_paths_copy_with_prefix(stp_list_t *list, /* List to add prefix to */ ++ const char *prefix) /* Prefix to add */ ++{ ++ stp_list_t *new_list; ++ stp_list_item_t *item; ++ int prefixlen = strlen (prefix); ++ if (!(new_list = stp_list_create())) ++ return; ++ ++ item = stp_list_get_start (list); ++ while (item) ++ { ++ const char *data; ++ char *new_data; ++ int len; ++ data = stp_list_item_get_data (item); ++ len = strlen (data); ++ new_data = (char *) stp_malloc(prefixlen + 1 + len + 1); ++ strncpy(new_data, prefix, prefixlen); ++ new_data[prefixlen] = '/'; ++ strcpy(new_data + prefixlen + 1, data); ++ stp_list_item_create(new_list, NULL, new_data); ++ ++ item = stp_list_item_next (item); ++ } ++ ++ return new_list; ++} ++ + /* Adapted from GNU libc + These macros extract size information from a `struct dirent *'. + They may evaluate their argument multiple times, so it must not diff --git a/SOURCES/gutenprint-python36syntax.patch b/SOURCES/gutenprint-python36syntax.patch new file mode 100644 index 0000000..5b28195 --- /dev/null +++ b/SOURCES/gutenprint-python36syntax.patch @@ -0,0 +1,94 @@ +--- gutenprint-5.2.12/src/cups/cups-genppdupdate.in.python36syntax ++++ gutenprint-5.2.12/src/cups/cups-genppdupdate.in +@@ -287,7 +287,7 @@ def update_ppd (ppd_source_filename): + for line in orig.readlines (): + line.rstrip () + if line.find ("*StpLocale:") != -1: +- match = re.search ("\*StpLocale:\s*\"(.*)\"$", line) ++ match = re.search (r'\*StpLocale:\s*"(.*)"$', line) + if match: + groups = match.groups () + if len (groups) >= 1: +@@ -295,26 +295,26 @@ def update_ppd (ppd_source_filename): + orig_locale = locale + valid = 1 + elif line.startswith ("*LanguageVersion"): +- match = re.search ("^\*LanguageVersion:\s*(.*)$", line) ++ match = re.search (r'^\*LanguageVersion:\s*(.*)$', line) + if match: + groups = match.groups () + if len (groups) >= 1: + lingo = groups[0] + elif line.startswith ("*StpDriverName:"): +- match = re.search ("^\*StpDriverName:\s*\"(.*)\"$", line) ++ match = re.search (r'^\*StpDriverName:\s*"(.*)"$', line) + if match: + groups = match.groups () + if len (groups) >= 1: + driver = groups[0] + valid = 1 + elif line.find ("*%End of ") != -1 and driver == "": +- match = re.search ("^\*%End of\s*(.*).ppd$", line) ++ match = re.search (r'^\*%End of\s*(.*).ppd$', line) + if match: + groups = match.groups () + if len (groups) >= 1: + driver = groups[0] + elif line.startswith ("*StpPPDLocation:"): +- match = re.search ("^\*StpPPDLocation:\s*\"(.*)\"$", line) ++ match = re.search (r'^\*StpPPDLocation:\s*"(.*)"$', line) + if match: + groups = match.groups () + if len (groups) >= 1: +@@ -436,7 +436,7 @@ def update_ppd (ppd_source_filename): + lines = source_data.rstrip ().split ("\n") + source_data = "" + for line in lines: +- m = re.search ("(\*StpLocale:\s*\")(.*)(\")", line) ++ m = re.search (r'(\*StpLocale:\s*")(.*)(")', line) + if m: + groups = m.groups () + line = groups[0] + orig_locale + groups[2] +@@ -689,7 +689,7 @@ def get_ppd_data (fh, types, opts, resolutions, defaults, data): + line = line.strip () + + if (types or opts) and line.startswith ("*OpenUI"): +- m = re.search ("^\*OpenUI\s\*(\w+).*:\s(\w+)", ++ m = re.search (r'^\*OpenUI\s\*(\w+).*:\s(\w+)', + line) + if m: + groups = m.groups () +@@ -704,7 +704,7 @@ def get_ppd_data (fh, types, opts, resolutions, defaults, data): + + optionlist = [] + elif opts and line.startswith ("*%s" % cur_opt): +- m = re.search ("^\*%s\s*(\w+)[\/:]" % cur_opt, line) ++ m = re.search (r'^\*%s\s*(\w+)[\/:]' % cur_opt, line) + if m: + groups = m.groups() + if len (groups) >= 1: +@@ -717,7 +717,7 @@ def get_ppd_data (fh, types, opts, resolutions, defaults, data): + old = s[2] + resolution_map[old] = new + elif defaults and line.startswith ("*Default"): +- m = re.search ("^\*(\w+):\s*(\w+)", line) ++ m = re.search (r'^\*(\w+):\s*(\w+)', line) + if m: + groups = m.groups () + key = groups[0] +@@ -844,13 +844,13 @@ def find_ppd (gutenprintfilename, drivername, lang, region): + global debug + + key = '^\\*FileVersion:[ ]*' + file_version +- match = re.search (".*/([^/]+\.[0-9]+\.[0-9]+)(\.sim)?(\.ppd)?(\.gz)?$", ++ match = re.search (r'.*/([^/]+\.[0-9]+\.[0-9]+)(\.sim)?(\.ppd)?(\.gz)?$', + gutenprintfilename) + if not match: + return None + + stored_name = match.groups ()[0] +- if re.search (".*/([^/]*)(\.sim)(\.ppd)?(\.gz)?$", gutenprintfilename): ++ if re.search (r'.*/([^/]*)(\.sim)(\.ppd)?(\.gz)?$', gutenprintfilename): + simplified = ".sim" + else: + simplified = "" diff --git a/SOURCES/gutenprint-yyin.patch b/SOURCES/gutenprint-yyin.patch new file mode 100644 index 0000000..79658ca --- /dev/null +++ b/SOURCES/gutenprint-yyin.patch @@ -0,0 +1,26 @@ +diff -up gutenprint-5.2.9/src/gutenprintui2/Makefile.am.yyin gutenprint-5.2.9/src/gutenprintui2/Makefile.am +--- gutenprint-5.2.9/src/gutenprintui2/Makefile.am.yyin 2010-09-12 14:52:53.000000000 +0100 ++++ gutenprint-5.2.9/src/gutenprintui2/Makefile.am 2012-12-18 16:27:11.705127153 +0000 +@@ -55,7 +55,8 @@ libgutenprintui2_la_CFLAGS = $(AM_CFLAGS + # Uncomment to build a versioned library + libgutenprintui2_la_LDFLAGS = \ + -version-info $(GUTENPRINTUI2_CURRENT_INTERFACE):$(GUTENPRINTUI2_INTERFACE_AGE):$(GUTENPRINTUI2_BINARY_AGE) \ +- -rpath $(libdir) -no-undefined ++ -rpath $(libdir) -no-undefined \ ++ -export-symbols-regex '^([^y]|y[^y])' + + AM_LFLAGS = -i + AM_YFLAGS = -d +diff -up gutenprint-5.2.9/src/gutenprintui2/Makefile.in.yyin gutenprint-5.2.9/src/gutenprintui2/Makefile.in +--- gutenprint-5.2.9/src/gutenprintui2/Makefile.in.yyin 2012-07-07 16:36:19.000000000 +0100 ++++ gutenprint-5.2.9/src/gutenprintui2/Makefile.in 2012-12-18 16:27:11.705127153 +0000 +@@ -367,7 +367,8 @@ libgutenprintui2_la_CFLAGS = $(AM_CFLAGS + # Uncomment to build a versioned library + libgutenprintui2_la_LDFLAGS = \ + -version-info $(GUTENPRINTUI2_CURRENT_INTERFACE):$(GUTENPRINTUI2_INTERFACE_AGE):$(GUTENPRINTUI2_BINARY_AGE) \ +- -rpath $(libdir) -no-undefined ++ -rpath $(libdir) -no-undefined \ ++ -export-symbols-regex '^([^y]|y[^y])' + + AM_LFLAGS = -i + AM_YFLAGS = -d diff --git a/SPECS/gutenprint.spec b/SPECS/gutenprint.spec new file mode 100644 index 0000000..46cac22 --- /dev/null +++ b/SPECS/gutenprint.spec @@ -0,0 +1,748 @@ +#%%global prever pre2 +#%%global ver %%{version}-%%{prever} + +Name: gutenprint +Summary: Printer Drivers Package +Version: 5.2.14 +Release: 3%{?dist} +URL: http://gimp-print.sourceforge.net/ +Source0: http://downloads.sourceforge.net/gimp-print/%{name}-%{version}.tar.bz2 +# Post-install script to update CUPS native PPDs. +Source1: cups-genppdupdate.py.in +# ported from old gimp-print package - fix for a menu in gimp gutenprint plugin +Patch0: gutenprint-menu.patch +Patch1: gutenprint-O6.patch +Patch3: gutenprint-postscriptdriver.patch +Patch4: gutenprint-yyin.patch +Patch5: gutenprint-manpage.patch +Patch6: gutenprint-python36syntax.patch +License: GPLv2+ + +#### removed patches, because the seems useless +# I'll leave them here, in case its removal will break something +#Patch2: gutenprint-selinux.patch + +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +# gcc is no longer in buildroot by default +BuildRequires: gcc +BuildRequires: cups-libs, cups-devel, cups +BuildRequires: gettext-devel,pkgconfig +BuildRequires: libtiff-devel,libjpeg-devel,libpng-devel +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: pkgconfig(gtk+-2.0) +BuildRequires: pkgconfig(gimpui-2.0) +BuildRequires: gimp +BuildRequires: chrpath + +# Make sure we get postscriptdriver tags. +BuildRequires: python3-cups + +# autoreconf +BuildRequires: autoconf automake libtool + +# needed for defining %%{__python3} macro in prep phase +BuildRequires: python3-devel + +## NOTE ## +# The README file in this package contains suggestions from upstream +# on how to package this software. I'd be inclined to follow those +# suggestions unless there's a good reason not to do so. + +%description +Gutenprint is a package of high quality printer drivers for Linux, BSD, +Solaris, IRIX, and other UNIX-alike operating systems. +Gutenprint was formerly called Gimp-Print. + +%package doc +Summary: Documentation for gutenprint + +%description doc +Documentation for gutenprint. + +%package libs +Summary: libgutenprint library + +%description libs +This package includes libgutenprint library, necessary to run gutenprint. + +%package libs-ui +Summary: libgutenprintui2 library +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description libs-ui +This package includes libgutenprintui2 library, which contains +GTK+ widgets, which may be used for print dialogs etc. + +%package devel +Summary: Library development files for gutenprint +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: gtk2-devel + +%description devel +This package contains headers and libraries required to build applications that +uses gutenprint package. + +%package plugin +Summary: GIMP plug-in for gutenprint +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: gimp + +%description plugin +This package contains the gutenprint GIMP plug-in. + +%package extras +Summary: Sample test pattern generator for gutenprint-devel +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description extras +This package contains test pattern generator and the sample test pattern +that is used by gutenprint-devel package. + +%package cups +Summary: CUPS drivers for Canon, Epson, HP and compatible printers +Requires: cups +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description cups +This package contains native CUPS support for a wide range of Canon, +Epson, HP and compatible printers. + +%prep +%setup -q -n %{name}-%{version} +# Fix menu placement of GIMP plugin. +%patch0 -p1 -b .menu +# Don't use -O6 compiler option. +%patch1 -p1 -b .O6 +# Restore file contexts when updating PPDs. +#%%patch2 -p1 -b .selinux +# Allow the CUPS dynamic driver to run inside a build root. +%patch3 -p1 -b .postscriptdriver +# Don't export yy* symbols (bug #882194). +%patch4 -p1 -b .yyin + +# Added some escputil options to the manpage (bug #979064). +%patch5 -p1 -b .manpage + +cp %{SOURCE1} src/cups/cups-genppdupdate.in + +#shebang can change between releases - use %%{__python3} macro +sed -i -e 's,^#!/usr/bin/python3,#!%{__python3},' src/cups/cups-genppdupdate.in + +# Python 3.6 invalid escape sequence deprecation fixes, COPYING as license (bug #1448303) +%patch6 -p1 -b .python36syntax + +%build +# Don't run the weave test as it takes a very long time. +sed -i -e 's,^\(TESTS *=.*\) run-weavetest,\1,' test/Makefile.in + +%configure --disable-dependency-tracking \ + --disable-static \ + --enable-samples \ + --enable-escputil \ + --enable-test \ + --disable-rpath \ + --enable-cups-1_2-enhancements \ + --disable-cups-ppds \ + --enable-simplified-cups-ppds + +%make_build + +# Test suite disabled due to bug #1069274. +#%check +#make check + +%install +%make_install + +mkdir -p %{buildroot}%{_sbindir} + +rm -rf %{buildroot}%{_datadir}/gutenprint/doc +rm -f %{buildroot}%{_datadir}/foomatic/kitload.log +rm -rf %{buildroot}%{_libdir}/gutenprint/5.2/modules/*.la +rm -f %{buildroot}%{_sysconfdir}/cups/command.types + +%find_lang %{name} +sed 's!%{_datadir}/locale/\([^/]*\)/LC_MESSAGES/gutenprint.mo!%{_datadir}/locale/\1/gutenprint_\1.po!g' %{name}.lang >%{name}-po.lang +rm -f %{name}.lang +%find_lang %{name} --all-name +cat %{name}-po.lang >>%{name}.lang + +echo .so man8/cups-genppd.8 > %{buildroot}%{_mandir}/man8/cups-genppd.5.2.8 + +# Fix up rpath. If you can find a way to do this without resorting +# to chrpath, please let me know! +for file in \ + %{buildroot}%{_sbindir}/cups-genppd.5.2 \ + %{buildroot}%{_libdir}/gimp/*/plug-ins/* \ + %{buildroot}%{_libdir}/*.so.* \ + %{buildroot}%{_cups_serverbin}/driver/* \ + %{buildroot}%{_cups_serverbin}/filter/* \ + %{buildroot}%{_bindir}/* +do + chrpath --delete ${file} +done + + +%post libs -p /sbin/ldconfig +%post libs-ui -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig +%postun libs-ui -p /sbin/ldconfig + +%post cups +/usr/sbin/cups-genppdupdate >/dev/null 2>&1 || : +/sbin/service cups reload >/dev/null 2>&1 || : +exit 0 + + +%files -f %{name}.lang +%license COPYING +%{_bindir}/escputil +%{_mandir}/man1/escputil.1* +%{_datadir}/%{name} +%{_libdir}/%{name} + +%files doc +%doc AUTHORS NEWS README doc/FAQ.html doc/gutenprint-users-manual.odt doc/gutenprint-users-manual.pdf +%license COPYING + +%files libs +%{_libdir}/libgutenprint.so.2 +%{_libdir}/libgutenprint.so.2.7.0 + +%files libs-ui +%{_libdir}/libgutenprintui2.so.1 +%{_libdir}/libgutenprintui2.so.1.0.0 + +%files devel +%doc ChangeLog doc/developer/reference-html doc/developer/gutenprint.pdf +%doc doc/gutenprint doc/gutenprintui2 +%{_includedir}/gutenprint/ +%{_includedir}/gutenprintui2/ +%{_libdir}/*.so +%{_libdir}/pkgconfig/gutenprint.pc +%{_libdir}/pkgconfig/gutenprintui2.pc +%exclude %{_libdir}/*.la + +%files plugin +%{_libdir}/gimp/*/plug-ins/gutenprint + +%files extras +%doc +%{_bindir}/testpattern +%{_datadir}/gutenprint/samples/* + +%files cups +%doc +%{_datadir}/cups/calibrate.ppm +%{_datadir}/cups/usb/net.sf.gimp-print.usb-quirks +%{_cups_serverbin}/filter/* +%{_cups_serverbin}/driver/* +%{_cups_serverbin}/backend/* +%{_bindir}/cups-calibrate +%{_sbindir}/cups-genppd* +%{_mandir}/man8/cups-calibrate.8* +%{_mandir}/man8/cups-genppd*.8* + +%changelog +* Wed Aug 15 2018 Zdenek Dohnal - 5.2.14-3 +- rebuilt with fixed gimp module + +* Wed Jul 11 2018 Zdenek Dohnal - 5.2.14-2 +- use %%{__python3} macro + +* Thu Jun 28 2018 Zdenek Dohnal - 5.2.14-1 +- 5.2.14 + +* Wed Feb 28 2018 Zdenek Dohnal - 5.2.14-0.4pre2 +- name libraries explicitly + +* Tue Feb 20 2018 Zdenek Dohnal - 5.2.14-0.3pre2 +- gcc is no longer in buildroot by default + +* Wed Feb 07 2018 Fedora Release Engineering - 5.2.14-0.2pre2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Jan 30 2018 Zdenek Dohnal - 5.2.14-0.1pre2 +- Rebase to 5.2.14pre2 + +* Sat Jan 20 2018 Björn Esser - 5.2.13-4 +- Rebuilt for switch to libxcrypt + +* Wed Aug 02 2017 Fedora Release Engineering - 5.2.13-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 5.2.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jul 19 2017 Zdenek Dohnal - 5.2.13-1 +- rebase to 5.2.13 + +* Tue May 23 2017 Zdenek Dohnal - 5.2.13-0.1pre1 +- rebase to 5.2.13-pre1 + +* Fri May 05 2017 Zdenek Dohnal - 5.2.12-4 +- removing deprecated escape sequences because of Python-3.6, ship COPYING as license (patch provided by Ville Skyttä) + +* Fri Feb 10 2017 Fedora Release Engineering - 5.2.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 02 2017 Zdenek Dohnal - 5.2.12-2 +- move back gutenprint folder to base package (bug #1412020) + +* Fri Jan 13 2017 Zdenek Dohnal - 5.2.12-1 +- rebase to 5.2.12 - removed foomatic and ghostscript/ijs support + +* Mon Dec 19 2016 Miro Hrončok - 5.2.12-0.5pre4 +- Rebuild for Python 3.6 + +* Mon Oct 31 2016 Zdenek Dohnal - 5.2.12-0.4pre4 +- rebase to 5.2.12-pre4 + +* Fri Oct 14 2016 Zdenek Dohnal - 5.2.12-0.4pre3 +- rebase to 5.2.12-pre3, adding new share libraries to devel subpackage + +* Tue Sep 20 2016 Zdenek Dohnal - 5.2.12-0.2pre2 +- adding new sources + +* Tue Sep 20 2016 Zdenek Dohnal - 5.2.12-0.2pre2 +- rebase to 5.2.12-pre2, GhostScript IJS driver and Foomatic data generator were removed from package + +* Wed Feb 03 2016 Fedora Release Engineering - 5.2.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jan 21 2016 Jiri Popelka - 5.2.11-1 +- 5.2.11 + +* Tue Oct 06 2015 Jiri Popelka - 5.2.11-0.2pre2 +- 5.2.11-pre2 + +* Tue Jun 30 2015 Jiri Popelka - 5.2.11-0.1pre1 +- 5.2.11-pre1 + +* Mon Jun 29 2015 Tim Waugh - 5.2.10-15 +- Fix for PPD update script with more than one PPD (bug #1229619). + +* Tue Jun 16 2015 Tim Waugh - 5.2.10-14 +- Disable test suite again (bug #1069274). + +* Mon Jun 01 2015 Jiri Popelka - 5.2.10-13 +- foomatic subpackage requires python3-cups (bug #1226871). + +* Fri Apr 10 2015 Tim Waugh - 5.2.10-12 +- Enable test suite again to see if bug #1069274 is still current. + +* Sat Feb 21 2015 Till Maas - 5.2.10-11 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Thu Jan 15 2015 Tim Waugh - 5.2.10-10 +- Require python3-cups to get postscriptdriver() tags. + +* Mon Dec 8 2014 Tim Waugh - 5.2.10-9 +- Fix tagging of language-specific files (bug #1157347). + +* Fri Aug 29 2014 Tim Waugh - 5.2.10-8 +- More Python 3 fixes for scripts (bug #1134092). + +* Fri Aug 22 2014 Tim Waugh - 5.2.10-7 +- Python 3 fixes for scripts (bug #1132924). + +* Sat Aug 16 2014 Fedora Release Engineering - 5.2.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Aug 12 2014 Tomas Radej - 5.2.10-5 +- Ported scripts to Python 3 + +* Tue Aug 5 2014 Tim Waugh - 5.2.10-4 +- Supply man page for gutenprint-foomaticupdate. +- Link to cups-genppd(8) man page from cups-genppd.5.2(8). + +* Mon Aug 4 2014 Tim Waugh - 5.2.10-3 +- Link to ijsgutenprint(1) man page from ijsgutenprint.5.2(1). + +* Sat Jun 07 2014 Fedora Release Engineering - 5.2.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon May 19 2014 Jiri Popelka - 5.2.10-1 +- 5.2.10 + +* Wed Apr 09 2014 Jiri Popelka - 5.2.10-0.6.pre2 +- Move libraries into separate subpackages (#1085599) +- Remove archaic Provides&Obsoletes + +* Mon Mar 10 2014 Jaromír Končický - 5.2.10-0.5.pre2 +- 5.2.10-pre2. + +* Mon Mar 10 2014 Jiri Popelka - 5.2.10-0.4.pre1 +- BuildRequires: pkgconfig(foo) instead of foo-devel + +* Wed Feb 26 2014 Jaromír Končický - 5.2.10-0.3.pre1 +- Removing check phase because of strange and not reproducible segfault + (bug #1069274) + +* Fri Feb 21 2014 Jiri Popelka - 5.2.10-0.2.pre1 +- BuildRequires libusb1-devel + +* Mon Feb 17 2014 Jaromír Končický - 5.2.10-0.1.pre1 +- 5.2.10-pre1. +- Removed: device-ids.patch ui2-libdeps.patch + +* Thu Jan 2 2014 Tim Waugh - 5.2.9-15 +- Fixed typo in cups-genppdupdate script (bug #1046073). + +* Sat Aug 03 2013 Fedora Release Engineering - 5.2.9-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 16 2013 Tim Waugh - 5.2.9-13 +- Run test suite. + +* Thu Jun 27 2013 Tim Waugh - 5.2.9-12 +- Fixed changelog dates. +- Added some escputil options to the manpage (bug #979064). + +* Mon Mar 25 2013 Jiri Popelka - 5.2.9-11 +- Run autoreconf prior to running configure (#925535) + +* Tue Feb 19 2013 Jiri Popelka - 5.2.9-10 +- Added IEEE 1284 Device ID for Canon PIXMA MP500 (bug #911727). + +* Thu Feb 14 2013 Fedora Release Engineering - 5.2.9-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jan 17 2013 Jiri Popelka 5.2.9-8 +- Added IEEE 1284 Device ID for Kyocera FS-1118MFP (bug #782379). +- Use arch-specific dependency when requiring base package. + +* Tue Dec 18 2012 Tim Waugh 5.2.9-7 +- Don't export yy* symbols (bug #882194). + +* Fri Dec 07 2012 Jiri Popelka 5.2.9-6 +- 5.2.9 has had wrong libgutenprintui2 dependencies + +* Fri Oct 19 2012 Tim Waugh 5.2.9-5 +- Added IEEE 1284 Device IDs for Samsung ML-1450 (bug #844687) and + Canon ML280 series (bug #848093). + +* Fri Sep 21 2012 Tim Waugh 5.2.9-4 +- Updated source URL. + +* Thu Jul 19 2012 Fedora Release Engineering - 5.2.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 09 2012 Jiri Popelka 5.2.9-1 +- 5.2.9 + +* Tue Jun 12 2012 Jiri Popelka 5.2.8-2 +- bumped release + +* Tue Jun 12 2012 Jiri Popelka 5.2.8-1 +- 5.2.8 + +* Tue Apr 03 2012 Nils Philippsen - 5.2.7-11 +- rebuild against gimp 2.8.0 release candidate + +* Fri Jan 13 2012 Fedora Release Engineering - 5.2.7-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Dec 16 2011 Nils Philippsen - 5.2.7-9 +- rebuild for GIMP 2.7 + +* Mon Nov 7 2011 Tim Waugh 5.2.7-8 +- Rebuild for new libpng. + +* Tue Oct 11 2011 Tim Waugh 5.2.7-7 +- Added IEEE 1284 Device ID for Canon PIXMA MP250 (bug #744087). + +* Tue Sep 27 2011 Jiri Popelka 5.2.7-6 +- Use _cups_serverbin macro from cups-devel for where to put driver executables. +- Added IEEE 1284 Device ID for: + Epson Stylus Photo R2400 (bug #720270) + Epson Stylus C92 (bug #735400) + Canon PIXMA iP1900 (bug #741329) + Canon PIXMA iP4000 (bug #741006) + +* Tue Aug 09 2011 Jiri Popelka 5.2.7-5 +- Improve the null-pointer.patch (bug #725447). +- Added IEEE 1284 Device ID for: + Epson Stylus D78 (bug #245948). + +* Tue Jun 28 2011 Tim Waugh 5.2.7-4 +- Fixed use of find_lang macro (bug #716426). + +* Wed Jun 15 2011 Tim Waugh 5.2.7-3 +- Rebuilt against new python-cups package to fix postscriptdriver tags + (bug #712074). + +* Tue Jun 7 2011 Tim Waugh 5.2.7-2 +- Fix build against newer versions of gcc. +- cups-genppdupdate: fixed multicat support (bug #711021). It was + writing an extra newline character after the URI, which caused the + gutenprint.5.2 multicat process to exit. This prevented some + PPDs from being updated. + +* Thu May 05 2011 Jiri Popelka 5.2.7-1 +- 5.2.7. + +* Thu Dec 02 2010 Jiri Popelka 5.2.6-3 +- Added IEEE 1284 Device ID for: + Canon PIXMA iP4200 (bug #626365). + Canon PIXMA iP3000 (bug #652179). + Epson Stylus Color 680 (bug #652228). + Epson Stylus Photo 1270 (bug #638537). + HP LaserJet 4050/4100/4350/5100/8000/M3027 MFP/M3035 MFP/P3005 (bug #659043). + HP Color LaserJet 2500/4550 (bug #659044). + Brother hl-2035 (bug #651603#c3). +- Avoid null pointer access in escputil (bug #659120). + +* Fri Nov 26 2010 Tim Waugh 5.2.6-2 +- The pycups requirement is now python-cups. + +* Wed Aug 11 2010 Jiri Popelka 5.2.6-1 +- 5.2.6. + +* Mon Jul 12 2010 Jiri Popelka 5.2.5-10 +- Added COPYING file to main package. + +* Thu Jul 8 2010 Jiri Popelka 5.2.5-9 +- Don't ship kitload.log in foomatic sub-package (bug #594709). + +* Fri Jun 11 2010 Tim Waugh 5.2.5-8 +- Fixed Source0 URL. + +* Wed May 12 2010 Jiri Popelka 5.2.5-7 +- Added IEEE 1284 Device ID for: + Epson Stylus Photo 1400 (bug #577299). + Epson Stylus Photo 830U (bug #577307). + HP DeskJet 959C (bug #577291). + +* Thu Mar 25 2010 Tim Waugh 5.2.5-6 +- Added IEEE 1284 Device ID for Epson Stylus Photo R230 (from Ubuntu #520466). + +* Mon Mar 8 2010 Tim Waugh 5.2.5-5 +- Added IEEE 1284 Device ID for Epson Stylus D92 (bug #570888). + +* Tue Mar 2 2010 Tim Waugh 5.2.5-4 +- Better defattr use in file manifests. +- Fixed mixed spaces and tabs. +- Fixed main package summary. +- Added comments for all sources and patches. + +* Mon Feb 15 2010 Tim Waugh 5.2.5-3 +- The cups sub-package requires the exactly-matching main gutenprint + package. + +* Fri Feb 12 2010 Tim Waugh 5.2.5-2 +- 5.2.5. + +* Fri Feb 5 2010 Tim Waugh 5.2.4-11 +- CUPS driver: if DESTDIR is set, use it when looking for XML files. + Fixes postscriptdriver tags. + +* Thu Feb 4 2010 Tim Waugh 5.2.4-10 +- Rebuild for postscriptdriver tags. + +* Wed Nov 25 2009 Tim Waugh 5.2.4-9 +- The foomatic sub-package requires foomatic-db (for directories). + +* Fri Nov 20 2009 Tim Waugh 5.2.4-8 +- Don't ship command.types as CUPS defines its own. + +* Thu Oct 29 2009 Tim Waugh 5.2.4-7 +- Removed incorrect Device ID for Brother HL-2060 (bug #531370). + +* Mon Sep 28 2009 Tim Waugh 5.2.4-6 +- Reimplemented PPD upgrade script in Python to avoid perl + dependency (bug #524978). + +* Tue Sep 1 2009 Tim Waugh 5.2.4-5 +- Provide IEEE 1284 Device IDs in CUPS model list. + +* Tue Aug 18 2009 Tim Waugh 5.2.4-4 +- Enabled simplified CUPS drivers (bug #518030). + +* Mon Aug 3 2009 Tim Waugh 5.2.4-3 +- Silence gutenprint-foomaticppdupdate on gutenprint-foomatic upgrade. + +* Fri Jul 31 2009 Tim Waugh 5.2.4-2 +- 5.2.4. Re-enabled compiler optimization for ppc64. + +* Thu Jul 30 2009 Tim Waugh 5.2.3-8 +- Don't show output when upgrading cups sub-package (bug #507324). +- Split documentation into doc sub-package (bug #492452). + +* Fri Jul 24 2009 Fedora Release Engineering - 5.2.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jul 15 2009 Tim Waugh 5.2.3-6 +- Don't build CUPS PPDs (instead build a CUPS driver that can + generate them). Fixes build (bug #511538). + +* Tue Feb 24 2009 Fedora Release Engineering - 5.2.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Jan 29 2009 Tim Waugh 5.2.3-4 +- When updating foomatic PPDs, don't give a traceback if some PPD is + not strictly conformant (bug #481397). + +* Sat Jan 10 2009 Tim Waugh 5.2.3-3 +- Don't use popen2 in the foomatic PPD update script. + +* Thu Jan 8 2009 Tim Waugh 5.2.3-2 +- Only run the foomatic PPD update script on update, and make sure the + script can deal with major version upgrades (bug #478328). + +* Tue Dec 23 2008 Tim Waugh 5.2.3-1 +- 5.2.3. + +* Fri Dec 5 2008 Tim Waugh 5.2.2-2 +- Fixed generation of globalized PPDs. + +* Thu Nov 20 2008 Tim Waugh 5.2.2-1 +- 5.2.2. +- Restore SELinux file contexts of modified PPDs. + +* Mon Aug 4 2008 Tim Waugh +- Fixed summary for foomatic sub-package. + +* Thu Jul 31 2008 Tom "spot" Callaway 5.0.2-3 +- fix license tag + +* Wed Feb 13 2008 Tim Waugh 5.0.2-2 +- Rebuild for GCC 4.3. + +* Fri Jan 18 2008 Tim Waugh 5.0.2-1 +- 5.0.2. No longer need lpstat patch. + +* Mon Jan 7 2008 Tim Waugh +- Own %%{_datadir}/gutenprint (bug #427801). + +* Fri Oct 5 2007 Tim Waugh 5.0.1-5 +- Don't ship samples in the main package. + +* Fri Aug 31 2007 Tim Waugh 5.0.1-4 +- Plug-in name is gutenprint, not print. + +* Mon Jul 2 2007 Tim Waugh 5.0.1-3 +- The foomatic package requires system-config-printer-libs for the + update script (bug #246865). + +* Mon Jul 2 2007 Tim Waugh 5.0.1-2 +- Fix up foomatic PPD files after upgrade (bug #246448). + +* Tue Jun 26 2007 Tim Waugh 5.0.1-1 +- 5.0.1. + +* Thu May 10 2007 Tim Waugh 5.0.0.99.1-3 +- Try to work around GCC bug #239003. +- Don't add extra compiler flags. +- Moved gimp-print obsoletes/provides to the foomatic sub-package + (bug #238890). + +* Mon Mar 5 2007 Tim Waugh 5.0.0.99.1-2 +- Slightly better obsoletes/provides to follow the naming guidelines. + +* Mon Mar 5 2007 Tim Waugh 5.0.0.99.1-1 +- 5.0.0.99.1. +- No longer need PPDs sub-packages: CUPS driver is included in the cups + sub-package. +- Package the CUPS driver in sbindir and put a symlink in the CUPS ServerBin + directory to work around bug #231015. +- Set POSIX locale when parsing lpstat output. + +* Fri Mar 2 2007 Tim Waugh 5.0.0-7 +- Fixed menu patch. +- Don't list rastertogutenprint twice. + +* Wed Feb 28 2007 Tim Waugh +- Fixed typo in patch line. + +* Wed Feb 28 2007 Tim Waugh 5.0.0-6 +- Ported menu patch from gimp-print package. +- Fixed summary for plugin sub-package. + +* Fri Feb 9 2007 Tim Waugh 5.0.0-5 +- More obsoletes/provides for gimp-print sub-packages. + +* Fri Jan 19 2007 Tim Waugh 5.0.0-4 +- Disable libgutenprintui (GTK+ 1.2 library). Build requires gtk2-devel, + not gtk+-devel. + +* Tue Jan 16 2007 Tim Waugh 5.0.0-3 +- More obsoletes/provides fixing (bug #222546). + +* Fri Jan 12 2007 Tim Waugh 5.0.0-2 +- Make cups sub-package obsolete/provide gimp-print-cups. +- PPDs sub-packages require cups sub-package. +- Remove foomatic cache after foomatic sub-package is installed/removed. +- Obsoletes/Provides gimp-print-utils. + +* Thu Jan 11 2007 Tim Waugh 5.0.0-1 +- The cups subpackage no longer requires gimp-print-cups. +- Ship escputil, native CUPS backend/filters, and cups-calibrate. + +* Thu Jan 11 2007 Parag Nemade - 5.0.0-0.17 +- Enabling -plugin subpackage as gimp-print dropped its -plugin subpackage. + +* Tue Nov 14 2006 Parag Nemade - 5.0.0-0.16 +- Added missing dependency of gimp-print-cups in gutenprint-cups + +* Tue Oct 03 2006 Parag Nemade - 5.0.0-0.15 +- Did some fix for tag issue + +* Fri Sep 29 2006 Parag Nemade - 5.0.0-0.14 +- Removed unwanted .la files and made following files owned by + main package. + /usr/share/gutenprint/5.0.0 + /usr/share/gutenprint + +* Fri Sep 29 2006 Parag Nemade - 5.0.0-0.13 +- Fixed some missing file remove locations path + +* Thu Sep 28 2006 Parag Nemade - 5.0.0-0.12 +- Fixed rpm build for x86_64 arch + +* Fri Sep 08 2006 Parag Nemade - 5.0.0-0.11 +- Separated GIMP plugin under gutenprint-plugin package + +* Thu Sep 07 2006 Parag Nemade - 5.0.0-0.10 +- Added gimp as BR + +* Thu Sep 07 2006 Parag Nemade - 5.0.0-0.9 +- Removed Requires(post) and Requires(postun) lines in SPEC +- Removed mixed usage of macros + +* Wed Aug 09 2006 Parag Nemade - 5.0.0-0.8 +- Moved cups related files from main rpm to gutenprint-cups + +* Wed Aug 09 2006 Parag Nemade - 5.0.0-0.7 +- Moved /usr/share/gutenprint/doc to %%doc of main rpm and devel rpm +- Additionally added API documents for gutenprint and gutenprintui2 + +* Tue Aug 08 2006 Parag Nemade - 5.0.0-0.6 +- Added cups-genppdupdate.5.0 at post section +- Splitted gutenprint main rpm for separate languages + +* Wed Aug 02 2006 Parag Nemade - 5.0.0-0.5 +- New upstream release + +* Wed Jul 19 2006 Parag Nemade - 5.0.0-0.4.rc3 +- Removed Requires on perl-Curses and perl-perlmenu + as both are automatically added on binary RPM +- Commented Obsoletes and provides tag as Fedora Extras package can not + Obsoletes Fedora Core Package. + +* Tue Jul 18 2006 Parag Nemade - 5.0.0-0.3.rc3 +- Added 3 more sub-packages-extras,cups,foomatic +- Added BuildRequires gtk+-devel +- Added correct options for %%configure +- Added Requires for perl-Curses, perl-perlmenu +- Added cups restart command at post section of SPEC + +* Tue Jul 18 2006 Parag Nemade - 5.0.0-0.2.rc3 +- Added Obsoletes and Provides tag + +* Fri Jul 14 2006 Parag Nemade - 5.0.0-0.1.rc3 +- Initial Release +