diff -Nru cups-filters-1.8.3/debian/changelog cups-filters-1.8.3/debian/changelog --- cups-filters-1.8.3/debian/changelog 2016-03-30 12:29:41.000000000 +0000 +++ cups-filters-1.8.3/debian/changelog 2016-04-20 15:30:59.000000000 +0000 @@ -1,3 +1,10 @@ +cups-filters (1.8.3-2ubuntu3) xenial; urgency=medium + + * Undo cups-filters-lsb and cups-filters-invalid-mta changes, we + will fix this in a more generic way in a post-release update. + + -- Adam Conrad Wed, 20 Apr 2016 09:29:13 -0600 + cups-filters (1.8.3-2ubuntu2) xenial; urgency=medium * Added Conflicts:/Replaces:/Provides: foomatic-filters-beh to the diff -Nru cups-filters-1.8.3/debian/control cups-filters-1.8.3/debian/control --- cups-filters-1.8.3/debian/control 2016-03-30 12:24:38.000000000 +0000 +++ cups-filters-1.8.3/debian/control 2016-04-20 15:31:57.000000000 +0000 @@ -2,7 +2,8 @@ Standards-Version: 3.9.7 Priority: optional Section: net -Maintainer: Debian Printing Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Printing Team Uploaders: Till Kamppeter , Didier Raboud @@ -39,9 +40,7 @@ librsvg2-bin, liblouis-dev, # Needed for tests - fonts-dejavu-core, -# Needed for cups-filters-lsb - python3-all-dev + fonts-dejavu-core Homepage: http://www.openprinting.org/ Vcs-Git: https://alioth.debian.org/anonscm/git/printing/cups-filters.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=printing/cups-filters.git @@ -177,182 +176,3 @@ cups-browsed is also useful with a CUPS >= 1.6 server to allow CUPS < 1.6 clients to browse its printer list (by using the old 'cups' protocol in BrowseLocalProtocols). - -Package: cups-filters-lsb -Architecture: all -Depends: lsb-base (>= 9.20150826), - lsb-release (>= 9.20150826), -# From lsb-core - ${glibc}, - libz1, - libncurses5, - libpam0g, - lsb-invalid-mta | mail-transport-agent, - at, - bc, - binutils, - bsdmainutils, - bsdutils, - cpio, - cron | cron-daemon, - ed, - file, - libc6-dev | libc-dev, - locales, - cups-bsd | lpr, - lprng | cups-client, - m4, - mailx | mailutils, - make, - man-db, - mawk | gawk, - ncurses-term, - passwd, - patch, - pax, - procps, - psmisc, - rsync, - alien (>= 8.36), - python3, - ${python3:Depends}, - time, -# from lsb-graphics - libgl1-mesa-glx | libgl1, - libglu1-mesa | libglu1, - libx11-6 | xlibs, -# from lsb-cxx - libstdc++6, -# from lsb-desktop - fontconfig (>= 2.6.0), - libfontconfig1 (>= 2.6.0), - libpng12-0, - libjpeg62, - libglib2.0-0 (>= 2.12.13), - libatk1.0-0 (>= 1.10.3), - libpango1.0-0 (>= 1.10.4), - libgtk2.0-0 (>= 2.10.14), - libcairo2 (>= 1.2.0), - libqtcore4, - libqtgui4, - libqt4-xml, - libqt4-opengl, - libqt4-sql, - libqt4-svg, - libqt4-network, - libqt4-sql-sqlite, - libxml2, - libfreetype6, - libxrender1, - libxtst6, - libxft2, - xdg-utils, - libnss3, -# from lsb-languages - python (>= 2.4), - perl (>= 5.8.8), - perl (<< 6), - libpod-plainer-perl, -# from lsb-multimedia - libasound2, -# from lsb-printing - libcups2, - libcupsimage2, - cups-filters (>= 1.0.42) | foomatic-filters, - ghostscript, - cups-filters (>= 1.0.36) | ghostscript-cups, -# from lsb-security - libnss3, - libnspr4, - ${depends}, - ${misc:Depends} -# from lsb-desktop -Recommends: libqt3-mt (>= 3:3.3.6) -Provides: lsb ${lsbversion}, - lsb-core ${lsbversion}, - lsb-graphics ${lsbversion}, - lsb-cxx ${lsbversion}, - lsb-desktop ${lsbversion}, - lsb-languages ${lsbversion}, - lsb-multimedia ${lsbversion}, - lsb-printing ${lsbversion}, - lsb-security ${lsbversion}, - lsb-core-noarch ${lsbversion}, - lsb-graphics-noarch ${lsbversion}, - lsb-cxx-noarch ${lsbversion}, - lsb-desktop-noarch ${lsbversion}, - lsb-languages-noarch ${lsbversion}, - lsb-multimedia-noarch ${lsbversion}, - lsb-printing-noarch ${lsbversion}, - lsb-security-noarch ${lsbversion}, - ${provides} -Breaks: lsb ${beforelsbversion}, - lsb-core ${beforelsbversion}, - lsb-graphics ${beforelsbversion}, - lsb-cxx ${beforelsbversion}, - lsb-desktop ${beforelsbversion}, - lsb-languages ${beforelsbversion}, - lsb-multimedia ${beforelsbversion}, - lsb-printing ${beforelsbversion}, - lsb-security ${beforelsbversion} -Replaces: lsb ${beforelsbversion}, - lsb-core ${beforelsbversion}, - lsb-graphics ${beforelsbversion}, - lsb-cxx ${beforelsbversion}, - lsb-desktop ${beforelsbversion}, - lsb-languages ${beforelsbversion}, - lsb-multimedia ${beforelsbversion}, - lsb-printing ${beforelsbversion}, - lsb-security ${beforelsbversion} -Description: OpenPrinting CUPS Filters - LSB 4.1 printer driver package support - The LSB (Linux Standard Base, http://www.linuxbase.org/) is a - standard core system that third-party applications written for Linux - can depend upon. Defining what common Linux distribution have in - common as a standard, it allows for creating distribution-independent - binary software packages. - . - OpenPrinting has made use of the LSB to let printer manufacturers be - able to supply binary printer driver packages which work on all Linux - distributions and Epson has actually adopted this concept. - . - As Debian has dropped the support for the LSB, there is no "lsb" meta - package and auxiliary packages any more, also not in Ubuntu. This - binary package replaces them, at least for an interim period until - there is a new driver package concept established by Openprinting - which does not use the LSB any more. - -Package: cups-filters-invalid-mta -Architecture: all -Depends: ${misc:Depends} -Suggests: lsb -Breaks: lsb-invalid-mta ${beforelsbversion} -Replaces: lsb-invalid-mta ${beforelsbversion} -Provides: mail-transport-agent, lsb-invalid-mta ${lsbversion} -Conflicts: mail-transport-agent -Description: OpenPrinting CUPS Filters - LSB 4.1 sendmail dummy - The Linux Standard Base (http://www.linuxbase.org/) is a standard - core system that third-party applications written for Linux can - depend upon. - . - This package contains nothing else than a fake /usr/sbin/sendmail - command to fulfill the LSB's requirement of providing this command without - requiring an MTA to get installed, which once introduces a daemon which - can cause security problems and second, users get asked questions about - how they want their MTA configured when in reality they simply wanted to - install a desktop application or a printer driver, but the dependency on - LSB compliance pulls in an MTA with the installation. - . - The LSB requirement on /usr/sbin/sendmail comes from old times where Linux - and Unix machines had all fixed IPs and did server tasks in data centers. - Today's typical desktop Linux machines do not do local e-mail any more as - users use external e-mail services. - . - The /usr/sbin/sendmail always exits with exit status -1 (255) and sends a - warning message to stderr, so that if a program actually tries to send e-mail - via the sendmail command the user gets note. - . - As Debian has dropped the support for the LSB, there is no - "lsb-invalid-mta" package any more, also not in Ubuntu. This binary - package replaces it, at least for an interim period until there is a - new driver package concept established by Openprinting which does not - use the LSB any more. diff -Nru cups-filters-1.8.3/debian/copyright cups-filters-1.8.3/debian/copyright --- cups-filters-1.8.3/debian/copyright 2016-02-15 18:59:32.000000000 +0000 +++ cups-filters-1.8.3/debian/copyright 2016-04-20 15:32:46.000000000 +0000 @@ -28,10 +28,6 @@ 2013-2015, Didier Raboud License: GPL-2+ -Files: debian/local/lsb/* -Copyright: 2002-2010, Chris Lawrence -License: GPL-2 - Files: backend/beh.c backend/implicitclass.c Copyright: 2015, Till Kamppeter diff -Nru cups-filters-1.8.3/debian/cups-filters-invalid-mta.install cups-filters-1.8.3/debian/cups-filters-invalid-mta.install --- cups-filters-1.8.3/debian/cups-filters-invalid-mta.install 2016-02-15 18:50:04.000000000 +0000 +++ cups-filters-1.8.3/debian/cups-filters-invalid-mta.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian/local/lsb/sendmail /usr/sbin/ diff -Nru cups-filters-1.8.3/debian/cups-filters-lsb.install cups-filters-1.8.3/debian/cups-filters-lsb.install --- cups-filters-1.8.3/debian/cups-filters-lsb.install 2016-02-15 18:49:54.000000000 +0000 +++ cups-filters-1.8.3/debian/cups-filters-lsb.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -debian/local/lsb/initdutils.py /usr/lib/lsb -debian/local/lsb/install_initd /usr/lib/lsb -debian/local/lsb/remove_initd /usr/lib/lsb -debian/local/lsb/lsbinstall /usr/lib/lsb diff -Nru cups-filters-1.8.3/debian/local/lsb/initdutils.py cups-filters-1.8.3/debian/local/lsb/initdutils.py --- cups-filters-1.8.3/debian/local/lsb/initdutils.py 2016-02-14 22:20:17.000000000 +0000 +++ cups-filters-1.8.3/debian/local/lsb/initdutils.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,174 +0,0 @@ -# Support for scanning init scripts for LSB info - -# Python3-compatible print() function - - -import re, sys, os, io -import pickle - -class RFC822Parser(dict): - "A dictionary-like object." - __linere = re.compile(r'([^:]+):\s*(.*)$') - - def __init__(self, fileob=None, strob=None, startcol=0, basedict=None): - if fileob is None and strob is None: - raise ValueError('need a file or string') - if not basedict: - basedict = {} - - super(RFC822Parser, self).__init__(basedict) - - if not fileob: - fileob = io.StringIO(strob) - - key = None - for line in fileob: - if startcol: - line = line[startcol:] - - if not line.strip(): - continue - - # Continuation line - if line[0].isspace(): - if not key: - continue - self[key] += '\n' + line.strip() - continue - - m = self.__linere.match(line) - if not m: - # Not a valid RFC822 header - continue - key, value = m.groups() - self[key] = value.strip() - -# End of RFC882Parser - -LSBLIB = '/var/lib/lsb' -FACILITIES = os.path.join(LSBLIB, 'facilities') -DEPENDS = os.path.join(LSBLIB, 'depends') -LSBINSTALL = os.path.join(LSBLIB, 'lsbinstall') - -beginre = re.compile(re.escape('### BEGIN INIT INFO')) -endre = re.compile(re.escape('### END INIT INFO')) -#linere = re.compile(r'\#\s+([^:]+):\s*(.*)') - -def scan_initfile(initfile): - headerlines = '' - scanning = False - - for line in open(initfile): - line = line.rstrip() - if beginre.match(line): - scanning = True - continue - elif scanning and endre.match(line): - scanning = False - continue - elif not scanning: - continue - - if line.startswith('# '): - headerlines += line[2:] + '\n' - elif line.startswith('#\t'): - headerlines += line[1:] + '\n' - - inheaders = RFC822Parser(strob=headerlines) - headers = {} - for header, body in inheaders.items(): - # Ignore empty headers - if not body.strip(): - continue - - if header in ('Default-Start', 'Default-Stop'): - headers[header] = list(map(int, body.split())) - elif header in ('Required-Start', 'Required-Stop', 'Provides', - 'Should-Start', 'Should-Stop'): - headers[header] = body.split() - else: - headers[header] = body - - return headers - -def save_facilities(facilities): - if not facilities: - try: - os.unlink(FACILITIES) - except OSError: - pass - return - - fh = open(FACILITIES, 'w') - for facility, entries in list(facilities.items()): - # Ignore system facilities - if facility.startswith('$'): continue - for (scriptname, pri) in list(entries.items()): - start, stop = pri - print("%(scriptname)s %(facility)s %(start)d %(stop)d" % locals(), file=fh) - fh.close() - -def load_facilities(): - facilities = {} - if os.path.exists(FACILITIES): - for line in open(FACILITIES): - try: - scriptname, name, start, stop = line.strip().split() - facilities.setdefault(name, {})[scriptname] = (int(start), - int(stop)) - except ValueError as x: - print('Invalid facility line', line, file=sys.stderr) - - return facilities - -def load_depends(): - depends = {} - - if os.path.exists(DEPENDS): - independs = RFC822Parser(fileob=open(DEPENDS)) - for initfile, facilities in independs.items(): - depends[initfile] = facilities.split() - return depends - -def save_depends(depends): - if not depends: - try: - os.unlink(DEPENDS) - except OSError: - pass - return - - fh = open(DEPENDS, 'w') - for initfile, facilities in depends.items(): - print('%s: %s' % (initfile, ' '.join(facilities)), fh) - fh.close() - -# filemap entries are mappings, { (package, filename) : instloc } -def load_lsbinstall_info(): - if not os.path.exists(LSBINSTALL): - return {} - - fh = open(LSBINSTALL, 'rb') - filemap = pickle.load(fh) - fh.close() - - # Just in case it's corrupted somehow - if not isinstance(filemap, dict): - return {} - - return filemap - -def save_lsbinstall_info(filemap): - if not filemap: - try: - os.unlink(LSBINSTALL) - except OSError: - pass - return - - fh = open(LSBINSTALL, 'wb') - pickle.dump(fh, filemap) - fh.close() - -if __name__ == '__main__': - print(scan_initfile('init-fragment')) diff -Nru cups-filters-1.8.3/debian/local/lsb/install_initd cups-filters-1.8.3/debian/local/lsb/install_initd --- cups-filters-1.8.3/debian/local/lsb/install_initd 2016-02-14 22:20:17.000000000 +0000 +++ cups-filters-1.8.3/debian/local/lsb/install_initd 1970-01-01 00:00:00.000000000 +0000 @@ -1,138 +0,0 @@ -#! /usr/bin/python3 - -import sys, re, os, initdutils - -if len(sys.argv) > 1: - initfile = sys.argv[1] - # If the absolute path isn't specified, assume it's relative to - # cwd; if that doesn't exist, try /etc/init.d - ap = os.path.abspath(initfile) - if os.path.exists(ap): - initfile = ap - else: - initfile = os.path.join('/etc/init.d', initfile) -else: - print('Usage: %s /etc/init.d/' % sys.argv[0], file=sys.stderr) - sys.exit(1) - -# Default priorities -startpri = stoppri = 20 -defstart = [2, 3, 4, 5] -defstop = [0, 1, 6] - -# Estimated priorities of these facilities in Debian -os_facilities = { - "$local_fs" : {'lsb' : (0, 100)}, - "$network" : {'lsb' : (10, 50)}, - "$remote_fs" : {'lsb': (19, 20)}, - "$named" : {'lsb': (19, 19)}, - "$syslog" : {'lsb' : (10, 89)}, - # No longer present in gLSB 1.2; however, required for gLSB 1.1 - # compat. Note that these are looser than $portmap and $time; - # anything specifying $netdaemons will be run later, which may not - # be what you want... - "$netdaemons" : {'lsb': (80, 19)}, - # gLSB 1.2 - "$portmap" : {'lsb' : (19, 34)}, - "$time" : {'lsb' : (24, 21)}, - } - -facilities = initdutils.load_facilities() -facilities.update(os_facilities) - -depends = initdutils.load_depends() -depends[initfile] = [] - -headers = initdutils.scan_initfile(initfile) - -reqstart = headers.get('Required-Start', []) -shouldstart = headers.get('Should-Start', []) -if reqstart or shouldstart: - startpri = 5 - for facility in reqstart: - if facility not in facilities: - print('Missing required start facility', facility, file=sys.stderr) - sys.exit(1) - else: - for script, pri in facilities[facility].items(): - if script != initfile: - start, stop = pri - startpri = max(startpri, start+1) - if facility not in depends[initfile]: - depends[initfile].append(facility) - - for facility in shouldstart: - if facility not in facilities: - print('Missing should-start facility', facility, '(ignored)', file=sys.stderr) - else: - for script, pri in facilities[facility].items(): - if script != initfile: - start, stop = pri - startpri = max(startpri, start+1) - startpri = min(max(startpri, 1), 99) - -reqstop = headers.get('Required-Stop', []) -shouldstop = headers.get('Should-Stop', []) -if reqstop or shouldstop: - stoppri = 95 - for facility in reqstop: - if facility not in facilities: - print('Missing required stop facility', facility, file=sys.stderr) - sys.exit(1) - else: - for script, pri in facilities[facility].items(): - if script != initfile: - start, stop = pri - stoppri = min(stoppri, stop-1) - if facility not in depends[initfile]: - depends[initfile].append(facility) - - for facility in shouldstop: - if facility not in facilities: - print('Missing should-stop facility', facility, '(ignored)', file=sys.stderr) - else: - for script, pri in facilities[facility].items(): - if script != initfile: - start, stop = pri - stoppri = min(stoppri, stop-1) - - stoppri = min(max(stoppri, 1), 99) - -if depends[initfile]: - initdutils.save_depends(depends) - -provides = headers.get('Provides', []) -if provides: - for facility in provides: - if facility[0] == '$': - print('Ignoring system-provided facility', facility, file=sys.stderr) - continue - if facility not in facilities: - facilities[facility] = {} - - facilities[facility][initfile] = (startpri, stoppri) - initdutils.save_facilities(facilities) - -defstart = headers.get('Default-Start', defstart) -defstop = headers.get('Default-Stop', defstop) - -# A set type would be nice... [range(2,6) = 2..5] -for level in range(2,6): - if level in defstart: - for i in range(2,6): - if i not in defstart: - defstart.append(i) - if level in defstop: - for i in range(2,6): - if i not in defstop: - defstop.append(i) - -defstart.sort() -defstop.sort() - -start_runlevels = " ".join(map(str, defstart)) -stop_runlevels = " ".join(map(str, defstop)) - -initfile = initfile.replace('/etc/init.d/', '') - -os.system("/usr/sbin/update-rc.d %(initfile)s start %(startpri)d %(start_runlevels)s . stop %(stoppri)d %(stop_runlevels)s ." % locals()) diff -Nru cups-filters-1.8.3/debian/local/lsb/lsbinstall cups-filters-1.8.3/debian/local/lsb/lsbinstall --- cups-filters-1.8.3/debian/local/lsb/lsbinstall 2016-02-14 22:20:17.000000000 +0000 +++ cups-filters-1.8.3/debian/local/lsb/lsbinstall 1970-01-01 00:00:00.000000000 +0000 @@ -1,271 +0,0 @@ -#! /usr/bin/python3 - -import sys -import os -import shutil -import socket -import subprocess -from tempfile import NamedTemporaryFile -from initdutils import load_lsbinstall_info, save_lsbinstall_info - -# These keep getting revised... *sigh* -objecttypes = ( - #'init', - 'profile', - 'service', - 'inet', # XXX - reenable when implemented - #'crontab', - #'man' - ) - -def installed_message(objectname): - print(objectname, 'is installed') - -def handle_generic_install(options, args, location, showinstloc=False): - filename = args[0] - basename = os.path.basename(filename) - instloc = os.path.join(location, basename) - package = args.package - - filemap = load_lsbinstall_info() - fileinfo = filemap.get((package, filename)) - - if options.check: - if fileinfo and os.path.exists(fileinfo): - installed_message(fileinfo) - return - else: - sys.exit(1) - elif options.remove: - if os.path.exists(fileinfo): - try: - os.unlink(fileinfo) - except (IOError, OSError, os.error) as why: - print('Removal of %s failed: %s' % ( - instloc, str(why)), file=sys.stderr) - sys.exit(1) - - # Remove it from the database, even if it was previously removed - del filemap[(package, filename)] - save_lsbinstall_info(filemap) - return - - if os.path.exists(instloc) and options.package: - instloc = os.path.join(location, '%s.%s' % (options.package, basename)) - - if os.path.exists(instloc): - print('Unable to install %s: %s exists' % ( - filename, instloc), file=sys.stderr) - sys.exit(1) - - if not os.path.exists(location): - try: - os.makedirs(location) - except (IOError, OSError, os.error) as why: - print('Unable to create %s to install %s: %s' % ( - location, filename, str(why)), file=sys.stderr) - sys.exit(1) - - try: - shutil.copy2(filename, instloc) - except (IOError, os.error) as why: - print('Installation of %s as %s failed: %s' % ( - filename, instloc, str(why)), file=sys.stderr) - sys.exit(1) - - if showinstloc: - print(instloc) - - filemap[(package, filename)] = instloc - save_lsbinstall_info(filemap) - -def handle_service(options, args): - # LSB says we don't actually have to remove these things... - if options.remove: - sys.exit(0) - - pkg = options.package or '' - - try: - pproto = args[0] - port, proto = pproto.split('/', 1) - port = int(port) - except: - print('You must specify a port/protocol pair as the first argument.', file=sys.stderr) - sys.exit(2) - - if options.check: - try: - serv = socket.getservbyport(port, proto) - except socket.error: - sys.exit(1) - - print('%d/%s corresponds to service %s' % (port, proto, serv)) - return - - sname = args[1] - saliases = args[2:] - - try: - serv = socket.getservbyport(port, proto) - except socket.error: - serv = None - - if serv: - # Editing existing service - fpin = open('/etc/services') - fpout = NamedTemporaryFile('w', prefix='services-', dir='/etc') - newfname = fpout.name - - for line in fpin: - line = line.rstrip() - if not line.startswith('#'): - lcomment = '' - if '#' in line: - line, lcomment = line.split('#', 1) - - bits = line.split(None, 2) - lname, lpproto = bits[:2] - laliases = [] - if len(bits) > 2: - laliases = bits[2].split() - - lport, lproto = lpproto.split('/') - lport = int(lport) - - if lport == port and lproto == proto: - # We've found the right line - if name != lname: - aliases += [name] - - for a in aliases: - if a != lname and a not in laliases: - laliases += [a] - elif name == lname or name in laliases: - # name shows up, but in wrong protocol/port - print('Conflict between specified addition and /etc/services; aborting.', file=sys.stderr) - fpout.close() - os.unlink(newfname) - sys.exit(1) - - endbits = '' - if laliases: - endbits = ' '.join(laliases) + ' ' - if lcomment: - endbits += '#'+lcomment - - line = '%15s %15s %s' % lname, lpproto, endbits - line = line.rstrip() - - print(line, file=fpout) - - fpin.close() - fpout.close() - # Make sure /etc/services is always available - shutil.copy2('/etc/services', '/etc/services~') - os.rename(newfname, '/etc/services') - return - - fp = open('/etc/services', 'a') - print('%15s %15s %s # Added by lsbinstall for %s' % ( - sname, pproto, ' '.join(saliases), pkg), file=fp) - fp.close() - -def handle_inet(options, args, parser): - cmd = 'update-inetd --group LSB ' - - alist = list(args[0].split(':')) - if len(alist) < 2: - parser.error("The operand must include a service and protocol.") - return - - if not alist[1]: - alist[1] = 'tcp' - - if options.remove: - parts = r'%s\s+.*\s+%s\s+.*' % (re.escape(alist[0], alist[1])) - cmd += '--remove '+subprocess.mkarg(parts) - elif options.check: - return - else: - if len(alist) != 6: - parser.error('The operand must have six colon-separated arguments.') - return - newalist = [alist[0], alist[2], alist[1]] + alist[3:] - cmd += '--add '+subprocess.mkarg('\t'.join(newalist)) - - os.system(cmd) - pass - -def handle_man(options, args): - # Try to figure out the man page section - section = 1 - - location = '/usr/local/share/man/man%d/' % section - - handle_generic_install(options, args, location) - - -def main(): - from optparse import OptionParser - - parser = OptionParser('usage: %prog [-r|-c] -t TYPE arguments...') - parser.add_option('-c', '--check', dest="check", default=False, - action="store_true", help='check whether or not an ' - 'object of this type is already installed') - parser.add_option('-r', '--remove', action="store_true", - dest="remove", default=False, - help='remove the named object') - parser.add_option('-t', '--type', dest="type", type='choice', - default=None, choices=objecttypes, - help='type of object to be ' - 'installed: one of %s' % ', '.join(objecttypes) ) - parser.add_option('-p', '--package', dest="package", default=None, - help='LSB package to operate on') - - (options, args) = parser.parse_args() - - if len(args) < 1: - parser.error('You must specify at least one argument.') - elif (options.remove or options.check) and len(args) > 1: - parser.error('You may only specify one argument with --check or ' - '--remove.') - - if not options.type: - parser.error('You must specify an object type.') - - if not options.package and options.type not in ['service']: - parser.error('You must specify a package with %s objects.' % - options.type) - - if options.type == 'init': - if len(args) > 1: - parser.error('Only one argument supported for %s' % options.type) - handle_generic_install(options, args, '/etc/init.d', showinstloc=True) - elif options.type == 'profile': - if len(args) > 1: - parser.error('Only one argument supported for %s' % options.type) - # profile.d does nothing on Debian... sigh - handle_generic_install(options, args, '/etc/profile.d') - elif options.type == 'service': - if len(args) < 2 and not (options.remove or options.check): - parser.error('You must specify at least two arguments when adding a service entry.') - elif len(args) != 1 and (options.remove or options.check): - parser.error('You must specify one argument when removing or checking a service entry.') - handle_service(options, args) - elif options.type == 'inet': - handle_inet(options, args, parser) - elif options.type == 'crontab': - if len(args) > 1: - parser.error('Only one argument supported for %s' % options.type) - handle_generic_install(options, args, '/etc/cron.d') - elif options.type == 'man': - if len(args) > 1: - parser.error('Only one argument supported for %s' % options.type) - handle_man(options, args) - else: - print('Unsupported type %s' % options.type, file=sys.stderr) - sys.exit(1) - -if __name__ == '__main__': - main() diff -Nru cups-filters-1.8.3/debian/local/lsb/remove_initd cups-filters-1.8.3/debian/local/lsb/remove_initd --- cups-filters-1.8.3/debian/local/lsb/remove_initd 2016-02-14 22:20:17.000000000 +0000 +++ cups-filters-1.8.3/debian/local/lsb/remove_initd 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#! /usr/bin/python3 - -import sys, re, os, initdutils - -if len(sys.argv) > 1: - initfile = sys.argv[1] - # If the absolute path isn't specified, assume it's relative to - # cwd; if that doesn't exist, try /etc/init.d - ap = os.path.abspath(initfile) - if os.path.exists(ap): - initfile = ap - else: - initfile = os.path.join('/etc/init.d', initfile) -else: - print('Usage: %s /etc/init.d/' % sys.argv[0], file=sys.stderr) - sys.exit(1) - -headers = initdutils.scan_initfile(initfile) - -provides = headers.get('Provides') -if provides: - facilities = initdutils.load_facilities() - depends = initdutils.load_depends() - - for facility in provides: - if facility in facilities: - entries = {} - for entry in list(facilities[facility].items()): - if entry[0] != initfile: - entries[entry[0]] = entry[1] - facilities[facility] = entries - - for (initscript, needed) in depends.items(): - for facility in needed: - if facility[0] == "$": - continue - if not facilities.get(facility) and facility in provides: - print('Unable to remove %s: %s needs %s\n' % ( - initfile, initscript, facility), file=sys.stderr) - sys.exit(1) - - if initfile in depends: - del depends[initfile] - initdutils.save_depends(depends) - - initdutils.save_facilities(facilities) - -initfile = initfile.replace('/etc/init.d/', '') -os.system('/usr/sbin/update-rc.d -f %s remove' % initfile) diff -Nru cups-filters-1.8.3/debian/local/lsb/sendmail cups-filters-1.8.3/debian/local/lsb/sendmail --- cups-filters-1.8.3/debian/local/lsb/sendmail 2016-02-15 00:16:54.000000000 +0000 +++ cups-filters-1.8.3/debian/local/lsb/sendmail 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#!/bin/sh -echo "Please install an MTA on this system if you want to use sendmail!" >&2 -exit 255 diff -Nru cups-filters-1.8.3/debian/rules cups-filters-1.8.3/debian/rules --- cups-filters-1.8.3/debian/rules 2016-02-15 20:37:36.000000000 +0000 +++ cups-filters-1.8.3/debian/rules 2016-04-20 15:33:33.000000000 +0000 @@ -5,8 +5,7 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed %: - # --with python3 only needed for cups-filter-lsb - dh $@ --parallel --with autoreconf,systemd --with python3 + dh $@ --parallel --with autoreconf,systemd override_dh_auto_configure: dh_auto_configure -- \ @@ -59,39 +58,3 @@ install -D -m 644 debian/local/modules-load.conf debian/cups-filters/etc/modules-load.d/cups-filters.conf dh_apparmor -pcups-browsed --profile-name=usr.sbin.cups-browsed - -############################################################################## -# Temporary addition of LSB compatibility binary packages for printer drivers -# This, the binary package entries cups-filters-lsb and -# cups-filters-invalid-mta, the debian/local/lsb directory, and the files -# debian/cups-filters-lsb.install and debian/cups-filters-invalid-mta.install -# need to get removed to removethis temporary LSB compatibility support. -# Also the "dh --with python3" call and the build dependency on -# python3-all-dev is only for the LSB compatibility packages. -############################################################################## - -DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) -lsbarch=${DEB_HOST_ARCH} -ifeq (${lsbarch}, i386) -lsbarch=ia32 -endif -ifeq (${lsbarch}, powerpc) -lsbarch=ppc32 -endif -LIBC=libc6 (>> 2.3.5) -ifeq (${lsbarch}, amd64) -LIBC=libc6 (>= 2.13-17) -endif -# Version of the last Debian lsb source package with full LSB support plus -# something. -lsbver=4.1+Debian14+cupsfilters1 - -override_dh_gencontrol: - @echo >> debian/cups-filters-lsb.substvars "lsbversion=(= ${lsbver})" - @echo >> debian/cups-filters-lsb.substvars "beforelsbversion=(<< ${lsbver})" - @echo >> debian/cups-filters-lsb.substvars "glibc=${LIBC}" - @echo >> debian/cups-filters-lsb.substvars "provides=lsb-core-${lsbarch}, lsb-cxx-${lsbarch}, lsb-graphics-${lsbarch}, lsb-qt4-${lsbarch}, lsb-desktop-${lsbarch}, lsb-multimedia-${lsbarch}, lsb-languages-${lsbarch}, lsb-printing-${lsbarch}, lsb-security-${lsbarch}" - @[ ${DEB_HOST_ARCH} = 'amd64' ] && echo >> debian/cups-filters-lsb.substvars "depends=libc6-i386, lib32z1" || true - @echo >> debian/cups-filters-invalid-mta.substvars "lsbversion=(= ${lsbver})" - @echo >> debian/cups-filters-invalid-mta.substvars "beforelsbversion=(<< ${lsbver})" - dh_gencontrol