--- cupsys-1.2.2.orig/debian/cupsys.logrotate +++ cupsys-1.2.2/debian/cupsys.logrotate @@ -0,0 +1,15 @@ +/var/log/cups/*log { + daily + missingok + rotate 7 + sharedscripts + postrotate + if [ -e /var/run/cups/cupsd.pid ]; then + invoke-rc.d --quiet cupsys force-reload > /dev/null + sleep 10 + fi + endscript + compress + notifempty + create 640 cupsys lpadmin +} --- cupsys-1.2.2.orig/debian/control +++ cupsys-1.2.2/debian/control @@ -0,0 +1,169 @@ +Source: cupsys +Priority: optional +Section: net +Maintainer: Debian CUPS Maintainers +Standards-Version: 3.6.2 +Build-Depends: libpam0g-dev, libtiff4-dev, libjpeg62-dev, zlib1g-dev, libpng12-dev, libslp-dev, libgnutls-dev, libpaper-dev, libldap2-dev, debhelper (>> 4.1.0), po-debconf, cdbs, sharutils, dpatch (>= 1.11) +Uploaders: Kenshi Muto , Masayuki Hatta , Jeff Licquia , Martin-Éric Racine + +Package: cupsys +Priority: optional +Section: net +Architecture: any +Depends: ${shlibs:Depends}, adduser (>= 3.12), debconf (>= 1.2.9) | debconf-2.0, patch, poppler-utils | xpdf-utils, perl-modules, procps, gs-esp, lsb-base (>= 3) +Replaces: cupsys-pstoraster +Conflicts: cupsys-pstoraster (<< 2) +Recommends: cupsys-client, smbclient (>= 3.0.9), foomatic-filters +Suggests: cupsys-bsd, cupsys-driver-gutenprint | cupsys-driver-gimpprint, foomatic-filters-ppds, xpdf-korean | xpdf-japanese | xpdf-chinese-traditional | xpdf-chinese-simplified, cups-pdf, hplip +Description: Common UNIX Printing System(tm) - server + The Common UNIX Printing System (or CUPS(tm)) is a printing system and + general replacement for lpd and the like. It supports the Internet + Printing Protocol (IPP), and has its own filtering driver model for + handling various document types. + . + This package provides the CUPS scheduler/daemon and related files. + . + The terms "Common UNIX Printing System" and "CUPS" are trademarks of + Easy Software Products (www.easysw.com), and refer to the original + source packages from which these packages are made. + +Package: cupsys-client +Priority: optional +Section: net +Architecture: any +Depends: ${shlibs:Depends}, adduser +Conflicts: lprng +Recommends: cupsys-bsd +Suggests: cupsys, kdeprint, gtklp, cupsys-pt, xpp +Replaces: cupsys (<= 1.1.18-3) +Description: Common UNIX Printing System(tm) - client programs (SysV) + The Common UNIX Printing System (or CUPS(tm)) is a printing system and + general replacement for lpd and the like. It supports the Internet + Printing Protocol (IPP), and has its own filtering driver model for + handling various document types. + . + This package provides the System V style print client programs. + . + The terms "Common UNIX Printing System" and "CUPS" are trademarks of + Easy Software Products (www.easysw.com), and refer to the original + source packages from which these packages are made. + +Package: libcupsys2 +Priority: optional +Section: libs +Architecture: any +Depends: ${shlibs:Depends} +Provides: libcupsys2-gnutls10 +Replaces: cupsys-client (<= 1.1.10-2), libcupsys2-gnutls10 (<= 1.1.23-11) +Conflicts: gs-esp (<< 7.05.6-2), cupsys-driver-gimpprint (<< 4.2.5-3), libcupsys2-gnutls10 (<= 1.1.23-11) +Description: Common UNIX Printing System(tm) - libs + The Common UNIX Printing System (or CUPS(tm)) is a printing system and + general replacement for lpd and the like. It supports the Internet + Printing Protocol (IPP), and has its own filtering driver model for + handling various document types. + . + This package provides the base shared libraries for CUPS. + . + The terms "Common UNIX Printing System" and "CUPS" are trademarks of + Easy Software Products (www.easysw.com), and refer to the original + source packages from which these packages are made. + +Package: libcupsys2-gnutls10 +Priority: optional +Section: libs +Architecture: all +Depends: libcupsys2 (>= 1.1.23-12) +Description: Common UNIX Printing System(tm) - dummy libs for transition + The Common UNIX Printing System (or CUPS(tm)) is a printing system and + general replacement for lpd and the like. It supports the Internet + Printing Protocol (IPP), and has its own filtering driver model for + handling various document types. + . + This package is for transition to libcupsys2. + . + The terms "Common UNIX Printing System" and "CUPS" are trademarks of + Easy Software Products (www.easysw.com), and refer to the original + source packages from which these packages are made. + +Package: libcupsys2-dev +Priority: optional +Section: libdevel +Architecture: any +Depends: libcupsys2 (= ${Source-Version}), libgnutls-dev +Provides: libcupsys-dev +Conflicts: libcupsys1-dev, libcupsys-dev, cupsys (<< 1.1.22-3) +Replaces: libcupsys1-dev, libcupsys-dev, cupsys (<< 1.1.22-3) +Description: Common UNIX Printing System(tm) - development files + The Common UNIX Printing System (or CUPS(tm)) is a printing system and + general replacement for lpd and the like. It supports the Internet + Printing Protocol (IPP), and has its own filtering driver model for + handling various document types. + . + This package provides the files necessary for developing CUPS-aware + applications and CUPS drivers. + . + The terms "Common UNIX Printing System" and "CUPS" are trademarks of + Easy Software Products (www.easysw.com), and refer to the original + source packages from which these packages are made. + +Package: libcupsimage2 +Priority: optional +Section: libs +Architecture: any +Depends: ${shlibs:Depends} +Replaces: libcupsys2 (<= 1.1.18-2) +Description: Common UNIX Printing System(tm) - image libs + The Common UNIX Printing System (or CUPS(tm)) is a printing system and + general replacement for lpd and the like. It supports the Internet + Printing Protocol (IPP), and has its own filtering driver model for + handling various document types. + . + This package provides the image libraries for handling the CUPS + raster format. + . + The terms "Common UNIX Printing System" and "CUPS" are trademarks of + Easy Software Products (www.easysw.com), and refer to the original + source packages from which these packages are made. + +Package: libcupsimage2-dev +Priority: optional +Section: libdevel +Architecture: any +Depends: libcupsimage2 (= ${Source-Version}), libcupsys2-dev (= ${Source-Version}), libpng-dev, libtiff4-dev, libjpeg62-dev, zlib1g-dev +Provides: libcupsimage-dev +Conflicts: libcupsimage-dev +Replaces: libcupsys1-dev, libcupsimage-dev, libcupsys2-dev (<= 1.1.18-2) +Description: Common UNIX Printing System(tm) - image development files + The Common UNIX Printing System (or CUPS(tm)) is a printing system and + general replacement for lpd and the like. It supports the Internet + Printing Protocol (IPP), and has its own filtering driver model for + handling various document types. + . + This package provides the files necessary for developing applications + that use the CUPS raster image format. + . + The terms "Common UNIX Printing System" and "CUPS" are trademarks of + Easy Software Products (www.easysw.com), and refer to the original + source packages from which these packages are made. + +Package: cupsys-bsd +Priority: extra +Section: net +Architecture: any +Depends: ${shlibs:Depends}, cupsys-client (= ${Source-Version}), debconf, netbase +Conflicts: lpr, lprng, manpages-fr (<< 0.9.5-1) +Provides: lpr +Replaces: lpr, cupsys (<= 1.1.15-2), manpages-fr (<< 0.9.5-1) +Description: Common UNIX Printing System(tm) - BSD commands + The Common UNIX Printing System (or CUPS(tm)) is a printing system and + general replacement for lpd and the like. It supports the Internet + Printing Protocol (IPP), and has its own filtering driver model for + handling various document types. + . + This package provides the BSD commands for interacting with CUPS. It + is provided separately to allow CUPS to coexist with other printing + systems (to a small degree). + . + The terms "Common UNIX Printing System" and "CUPS" are trademarks of + Easy Software Products (www.easysw.com), and refer to the original + source packages from which these packages are made. --- cupsys-1.2.2.orig/debian/libcupsimage2.files +++ cupsys-1.2.2/debian/libcupsimage2.files @@ -0,0 +1,2 @@ +usr/lib/libcupsimage.so.* +usr/lib64/libcupsimage.so.* --- cupsys-1.2.2.orig/debian/cupsys-bsd.prerm +++ cupsys-1.2.2/debian/cupsys-bsd.prerm @@ -0,0 +1,45 @@ +#! /bin/sh +# prerm script for cupsys-bsd +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ + +if [ -L /etc/printcap ]; then + rm -f /etc/printcap +fi + +case "$1" in + remove|upgrade|deconfigure) + # Remove documentation links + rm -rf /usr/share/doc/cupsys-bsd + + # Disable inetd entry + update-inetd --pattern cups-lpd --disable printer + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- cupsys-1.2.2.orig/debian/cupsys.config +++ cupsys-1.2.2/debian/cupsys.config @@ -0,0 +1,143 @@ +#!/bin/sh + +set -e + +CONF=/etc/cups/cupsd.conf +PORTS=/etc/cups/cups.d/ports.conf +BROWSE=/etc/cups/cups.d/browse.conf + +# Move cupsd-browsing.conf to new location and name +if [ -f /etc/cups/cupsd-browsing.conf -a ! -e /etc/cups/cups.d/browse.conf ]; then + echo "Moving /etc/cups/cupsd-browsing.conf to new location /etc/cups/cups.d/browse.conf..." >&2 + mkdir -p /etc/cups/cups.d + mv /etc/cups/cupsd-browsing.conf /etc/cups/cups.d/browse.conf +fi + +# Debconf library +. /usr/share/debconf/confmodule + +is_ports () { + # syntax: parse_ports string (0: success 1: error) + VAL=$(echo "$1" | LC_ALL=C perl -e '$ret = ""; while () { chomp; + @values = split(/\s+/); + foreach(@values) { + if (/^\d+$/ && $_ >= 0 && $_ < 65536) { + # PORT + $ret .= "Port $_\\n"; + } elsif (/^\d+\.\d+\.\d+\.\d+$/ || /^\d+\.\d+\.\d+\.\d+:\d+$/) { + # IP + $ret .= "Listen $_\\n"; + } elsif (/^[a-zA-Z0-9-_.*]+$/ || /^[a-zA-Z0-9-_.*]+:\d+$/) { + my($tmp) = $_; + if (/^[a-zA-Z0-9-_.*]+:(\d+)$/) { + if ($1 < 0 || $1 > 65535) { + # ERROR + $ret = ""; + last; + } + } + # HOSTNAME + $ret .= "Listen $_\\n"; + } elsif (/^\//) { + # domain socket + $ret .= "Listen $_\\n"; + } else { + # ERROR + $ret = ""; + last; + } + } + print $ret; + }') + + if [ -z "$VAL" ]; then + return 1 + else + return 0 + fi +} + +db_get cupsys/raw-print +OLD_RET=$RET + +db_input low cupsys/raw-print || true +db_go + +db_get cupsys/raw-print +if [ "$OLD_RET" != "$RET" ]; then + db_fset cupsys/raw-print changed true +fi + +# remove parallel from PPC default +ARCH=`dpkg --print-architecture` +if [ "$ARCH" = "ppc" -o "$ARCH" = "ppc-none" ]; then + db_fget cupsys/backend seen + if [ "$RET" = "false" ]; then + db_set cupsys/backend "ipp, lpd, socket, usb" + fi +fi + +db_input low cupsys/backend || true +db_go + +RET= +if [ -f "$CONF" ]; then + if [ "$(grep -h "Include[[:space:]]\+$PORTS" $CONF)" -a -f "$PORTS" ]; then + RET=$(grep -h -e "^\(Port\|Listen\)[[:space:]]\+" $CONF $PORTS | sort | uniq | sed -e "s/Port[[:space:]]\+//" -e "s/Listen[[:space:]]\+//" | tr "\n" " ") + else + RET=$(grep -h -e "^\(Port\|Listen\)[[:space:]]\+" $CONF | sort | uniq | sed -e "s/Port[[:space:]]\+//" -e "s/Listen[[:space:]]\+//" | tr "\n" " ") + fi + if [ "$RET" ]; then + db_set cupsys/ports $RET + fi + db_input low cupsys/ports || true + db_go + db_get cupsys/ports + STATE=0 + while ! is_ports "$RET"; do + db_input critical cupsys/portserror || true + db_go + db_fset cupsys/ports seen false + STATE=$(expr $STATE + 1) + if [ "$STATE" = "5" ]; then + echo "Illegal port value for CUPS. Please correct this by running 'dpkg-reconfigure cupsys'." + exit 1 + fi + db_input high cupsys/ports || true + db_go + db_get cupsys/ports + done + + if [ "$(grep -h "Include[[:space:]]\+\($BROWSE\|cupsd-browsing.conf\)" $CONF)" -a -f "$BROWSE" ]; then + RET=$(grep -h -e "^Browsing[[:space:]]\+" $CONF $BROWSE | head -1 | sed -e "s/Browsing[[:space:]]\+//" | tr "A-Z" "a-z") + else + RET=$(grep -h -e "^Browsing[[:space:]]\+" $CONF | head -1 | sed -e "s/Browsing[[:space:]]\+//" | tr "A-Z" "a-z") + fi + if [ "$RET" = "off" ]; then + db_set cupsys/browse false + elif [ "$RET" = "on" ]; then + db_set cupsys/browse true + fi + db_input low cupsys/browse || true + db_go +else + db_input low cupsys/ports || true + db_go + db_get cupsys/ports + STATE=0 + while ! is_ports "$RET"; do + db_input critical cupsys/portserror || true + db_go + db_fset cupsys/ports seen false + STATE=$(expr $STATE + 1) + if [ "$STATE" = "5" ]; then + echo "Illegal port value for CUPS. Please correct this by running 'dpkg-reconfigure cupsys'." + exit 1 + fi + db_input low cupsys/ports || true + db_go + db_get cupsys/ports + done + db_input low cupsys/browse || true + db_go +fi --- cupsys-1.2.2.orig/debian/cupsys-bsd.files +++ cupsys-1.2.2/debian/cupsys-bsd.files @@ -0,0 +1,10 @@ +usr/sbin/lpc +usr/bin/lpq +usr/bin/lpr +usr/bin/lprm +usr/lib/cups/daemon/cups-lpd +usr/share/man/man1/lpr.1.gz +usr/share/man/man1/lprm.1.gz +usr/share/man/man1/lpq.1.gz +usr/share/man/man8/cups-lpd.8.gz +usr/share/man/man8/lpc.8.gz --- cupsys-1.2.2.orig/debian/libcupsys2-dev.files +++ cupsys-1.2.2/debian/libcupsys2-dev.files @@ -0,0 +1,15 @@ +usr/bin/cups-config +usr/lib/libcups.so +usr/include/cups/array.h +usr/include/cups/cups.h +usr/include/cups/dir.h +usr/include/cups/file.h +usr/include/cups/http.h +usr/include/cups/ipp.h +usr/include/cups/language.h +usr/include/cups/md5.h +usr/include/cups/ppd.h +usr/include/cups/transcode.h +usr/include/cups/adminutil.h +usr/include/cups/i18n.h +usr/share/man/man1/cups-config.1.gz --- cupsys-1.2.2.orig/debian/cupsys.docs +++ cupsys-1.2.2/debian/cupsys.docs @@ -0,0 +1,4 @@ +CHANGES.txt +CREDITS.txt +README.txt +debian/HOWTO_BUGREPORT.txt --- cupsys-1.2.2.orig/debian/pdftops +++ cupsys-1.2.2/debian/pdftops @@ -0,0 +1,162 @@ +#!/usr/bin/perl -w +# pdftops.pl - wrapper script for xpdf's pdftops utility to act as a CUPS filter +# ============================================================================== +# 1.00 - 2004-10-05/Bl +# Initial implementation +# +# Copyright: Helge Blischke / SRZ Berlin 2004 +# This program is free seoftware and governed by the GNU Public License Version 2. +# +# Description: +# ------------ +# This program wraps the pdftops utility from the xpdf 3.00 (and higher) suite +# to behave as a CUPS filter as a replacement for the original pdftops filter. +# +# The main purpose of this approach is to keep the properties of a PDF to be +# printed as undesturbed as possible, especially with respect to page size, +# scaling, and positioning. +# +# The pdftops utility reads a configuration file 'pdftops.conf' in the +# CUPS_SERVERROOT directory, which must exist but may be empty. The sample +# configuration file accompanying this program sets the defaults which +# seem plausible to me with respect to high end production printers. +# +# To give the user highest possible flexibility, this program accepts and +# evaluates a set of job attributes special to this filter, which are +# described below: +# +# pdf-pages=, +# expands to the -f and -l options of pdftops +# to select a page range to process. This is independent +# of the page-ranges attribute and may significantly +# increase throughput when printing page ranges. +# Either of these numbers may be omitted. +# +# pdf-paper= +# pdf-paper=x +# may be one of letter, legal , A4, A3, or match; +# and are the paper width and height +# in printers points (1/72 inch). This expands to +# either the -paper or the -paperh and -paperw options +# of pdftops +# +# pdf-opw= +# pdf-upw= +# expand to the -opw and -upw options of pdftops, +# respectively and permit printing of password +# protected PDFs. +# +# pdf-