--- cupsys-1.2.2.orig/debian/cupsys-bsd.config
+++ cupsys-1.2.2/debian/cupsys-bsd.config
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+# Debconf library
+. /usr/share/debconf/confmodule
+
+db_input medium cupsys-bsd/setuplpd || true
+db_go
--- cupsys-1.2.2.orig/debian/libcupsys2.shlibs
+++ cupsys-1.2.2/debian/libcupsys2.shlibs
@@ -0,0 +1 @@
+libcups 2 libcupsys2 (>= 1.2.1)
--- cupsys-1.2.2.orig/debian/cupsys.postrm
+++ cupsys-1.2.2/debian/cupsys.postrm
@@ -0,0 +1,45 @@
+#! /bin/sh
+# postrm script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `remove'
+# * `purge'
+# * `upgrade'
+# * `failed-upgrade'
+# * `abort-install'
+# * `abort-install'
+# * `abort-upgrade'
+# * `disappear' overwrit>r>
+# for details, see /usr/doc/packaging-manual/
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+case "$1" in
+ purge)
+ rm -rf /var/lib/cups
+ rm -rf /var/log/cups
+ rm -rf /var/spool/cups
+ rm -rf /etc/cups/interfaces
+ rm -rf /etc/cups/ppd
+ rm -rf /etc/cups/passwd.md5
+ rm -f /etc/cups/cups.d/*
+ rm -f /etc/cups/printers.conf* /etc/cups/classes.conf.* \
+ /var/lib/cups/ppds.dat /etc/cups/raw.convs /etc/cups/raw.types
+ rmdir /etc/cups 2>/dev/null || true
+ deluser --system --quiet cupsys
+ ;;
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 0
+
+esac
--- 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/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.preinst
+++ cupsys-1.2.2/debian/cupsys.preinst
@@ -0,0 +1,86 @@
+#! /bin/sh
+# preinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `install'
+# * `install'
+# * `upgrade'
+# * `abort-upgrade'
+
+case "$1" in
+ install)
+ ;;
+
+ upgrade)
+ if dpkg --compare-versions "$2" le 1.1.23-6; then
+ [ -f /etc/cups/printers.conf ] && mv /etc/cups/printers.conf /etc/cups/printers.conf.save
+ [ -f /etc/cups/classes.conf ] && mv /etc/cups/classes.conf /etc/cups/classes.conf.save
+ fi
+ if [ -e /var/lib/cups/conf -a ! -L /var/lib/cups/conf -a ! -e /etc/cups ]; then
+ echo -n "Moving configuration files..."
+ mkdir -p /etc/cups || true
+ if [ `ls /var/lib/cups/conf | wc -l` -ne " 0" ]; then
+ cp -a /var/lib/cups/conf/* /etc/cups
+ fi
+ rm -rf /var/lib/cups/conf
+ echo "done."
+ fi
+
+ if [ -e /var/lib/cups/ppd -a ! -L /var/lib/cups/ppd -a ! -e /etc/cups/ppd ]; then
+ echo -n "Moving printer definition files..."
+ mkdir -p /etc/cups/ppd || true
+ if [ `ls /var/lib/cups/ppd | wc -l` -ne " 0" ]; then
+ cp -a /var/lib/cups/ppd/* /etc/cups/ppd
+ fi
+ rm -rf /var/lib/cups/ppd
+ echo "done."
+ fi
+
+ if [ -e /var/lib/cups/logs -a ! -L /var/lib/cups/logs ]; then
+ rmdir /var/lib/cups/logs || true
+ fi
+
+ # Remove dangling pdftops.conf symlink, which is obsolete anyway
+ if [ -L /etc/cups/pdftops.conf -a ! -e /etc/cups/pdftops.conf ]; then
+ rm -f /etc/cups/pdftops.conf
+ fi
+
+ # Remove obsolete /etc/cups/certs
+ [ -L /etc/cups/certs ] && rm -f /etc/cups/certs || true
+
+ # Move cupsd-browsing.conf to new location and name
+ if dpkg --compare-versions "$2" le-nl '1.1.23-10ubuntu4'; then
+ if [ -f /etc/cups/cupsd-browsing.conf ]; then
+ echo "Moving /etc/cups/cupsd-browsing.conf to new location /etc/cups/cups.d/browse.conf..."
+ mkdir -p /etc/cups/cups.d
+ mv /etc/cups/cupsd-browsing.conf /etc/cups/cups.d/browse.conf
+ fi
+ fi
+
+ # Fix root-owned PPD files from upgrades
+ if dpkg --compare-versions "$2" le-nl '1.1.99.b1.r4929-0ubuntu2'; then
+ find /etc/cups/ppd -type f -uid 0 -exec chown cupsys '{}' \; || true
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst 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.prerm
+++ cupsys-1.2.2/debian/cupsys.prerm
@@ -0,0 +1,42 @@
+#! /bin/sh
+# prerm script for cupsys
+#
+# 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 http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ -L /usr/lib/cups/backend/smb ]; then
+ rm -f /usr/lib/cups/backend/smb 2>/dev/null || true
+fi
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ (cd /usr/lib/cups/backend && rm -f http ipp lpd parallel scsi serial socket usb)
+ ;;
+ failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+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-client.postinst
+++ cupsys-1.2.2/debian/cupsys-client.postinst
@@ -0,0 +1,64 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure)
+ if [ -z "`getent group lpadmin`" ]; then
+ addgroup --system lpadmin
+ fi
+
+ # Set up cupsys user.
+ if [ -z "`getent passwd cupsys`" ]; then
+ adduser --system --no-create-home --ingroup lpadmin --disabled-password cupsys
+ fi
+ # necessary for access to local parallel and usb printers
+ adduser --quiet cupsys lp
+ # necessary for access to local serial printers
+ adduser --quiet cupsys dialout
+ # necessary for web authentication
+ # disabled by default since lpadmin membership is sufficient
+ # adduser --quiet cupsys shadow
+ chown cupsys:lpadmin /usr/bin/lppasswd
+
+ chmod u+s /usr/bin/lppasswd
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst 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.doc-base
+++ cupsys-1.2.2/debian/cupsys.doc-base
@@ -0,0 +1,10 @@
+Document: cupsys
+Title: CUPS Documentation
+Author: Easy Software Products
+Abstract: This documentation covers the use and administration of a CUPS
+ printing system, and the programming interface for the libcups API.
+Section: Apps/System
+
+Format: HTML
+Index: /usr/share/doc/cupsys/online-docs/index.html
+Files: /usr/share/doc/cupsys/online-docs/*.html
--- cupsys-1.2.2.orig/debian/libcupsys2.postinst
+++ cupsys-1.2.2/debian/libcupsys2.postinst
@@ -0,0 +1,45 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure)
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst 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/libcupsimage2.shlibs
+++ cupsys-1.2.2/debian/libcupsimage2.shlibs
@@ -0,0 +1 @@
+libcupsimage 2 libcupsimage2 (>= 1.2.1)
--- cupsys-1.2.2.orig/debian/cupsys-client.preinst
+++ cupsys-1.2.2/debian/cupsys-client.preinst
@@ -0,0 +1,40 @@
+#! /bin/sh
+# preinst script for cupsys-client
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `install'
+# * `install'
+# * `upgrade'
+# * `abort-upgrade'
+
+case "$1" in
+ install)
+ ;;
+
+ upgrade)
+ if [ ! -L /usr/share/doc/cupsys-client ]; then
+ rm -rf /usr/share/doc/cupsys-client
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst 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.postinst
+++ cupsys-1.2.2/debian/cupsys.postinst
@@ -0,0 +1,226 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+# Debconf
+. /usr/share/debconf/confmodule
+
+# Default Configuration file
+if [ -e /etc/default/cupsys ]; then
+ . /etc/default/cupsys
+fi
+
+case "$1" in
+ configure)
+ [ -f /etc/cups/printers.conf.save ] && mv /etc/cups/printers.conf.save /etc/cups/printers.conf
+ [ -f /etc/cups/classes.conf.save ] && mv /etc/cups/classes.conf.save /etc/cups/classes.conf
+
+ # Set up lpadmin group.
+ if [ -z "`getent group lpadmin`" ]; then
+ addgroup --system lpadmin
+ fi
+ if [ -n "`getent group lpadmin | awk -F: '{ print $4 }' | awk -F, '{ for (i=1; i <= NF; i++ ) print $i }' |grep '^root$'`" ]; then
+ # Bug#214746
+ echo "Deleting root from lpadmin group. If you use NIS/LDAP, change this manually."
+ deluser root lpadmin || true
+ fi
+
+ # Set up cupsys user.
+ if [ -z "`getent passwd cupsys`" ]; then
+ adduser --quiet --system --no-create-home --ingroup lpadmin cupsys
+ fi
+
+ # necessary for access to local parallel and usb printers
+ adduser --quiet cupsys lp
+ # necessary for access to local serial printers
+ adduser --quiet cupsys dialout
+ # necessary for web authentication
+ # disabled by default since lpadmin membership is sufficient
+ # adduser --quiet cupsys shadow
+ # necessary for access to printer/scanner combo devices
+ if [ -z "`getent group scanner`" ]; then
+ addgroup --system scanner
+ fi
+ adduser --quiet cupsys scanner
+
+ if [ -d /etc/cups/certs ]; then
+ rm -rf /etc/cups/certs
+ fi
+ if [ -d /var/spool/cups/certs ]; then
+ mv /var/spool/cups/certs/* /var/run/cups/certs || true
+ rm -rf /var/spool/cups/certs
+ fi
+
+ [ -f /etc/cups/ppds.dat ] && mv /etc/cups/ppds.dat /var/cache/cups/ppd
+
+ # Set up smb backend by symlinking to smbspool.
+ if [ -x /usr/bin/smbspool -a ! -e /usr/lib/cups/backend/smb ]; then
+ ln -sf /usr/bin/smbspool /usr/lib/cups/backend/smb
+ fi
+
+ # Generate raw MIME handling files if they don't already exist.
+ if [ ! -e /etc/cups/raw.types ]; then
+ cat >/etc/cups/raw.types </etc/cups/raw.convs < /etc/cups/raw.convs
+ else
+ sed 's/^application/#application/' \
+ < /etc/cups/raw.convs-convert > /etc/cups/raw.convs
+ fi
+ rm -f /etc/cups/raw.convs-convert
+ db_fset cupsys/raw-print changed false
+ fi
+ # Set up backends
+ (cd /usr/lib/cups/backend && rm -f http ipp lpd parallel scsi serial socket usb)
+ db_get cupsys/backend && SELECTED=$RET
+ list=`echo $SELECTED | sed -e 's/, /,/g'`
+ save_IFS=$IFS
+ IFS=,
+ for module in $list; do
+ ln -s ../backend-available/$module /usr/lib/cups/backend/$module
+ if [ "$module" = "ipp" ]; then
+ ln -s ipp /usr/lib/cups/backend/http
+ fi
+ done
+
+ # Create password file for Digest authentication
+ # (removed: Debian CUPS uses PAM and basic authentication)
+ #db_get cupsys/adminpassword
+ #VAL=$(echo -n "root:CUPS:$RET" | md5sum | cut -d' ' -f1)
+ #if [ -f /etc/cups/passwd.md5 ]; then
+ # if [ "$(grep "^root:" /etc/cups/passwd.md5)" ]; then
+ # sed -e "s/^root:lpadmin:.*/root:lpadmin:$VAL/" /etc/cups/passwd.md5 > /etc/cups/passwd.md5.$$
+ # mv /etc/cups/passwd.md5.$$ /etc/cups/passwd.md5
+ # else
+ # echo "root:lpadmin:$VAL" >> /etc/cups/passwd.md5
+ # fi
+ #else
+ # echo "root:lpadmin:$VAL" > /etc/cups/passwd.md5
+ # chown root:nogroup /etc/cups/passwd.md5
+ # chmod 600 /etc/cups/passwd.md5
+ #fi
+
+ # Create /etc/cups/cups.d/ports.conf and /etc/cups/cups.d/browse.conf
+ db_get cupsys/ports
+ VAL=$(echo "$RET" | 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
+ echo "Error: debconf has an invalid value. Run 'dpkg-reconfigure cupsys' again."
+ return 1
+ else
+ /bin/echo -e -n "$VAL" > /etc/cups/cups.d/ports.conf
+ fi
+
+ db_get cupsys/browse
+ if [ "$RET" = "true" ]; then
+ /bin/echo "Browsing on" > /etc/cups/cups.d/browse.conf
+ else
+ /bin/echo "Browsing off" > /etc/cups/cups.d/browse.conf
+ fi
+
+ # fix browse.conf Include directive for upgrades
+ if dpkg --compare-versions "$2" le-nl "1.1.23-10ubuntu4" &&
+ test -e /etc/cups/cupsd.conf &&
+ grep -q '^Include cupsd-browsing.conf\>' /etc/cups/cupsd.conf; then
+ sed -i 's_^Include cupsd-browsing.conf_Include /etc/cups/cups.d/browse.conf_' /etc/cups/cupsd.conf
+ fi
+
+ # fix permissions for upgrades which might have written cache files as
+ # root
+ if [ -d /var/cache/cups ]; then
+ chown -R cupsys:lp /var/cache/cups || true
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+db_stop
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/dirs
+++ cupsys-1.2.2/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
--- cupsys-1.2.2.orig/debian/pam
+++ cupsys-1.2.2/debian/pam
@@ -0,0 +1,3 @@
+@include common-auth
+@include common-account
+@include common-session
--- 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/libcupsimage2.postinst
+++ cupsys-1.2.2/debian/libcupsimage2.postinst
@@ -0,0 +1,46 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure)
+ ldconfig
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst 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/rules
+++ cupsys-1.2.2/debian/rules
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets by Bill Allombert 2001
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
+
+unpatch: deapply-dpatches
+
+DEB_CONFIGURE_EXTRA_FLAGS := --with-optim=$(DEB_OPTFLAGS) --libdir=/usr/lib --mandir=/usr/share/man --with-docdir=/usr/share/cups/doc-root --enable-slp --enable-libpaper --enable-ssl --enable-gnutls --disable-openssl --enable-threads --enable-static --disable-pdftops --disable-launchd --with-cups-user=cupsys --with-cups-group=lp --with-system-groups=lpadmin --enable-privilege-dropping
+DEB_MAKE_INSTALL_TARGET := install BUILDROOT=$(DEB_DESTDIR)
+#DESTDIR=$(DEB_DESTDIR) BINDIR=$(DEB_DESTDIR)/usr/bin SBINDIR=$(DEB_DESTDIR)/usr/sbin INCLUDEDIR=$(DEB_DESTDIR)/usr/include LIBDIR=$(DEB_DESTDIR)/usr/lib SERVERBIN=$(DEB_DESTDIR)/usr/lib/cups SERVERROOT=$(DEB_DESTDIR)/etc/cups BUILDROOT=$(DEB_DESTDIR)
+DEB_DH_INSTALLINIT_ARGS := -u'defaults 19'
+
+clean::
+ -rm core
+ -$(MAKE) clean
+ -rm man/*.gz man/*.z man/*.1 man/*.5 man/*.8 man/*.o man/mantohtml
+ -rm -f doc/help/man-*.html doc/help/standard.html doc/index.html
+ -rm -f conf/pam.std packaging/cups.list templates/edit-config.tmpl
+ -rm cups/libcups.so
+ -rm cups/libcups.a
+ -rm filter/libcupsimage.so
+ -rm filter/libcupsimage.a
+ -rm pdftops/libxpdf.a
+ -rm scheduler/testdirsvc scheduler/testdirsvc.o
+ -rm cups/testfile cups/testfile.o cups/http-addrlist.o
+ -rm backend/http
+ -rm systemv/disable systemv/enable systemv/reject
+ -rm cups-config cups.list conf/cupsd.conf conf/pam.conf
+ -rm config.log config.h config.cache config.status Makedefs cups.sh
+ -rmdir --ignore-fail-on-non-empty debian/patched
+ -rm -f doc/es/index.html doc/ja/index.html man/client.conf.man man/cups-deviced.man man/cups-driverd.man man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man man/cupsd.conf.man man/lpoptions.man templates/ja/header.tmpl templates/es/header.tmpl templates/header.tmpl init/cups.sh init/cups-lpd
+ -rm backend/*.o
+
+common-install-prehook-impl::
+ (cd fonts && $(MAKE) install BUILDROOT=$(DEB_DESTDIR))
+$(patsubst %,install/%,$(DEB_ALL_PACKAGES)) :: install/%:
+ dh_movefiles -p$(cdbs_curpkg)
+binary-post-install/cupsys::
+ mv debian/cupsys/usr/lib/cups/backend/* debian/cupsys/usr/lib/cups/backend-available
+ install -o root -g root -m 644 doc/favicon.ico debian/cupsys/usr/share/cups/doc-root
+ (cd $(DEB_DESTDIR) && mv var/spool var/log $(DEB_DESTDIR)/../cupsys/var)
+ (cd $(DEB_DESTDIR) && mv etc/cups/interfaces etc/cups/ppd $(DEB_DESTDIR)/../cupsys/etc/cups)
+ (cd $(DEB_DESTDIR)/../cupsys/usr/share/doc/cupsys && ln -sf ../../cups/doc-root online-docs)
+ #(cd $(DEB_DESTDIR)/../cupsys/usr/share/man && mv man1/backend.1 man1/cups-backend.1 && mv man1/filter.1 man1/cups-filter.1)
+ (install -m 755 -o root -g root $(DEB_DESTDIR)/../pdftops $(DEB_DESTDIR)/../cupsys/usr/lib/cups/filter/)
+ install -o root -g root -m 644 debian/cupsys.default debian/cupsys/etc/default/cupsys
+ install -m 755 debian/local/browsing_status debian/local/enable_browsing debian/local/sharing_status debian/local/enable_sharing $(DEB_DESTDIR)/../cupsys/usr/share/cups
+
+ # Install PPDs into /usr/share/ppd/cups-included/, see
+ # http://wiki.debian.org/PpdFileStructureSpecification
+ for i in $(DEB_DESTDIR)/../cupsys/usr/share/cups/model/*.ppd; do \
+ m=$$(sed -n -e '/^\*Manufacturer:/s/.*"\([^"]*\)".*/\1/p' $$i); \
+ mkdir -p "$(DEB_DESTDIR)/../cupsys/usr/share/ppd/cups-included/$$m"; \
+ mv $$i "$(DEB_DESTDIR)/../cupsys/usr/share/ppd/cups-included/$$m/"; \
+ done
+
+ # Compatibility for programs which still look in the old location
+ ln -s ../../ppd/cups-included $(DEB_DESTDIR)/../cupsys/usr/share/cups/model/cups-included
+ ln -s ../../ppd/custom $(DEB_DESTDIR)/../cupsys/usr/share/cups/model/custom
+
+binary-post-install/libcupsimage2-dev::
+ rm -r debian/libcupsimage2-dev/usr/share/doc/libcupsimage2-dev
+ ln -s libcupsimage2 debian/libcupsimage2-dev/usr/share/doc/libcupsimage2-dev
+binary-post-install/libcupsys2-gnutls10::
+ rm -r debian/libcupsys2-gnutls10/usr/share/doc/libcupsys2-gnutls10
+ ln -s libcupsys2 debian/libcupsys2-gnutls10/usr/share/doc/libcupsys2-gnutls10
+binary-post-install/cupsys-bsd::
+ rm -r debian/cupsys-bsd/usr/share/doc/cupsys-bsd
+ ln -s libcupsys2 debian/cupsys-bsd/usr/share/doc/cupsys-bsd
+binary-post-install/libcupsys2-dev::
+ rm -r debian/libcupsys2-dev/usr/share/doc/libcupsys2-dev
+ ln -s libcupsys2 debian/libcupsys2-dev/usr/share/doc/libcupsys2-dev
+binary-post-install/cupsys-client::
+ rm -r debian/cupsys-client/usr/share/doc/cupsys-client
+ ln -s libcupsys2 debian/cupsys-client/usr/share/doc/cupsys-client
--- cupsys-1.2.2.orig/debian/libcupsimage2-dev.files
+++ cupsys-1.2.2/debian/libcupsimage2-dev.files
@@ -0,0 +1,3 @@
+usr/lib/libcupsimage.so
+usr/include/cups/image.h
+usr/include/cups/raster.h
--- cupsys-1.2.2.orig/debian/filters/pdf.ppd
+++ cupsys-1.2.2/debian/filters/pdf.ppd
@@ -0,0 +1,136 @@
+*PPD-Adobe: "4.3"
+*%
+*% "$Id: pdf.ppd,v 1.3 2003/01/02 23:32:42 gurubert Exp $"
+*%
+*% Printer description for a printer that uses the pstopdf filter
+*%
+*% This file is based on the laserjet.ppd that comes with CUPS.
+*%
+*FormatVersion: "4.3"
+*FileVersion: "1.1"
+*LanguageVersion: English
+*LanguageEncoding: ISOLatin1
+*PCFileName: "PDF.PPD"
+*Manufacturer: "Robert Sander "
+*Product: "(CUPS v1.1)"
+*cupsVersion: 1.1
+*cupsManualCopies: False
+*cupsFilter: "application/vnd.cups-postscript 33 pstopdf"
+*ModelName: "PDF Converter"
+*ShortNickName: "PDF Converter"
+*NickName: "PDF Converter CUPS v1.1"
+*PSVersion: "(3010.000) 550"
+*LanguageLevel: "3"
+*ColorDevice: True
+*DefaultColorSpace: RGB
+*FileSystem: False
+*Throughput: "8"
+*LandscapeOrientation: Plus90
+*VariablePaperSize: False
+*TTRasterizer: Type42
+
+*OpenUI *PageSize/Media Size: PickOne
+*OrderDependency: 10 AnySetup *PageSize
+*DefaultPageSize: A4
+*PageSize Letter/US Letter: "<>setpagedevice"
+*PageSize Legal/US Legal: "<>setpagedevice"
+*PageSize Executive/US Executive: "<>setpagedevice"
+*PageSize Tabloid/US Tabloid: "<>setpagedevice"
+*PageSize A3/A3: "<>setpagedevice"
+*PageSize A4/A4: "<>setpagedevice"
+*PageSize A5/A5: "<>setpagedevice"
+*PageSize B5/B5 (JIS): "<>setpagedevice"
+*PageSize EnvISOB5/Envelope B5: "<>setpagedevice"
+*PageSize Env10/Envelope #10: "<>setpagedevice"
+*PageSize EnvC5/Envelope C5: "<>setpagedevice"
+*PageSize EnvDL/Envelope DL: "<>setpagedevice"
+*PageSize EnvMonarch/Envelope Monarch: "<>setpagedevice"
+*CloseUI: *PageSize
+
+*OpenUI *PageRegion: PickOne
+*OrderDependency: 10 AnySetup *PageRegion
+*DefaultPageRegion: A4
+*PageRegion Letter/US Letter: "<>setpagedevice"
+*PageRegion Legal/US Legal: "<>setpagedevice"
+*PageRegion Executive/US Executive: "<>setpagedevice"
+*PageRegion Tabloid/US Tabloid: "<>setpagedevice"
+*PageRegion A3/A3: "<>setpagedevice"
+*PageRegion A4/A4: "<>setpagedevice"
+*PageRegion A5/A5: "<>setpagedevice"
+*PageRegion B5/B5 (JIS): "<>setpagedevice"
+*PageRegion EnvISOB5/Envelope B5: "<>setpagedevice"
+*PageRegion Env10/Envelope #10: "<>setpagedevice"
+*PageRegion EnvC5/Envelope C5: "<>setpagedevice"
+*PageRegion EnvDL/Envelope DL: "<>setpagedevice"
+*PageRegion EnvMonarch/Envelope Monarch: "<>setpagedevice"
+*CloseUI: *PageRegion
+
+*DefaultImageableArea: A4
+*ImageableArea Letter/US Letter: "18 36 594 756"
+*ImageableArea Legal/US Legal: "18 36 594 972"
+*ImageableArea Executive/US Executive: "18 36 504 684"
+*ImageableArea Tabloid/US Tabloid: "18 36 774 1188"
+*ImageableArea A3/A3: "18 36 824 1155"
+*ImageableArea A4/A4: "18 36 577 806"
+*ImageableArea A5/A5: "18 36 403 559"
+*ImageableArea B5/JIS B5: "18 36 498 693"
+*ImageableArea EnvISOB5/B5 (ISO): "18 36 463 673"
+*ImageableArea Env10/Com-10: "18 36 279 648"
+*ImageableArea EnvC5/EnvC5: "18 36 441 613"
+*ImageableArea EnvDL/EnvDL: "18 36 294 588"
+*ImageableArea EnvMonarch/Envelope Monarch: "18 36 261 504"
+
+*DefaultPaperDimension: A4
+*PaperDimension Letter/US Letter: "612 792"
+*PaperDimension Legal/US Legal: "612 1008"
+*PaperDimension Executive/US Executive: "522 756"
+*PaperDimension Tabloid/US Tabloid: "792 1224"
+*PaperDimension A3/A3: "842 1191"
+*PaperDimension A4/A4: "595 842"
+*PaperDimension A5/A5: "421 595"
+*PaperDimension B5/B5 (JIS): "516 729"
+*PaperDimension EnvISOB5/Envelope B5: "499 709"
+*PaperDimension Env10/Envelope #10: "297 684"
+*PaperDimension EnvC5/Envelope C5: "459 649"
+*PaperDimension EnvDL/Envelope DL: "312 624"
+*PaperDimension EnvMonarch/Envelope Monarch: "279 540"
+
+*DefaultFont: Courier
+*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
+*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
+*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
+*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
+*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
+*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
+*Font Bookman-Light: Standard "(001.004S)" Standard ROM
+*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
+*Font Courier: Standard "(002.004S)" Standard ROM
+*Font Courier-Bold: Standard "(002.004S)" Standard ROM
+*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
+*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
+*Font Helvetica: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
+*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
+*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
+*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
+*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
+*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
+*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
+*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
+*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
+*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
+*Font Symbol: Special "(001.007S)" Special ROM
+*Font Times-Bold: Standard "(001.007S)" Standard ROM
+*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
+*Font Times-Italic: Standard "(001.007S)" Standard ROM
+*Font Times-Roman: Standard "(001.007S)" Standard ROM
+*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
+*Font ZapfDingbats: Special "(001.004S)" Standard ROM
+*%
+*% End of "$Id: pdf.ppd,v 1.3 2003/01/02 23:32:42 gurubert Exp $".
+*%
--- cupsys-1.2.2.orig/debian/filters/dvipipetops.convs
+++ cupsys-1.2.2/debian/filters/dvipipetops.convs
@@ -0,0 +1,4 @@
+# If you'd like to use dvi filter, install tetex-bin or dvipsk-ja package.
+# You can setup dvips options with /etc/default/cupsys.
+
+application/x-dvi application/postscript 33 dvipipetops
--- cupsys-1.2.2.orig/debian/filters/pstopdf
+++ cupsys-1.2.2/debian/filters/pstopdf
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# $Id: pstopdf,v 1.3 2003/02/15 15:21:00 gurubert Exp $
+#
+# This is a Postscript to PDF filter for CUPS
+#
+# (C) 2003 Robert Sander
+#
+# Released under GPL
+#
+# NO WARRANTY AT ALL
+#
+
+set -e
+
+PSTOPDF=/usr/bin/ps2pdf13
+OPTIONS="-r150 -dAutoRotatePages=/None -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dNOPLATFONTS"
+
+echo "INFO: pstopdf argv[$#] = $@" >&2
+
+if [ $# -lt 5 -o $# -gt 6 ]; then
+
+ echo "ERROR: $0 job-id user title copies options [file]" >&2
+ exit 1
+
+fi
+
+jobid="$1"
+outfile=$(mktemp "${TMPDIR:-/tmp}/$jobid.pstopdf.out.XXXXXX")
+trap 'rm -f "$outfile"' 0 1 2 13 15
+
+infile="${6:--}"
+
+$PSTOPDF $OPTIONS "$infile" "$outfile" >&2
+
+cat "$outfile"
+
--- cupsys-1.2.2.orig/debian/filters/samba-postscript.convs
+++ cupsys-1.2.2/debian/filters/samba-postscript.convs
@@ -0,0 +1 @@
+application/a-x-postscript-with-pjl-header application/postscript 10 samba-ps-to-ps
--- cupsys-1.2.2.orig/debian/filters/dvipipetops
+++ cupsys-1.2.2/debian/filters/dvipipetops
@@ -0,0 +1,190 @@
+#!/bin/sh
+
+# CUPS (Common Unix Printing System) filter for DVI files
+
+## Copyright (C) 2004 Matthew Swift
+##
+## 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
+## of the License, 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.
+
+## Documentation
+#
+# This script has several advantages (some involving security and privacy) over
+# the script of the same name by Decklin Foster dated 2002 and (on the present
+# date) distributed with the Debian cupsys package in
+# /usr/share/doc/cupsys/examples/filters/dvipipetops.
+#
+# This script...
+#
+# - works with Debian cupsys version 1.1.20final+cvs20040330-1.
+# - uses the -R option to dvips for greater security.
+# - creates a temporary file only when necessary.
+# - is more aggressive about cleaning up its temporary file.
+# - uses an absolute pathname for dvips, for greater security.
+# - avoids a security problem when $TMPDIR contains a space.
+# - is better documented.
+# - gives better diagnostic output to CUPS.
+#
+# See http://localhost:631/spm.html#WRITING_FILTERS for information.
+# Note that the documentation as of this date is conflicting and misleading on
+# the subject of arguments passed to filters.
+
+## History
+# initial version: 1.0 [28 April 2004]
+
+# TODO
+# add/remove trapped signals; are they portable?
+# are there bashisms? if so, should they be removed, or should bash be invoked explicitly?
+# should we heed the "copies" argument? my interpretation of the spec quoted
+# below is that we should not.
+# something interesting to do with page accounting?
+# is including $prog in the diagnostic output redundant?
+
+## Variables you may want to tweak.
+
+# on error, exit with this status.
+CUPS_DVIPS_ERREXIT=2
+# absolute pathname to dvips executable
+CUPS_DVIPS=/usr/bin/dvips
+
+# If you want to give options to dvips that should not go into the normal
+# config.ps, include them here. A good method would be to include, e.g.,
+# "-Pcups" and put all your configuration into cups.ps in the right place for
+# your dvips (e.g., /etc/texmf/dvips for a standard Debian TeX installation).
+# Note that CUPS passes information in the environment and the command line
+# that can be used here to determine the options, if you wanted.
+##
+# additional options to give to dvips
+CUPS_DVIPS_OPTS=""
+
+# Load configuration from default file.
+. /etc/default/cupsys
+
+## I do not expect you to want to change anything below here,
+## except possibly to (dis)include the debugging statements.
+#############################################################
+
+prog=$(basename "$0")
+# This statement needs bash I think.
+echo "DEBUG: $prog: \"$0\" has been called with these arguments:" >&2
+count=1
+for x; do
+ echo "DEBUG: $prog: arg $((count++)): \"$x\"" >&2
+done
+echo "DEBUG: $prog: \$CUPS_DVIPS_OPTIONS=$CUPS_DVIPS_OPTIONS" >&2
+
+#### echo " $prog: test debug without prefix" >&2
+#### echo "DEBUG: $prog: test debug with prefix" >&2
+#### echo "INFO: $prog: test info" >&2
+#### echo "WARNING: $prog: test warning" >&2
+#### echo "ERROR: $prog: test error" >&2
+#### echo "PAGE: $prog: test page" >&2
+
+# Get rid of the irrelevant command line arguments.
+if ! shift 5; then
+ echo "ERROR: $prog: expected 5 or 6 arguments and received <5" >&2
+ exit $CUPS_DVIPS_ERREXIT
+elif [ $# -gt 1 ]; then
+ echo "ERROR: $prog: expected 5 or 6 arguments and received >6" >&2
+ exit $CUPS_DVIPS_ERREXIT
+elif [ $# -eq 1 ]; then
+ file=$1
+else
+ # Dvips needs seekable input, so if input is on stdin, we need to save it
+ # to a temporary file.
+
+ # tempfile(1) is in the debianutils Debian package (28 April 2004) and is
+ # recommended over mktemp(1).
+ if ! file=$(/bin/tempfile); then
+ echo "ERROR: $prog: invocation of /bin/tempfile failed" >&2
+ exit $CUPS_DVIPS_ERREXIT
+ fi
+ # 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL
+ # 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE
+ # 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2
+ # 13) SIGPIPE 14) SIGALRM 15) SIGTERM 17) SIGCHLD
+ # etc.
+ trap "rm -f \"$file\" 2>/dev/null" EXIT 1 2 3 9 15
+ # Be sure that no prior commands use up the script's stdin. Duplicate stdin if necessary.
+ cat - >"$file"
+fi
+# Dvips options:
+# -q be quiet (not used: output is always sent to CUPS;
+# CUPS variables LogLevel etc. control what
+# is actually logged and where.)
+# -R run securely (recommended)
+# -f run as a filter (necessary)
+##
+
+# If the INFO: level output is not actually going to be logged, we are wasting
+# a time generating it. While in this script, the wasted time is negligible,
+# it does to me a very reasonable wish that CUPS provide the LogLevel to
+# filters via an environment variable. For example, we could choose whether to
+# give debugging options to dvips or not.
+##
+# Make the shell's fd3 point to the shell's stdout.
+exec 3>&1
+# Make the error text of dvips go to the command's stdout and thus through the
+# pipe to the {}-subshell; make the normal text of dvips go to the shell's
+# stdout (fd3); make the {}-subshell's normal output go to the shell's
+# stderr (fd2 as usual). I think it's good form to close fd3 for the dvips and
+# {}-subshell commands, but this may be unnecessary.
+"$CUPS_DVIPS" -R -f $CUPS_DVIPS_OPTS <"$file" 2>&1 1>&3- | \
+ { while read -r -a line; do echo "INFO: $prog: ${line[*]}" >&2; done 3>&-; }
+# Close fd3 for the shell.
+exec 3>&-
+
+exit
+
+#######
+#NOTES#
+#######
+
+# MSS as of this date, arguments passed to filters seem to be, starting with $1:
+#
+# job user title copies options [filename]
+#
+# Remainder from official documentation:
+#
+# job The numeric job ID for the job being printed
+# user The string from the originating-user-name attribute
+# title The string from the job-name attribute
+# copies The numeric value from the number-copies attribute
+# options String representations of the job template attributes, separated by
+# spaces. Boolean attributes are provided as "name" for true values and
+# "noname" for false values. All other attributes are provided as
+# "name=value" for single-valued attributes and
+# "name=value1,value2,...,valueN" for set attributes
+# filename The request file
+
+# The filename argument is provided to only the first filter in the chain.
+
+# The copies argument specifies the number of copies to produce of the input
+# file. In general, you should only generate copies if the filename argument is
+# supplied. The only exception to this are filters that produce
+# device-independent PostScript output (without any printer commands from the
+# printer's PPD file), since the PostScript filter pstops is responsible for
+# copy generation.
+
+# The type of message is determined by an initial prefix sent on each line:
+# DEBUG: - a debug message
+# INFO: - an informational message
+# WARNING: - a warning message
+# ERROR: - an error message
+# PAGE: - a page accounting message
+
+# If the line of text does not begin with any of the above prefixes, it is
+# treated as a debug message. Text following the prefix is copied to the
+# printer-state-message attribute for the printer, and also added to the
+# error_log unless it is an informational or page accounting message.
--- cupsys-1.2.2.orig/debian/filters/dvipipetops.types
+++ cupsys-1.2.2/debian/filters/dvipipetops.types
@@ -0,0 +1 @@
+application/x-dvi dvi string(0,<02>)
--- cupsys-1.2.2.orig/debian/filters/samba-to-ps
+++ cupsys-1.2.2/debian/filters/samba-to-ps
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# CUPS (Common Unix Printing System) filter to fix certain "broken" PostScript files
+
+# The files generated by Hewlett-Packard's Windows drivers for the "LaserJet
+# 5P/5MP PostScript" printer include a PJL header (that switches that printer
+# to PostScript) before the actual PostScript file, and some weird additional
+# comments within the PostScript. If you are sending these files (via Samba)
+# to a plain LaserJet 5P (i.e., without PostScript), you need to remove the
+# header and the weird additional comments before sending the file to
+# ghostscript. Though it is a reasonable guess that the same situation applies
+# to other pairs of HP printers with and without native PostScript
+# capabilities, I have tested this script only with the LaserJet 5P.
+
+# The garbage we are trimming at top and bottom of the file is fixed-length, so
+# we could use something simpler than awk to trim it, but we have to use awk
+# anyway to skip those weird comment lines (3d line of the program below), so
+# let's just use awk for the whole thing.
+
+# I wrote this awk script in the mid-1990s when I bought this printer, and it
+# still serves me well today, with the latest versions of Windows, Debian, and
+# Samba, and with CUPS instead of old BSD lpd and magicfilter. I adapted it
+# for CUPS in April 2004. I put this code into the public domain. I am not
+# putting my name on it because I do not want to receive emails with questions
+# about things I do not know much about.
+
+# TODO
+# does the code here involve gawk extensions?
+
+# on error, exit with this status.
+CUPS_SAMBAPS_ERREXIT=2
+
+prog=$(basename "$0")
+# This statement needs bash I think.
+echo "DEBUG: $prog: \"$0\" has been called with these arguments:" >&2
+count=1
+for x; do
+ echo "DEBUG: $prog: arg $((count++)): \"$x\"" >&2
+done
+
+if ! shift 5; then
+ echo "ERROR: $prog: expected 5 or 6 arguments and received <5" >&2
+ exit $CUPS_SAMBAPS_ERREXIT
+elif [ $# -gt 1 ]; then
+ echo "ERROR: $prog: expected 5 or 6 arguments and received >6" >&2
+ exit $CUPS_SAMBAPS_ERREXIT
+fi
+
+# variable `printme' starts as 0
+/usr/bin/awk \
+ '/^%\!PS-Adobe-/ {printme = 1}
+ /^%%EOF/ {print; printme = 0}
+ /\(%%\[ ?(ProductName:|Page:|LastPage ?)/ {next}
+ { if (printme) print; else next }' \
+ ${1--}
+exit
--- cupsys-1.2.2.orig/debian/filters/dvipipetops.INSTALL
+++ cupsys-1.2.2/debian/filters/dvipipetops.INSTALL
@@ -0,0 +1,7 @@
+To use the dvipipetops filter:
+- create an /etc/cups/local.convs file and add the contents of
+ dvipipetops.convs to it
+- add the contents of dvipipetops.types to /etc/cups/mime.types
+- uncompress dvipipetops, give it exec permissions and put it in
+ /usr/lib/cups/filter
+- restart cups with /etc/init.d/cupsys restart
--- cupsys-1.2.2.orig/debian/filters/mailto
+++ cupsys-1.2.2/debian/filters/mailto
@@ -0,0 +1,161 @@
+#!/usr/bin/python
+
+#
+# $Id: mailto,v 1.3 2003/01/02 17:59:19 gurubert Exp $
+#
+
+#
+# This is a mailto backend for CUPS (www.cups.org)
+#
+# (C) 2002 Robert Sander
+#
+# Released under GPL
+#
+# NO WARRANTY AT ALL
+#
+
+import sys, os, tempfile, MimeWriter, mimetools, mimetypes
+
+log = "\nLog:\n"
+
+def guess_type(file):
+ global log
+
+ type, enc = mimetypes.guess_type(file)
+ if (not type) or (type == 'application/octet-stream'):
+ enc = None
+ try:
+ type = os.popen("/usr/bin/file -bi %s 2> /dev/null" % file).read().rstrip()
+ if type == "" or type == "data":
+ type = "application/octet-stream"
+ except:
+ type = "application/octet-stream"
+ if log:
+ log = "%stype is %s\n" % (log, type)
+ return (type, enc)
+
+def guess_extension(mimetype):
+ return(mimetypes.guess_extension(mimetype))
+
+argc = len(sys.argv)
+
+if argc == 1:
+ print "network mailto \"Unknown\" \"SMTP\""
+ sys.exit(0)
+
+sys.stderr.write("INFO: mailto argv[%s] =" % argc)
+if log:
+ log = "%smailto argv[%s] =" % (log, argc)
+for arg in sys.argv[1:]:
+ sys.stderr.write(" '%s'" % arg)
+ if log:
+ log = "%s '%s'" % (log, arg)
+sys.stderr.write("\n")
+if log:
+ log = "%s\n" % log
+
+if argc < 6 or argc > 7:
+ sys.stderr.write("ERROR: %s job-id user title copies options [file]\n" % sys.argv[0])
+ sys.exit(1)
+
+jobid = sys.argv[1]
+user = sys.argv[2]
+title = sys.argv[3]
+opts = sys.argv[5].split(" ")
+
+if argc == 7:
+ sys.stderr.write("INFO: file is %s\n" % sys.argv[6])
+ if log:
+ log = "%sfile is %s\n" % (log, sys.argv[6])
+ infilename = sys.argv[6]
+else:
+ infilename = tempfile.mktemp(".mailto")
+ try:
+ infile = open(infilename, "w")
+ except:
+ sys.stderr.write("ERROR: unable to create tmp file %s\n" % infilename)
+ sys.exit(1)
+ sys.stderr.write("INFO: file is stdin\n")
+ try:
+ infile.write(sys.stdin.read())
+ except:
+ sys.stderr.write("ERROR: unable to copy into tmpfile\n")
+ sys.exit(1)
+ infile.close()
+ if log:
+ log = "%scopied stdin to %s\n" % (log, infilename)
+
+infile = open(infilename, "r")
+
+sys.stderr.write("INFO: creating tmp mail file\n")
+
+try:
+ mimemailfile = tempfile.TemporaryFile()
+ mimemail = MimeWriter.MimeWriter(mimemailfile)
+except:
+ sys.stderr.write("ERROR: unable to create tmp file for MIME_MAIL\n")
+ sys.exit(1)
+
+mailto = None
+mailfrom = None
+for opt in opts:
+ if log:
+ log = "%sopt = '%s'\n" % (log, opt)
+ if opt[:7] == "mailto=":
+ mailto = opt[7:]
+ if log:
+ log = "%smailto = '%s'\n" % (log, mailfrom)
+ if opt[:9] == "mailfrom=":
+ mailfrom = opt[9:]
+ if log:
+ log = "%smailfrom = '%s'\n" % (log, mailfrom)
+if not mailto:
+ if user:
+ mailto = user
+ else:
+ mailto = mailfrom
+else:
+ if not mailfrom:
+ if user:
+ mailfrom = user
+if not mailfrom:
+ mailfrom = "lp"
+
+# Essential lines to put into the header of a MIME mail.
+mimemail.addheader("From", mailfrom)
+mimemail.addheader("To", mailto)
+mimemail.addheader("Subject", title)
+mimemail.addheader("MIME-Version", "1.0")
+if mailto != user and mailfrom != user:
+ mimemail.addheader("X-CUPS-mailto-started-by", user)
+
+mimemail.startmultipartbody("mixed")
+
+body = mimemail.nextpart()
+
+body.addheader("Content-Transfer-Encoding", "8bit")
+
+body.startbody("text/plain").write("You printed %s with jobid %s\n%s" % (title, jobid, log))
+
+attachment = mimemail.nextpart()
+type, enc = guess_type(infilename)
+ext = guess_extension(type)
+if not ext:
+ ext = ""
+attachment.addheader("Content-Transfer-Encoding", "base64")
+att = attachment.startbody('%s; name="%s%s"' % (type, os.path.basename(title), ext))
+mimetools.encode(infile, att, "base64")
+mimemail.lastpart()
+
+mimemailfile.seek(0)
+
+os.popen("/usr/sbin/sendmail -t -f%s" % mailfrom, "w").write(mimemailfile.read())
+
+att.close()
+infile.close()
+mimemailfile.close()
+
+if argc == 6:
+ os.unlink(infilename)
+
+sys.exit(0)
--- cupsys-1.2.2.orig/debian/filters/samba-postscript.types
+++ cupsys-1.2.2/debian/filters/samba-postscript.types
@@ -0,0 +1,14 @@
+# This evil type, which I have made up, catches files coming in via Samba, when
+# the Windows client is configured to print to the PostScript counterpart to
+# your non-PostScript printer (in my case, I have a Hewlett-Packard LaserJet 5P
+# and configure Windows to use the "HP LaserJet 5P/5MP PostScript" driver so
+# that it will send PostScript straight on rather than convert it to PCL before
+# sending it -- useful to print to files and so on.). I do not know what
+# combinations produce the finest output. See the conversion script
+# samba-ps-to-ps for more information.
+
+# The MIME type used here must sort alphbetically before application/postscript
+# (CUPS has a dozen manuals, and this information seemed available only in a
+# comment in mime.types!). If this were a real MIME type, I think it would be
+# non-conformant.
+application/a-x-postscript-with-pjl-header string(78,"%!PS-Adobe-")
--- cupsys-1.2.2.orig/debian/libcupsys2.dirs
+++ cupsys-1.2.2/debian/libcupsys2.dirs
@@ -0,0 +1 @@
+/var/spool/cups/tmp
--- 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.init.d
+++ cupsys-1.2.2/debian/cupsys.init.d
@@ -0,0 +1,81 @@
+#! /bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/cupsd
+NAME=cupsd
+PIDFILE=/var/run/cups/$NAME.pid
+DESC="Common Unix Printing System"
+
+unset TMPDIR
+
+test -f $DAEMON || exit 0
+
+set -e
+
+. /lib/lsb/init-functions
+
+# Get the timezone set.
+if [ -z "$TZ" -a -e /etc/timezone ]; then
+ TZ=`cat /etc/timezone`
+ export TZ
+fi
+
+case "$1" in
+ start)
+ log_begin_msg "Starting $DESC: $NAME"
+ chown root:lpadmin /usr/share/ppd/custom 2>/dev/null || true
+ chmod 3775 /usr/share/ppd/custom 2>/dev/null || true
+ mkdir -p `dirname "$PIDFILE"`
+ chown cupsys:lp `dirname "$PIDFILE"`
+
+ # create the logs file since cupsd can't
+ for l in access_log page_log error_log; do
+ if [ ! -e /var/log/cups/$l ]; then
+ touch /var/log/cups/$l
+ chmod 640 /var/log/cups/$l
+ chown cupsys:lpadmin /var/log/cups/$l
+ fi
+ done
+
+ # load modules for parallel printer support which are not covered by
+ # udev
+ modprobe lp 2>/dev/null || true
+ modprobe ppdev 2>/dev/null || true # for ISO-1284 device name detection
+
+ start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec $DAEMON
+ log_end_msg $?
+ ;;
+ stop)
+ log_begin_msg "Stopping $DESC: $NAME"
+ start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME
+ log_end_msg $?
+ ;;
+ restart|force-reload)
+ log_begin_msg "Restarting $DESC: $NAME"
+ if start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME; then
+ start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec $DAEMON
+ fi
+ log_end_msg $?
+ ;;
+ status)
+ echo -n "Status of $DESC: "
+ if [ ! -r "$PIDFILE" ]; then
+ echo "$NAME is not running."
+ exit 3
+ fi
+ if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
+ echo "$NAME is running."
+ exit 0
+ else
+ echo "$NAME is not running but $PIDFILE exists."
+ exit 1
+ fi
+ ;;
+ *)
+ N=/etc/init.d/${0##*/}
+ echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
--- cupsys-1.2.2.orig/debian/patches/12_quiesce_ipp_logging.dpatch
+++ cupsys-1.2.2/debian/patches/12_quiesce_ipp_logging.dpatch
@@ -0,0 +1,42 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 12_quiesce_ipp_logging.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys~/scheduler/ipp.c cupsys/scheduler/ipp.c
+--- cupsys~/scheduler/ipp.c 2006-04-07 17:36:10.000000000 +0200
++++ cupsys/scheduler/ipp.c 2006-04-12 16:44:34.000000000 +0200
+@@ -8057,13 +8057,13 @@
+ _cupsLangString(con->language, message), ap);
+ va_end(ap);
+
+- cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_ERROR : CUPSD_LOG_INFO,
++ cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_INFO : CUPSD_LOG_DEBUG,
+ "%s %s: %s",
+ ippOpString(con->request->request.op.operation_id),
+ ippErrorString(status), formatted);
+ }
+ else
+- cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_ERROR : CUPSD_LOG_INFO,
++ cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_INFO : CUPSD_LOG_DEBUG,
+ "%s %s",
+ ippOpString(con->request->request.op.operation_id),
+ ippErrorString(status));
+diff -urNad cupsys~/scheduler/log.c cupsys/scheduler/log.c
+--- cupsys~/scheduler/log.c 2006-02-27 21:57:07.000000000 +0100
++++ cupsys/scheduler/log.c 2006-04-12 16:43:26.000000000 +0200
+@@ -354,6 +354,12 @@
+ "STATUS"
+ };
+
++ /* Do not flood the log with CUPS-Get-Printers requests */
++ if (con->request && code == HTTP_OK && (
++ con->request->request.op.operation_id == CUPS_GET_PRINTERS ||
++ con->request->request.op.operation_id == CUPS_GET_DEFAULT ||
++ con->request->request.op.operation_id == IPP_GET_PRINTER_ATTRIBUTES))
++ return (1);
+
+ #ifdef HAVE_VSYSLOG
+ /*
--- cupsys-1.2.2.orig/debian/patches/08_cupsd.conf.conf.d.dpatch
+++ cupsys-1.2.2/debian/patches/08_cupsd.conf.conf.d.dpatch
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 08_cupsd.conf.conf.d.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2-ubuntu~/conf/cupsd.conf.in cups-1.2-ubuntu/conf/cupsd.conf.in
+--- cups-1.2-ubuntu~/conf/cupsd.conf.in 2006-04-24 19:25:39.000000000 +0200
++++ cups-1.2-ubuntu/conf/cupsd.conf.in 2006-04-25 10:50:24.000000000 +0200
+@@ -14,13 +14,18 @@
+ SystemGroup @CUPS_SYSTEM_GROUPS@
+
+ # Only listen for connections from the local machine.
+-Listen localhost:@DEFAULT_IPP_PORT@
+-@CUPS_LISTEN_DOMAINSOCKET@
++# These settings are configured in /etc/cups/cups.d/ports.conf so that
++# changing them does not require to change this file.
++# Listen localhost:@DEFAULT_IPP_PORT@
++# @CUPS_LISTEN_DOMAINSOCKET@
+
+ # Show shared printers on the local network.
+-Browsing On
++# The 'Browsing' setting is configured in /etc/cups/cups.d/browse.conf
++# so that changing it does not require to change this file.
++# Browsing Off
+ BrowseOrder allow,deny
+ BrowseAllow @LOCAL
++BrowseAddress @LOCAL
+
+ # Default authentication type, when authentication is required...
+ DefaultAuthType Basic
+@@ -71,6 +76,10 @@
+
+
+
++# Include files in /etc/cups/conf.d
++Include /etc/cups/cups.d/ports.conf
++Include /etc/cups/cups.d/browse.conf
++
+ #
+ # End of "$Id: cupsd.conf.in 5114 2006-02-16 12:28:29Z mike $".
+ #
--- cupsys-1.2.2.orig/debian/patches/74_pid.dpatch
+++ cupsys-1.2.2/debian/patches/74_pid.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 74_pid.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.4~/test/run-stp-tests.sh cupsys-1.2.4/test/run-stp-tests.sh
+--- cupsys-1.2.4~/test/run-stp-tests.sh 2006-05-05 12:33:57.000000000 -0400
++++ cupsys-1.2.4/test/run-stp-tests.sh 2008-03-26 14:09:57.000000000 -0400
+@@ -305,6 +305,7 @@
+ DocumentRoot $root/doc
+ RequestRoot /tmp/cups-$user/spool
+ TempDir /tmp/cups-$user/spool/temp
++PidFile /tmp/cups-$user/cupsd.pid
+ MaxLogSize 0
+ AccessLog /tmp/cups-$user/log/access_log
+ ErrorLog /tmp/cups-$user/log/error_log
--- cupsys-1.2.2.orig/debian/patches/73_CVE-2008-0882.dpatch
+++ cupsys-1.2.2/debian/patches/73_CVE-2008-0882.dpatch
@@ -0,0 +1,34 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 73_CVE-2008-0882.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/scheduler/dirsvc.c cupsys-1.2.2/scheduler/dirsvc.c
+--- cupsys-1.2.2~/scheduler/dirsvc.c 2008-03-26 14:57:34.000000000 -0400
++++ cupsys-1.2.2/scheduler/dirsvc.c 2008-03-26 14:58:30.000000000 -0400
+@@ -1923,9 +1923,9 @@
+ else
+ return;
+
+- if ((p = cupsdFindClass(name)) == NULL && BrowseShortNames)
++ if ((p = cupsdFindDest(name)) == NULL && BrowseShortNames)
+ {
+- if ((p = cupsdFindClass(resource + 9)) != NULL)
++ if ((p = cupsdFindDest(resource + 9)) != NULL)
+ {
+ if (p->hostname && strcasecmp(p->hostname, host))
+ {
+@@ -2026,9 +2026,9 @@
+ else
+ return;
+
+- if ((p = cupsdFindPrinter(name)) == NULL && BrowseShortNames)
++ if ((p = cupsdFindDest(name)) == NULL && BrowseShortNames)
+ {
+- if ((p = cupsdFindPrinter(resource + 10)) != NULL)
++ if ((p = cupsdFindDest(resource + 10)) != NULL)
+ {
+ if (p->hostname && strcasecmp(p->hostname, host))
+ {
--- cupsys-1.2.2.orig/debian/patches/59_title_escaping.dpatch
+++ cupsys-1.2.2/debian/patches/59_title_escaping.dpatch
@@ -0,0 +1,167 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 59_title_escaping.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/common.c cupsys-1.2.2/filter/common.c
+--- cupsys-1.2.2~/filter/common.c 2005-02-18 03:18:11.000000000 +0100
++++ cupsys-1.2.2/filter/common.c 2007-08-10 12:47:07.000000000 +0200
+@@ -467,5 +467,76 @@
+
+
+ /*
++ * 'WriteTextComment()' - Write a DSC text comment.
++ */
++
++void
++WriteTextComment(const char *name, /* I - Comment name ("Title", etc.) */
++ const char *value) /* I - Comment value */
++{
++ int len; /* Current line length */
++
++
++ /*
++ * DSC comments are of the form:
++ *
++ * %%name: value
++ *
++ * The name and value must be limited to 7-bit ASCII for most printers,
++ * so we escape all non-ASCII and ASCII control characters as described
++ * in the Adobe Document Structuring Conventions specification.
++ */
++
++ printf("%%%%%s: (", name);
++ len = 5 + strlen(name);
++
++ while (*value)
++ {
++ if (*value < ' ' || *value >= 127)
++ {
++ /*
++ * Escape this character value...
++ */
++
++ if (len >= 251) /* Keep line < 254 chars */
++ break;
++
++ printf("\\%03o", *value & 255);
++ len += 4;
++ }
++ else if (*value == '\\')
++ {
++ /*
++ * Escape the backslash...
++ */
++
++ if (len >= 253) /* Keep line < 254 chars */
++ break;
++
++ putchar('\\');
++ putchar('\\');
++ len += 2;
++ }
++ else
++ {
++ /*
++ * Put this character literally...
++ */
++
++ if (len >= 254) /* Keep line < 254 chars */
++ break;
++
++ putchar(*value);
++ len ++;
++ }
++
++ value ++;
++ }
++
++ puts(")");
++}
++
++
++/*
+ * End of "$Id: common.c 4494 2005-02-18 02:18:11Z mike $".
+ */
+diff -urNad cupsys-1.2.2~/filter/common.h cupsys-1.2.2/filter/common.h
+--- cupsys-1.2.2~/filter/common.h 2005-02-18 03:09:53.000000000 +0100
++++ cupsys-1.2.2/filter/common.h 2007-08-10 12:47:07.000000000 +0200
+@@ -76,6 +76,7 @@
+ extern void WriteLabelProlog(const char *label, float bottom,
+ float top, float width);
+ extern void WriteLabels(int orient);
++extern void WriteTextComment(const char *name, const char *value);
+
+
+ /*
+diff -urNad cupsys-1.2.2~/filter/hpgl-prolog.c cupsys-1.2.2/filter/hpgl-prolog.c
+--- cupsys-1.2.2~/filter/hpgl-prolog.c 2005-09-21 11:28:39.000000000 +0200
++++ cupsys-1.2.2/filter/hpgl-prolog.c 2007-08-10 12:47:07.000000000 +0200
+@@ -70,8 +70,8 @@
+ puts("%%Creator: hpgltops/" CUPS_SVERSION);
+ strftime(line, sizeof(line), "%c", curtm);
+ printf("%%%%CreationDate: %s\n", line);
+- printf("%%%%Title: %s\n", title);
+- printf("%%%%For: %s\n", user);
++ WriteTextComment("Title", title);
++ WriteTextComment("For", user);
+ printf("%%cupsRotation: %d\n", (Orientation & 3) * 90);
+ puts("%%EndComments");
+ puts("%%BeginProlog");
+diff -urNad cupsys-1.2.2~/filter/imagetops.c cupsys-1.2.2/filter/imagetops.c
+--- cupsys-1.2.2~/filter/imagetops.c 2006-04-07 15:48:37.000000000 +0200
++++ cupsys-1.2.2/filter/imagetops.c 2007-08-10 12:47:07.000000000 +0200
+@@ -609,8 +609,8 @@
+ puts("%%Creator: imagetops/" CUPS_SVERSION);
+ strftime(curdate, sizeof(curdate), "%c", curtm);
+ printf("%%%%CreationDate: %s\n", curdate);
+- printf("%%%%Title: %s\n", argv[3]);
+- printf("%%%%For: %s\n", argv[2]);
++ WriteTextComment("Title", argv[3]);
++ WriteTextComment("For", argv[2]);
+ if (Orientation & 1)
+ puts("%%Orientation: Landscape");
+ else
+diff -urNad cupsys-1.2.2~/filter/pstops.c cupsys-1.2.2/filter/pstops.c
+--- cupsys-1.2.2~/filter/pstops.c 2006-06-02 01:43:21.000000000 +0200
++++ cupsys-1.2.2/filter/pstops.c 2007-08-10 12:47:07.000000000 +0200
+@@ -666,10 +666,10 @@
+ fputs("ERROR: No %%Pages: comment in header!\n", stderr);
+
+ if (!saw_for)
+- printf("%%%%For: %s\n", doc->user);
++ WriteTextComment("For", doc->user);
+
+ if (!saw_title)
+- printf("%%%%Title: %s\n", doc->title);
++ WriteTextComment("Title", doc->title);
+
+ if (doc->copies != 1 && (!doc->collate || !doc->slow_collate))
+ {
+@@ -946,8 +946,8 @@
+ else
+ puts("%%Pages: 1");
+
+- printf("%%%%For: %s\n", doc->user);
+- printf("%%%%Title: %s\n", doc->title);
++ WriteTextComment("For", doc->user);
++ WriteTextComment("Title", doc->title);
+
+ if (doc->copies != 1 && (!doc->collate || !doc->slow_collate))
+ {
+diff -urNad cupsys-1.2.2~/filter/texttops.c cupsys-1.2.2/filter/texttops.c
+--- cupsys-1.2.2~/filter/texttops.c 2005-09-21 11:28:39.000000000 +0200
++++ cupsys-1.2.2/filter/texttops.c 2007-08-10 12:47:07.000000000 +0200
+@@ -208,8 +208,8 @@
+ printf("%%cupsRotation: %d\n", (Orientation & 3) * 90);
+ puts("%%Creator: texttops/" CUPS_SVERSION);
+ printf("%%%%CreationDate: %s\n", curdate);
+- printf("%%%%Title: %s\n", title);
+- printf("%%%%For: %s\n", user);
++ WriteTextComment("Title", title);
++ WriteTextComment("For", user);
+ puts("%%Pages: (atend)");
+
+ /*
--- cupsys-1.2.2.orig/debian/patches/ubuntu-nowebadmin.dpatch
+++ cupsys-1.2.2/debian/patches/ubuntu-nowebadmin.dpatch
@@ -0,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## ubuntu-nowebadmin.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4892~/doc/index.html.in cupsys-1.1.99.b1.r4892/doc/index.html.in
+--- cupsys-1.1.99.b1.r4892~/doc/index.html.in 2005-12-10 22:20:14.000000000 +0100
++++ cupsys-1.1.99.b1.r4892/doc/index.html.in 2006-01-13 15:23:18.000000000 +0100
+@@ -73,8 +73,10 @@
+
+
+
+-If you are asked for a username and password, enter your login
+-username and password or the "root" username and password.
++Administrative commands are disabled in the web interface for security
++reasons. Please use the GNOME CUPS manager (System > Administration >
++Printing). /usr/share/doc/cupsys/README.Debian.gz
++describes the details and how to reenable it again.
+
+ About CUPS
+
--- cupsys-1.2.2.orig/debian/patches/76_CVE-2008-1373.dpatch
+++ cupsys-1.2.2/debian/patches/76_CVE-2008-1373.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 76_CVE-2008-1373.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.4~/filter/image-gif.c cupsys-1.2.4/filter/image-gif.c
+--- cupsys-1.2.4~/filter/image-gif.c 2006-05-11 07:41:36.000000000 -0400
++++ cupsys-1.2.4/filter/image-gif.c 2008-03-26 14:12:49.000000000 -0400
+@@ -47,6 +47,8 @@
+ #define GIF_INTERLACE 0x40
+ #define GIF_COLORMAP 0x80
+
++#define MAX_LWZ_BITS 12
++
+ typedef cups_ib_t gif_cmap_t[256][4];
+ typedef short gif_table_t[4096];
+
+@@ -471,6 +473,9 @@
+ pass = 0;
+ code_size = getc(fp);
+
++ if (code_size > MAX_LWZ_BITS)
++ return (-1);
++
+ if (gif_read_lzw(fp, 1, code_size) < 0)
+ return (-1);
+
--- cupsys-1.2.2.orig/debian/patches/ipptags-corruption-fix.dpatch
+++ cupsys-1.2.2/debian/patches/ipptags-corruption-fix.dpatch
@@ -0,0 +1,159 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## ipptags-corruption-fix.dpatch by Kees Cook
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/cups/ipp.c cupsys-1.2.2/cups/ipp.c
+--- cupsys-1.2.2~/cups/ipp.c 2006-06-02 08:15:23.000000000 -0700
++++ cupsys-1.2.2/cups/ipp.c 2007-11-01 07:27:35.000000000 -0700
+@@ -1312,6 +1312,12 @@
+ {
+ case IPP_TAG_INTEGER :
+ case IPP_TAG_ENUM :
++ if (n != 4)
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, 4) < 4)
+ {
+ DEBUG_puts("ippReadIO: Unable to read integer value!");
+@@ -1324,6 +1330,12 @@
+ value->integer = n;
+ break;
+ case IPP_TAG_BOOLEAN :
++ if (n != 1)
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, 1) < 1)
+ {
+ DEBUG_puts("ippReadIO: Unable to read boolean value!");
+@@ -1341,6 +1353,12 @@
+ case IPP_TAG_CHARSET :
+ case IPP_TAG_LANGUAGE :
+ case IPP_TAG_MIMETYPE :
++ if (n >= sizeof(buffer))
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, n) < n)
+ {
+ DEBUG_puts("ippReadIO: unable to read name!");
+@@ -1353,6 +1371,12 @@
+ value->string.text));
+ break;
+ case IPP_TAG_DATE :
++ if (n != 11)
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, value->date, 11) < 11)
+ {
+ DEBUG_puts("ippReadIO: Unable to date integer value!");
+@@ -1360,6 +1384,12 @@
+ }
+ break;
+ case IPP_TAG_RESOLUTION :
++ if (n != 9)
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, 9) < 9)
+ {
+ DEBUG_puts("ippReadIO: Unable to read resolution value!");
+@@ -1376,6 +1406,12 @@
+ (ipp_res_t)buffer[8];
+ break;
+ case IPP_TAG_RANGE :
++ if (n != 8)
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, 8) < 8)
+ {
+ DEBUG_puts("ippReadIO: Unable to read range value!");
+@@ -1391,7 +1427,7 @@
+ break;
+ case IPP_TAG_TEXTLANG :
+ case IPP_TAG_NAMELANG :
+- if (n > sizeof(buffer) || n < 4)
++ if (n >= sizeof(buffer) || n < 4)
+ {
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
+@@ -1417,22 +1453,27 @@
+
+ n = (bufptr[0] << 8) | bufptr[1];
+
+- if (n >= sizeof(string))
++ if ((bufptr + 2 + n) >= (buffer + sizeof(buffer)) ||
++ n >= sizeof(string))
+ {
+- memcpy(string, bufptr + 2, sizeof(string) - 1);
+- string[sizeof(string) - 1] = '\0';
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
+ }
+- else
+- {
+- memcpy(string, bufptr + 2, n);
+- string[n] = '\0';
+- }
++
++ memcpy(string, bufptr + 2, n);
++ string[n] = '\0';
+
+ value->string.charset = _cupsStrAlloc((char *)string);
+
+ bufptr += 2 + n;
+ n = (bufptr[0] << 8) | bufptr[1];
+
++ if ((bufptr + 2 + n) >= (buffer + sizeof(buffer)))
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ bufptr[2 + n] = '\0';
+ value->string.text = _cupsStrAlloc((char *)bufptr + 2);
+ break;
+@@ -1474,6 +1515,12 @@
+ * we need to carry over...
+ */
+
++ if (n >= sizeof(buffer))
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, n) < n)
+ {
+ DEBUG_puts("ippReadIO: Unable to read member name value!");
+@@ -1495,6 +1542,12 @@
+ break;
+
+ default : /* Other unsupported values */
++ if (n > sizeof(buffer))
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ value->unknown.length = n;
+ if (n > 0)
+ {
--- cupsys-1.2.2.orig/debian/patches/19_cupsaccept.dpatch
+++ cupsys-1.2.2/debian/patches/19_cupsaccept.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 19_cupsaccept.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4748~/systemv/accept.c cupsys-1.1.99.b1.r4748/systemv/accept.c
+--- cupsys-1.1.99.b1.r4748~/systemv/accept.c 2005-02-18 02:18:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/systemv/accept.c 2005-10-05 12:14:39.401595086 +0000
+@@ -67,6 +67,9 @@
+ else
+ command = argv[0];
+
++ if (strncmp(command, "cups", 4) == 0)
++ command += 4;
++
+ cancel = 0;
+
+ if (strcmp(command, "accept") == 0)
--- cupsys-1.2.2.orig/debian/patches/47_pid.dpatch
+++ cupsys-1.2.2/debian/patches/47_pid.dpatch
@@ -0,0 +1,104 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 47_pid.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b2~/scheduler/conf.c cupsys-1.1.99.b2/scheduler/conf.c
+--- cupsys-1.1.99.b2~/scheduler/conf.c 2006-03-11 13:31:04.000000000 +0000
++++ cupsys-1.1.99.b2/scheduler/conf.c 2006-03-11 13:31:16.000000000 +0000
+@@ -170,7 +170,8 @@
+ { "StateDir", &StateDir, CUPSD_VARTYPE_STRING },
+ { "TempDir", &TempDir, CUPSD_VARTYPE_STRING },
+ { "Timeout", &Timeout, CUPSD_VARTYPE_INTEGER },
+- { "UseNetworkDefault", &UseNetworkDefault, CUPSD_VARTYPE_BOOLEAN }
++ { "UseNetworkDefault", &UseNetworkDefault, CUPSD_VARTYPE_BOOLEAN },
++ { "PidFile", &PidFile, CUPSD_VARTYPE_STRING }
+ };
+ #define NUM_VARS (sizeof(variables) / sizeof(variables[0]))
+
+@@ -287,6 +288,7 @@
+ cupsdSetString(&RemoteRoot, "remroot");
+ cupsdSetString(&ServerHeader, "CUPS/1.2");
+ cupsdSetString(&StateDir, CUPS_STATEDIR);
++ cupsdSetString(&PidFile, "/var/run/cups/cupsd.pid");
+
+ strlcpy(temp, ConfigurationFile, sizeof(temp));
+ if ((slash = strrchr(temp, '/')) != NULL)
+diff -urNad cupsys-1.1.99.b2~/scheduler/conf.h cupsys-1.1.99.b2/scheduler/conf.h
+--- cupsys-1.1.99.b2~/scheduler/conf.h 2006-03-11 13:31:04.000000000 +0000
++++ cupsys-1.1.99.b2/scheduler/conf.h 2006-03-11 13:31:16.000000000 +0000
+@@ -186,6 +186,7 @@
+ /* Server key file */
+ # endif /* HAVE_LIBSSL || HAVE_GNUTLS */
+ #endif /* HAVE_SSL */
++VAR char *PidFile VALUE(NULL); /* Debian CUPS pid file */
+
+ #ifdef HAVE_LAUNCHD
+ VAR int LaunchdTimeout VALUE(DEFAULT_TIMEOUT);
+diff -urNad cupsys-1.1.99.b2~/scheduler/main.c cupsys-1.1.99.b2/scheduler/main.c
+--- cupsys-1.1.99.b2~/scheduler/main.c 2006-03-11 13:31:04.000000000 +0000
++++ cupsys-1.1.99.b2/scheduler/main.c 2006-03-11 13:32:41.000000000 +0000
+@@ -89,7 +89,8 @@
+ static void sigterm_handler(int sig);
+ static long select_timeout(int fds);
+ static void usage(int status);
+-
++int write_pid(void);
++int remvoe_pid(void);
+
+ /*
+ * Local globals...
+@@ -501,6 +502,11 @@
+ kill(i, SIGUSR1);
+ }
+
++ if (write_pid() == 0) {
++ cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to write pid file");
++ return (1);
++ }
++
+ /*
+ * Start power management framework...
+ */
+@@ -1095,9 +1101,39 @@
+ free(input);
+ free(output);
+
++ remove_pid();
++
+ return (!stop_scheduler);
+ }
+
++/* 'write_pid()' - Write PID file.
++ 'remove_pid()' - Delete PID file.
++*/
++int
++write_pid()
++{
++ FILE *f;
++ int fd;
++ int pid;
++ if (((fd = open(PidFile, O_RDWR|O_CREAT, 0644)) == -1)
++ || ((f = fdopen(fd, "r+")) == NULL) ) {
++ return 0;
++ }
++ pid = getpid();
++ if (!fprintf(f, "%d\n", pid)) {
++ close(fd);
++ return 0;
++ }
++ fflush(f);
++ close(fd);
++
++ return pid;
++}
++
++int remove_pid() {
++ return unlink(PidFile);
++}
++
+
+ /*
+ * 'cupsdClosePipe()' - Close a pipe as necessary.
--- cupsys-1.2.2.orig/debian/patches/81_CVE-2009-0163.dpatch
+++ cupsys-1.2.2/debian/patches/81_CVE-2009-0163.dpatch
@@ -0,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 81_CVE-2009-0163.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream: STR #3031
+## DP: Description: fix integer overflow via large TIFF file (CVE-2009-0163
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/image-private.h cupsys-1.2.2/filter/image-private.h
+--- cupsys-1.2.2~/filter/image-private.h 2006-02-26 20:47:56.000000000 -0600
++++ cupsys-1.2.2/filter/image-private.h 2009-04-15 09:25:40.000000000 -0500
+@@ -49,8 +49,8 @@
+
+ # define CUPS_IMAGE_MAX_WIDTH 0x07ffffff
+ /* 2^27-1 to allow for 15-channel data */
+-# define CUPS_IMAGE_MAX_HEIGHT 0x7fffffff
+- /* 2^31-1 */
++# define CUPS_IMAGE_MAX_HEIGHT 0x3fffffff
++ /* 2^30-1 */
+
+ # define CUPS_TILE_SIZE 256 /* 256x256 pixel tiles */
+ # define CUPS_TILE_MINIMUM 10 /* Minimum number of tiles */
--- cupsys-1.2.2.orig/debian/patches/78_CVE-2008-3639.dpatch
+++ cupsys-1.2.2/debian/patches/78_CVE-2008-3639.dpatch
@@ -0,0 +1,44 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 77_CVE-2008-3639.dpatch by Jamie Strandboge
+##
+## DP: Upstream: STR #2919
+## DP: fix integer overflow in texttops filter (CVE-2008-3640)
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/image-sgilib.c cupsys-1.2.2/filter/image-sgilib.c
+--- cupsys-1.2.2~/filter/image-sgilib.c 2005-10-01 23:25:52.000000000 -0500
++++ cupsys-1.2.2/filter/image-sgilib.c 2008-10-14 14:01:05.000000000 -0500
+@@ -610,13 +610,14 @@
+ if (ch & 128)
+ {
+ for (i = 0; i < count; i ++, row ++, xsize --, length ++)
+- *row = getc(fp);
++ if (xsize > 0)
++ *row = getc(fp);
+ }
+ else
+ {
+ ch = getc(fp);
+ length ++;
+- for (i = 0; i < count; i ++, row ++, xsize --)
++ for (i = 0; i < count && xsize > 0; i ++, row ++, xsize --)
+ *row = ch;
+ }
+ }
+@@ -655,13 +656,14 @@
+ if (ch & 128)
+ {
+ for (i = 0; i < count; i ++, row ++, xsize --, length ++)
+- *row = getshort(fp);
++ if (xsize > 0)
++ *row = getshort(fp);
+ }
+ else
+ {
+ ch = getshort(fp);
+ length ++;
+- for (i = 0; i < count; i ++, row ++, xsize --)
++ for (i = 0; i < count && xsize > 0; i ++, row ++, xsize --)
+ *row = ch;
+ }
+ }
--- cupsys-1.2.2.orig/debian/patches/26_modprobe.dpatch
+++ cupsys-1.2.2/debian/patches/26_modprobe.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 26_modprobe.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4748~/backend/parallel.c cupsys-1.1.99.b1.r4748/backend/parallel.c
+--- cupsys-1.1.99.b1.r4748~/backend/parallel.c 2005-09-26 19:33:58.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/backend/parallel.c 2005-10-05 12:33:48.589479144 +0000
+@@ -416,6 +416,10 @@
+ model[IPP_MAX_NAME]; /* Model from file */
+
+
++ /* Load module for unconfigured host */
++ fd = popen("/sbin/modprobe -q lp", "r");
++ pclose(fd);
++
+ for (i = 0; i < 4; i ++)
+ {
+ /*
--- cupsys-1.2.2.orig/debian/patches/80_CVE-2008-3641.dpatch
+++ cupsys-1.2.2/debian/patches/80_CVE-2008-3641.dpatch
@@ -0,0 +1,140 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 79_CVE-2008-3641.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/hpgl-attr.c cupsys-1.2.2/filter/hpgl-attr.c
+--- cupsys-1.2.2~/filter/hpgl-attr.c 2005-02-17 20:18:11.000000000 -0600
++++ cupsys-1.2.2/filter/hpgl-attr.c 2008-10-15 12:27:11.000000000 -0500
+@@ -205,13 +205,23 @@
+
+ if (num_params == 0)
+ PenCount = 8;
+- else if (num_params == 1 && params[0].value.number <= 1024)
+- PenCount = (int)params[0].value.number;
++ else if (num_params == 1)
++ {
++ if (params[0].value.number < 1 || params[0].value.number > MAX_PENS)
++ {
++ fprintf(stderr,
++ "DEBUG: HP-GL/2 \'NP\' command with invalid number of "
++ "pens (%d)!\n", (int)params[0].value.number);
++ PenCount = 8;
++ }
++ else
++ PenCount = (int)params[0].value.number;
++ }
+ else
+ fprintf(stderr, "WARNING: HP-GL/2 \'NP\' command with invalid number of parameters (%d)!\n",
+ num_params);
+
+- for (i = 0; i <= PenCount; i ++)
++ for (i = 0; i < PenCount; i ++)
+ Pens[i].width = PenWidth;
+
+ PC_pen_color(0, NULL);
+@@ -242,7 +252,7 @@
+
+ if (num_params == 0)
+ {
+- for (i = 0; i <= PenCount; i ++)
++ for (i = 0; i < PenCount; i ++)
+ if (i < 8)
+ {
+ Pens[i].rgb[0] = standard_colors[i][0];
+@@ -263,7 +273,14 @@
+ }
+ else if (num_params == 1 || num_params == 4)
+ {
+- i = (int)params[0].value.number;
++ i = (int)params[0].value.number - 1;
++
++ if (i < 0 || i >= PenCount)
++ {
++ fprintf(stderr,
++ "DEBUG: HP-GL/2 \'PC\' command with invalid pen (%d)!\n", i + 1);
++ return;
++ }
+
+ if (num_params == 1)
+ {
+@@ -336,7 +353,15 @@
+
+ if (num_params == 2)
+ {
+- pen = (int)params[1].value.number;
++ pen = (int)params[1].value.number - 1;
++
++ if (pen < 0 || pen >= PenCount)
++ {
++ fprintf(stderr,
++ "DEBUG: HP-GL/2 \'PW\' command with invalid pen (%d)!\n",
++ pen + 1);
++ return;
++ }
+
+ Pens[pen].width = w;
+
+@@ -351,7 +376,7 @@
+ * Set width for all pens...
+ */
+
+- for (pen = 0; pen <= PenCount; pen ++)
++ for (pen = 0; pen < PenCount; pen ++)
+ Pens[pen].width = w;
+
+ if (PageDirty)
+@@ -404,12 +429,15 @@
+ param_t *params) /* I - Parameters */
+ {
+ if (num_params == 0)
+- PenNumber = 1;
+- else if (params[0].value.number <= PenCount)
+- PenNumber = (int)params[0].value.number;
++ PenNumber = 0;
++ else if (num_params > 1)
++ fprintf(stderr, "WARNING: HP-GL/2 \'SP\' command with invalid number of parameters "
++ "(%d)!\n", num_params);
++ else if (params[0].value.number <= 0 || params[0].value.number >= PenCount)
++ fprintf(stderr, "WARNING: HP-GL/2 \'SP\' command with invalid pen (%d)!\n",
++ (int)params[0].value.number);
+ else
+- fprintf(stderr, "WARNING: HP-GL/2 \'SP\' command with invalid number or value of parameters (%d, %d)!\n",
+- num_params, (int)params[0].value.number);
++ PenNumber = (int)params[0].value.number;
+
+ if (PageDirty)
+ printf("%.3f %.3f %.3f %.2f SP\n", Pens[PenNumber].rgb[0],
+diff -urNad cupsys-1.2.2~/filter/hpgltops.h cupsys-1.2.2/filter/hpgltops.h
+--- cupsys-1.2.2~/filter/hpgltops.h 2005-02-17 20:18:11.000000000 -0600
++++ cupsys-1.2.2/filter/hpgltops.h 2008-10-15 12:19:26.000000000 -0500
+@@ -35,6 +35,14 @@
+ # define M_PI 3.14159265358979323846
+ #endif /* M_PI */
+
++
++/*
++ * Maximum number of pens we emulate...
++ */
++
++#define MAX_PENS 1024
++
++
+ /*
+ * Parameter value structure...
+ */
+@@ -117,10 +125,10 @@
+ /* Current pen position */
+ PenScaling VALUE(1.0f), /* Pen width scaling factor */
+ PenWidth VALUE(1.0f); /* Default pen width */
+-VAR pen_t Pens[1024]; /* State of each pen */
++VAR pen_t Pens[MAX_PENS]; /* State of each pen */
+ VAR int PenMotion VALUE(0), /* 0 = absolute, 1 = relative */
+ PenValid VALUE(0), /* 1 = valid position, 0 = undefined */
+- PenNumber VALUE(1), /* Current pen number */
++ PenNumber VALUE(0), /* Current pen number */
+ PenCount VALUE(8), /* Number of pens */
+ PenDown VALUE(0), /* 0 = pen up, 1 = pen down */
+ PolygonMode VALUE(0), /* Drawing polygons? */
--- cupsys-1.2.2.orig/debian/patches/71_CVE-2007-5849.dpatch
+++ cupsys-1.2.2/debian/patches/71_CVE-2007-5849.dpatch
@@ -0,0 +1,48 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 71_CVE-2007-5849.dpatch by Kees Cook
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/backend/snmp.c cupsys-1.2.2/backend/snmp.c
+--- cupsys-1.2.2~/backend/snmp.c 2006-07-13 12:59:36.000000000 -0700
++++ cupsys-1.2.2/backend/snmp.c 2008-01-07 16:18:28.000000000 -0800
+@@ -940,10 +940,24 @@
+ char *string, /* I - String buffer */
+ int strsize) /* I - String buffer size */
+ {
+- if (length < strsize)
++ if (length < 0)
+ {
+- memcpy(string, *buffer, length);
+- string[length] = '\0';
++ /*
++ * Disallow negative lengths!
++ */
++
++ fprintf(stderr, "ERROR: Bad ASN1 string length %d!\n", length);
++ *string = '\0';
++ }
++ else if (length < strsize)
++ {
++ /*
++ * String is smaller than the buffer...
++ */
++
++ if (length > 0)
++ memcpy(string, *buffer, length);
++ string[length] = '\0';
+ }
+ else
+ {
+@@ -951,7 +965,8 @@
+ string[strsize - 1] = '\0';
+ }
+
+- (*buffer) += length;
++ if (length > 0)
++ (*buffer) += length;
+
+ return (string);
+ }
--- cupsys-1.2.2.orig/debian/patches/70_CVE-2007-6358.dpatch
+++ cupsys-1.2.2/debian/patches/70_CVE-2007-6358.dpatch
@@ -0,0 +1,45 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 70_CVE-2007-6358.dpatch by Kees Cook
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/debian/pdftops cupsys-1.2.2/debian/pdftops
+--- cupsys-1.2.2~/debian/pdftops 2008-01-07 16:03:13.000000000 -0800
++++ cupsys-1.2.2/debian/pdftops 2008-01-07 16:18:11.000000000 -0800
+@@ -68,6 +68,7 @@
+ # ------------------------------------------------------------------------------
+
+ use File::Copy;
++use File::Temp qw( tempfile );
+
+ #
+ # Check the arguments
+@@ -87,15 +88,21 @@
+
+ if (! defined $pdffile)
+ {
+- my $tmpfile = $ENV{TMPDIR} . "pdfin.$$.tmp";
+- open (TEMP, ">$tmpfile") || die ("ERROR: pdftops wrapper: $tmpfile: $!\n");
+- if (! copy (\*STDIN, \*TEMP))
++ my $template = "pdfinXXXXXX";
++ my $tmpdir = $ENV{TMPDIR};
++ my ($bytes, $buffer);
++ my ($tmpfh, $tmpfile) = tempfile ($template, OPEN => 1, DIR => $tmpdir, UNLINK => 0, SUFFIX => '.tmp');
++ while (($bytes = read (STDIN, $buffer, 1024)) > 0)
+ {
+- close (TEMP);
++ print $tmpfh "$buffer";
++ }
++ if ($bytes < 0)
++ {
++ close ($tmpfh);
+ unlink $tmpfile;
+ die ("ERROR: pdftops wrapper: $tmpfile: $!\n");
+ }
+- close (TEMP);
++ close ($tmpfh);
+ $pdffile = $tmpfile;
+ $delete_input = 1; # for deleting the temp file after converting
+ }
--- cupsys-1.2.2.orig/debian/patches/14_dont_force_ssl.dpatch
+++ cupsys-1.2.2/debian/patches/14_dont_force_ssl.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 14_dont_force_ssl.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2-ubuntu~/conf/cupsd.conf.in cups-1.2-ubuntu/conf/cupsd.conf.in
+--- cups-1.2-ubuntu~/conf/cupsd.conf.in 2006-04-25 20:05:27.000000000 +0200
++++ cups-1.2-ubuntu/conf/cupsd.conf.in 2006-04-25 20:09:04.000000000 +0200
+@@ -33,7 +33,6 @@
+
+ # Restrict access to the admin pages...
+
+-@ENCRYPTION_REQUIRED@
+ Order allow,deny
+ Allow localhost
+
--- cupsys-1.2.2.orig/debian/patches/09_runasuser_autoconf.dpatch
+++ cupsys-1.2.2/debian/patches/09_runasuser_autoconf.dpatch
@@ -0,0 +1,62 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 99_autoconf.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2~/configure cups-1.2/configure
+--- cups-1.2~/configure 2006-07-21 18:43:01.000000000 +0200
++++ cups-1.2/configure 2006-07-21 18:43:41.000000000 +0200
+@@ -309,7 +309,7 @@
+ #endif"
+
+ ac_default_prefix=/
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CUPS_VERSION CUPS_REVISION AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB AR HTMLDOC LD LN MV RM RMDIR SED STRIP INSTALLSTATIC LIBMALLOC LIBPAPER EGREP ARFLAGS PKGCONFIG BACKLIBS CUPSDLIBS DBUSDIR DEFAULT_IPP_PORT INITDIR INITDDIR XINETD CUPS_CACHEDIR CUPS_DATADIR CUPS_DOCROOT CUPS_FONTPATH CUPS_LOCALEDIR CUPS_LOGDIR CUPS_REQUESTS CUPS_SERVERBIN INSTALL_SYSV CUPS_SERVERROOT CUPS_STATEDIR AMANDIR PMANDIR MAN1EXT MAN5EXT MAN7EXT MAN8EXT MAN8DIR DSO DSOFLAGS DSO32FLAGS DSO64FLAGS LIBCUPS LIBCUPSIMAGE LINKCUPS LINKCUPSIMAGE DSOLIBS IMGLIBS EXPORT_LDFLAGS LIBTOOL OPTIM ARCHFLAGS ARCH32FLAGS INSTALL32 LIB32CUPS LIB32CUPSIMAGE LIB32DIR UNINSTALL32 ARCH64FLAGS INSTALL64 LIB64CUPS LIB64CUPSIMAGE LIB64DIR UNINSTALL64 CXXLIBS PIEFLAGS IMGFILTERS LIBJPEG LIBPNG LIBTIFF LIBZ EXPORT_LIBJPEG EXPORT_LIBPNG EXPORT_LIBTIFF EXPORT_LIBZ CUPS_DEFAULT_DOMAINSOCKET CUPS_LISTEN_DOMAINSOCKET LIBSLP LIBLDAP LIBGNUTLSCONFIG SSLFLAGS SSLLIBS ENCRYPTION_REQUIRED EXPORT_SSLLIBS PAMDIR PAMFILE PAMLIBS PAMMOD PTHREAD_FLAGS LARGEFILE DEFAULT_LAUNCHD_CONF LAUNCHDLIBS LANGUAGES CUPS_CONFIG_FILE_PERM CUPS_LOG_FILE_PERM CUPS_BROWSING CUPS_BROWSE_LOCAL_PROTOCOLS CUPS_BROWSE_REMOTE_PROTOCOLS CUPS_BROWSE_SHORT_NAMES CUPS_DEFAULT_SHARED CUPS_IMPLICIT_CLASSES CUPS_USE_NETWORK_DEFAULT CUPS_USER CUPS_GROUP CUPS_SYSTEM_GROUPS CUPS_PRIMARY_SYSTEM_GROUP PAP PDFTOPS JAVA PERL PHP PHPCONFIG PHPDIR PYTHON INSTALL_LANGUAGES UNINSTALL_LANGUAGES LIBOBJS LTLIBOBJS'
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CUPS_VERSION CUPS_REVISION AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB AR HTMLDOC LD LN MV RM RMDIR SED STRIP INSTALLSTATIC LIBMALLOC LIBPAPER EGREP ARFLAGS PKGCONFIG BACKLIBS CUPSDLIBS DBUSDIR DEFAULT_IPP_PORT INITDIR INITDDIR XINETD CUPS_CACHEDIR CUPS_DATADIR CUPS_DOCROOT CUPS_FONTPATH CUPS_LOCALEDIR CUPS_LOGDIR CUPS_REQUESTS CUPS_SERVERBIN INSTALL_SYSV CUPS_SERVERROOT CUPS_STATEDIR AMANDIR PMANDIR MAN1EXT MAN5EXT MAN7EXT MAN8EXT MAN8DIR DSO DSOFLAGS DSO32FLAGS DSO64FLAGS LIBCUPS LIBCUPSIMAGE LINKCUPS LINKCUPSIMAGE DSOLIBS IMGLIBS EXPORT_LDFLAGS LIBTOOL OPTIM ARCHFLAGS ARCH32FLAGS INSTALL32 LIB32CUPS LIB32CUPSIMAGE LIB32DIR UNINSTALL32 ARCH64FLAGS INSTALL64 LIB64CUPS LIB64CUPSIMAGE LIB64DIR UNINSTALL64 CXXLIBS PIEFLAGS IMGFILTERS LIBJPEG LIBPNG LIBTIFF LIBZ EXPORT_LIBJPEG EXPORT_LIBPNG EXPORT_LIBTIFF EXPORT_LIBZ CUPS_DEFAULT_DOMAINSOCKET CUPS_LISTEN_DOMAINSOCKET LIBSLP LIBLDAP LIBGNUTLSCONFIG SSLFLAGS SSLLIBS ENCRYPTION_REQUIRED EXPORT_SSLLIBS PAMDIR PAMFILE PAMLIBS PAMMOD PTHREAD_FLAGS LARGEFILE DEFAULT_LAUNCHD_CONF LAUNCHDLIBS LANGUAGES CUPS_CONFIG_FILE_PERM CUPS_LOG_FILE_PERM CUPS_BROWSING CUPS_BROWSE_LOCAL_PROTOCOLS CUPS_BROWSE_REMOTE_PROTOCOLS CUPS_BROWSE_SHORT_NAMES CUPS_DEFAULT_SHARED CUPS_IMPLICIT_CLASSES CUPS_USE_NETWORK_DEFAULT CUPS_USER CUPS_GROUP CUPS_SYSTEM_GROUPS CUPS_PRIMARY_SYSTEM_GROUP PAP CUPS_DROP_PRIVILEGES PDFTOPS JAVA PERL PHP PHPCONFIG PHPDIR PYTHON INSTALL_LANGUAGES UNINSTALL_LANGUAGES LIBOBJS LTLIBOBJS'
+ ac_subst_files=''
+
+ # Initialize some variables set by options.
+@@ -881,6 +881,7 @@
+ enable ImplicitClasses by default, default=yes
+ --enable-use-network-default
+ enable UseNetworkDefault by default, default=auto
++ --enable-privilege-dropping drop root privileges to normal user, default=no
+ --enable-pdftops build pdftops filter, default=auto
+
+ Optional Packages:
+@@ -13297,6 +13298,26 @@
+ _ACEOF
+
+
++# Check whether --enable-privilege-dropping or --disable-privilege-dropping was given.
++if test "${enable_privilege_dropping+set}" = set; then
++ enableval="$enable_privilege_dropping"
++
++fi;
++if test "x$enable_privilege_dropping" = xyes; then
++ CUPS_DROP_PRIVILEGES=1
++ cat >>confdefs.h <<_ACEOF
++#define CUPS_DROP_PRIVILEGES 1
++_ACEOF
++
++else
++ CUPS_DROP_PRIVILEGES=0
++ cat >>confdefs.h <<_ACEOF
++#define CUPS_DROP_PRIVILEGES 0
++_ACEOF
++
++fi
++
++
+
+ # Check whether --with-printcap or --without-printcap was given.
+ if test "${with_printcap+set}" = set; then
+@@ -14584,6 +14605,7 @@
+ s,@CUPS_GROUP@,$CUPS_GROUP,;t t
+ s,@CUPS_SYSTEM_GROUPS@,$CUPS_SYSTEM_GROUPS,;t t
+ s,@CUPS_PRIMARY_SYSTEM_GROUP@,$CUPS_PRIMARY_SYSTEM_GROUP,;t t
++s,@CUPS_DROP_PRIVILEGES@,$CUPS_DROP_PRIVILEGES,;t t
+ s,@PAP@,$PAP,;t t
+ s,@PDFTOPS@,$PDFTOPS,;t t
+ s,@JAVA@,$JAVA,;t t
--- cupsys-1.2.2.orig/debian/patches/54_cups-config_modeldir.dpatch
+++ cupsys-1.2.2/debian/patches/54_cups-config_modeldir.dpatch
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 54_cups-config_modeldir.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4929~/cups-config.in cupsys-1.1.99.b1.r4929/cups-config.in
+--- cupsys-1.1.99.b1.r4929~/cups-config.in 2005-10-19 15:48:06.000000000 +0200
++++ cupsys-1.1.99.b1.r4929/cups-config.in 2006-04-07 16:04:46.000000000 +0200
+@@ -61,6 +61,7 @@
+ echo " cups-config [--image] [--static] --libs"
+ echo " cups-config --serverbin"
+ echo " cups-config --serverroot"
++ echo " cups-config --modeldir"
+ echo " cups-config --version"
+
+ exit $1
+@@ -118,6 +119,8 @@
+ --static)
+ static=yes
+ ;;
++ --modeldir
++ echo /usr/share/ppd
+ --version)
+ echo $VERSION
+ ;;
--- cupsys-1.2.2.orig/debian/patches/56_dirsvc.dpatch
+++ cupsys-1.2.2/debian/patches/56_dirsvc.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 56_dirsvc.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.1~/scheduler/dirsvc.c cupsys-1.2.1/scheduler/dirsvc.c
+--- cupsys-1.2.1~/scheduler/dirsvc.c 2006-06-11 11:41:06.000000000 +0000
++++ cupsys-1.2.1/scheduler/dirsvc.c 2006-06-11 11:50:51.000000000 +0000
+@@ -2521,7 +2521,7 @@
+
+ httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
+ iface->hostname, iface->port,
+- (p->type & CUPS_PRINTER_CLASS) ? "/classes/%s%s" :
++ (p->type & CUPS_PRINTER_CLASS) ? "/classes/%s" :
+ "/printers/%s",
+ p->name);
+ snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s\n",
--- cupsys-1.2.2.orig/debian/patches/55_ppd_okidata_name.dpatch
+++ cupsys-1.2.2/debian/patches/55_ppd_okidata_name.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 55_ppd_okidata_name.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+--- ./ppd/okidata9.ppd~ 2005-12-15 17:19:46.000000000 +0100
++++ ./ppd/okidata9.ppd 2006-04-12 20:13:44.240749856 +0200
+@@ -28,7 +28,7 @@
+ *LanguageVersion: English
+ *LanguageEncoding: ISOLatin1
+ *PCFileName: "OKIDATA9.PPD"
+-*Manufacturer: "Oki"
++*Manufacturer: "Okidata"
+ *Product: "(GNU Ghostscript)"
+ *Product: "(ESP Ghostscript)"
+ *cupsVersion: 1.2
+--- ./ppd/okidat24.ppd~ 2005-12-15 17:19:46.000000000 +0100
++++ ./ppd/okidat24.ppd 2006-04-12 20:13:32.764494512 +0200
+@@ -28,7 +28,7 @@
+ *LanguageVersion: English
+ *LanguageEncoding: ISOLatin1
+ *PCFileName: "OKIDAT24.PPD"
+-*Manufacturer: "Oki"
++*Manufacturer: "Okidata"
+ *Product: "(GNU Ghostscript)"
+ *Product: "(ESP Ghostscript)"
+ *cupsVersion: 1.2
--- cupsys-1.2.2.orig/debian/patches/00list
+++ cupsys-1.2.2/debian/patches/00list
@@ -0,0 +1,38 @@
+02_configure.dpatch
+#03_manext.dpatch
+03_clean.dpatch
+04_freebsd.dpatch
+05_avoidunknowngroup.dpatch
+06_disable_backend_setuid.dpatch
+07_removecvstag.dpatch
+08_cupsd.conf.conf.d.dpatch
+09_runasuser.dpatch
+09_runasuser_autoconf.dpatch
+11_pam.dpatch
+12_quiesce_ipp_logging.dpatch
+13_default_log_warn.dpatch
+14_dont_force_ssl.dpatch
+19_cupsaccept.dpatch
+26_modprobe.dpatch
+44_fixconfdirperms.dpatch
+47_pid.dpatch
+#48_stdlib.dpatch
+55_ppd_okidata_name.dpatch
+56_dirsvc.dpatch
+58_cupsd.conf-AllowLocal.dpatch
+59_title_escaping.dpatch
+60_ipp_read_busy_loop.dpatch
+ubuntu-nowebadmin.dpatch
+ipptags-corruption-fix.dpatch
+70_CVE-2007-6358.dpatch
+71_CVE-2007-5849.dpatch
+72_CVE-2008-0047.dpatch
+73_CVE-2008-0882.dpatch
+74_pid.dpatch
+75_CVE-2008-0053.dpatch
+76_CVE-2008-1373.dpatch
+77_CVE-2008-1722.dpatch
+78_CVE-2008-3639.dpatch
+79_CVE-2008-3640.dpatch
+80_CVE-2008-3641.dpatch
+81_CVE-2009-0163
--- cupsys-1.2.2.orig/debian/patches/75_CVE-2008-0053.dpatch
+++ cupsys-1.2.2/debian/patches/75_CVE-2008-0053.dpatch
@@ -0,0 +1,46 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 75_CVE-2008-0053.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.4~/filter/hpgl-input.c cupsys-1.2.4/filter/hpgl-input.c
+--- cupsys-1.2.4~/filter/hpgl-input.c 2006-02-22 14:21:50.000000000 -0500
++++ cupsys-1.2.4/filter/hpgl-input.c 2008-03-26 14:12:04.000000000 -0400
+@@ -56,6 +56,7 @@
+ i; /* Looping var */
+ char buf[262144], /* String buffer */
+ *bufptr; /* Pointer into buffer */
++ float temp; /* Temporary parameter value */
+ static param_t p[MAX_PARAMS]; /* Parameter buffer */
+
+
+@@ -214,10 +215,10 @@
+ case '-' :
+ case '+' :
+ ungetc(ch, fp);
+- fscanf(fp, "%f", &(p[num_params].value.number));
+- if (num_params < MAX_PARAMS)
++ if (fscanf(fp, "%f", &temp) == 1 && num_params < MAX_PARAMS)
+ {
+- p[num_params].type = PARAM_RELATIVE;
++ p[num_params].type = PARAM_RELATIVE;
++ p[num_params].value.number = temp;
+ num_params ++;
+ }
+ break;
+@@ -233,10 +234,10 @@
+ case '9' :
+ case '.' :
+ ungetc(ch, fp);
+- fscanf(fp, "%f", &(p[num_params].value.number));
+- if (num_params < MAX_PARAMS)
++ if (fscanf(fp, "%f", &temp) == 1 && num_params < MAX_PARAMS)
+ {
+- p[num_params].type = PARAM_ABSOLUTE;
++ p[num_params].type = PARAM_ABSOLUTE;
++ p[num_params].value.number = temp;
+ num_params ++;
+ }
+ break;
--- cupsys-1.2.2.orig/debian/patches/77_CVE-2008-1722.dpatch
+++ cupsys-1.2.2/debian/patches/77_CVE-2008-1722.dpatch
@@ -0,0 +1,80 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 77_CVE-2008-1722.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+## DP:
+## DP: Revised by Marc Deslauriers as per
+## DP: upstream bug http://www.cups.org/str.php?L2974
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/image-png.c cupsys-1.2.2/filter/image-png.c
+--- cupsys-1.2.2~/filter/image-png.c 2006-05-11 07:41:36.000000000 -0400
++++ cupsys-1.2.2/filter/image-png.c 2008-04-24 13:02:22.000000000 -0400
+@@ -3,6 +3,7 @@
+ *
+ * PNG image routines for the Common UNIX Printing System (CUPS).
+ *
++ * Copyright 2007-2008 by Apple Inc.
+ * Copyright 1993-2006 by Easy Software Products.
+ *
+ * These coded instructions, statements, and computer programs are the
+@@ -179,16 +180,56 @@
+ * Interlaced images must be loaded all at once...
+ */
+
++ size_t bufsize; /* Size of buffer */
++
++
+ if (color_type == PNG_COLOR_TYPE_GRAY ||
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+- in = malloc(img->xsize * img->ysize);
++ {
++ bufsize = img->xsize * img->ysize;
++
++ if ((bufsize / img->xsize) != img->ysize)
++ {
++ fprintf(stderr, "DEBUG: PNG image dimensions (%ux%u) too large!\n",
++ (unsigned)width, (unsigned)height);
++ fclose(fp);
++ return (1);
++ }
++ }
+ else
+- in = malloc(img->xsize * img->ysize * 3);
++ {
++ bufsize = img->xsize * img->ysize * 3;
++
++ if ((bufsize / (img->xsize * 3)) != img->ysize)
++ {
++ fprintf(stderr, "DEBUG: PNG image dimensions (%ux%u) too large!\n",
++ (unsigned)width, (unsigned)height);
++ fclose(fp);
++ return (1);
++ }
++ }
++
++ in = malloc(bufsize);
+ }
+
+ bpp = cupsImageGetDepth(img);
+ out = malloc(img->xsize * bpp);
+
++ if (!in || !out)
++ {
++ fputs("DEBUG: Unable to allocate memory for PNG image!\n", stderr);
++
++ if (in)
++ free(in);
++
++ if (out)
++ free(out);
++
++ fclose(fp);
++
++ return (1);
++ }
++
+ /*
+ * Read the image, interlacing as needed...
+ */
--- cupsys-1.2.2.orig/debian/patches/11_pam.dpatch
+++ cupsys-1.2.2/debian/patches/11_pam.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 11_pam.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4748~/scheduler/auth.c cupsys-1.1.99.b1.r4748/scheduler/auth.c
+--- cupsys-1.1.99.b1.r4748~/scheduler/auth.c 2005-11-04 13:35:45.087637554 +0000
++++ cupsys-1.1.99.b1.r4748/scheduler/auth.c 2005-11-04 13:36:32.953633141 +0000
+@@ -478,7 +478,7 @@
+ auth_data = &data;
+ # endif /* __hpux */
+
+- pamerr = pam_start("cups", username, &pamdata, &pamh);
++ pamerr = pam_start("cupsys", username, &pamdata, &pamh);
+ if (pamerr != PAM_SUCCESS)
+ {
+ cupsdLogMessage(CUPSD_LOG_ERROR,
--- cupsys-1.2.2.orig/debian/patches/05_avoidunknowngroup.dpatch
+++ cupsys-1.2.2/debian/patches/05_avoidunknowngroup.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05avoidunknowngroup.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.1~/systemv/Makefile cupsys-1.2.1/systemv/Makefile
+--- cupsys-1.2.1~/systemv/Makefile 2006-07-06 16:48:57.000000000 +0000
++++ cupsys-1.2.1/systemv/Makefile 2006-07-06 16:50:44.000000000 +0000
+@@ -78,7 +78,7 @@
+ $(INSTALL_BIN) lp $(BINDIR)
+ $(INSTALL_BIN) lpoptions $(BINDIR)
+ $(INSTALL_BIN) lpstat $(BINDIR)
+- $(INSTALL_BIN) -m 4755 -o root lppasswd $(BINDIR) || $(INSTALL_BIN) lppasswd $(BINDIR)
++ $(INSTALL_BIN) -m 4755 -o lp -g root lppasswd $(BINDIR) || $(INSTALL_BIN) lppasswd $(BINDIR)
+
+
+ #
--- cupsys-1.2.2.orig/debian/patches/02_configure.dpatch
+++ cupsys-1.2.2/debian/patches/02_configure.dpatch
@@ -0,0 +1,25 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_configure.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2~/configure cups-1.2/configure
+--- cups-1.2~/configure 2006-07-21 18:42:52.000000000 +0200
++++ cups-1.2/configure 2006-07-21 18:45:59.000000000 +0200
+@@ -7857,14 +7857,6 @@
+ fi
+ ;;
+ IRIX | Linux | GNU)
+- # IRIX, Linux, and HURD...
+- if test $exec_prefix != /usr; then
+- DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
+- DSO32FLAGS="-Wl,-rpath,$LIB32DIR $DSO32FLAGS"
+- DSO64FLAGS="-Wl,-rpath,$LIB64DIR $DSO64FLAGS"
+- LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
+- EXPORT_LDFLAGS="-Wl,-rpath,$libdir"
+- fi
+ ;;
+ esac
+ else
--- cupsys-1.2.2.orig/debian/patches/09_runasuser.dpatch
+++ cupsys-1.2.2/debian/patches/09_runasuser.dpatch
@@ -0,0 +1,132 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 09_runasuser.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2~/config-scripts/cups-defaults.m4 cups-1.2/config-scripts/cups-defaults.m4
+--- cups-1.2~/config-scripts/cups-defaults.m4 2006-04-25 12:17:52.000000000 +0200
++++ cups-1.2/config-scripts/cups-defaults.m4 2006-04-25 12:18:56.000000000 +0200
+@@ -218,6 +218,17 @@
+ AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GROUP, "$CUPS_GROUP")
+ AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SYSTEM_GROUPS, "$CUPS_SYSTEM_GROUPS")
+
++dnl Privilege dropping
++AC_ARG_ENABLE(privilege-dropping, [ --enable-privilege-dropping drop root privileges to normal user, default=no])
++if test "x$enable_privilege_dropping" = xyes; then
++ CUPS_DROP_PRIVILEGES=1
++ AC_DEFINE_UNQUOTED(CUPS_DROP_PRIVILEGES, 1)
++else
++ CUPS_DROP_PRIVILEGES=0
++ AC_DEFINE_UNQUOTED(CUPS_DROP_PRIVILEGES, 0)
++fi
++AC_SUBST(CUPS_DROP_PRIVILEGES)
++
+ dnl Default printcap file...
+ AC_ARG_WITH(printcap, [ --with-printcap set default printcap file],
+ default_printcap="$withval",
+diff -urNad cups-1.2~/config.h.in cups-1.2/config.h.in
+--- cups-1.2~/config.h.in 2006-04-25 12:17:52.000000000 +0200
++++ cups-1.2/config.h.in 2006-04-25 12:18:56.000000000 +0200
+@@ -41,6 +41,11 @@
+ #define CUPS_DEFAULT_GROUP "sys"
+ #define CUPS_DEFAULT_SYSTEM_GROUPS "sys root system"
+
++/*
++ * Privilege dropping
++ */
++
++#define CUPS_DROP_PRIVILEGES 0
+
+ /*
+ * Default file permissions...
+diff -urNad cups-1.2~/scheduler/cert.c cups-1.2/scheduler/cert.c
+--- cups-1.2~/scheduler/cert.c 2006-04-25 12:17:52.000000000 +0200
++++ cups-1.2/scheduler/cert.c 2006-04-25 12:18:56.000000000 +0200
+@@ -116,7 +116,7 @@
+ * Root certificate...
+ */
+
+- fchmod(fd, 0440);
++ fchmod(fd, 0240);
+ fchown(fd, RunUser, SystemGroupIDs[0]);
+
+ cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAddCert: NumSystemGroups=%d",
+diff -urNad cups-1.2~/scheduler/conf.c cups-1.2/scheduler/conf.c
+--- cups-1.2~/scheduler/conf.c 2006-04-25 12:17:52.000000000 +0200
++++ cups-1.2/scheduler/conf.c 2006-04-25 12:18:56.000000000 +0200
+@@ -460,7 +460,11 @@
+ if (!status)
+ return (0);
+
++#if CUPS_DROP_PRIVILEGES == 1
++ RunUser = User;
++#else
+ RunUser = getuid();
++#endif
+
+ /*
+ * Use the default system group if none was supplied in cupsd.conf...
+diff -urNad cups-1.2~/scheduler/main.c cups-1.2/scheduler/main.c
+--- cups-1.2~/scheduler/main.c 2006-04-25 12:17:52.000000000 +0200
++++ cups-1.2/scheduler/main.c 2006-04-25 12:19:17.000000000 +0200
+@@ -56,6 +56,9 @@
+ #include
+ #include
+ #include
++#if CUPS_DROP_PRIVILEGES == 1
++#include
++#endif
+
+ #ifdef HAVE_LAUNCH_H
+ # include
+@@ -515,6 +518,20 @@
+ cupsdStartSystemMonitor();
+ #endif /* __APPLE__ */
+
++#if CUPS_DROP_PRIVILEGES == 1
++ /*
++ * Drop root privileges
++ */
++ struct passwd * pwd = getpwuid(User);
++ if (!pwd) {
++ cupsdLogMessage(CUPSD_LOG_ERROR, "could not get passwd data for user id %i", User);
++ exit(EXIT_FAILURE);
++ }
++ setgid(Group);
++ initgroups(pwd->pw_name, pwd->pw_gid);
++ setuid(User);
++#endif
++
+ /*
+ * Start any pending print jobs...
+ */
+@@ -998,7 +1015,7 @@
+ */
+
+ if ((current_time - RootCertTime) >= RootCertDuration && RootCertDuration &&
+- !RunUser && cupsArrayCount(Clients))
++ cupsArrayCount(Clients))
+ {
+ /*
+ * Update the root certificate...
+diff -urNad cups-1.2-ubuntu~/scheduler/process.c cups-1.2-ubuntu/scheduler/process.c
+--- cups-1.2-ubuntu~/scheduler/process.c 2006-04-06 22:32:07.000000000 +0200
++++ cups-1.2-ubuntu/scheduler/process.c 2006-04-24 19:16:09.000000000 +0200
+@@ -245,15 +245,6 @@
+ if (setuid(User))
+ exit(errno);
+ }
+- else
+- {
+- /*
+- * Reset group membership to just the main one we belong to.
+- */
+-
+- setgid(Group);
+- setgroups(1, &Group);
+- }
+
+ /*
+ * Change umask to restrict permissions on created files...
--- cupsys-1.2.2.orig/debian/patches/06_disable_backend_setuid.dpatch
+++ cupsys-1.2.2/debian/patches/06_disable_backend_setuid.dpatch
@@ -0,0 +1,34 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 06_disable_backend_setuid.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys~/scheduler/cups-deviced.c cupsys/scheduler/cups-deviced.c
+--- cupsys~/scheduler/cups-deviced.c 2006-03-08 13:12:12.000000000 +0100
++++ cupsys/scheduler/cups-deviced.c 2006-04-05 14:18:19.000000000 +0200
+@@ -210,23 +210,6 @@
+ continue;
+
+ /*
+- * Change effective users depending on the backend permissions...
+- */
+-
+- if (!getuid())
+- {
+- /*
+- * Backends without permissions for normal users run as root,
+- * all others run as the unprivileged user...
+- */
+-
+- if (!(dent->fileinfo.st_mode & (S_IRWXG | S_IRWXO)))
+- seteuid(0);
+- else
+- seteuid(normal_user);
+- }
+-
+- /*
+ * Run the backend with no arguments and collect the output...
+ */
+
--- cupsys-1.2.2.orig/debian/patches/60_ipp_read_busy_loop.dpatch
+++ cupsys-1.2.2/debian/patches/60_ipp_read_busy_loop.dpatch
@@ -0,0 +1,34 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 60_ipp_read_busy_loop.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: - Don't return IPP_IDLE when we can't read the IPP header. (r6177)
+## DP: - Make sure all read timeouts result in the returning of an error. (r6230)
+## DP: - STR #2179, LP #44196
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/cups/ipp.c cupsys-1.2.2/cups/ipp.c
+--- cupsys-1.2.2~/cups/ipp.c 2006-06-02 17:15:23.000000000 +0200
++++ cupsys-1.2.2/cups/ipp.c 2007-11-20 10:05:03.000000000 +0100
+@@ -1054,7 +1054,7 @@
+ if ((n = (*cb)(src, buffer, 8)) < 8)
+ {
+ DEBUG_printf(("ippReadIO: Unable to read header (%d bytes read)!\n", n));
+- return (n == 0 ? IPP_IDLE : IPP_ERROR);
++ return (IPP_ERROR);
+ }
+
+ /*
+@@ -1098,8 +1098,11 @@
+ break;
+
+ case IPP_ATTRIBUTE :
+- while ((*cb)(src, buffer, 1) > 0)
++ for (;;)
+ {
++ if ((*cb)(src, buffer, 1) < 1)
++ return (IPP_ERROR);
++
+ DEBUG_printf(("ippReadIO: ipp->current=%p, ipp->prev=%p\n",
+ ipp->current, ipp->prev));
+
--- cupsys-1.2.2.orig/debian/patches/07_removecvstag.dpatch
+++ cupsys-1.2.2/debian/patches/07_removecvstag.dpatch
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 07_removecvstag.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2~/conf/Makefile cups-1.2/conf/Makefile
+--- cups-1.2~/conf/Makefile 2006-04-25 12:16:07.000000000 +0200
++++ cups-1.2/conf/Makefile 2006-04-25 12:17:11.000000000 +0200
+@@ -65,6 +65,8 @@
+ chgrp $(CUPS_GROUP) $(SERVERROOT)/$$file.N || true; \
+ else \
+ $(INSTALL_CONFIG) $$file $(SERVERROOT) ; \
++ grep -v "\$$Id:" $(SERVERROOT)/$$file > $(SERVERROOT)/$$file.n ; \
++ mv $(SERVERROOT)/$$file.n $(SERVERROOT)/$$file ; \
+ chgrp $(CUPS_GROUP) $(SERVERROOT)/$$file || true; \
+ fi ; \
+ done
+@@ -75,6 +77,8 @@
+ $(MV) $(SERVERROOT)/$$file $(SERVERROOT)/$$file.O ; \
+ fi ; \
+ $(INSTALL_DATA) $$file $(SERVERROOT) ; \
++ grep -v "\$$Id:" $(SERVERROOT)/$$file > $(SERVERROOT)/$$file.n ; \
++ mv $(SERVERROOT)/$$file.n $(SERVERROOT)/$$file ; \
+ done
+ -if test x$(PAMDIR) != x; then \
+ $(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \
--- cupsys-1.2.2.orig/debian/patches/58_cupsd.conf-AllowLocal.dpatch
+++ cupsys-1.2.2/debian/patches/58_cupsd.conf-AllowLocal.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 58_cupsd.conf-AllowLocal.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2-ubuntu~/conf/cupsd.conf.in cups-1.2-ubuntu/conf/cupsd.conf.in
+--- cups-1.2-ubuntu~/conf/cupsd.conf.in 2006-05-09 17:52:23.000000000 +0200
++++ cups-1.2-ubuntu/conf/cupsd.conf.in 2006-05-09 17:52:33.000000000 +0200
+@@ -34,6 +34,7 @@
+
+ Order allow,deny
+ Allow localhost
++ Allow @LOCAL
+
+
+ # Restrict access to the admin pages...
--- cupsys-1.2.2.orig/debian/patches/53_usr_share_ppd_support.dpatch
+++ cupsys-1.2.2/debian/patches/53_usr_share_ppd_support.dpatch
@@ -0,0 +1,35 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 53_usr_share_ppd_support.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4929~/scheduler/cups-driverd.c cupsys-1.1.99.b1.r4929/scheduler/cups-driverd.c
+--- cupsys-1.1.99.b1.r4929~/scheduler/cups-driverd.c 2005-10-25 20:23:10.000000000 +0200
++++ cupsys-1.1.99.b1.r4929/scheduler/cups-driverd.c 2006-04-07 15:43:44.000000000 +0200
+@@ -289,10 +289,7 @@
+ * Try opening the file...
+ */
+
+- if ((datadir = getenv("CUPS_DATADIR")) == NULL)
+- datadir = CUPS_DATADIR;
+-
+- snprintf(line, sizeof(line), "%s/model/%s", datadir, name);
++ snprintf(line, sizeof(line), "/usr/share/ppd/%s", datadir, name);
+ if ((fp = cupsFileOpen(line, "r")) == NULL)
+ {
+ fprintf(stderr, "ERROR: [cups-driverd] Unable to open \"%s\" - %s\n",
+@@ -443,11 +440,7 @@
+
+ SortedPPDs = NumPPDs;
+
+- if ((cups_datadir = getenv("CUPS_DATADIR")) == NULL)
+- cups_datadir = CUPS_DATADIR;
+-
+- snprintf(model, sizeof(model), "%s/model", cups_datadir);
+- load_ppds(model, "");
++ load_ppds("/usr/share/ppd", "");
+
+ /*
+ * Cull PPD files that are no longer present...
--- cupsys-1.2.2.orig/debian/patches/72_CVE-2008-0047.dpatch
+++ cupsys-1.2.2/debian/patches/72_CVE-2008-0047.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 72_CVE-2008-0047.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.4~/cgi-bin/search.c cupsys-1.2.4/cgi-bin/search.c
+--- cupsys-1.2.4~/cgi-bin/search.c 2006-09-17 15:01:47.000000000 -0400
++++ cupsys-1.2.4/cgi-bin/search.c 2008-03-26 14:06:28.000000000 -0400
+@@ -171,7 +171,9 @@
+ * string + RE overhead...
+ */
+
+- wlen = (sptr - s) + 4 * wlen + 2 * strlen(prefix) + 4;
++ wlen = (sptr - s) + 2 * 4 * wlen + 2 * strlen(prefix) + 11;
++ if (lword)
++ wlen += strlen(lword);
+
+ if (wlen > slen)
+ {
--- cupsys-1.2.2.orig/debian/patches/44_fixconfdirperms.dpatch
+++ cupsys-1.2.2/debian/patches/44_fixconfdirperms.dpatch
@@ -0,0 +1,50 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 44_fixconfdirperms.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.rc2~/scheduler/conf.c cupsys-1.1.99.rc2/scheduler/conf.c
+--- cupsys-1.1.99.rc2~/scheduler/conf.c 2006-04-06 20:03:32.000000000 +0000
++++ cupsys-1.1.99.rc2/scheduler/conf.c 2006-04-11 10:35:14.000000000 +0000
+@@ -531,22 +531,10 @@
+
+ cupsdLogMessage(CUPSD_LOG_NOTICE,
+ "Group and SystemGroup cannot use the same groups!");
+- cupsdLogMessage(CUPSD_LOG_INFO, "Resetting Group to \"nobody\"...");
++ cupsdLogMessage(CUPSD_LOG_INFO, "Resetting Group to \"root\"...");
+
+- group = getgrnam("nobody");
+ endgrent();
+-
+- if (group != NULL)
+- Group = group->gr_gid;
+- else
+- {
+- /*
+- * Use the (historical) NFS nobody group ID (-2 as a 16-bit twos-
+- * complement number...)
+- */
+-
+- Group = 65534;
+- }
++ Group = 0;
+ }
+ }
+
+@@ -630,11 +618,13 @@
+ check_permissions(StateDir, "certs", RunUser ? 0711 : 0511, User,
+ SystemGroupIDs[0], 1, 1);
+
+- check_permissions(ServerRoot, NULL, 0755, RunUser, Group, 1, 0);
++ check_permissions(ServerRoot, NULL, 03755, RunUser, Group, 1, 0);
+ check_permissions(ServerRoot, "ppd", 0755, RunUser, Group, 1, 1);
+ check_permissions(ServerRoot, "ssl", 0700, RunUser, Group, 1, 0);
++ /* Never alter permissions of central conffile
+ check_permissions(ServerRoot, "cupsd.conf", ConfigFilePerm, RunUser, Group,
+ 0, 0);
++ */
+ check_permissions(ServerRoot, "classes.conf", 0600, RunUser, Group, 0, 0);
+ check_permissions(ServerRoot, "printers.conf", 0600, RunUser, Group, 0, 0);
+ check_permissions(ServerRoot, "passwd.md5", 0600, User, Group, 0, 0);
--- cupsys-1.2.2.orig/debian/patches/48_stdlib.dpatch
+++ cupsys-1.2.2/debian/patches/48_stdlib.dpatch
@@ -0,0 +1,130 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 48_stdlib.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4748~/cups/attr.c cupsys-1.1.99.b1.r4748/cups/attr.c
+--- cupsys-1.1.99.b1.r4748~/cups/attr.c 2005-11-13 05:25:56.280194158 +0000
++++ cupsys-1.1.99.b1.r4748/cups/attr.c 2005-11-13 05:25:57.358029198 +0000
+@@ -34,8 +34,8 @@
+
+ #include "ppd.h"
+ #include "debug.h"
+-#include "string.h"
+ #include
++#include "string.h"
+
+
+ /*
+diff -urNad cupsys-1.1.99.b1.r4748~/cups/dir.c cupsys-1.1.99.b1.r4748/cups/dir.c
+--- cupsys-1.1.99.b1.r4748~/cups/dir.c 2005-11-13 05:25:56.284193546 +0000
++++ cupsys-1.1.99.b1.r4748/cups/dir.c 2005-11-13 05:25:57.409021394 +0000
+@@ -41,9 +41,9 @@
+ */
+
+ #include "dir.h"
++#include
+ #include "string.h"
+ #include "debug.h"
+-#include
+ #include
+
+
+diff -urNad cupsys-1.1.99.b1.r4748~/cups/getputfile.c cupsys-1.1.99.b1.r4748/cups/getputfile.c
+--- cupsys-1.1.99.b1.r4748~/cups/getputfile.c 2005-11-13 05:25:56.289192781 +0000
++++ cupsys-1.1.99.b1.r4748/cups/getputfile.c 2005-11-13 05:25:57.409021394 +0000
+@@ -38,9 +38,9 @@
+ #include "cups.h"
+ #include "ipp.h"
+ #include "language.h"
++#include
+ #include "string.h"
+ #include "debug.h"
+-#include
+ #include
+ #include
+ #include
+diff -urNad cupsys-1.1.99.b1.r4748~/filter/gziptoany.c cupsys-1.1.99.b1.r4748/filter/gziptoany.c
+--- cupsys-1.1.99.b1.r4748~/filter/gziptoany.c 2005-11-13 04:59:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/filter/gziptoany.c 2005-11-13 05:25:57.410021241 +0000
+@@ -32,8 +32,8 @@
+ * Include necessary headers...
+ */
+
+-#include
+ #include
++#include
+ #include
+
+ #ifdef HAVE_LIBZ
+diff -urNad cupsys-1.1.99.b1.r4748~/filter/interpret.c cupsys-1.1.99.b1.r4748/filter/interpret.c
+--- cupsys-1.1.99.b1.r4748~/filter/interpret.c 2005-11-13 04:59:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/filter/interpret.c 2005-11-13 05:25:57.410021241 +0000
+@@ -35,9 +35,9 @@
+ */
+
+ #include
++#include
+ #include
+ #include "raster.h"
+-#include
+
+
+ /*
+diff -urNad cupsys-1.1.99.b1.r4748~/filter/rastertoepson.c cupsys-1.1.99.b1.r4748/filter/rastertoepson.c
+--- cupsys-1.1.99.b1.r4748~/filter/rastertoepson.c 2005-11-13 04:59:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/filter/rastertoepson.c 2005-11-13 05:25:57.411021088 +0000
+@@ -41,9 +41,9 @@
+
+ #include
+ #include
++#include
+ #include
+ #include "raster.h"
+-#include
+ #include
+ #include
+ #include
+diff -urNad cupsys-1.1.99.b1.r4748~/filter/rastertohp.c cupsys-1.1.99.b1.r4748/filter/rastertohp.c
+--- cupsys-1.1.99.b1.r4748~/filter/rastertohp.c 2005-11-13 04:59:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/filter/rastertohp.c 2005-11-13 05:25:57.412020935 +0000
+@@ -41,9 +41,9 @@
+ */
+
+ #include
++#include
+ #include
+ #include "raster.h"
+-#include
+ #include
+ #include
+ #include
+diff -urNad cupsys-1.1.99.b1.r4748~/systemv/cupstestppd.c cupsys-1.1.99.b1.r4748/systemv/cupstestppd.c
+--- cupsys-1.1.99.b1.r4748~/systemv/cupstestppd.c 2005-11-13 05:25:56.458166920 +0000
++++ cupsys-1.1.99.b1.r4748/systemv/cupstestppd.c 2005-11-13 05:25:57.413020782 +0000
+@@ -37,9 +37,9 @@
+ */
+
+ #include
++#include
+ #include
+ #include
+-#include
+
+
+ /*
+diff -urNad cupsys-1.1.99.b1.r4748~/systemv/lpoptions.c cupsys-1.1.99.b1.r4748/systemv/lpoptions.c
+--- cupsys-1.1.99.b1.r4748~/systemv/lpoptions.c 2005-11-13 04:59:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/systemv/lpoptions.c 2005-11-13 05:25:57.413020782 +0000
+@@ -34,8 +34,8 @@
+ */
+
+ #include
+-#include
+ #include
++#include
+
+
+ /*
--- cupsys-1.2.2.orig/debian/patches/13_default_log_warn.dpatch
+++ cupsys-1.2.2/debian/patches/13_default_log_warn.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 13_default_log_warn.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys~/conf/cupsd.conf.in cupsys/conf/cupsd.conf.in
+--- cupsys~/conf/cupsd.conf.in 2006-04-12 16:32:11.000000000 +0200
++++ cupsys/conf/cupsd.conf.in 2006-04-12 17:04:58.000000000 +0200
+@@ -8,7 +8,7 @@
+
+ # Log general information in error_log - change "info" to "debug" for
+ # troubleshooting...
+-LogLevel info
++LogLevel warning
+
+ # Administrator user group...
+ SystemGroup @CUPS_SYSTEM_GROUPS@
--- cupsys-1.2.2.orig/debian/patches/03_clean.dpatch
+++ cupsys-1.2.2/debian/patches/03_clean.dpatch
@@ -0,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_clean.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.r5357~/Makefile cupsys-1.1.99.r5357/Makefile
+--- cupsys-1.1.99.r5357~/Makefile 2006-03-20 19:06:50.000000000 +0000
++++ cupsys-1.1.99.r5357/Makefile 2006-03-30 15:18:54.000000000 +0000
+@@ -55,6 +55,7 @@
+ echo Cleaning in $$dir... ;\
+ (cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\
+ done
++ $(RM) init/cups.sh init/cups-lpd
+
+
+ #
+diff -urNad cupsys-1.1.99.r5357~/doc/Makefile cupsys-1.1.99.r5357/doc/Makefile
+--- cupsys-1.1.99.r5357~/doc/Makefile 2006-03-23 20:23:19.000000000 +0000
++++ cupsys-1.1.99.r5357/doc/Makefile 2006-03-30 15:15:07.000000000 +0000
+@@ -187,6 +187,8 @@
+ #
+
+ clean:
++ $(RM) doc/es/index.html
++ $(RM) doc/ja/index.html
+
+
+ #
+diff -urNad cupsys-1.1.99.r5357~/man/Makefile cupsys-1.1.99.r5357/man/Makefile
+--- cupsys-1.1.99.r5357~/man/Makefile 2006-03-21 02:35:37.000000000 +0000
++++ cupsys-1.1.99.r5357/man/Makefile 2006-03-30 15:17:26.000000000 +0000
+@@ -88,6 +88,7 @@
+ for file in $(MAN8); do \
+ $(RM) ../doc/help/man-`basename $$file .$(MAN8EXT)`.html; \
+ done
++ $(RM) client.conf.man cups-deviced.man cups-driverd.man cups-lpd.man cupsaddsmb.man cupsd.man cupsd.conf.man lpoptions.man
+
+
+ #
+diff -urNad cupsys-1.1.99.r5357~/templates/Makefile cupsys-1.1.99.r5357/templates/Makefile
+--- cupsys-1.1.99.r5357~/templates/Makefile 2006-03-18 13:18:18.000000000 +0000
++++ cupsys-1.1.99.r5357/templates/Makefile 2006-03-30 15:18:07.000000000 +0000
+@@ -105,6 +105,7 @@
+ #
+
+ clean:
++ $(RM) ja/header.tmpl es/header.tmpl header.tmpl
+
+
+ #
--- cupsys-1.2.2.orig/debian/patches/04_freebsd.dpatch
+++ cupsys-1.2.2/debian/patches/04_freebsd.dpatch
@@ -0,0 +1,93 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_freebsd.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: man extension is handled by dh_installman
+
+@DPATCH@
+diff -urNad cups-1.2~/backend/parallel.c cups-1.2/backend/parallel.c
+--- cups-1.2~/backend/parallel.c 2006-04-25 12:14:36.000000000 +0200
++++ cups-1.2/backend/parallel.c 2006-04-25 12:14:51.000000000 +0200
+@@ -693,7 +693,7 @@
+ printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d\"\n", device, i + 1);
+ }
+ }
+-#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
++#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ int i; /* Looping var */
+ int fd; /* File descriptor */
+ char device[255]; /* Device filename */
+diff -urNad cups-1.2~/backend/serial.c cups-1.2/backend/serial.c
+--- cups-1.2~/backend/serial.c 2006-04-25 12:14:36.000000000 +0200
++++ cups-1.2/backend/serial.c 2006-04-25 12:15:44.000000000 +0200
+@@ -666,11 +666,11 @@
+ void
+ list_devices(void)
+ {
+-#if defined(__hpux) || defined(__sgi) || defined(__sun) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#if defined(__hpux) || defined(__sgi) || defined(__sun) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ static char *funky_hex = "0123456789abcdefghijklmnopqrstuvwxyz";
+ /* Funky hex numbering used for some *
+ * devices */
+-#endif /* __hpux || __sgi || __sun || __FreeBSD__ || __OpenBSD__ */
++#endif /* __hpux || __sgi || __sun || __FreeBSD__ || __OpenBSD__ || __FreeBSD_kernel__ */
+
+ #ifdef __linux
+ int i, j; /* Looping vars */
+@@ -958,7 +958,7 @@
+ printf("serial serial:%s?baud=38400 \"Unknown\" \"Serial Port #%d\"\n",
+ device, i + 1);
+ }
+-#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ int i, j; /* Looping vars */
+ int fd; /* File descriptor */
+ char device[255]; /* Device filename */
+diff -urNad cups-1.2~/backend/usb-unix.c cups-1.2/backend/usb-unix.c
+--- cups-1.2~/backend/usb-unix.c 2006-04-25 12:14:36.000000000 +0200
++++ cups-1.2/backend/usb-unix.c 2006-04-25 12:14:51.000000000 +0200
+@@ -401,7 +401,7 @@
+ }
+ #elif defined(__hpux)
+ #elif defined(__osf)
+-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ int i; /* Looping var */
+ char device[255]; /* Device filename */
+
+diff -urNad cups-1.2~/backend/usb.c cups-1.2/backend/usb.c
+--- cups-1.2~/backend/usb.c 2006-04-25 12:14:36.000000000 +0200
++++ cups-1.2/backend/usb.c 2006-04-25 12:14:51.000000000 +0200
+@@ -72,7 +72,7 @@
+
+ #ifdef __APPLE__
+ # include "usb-darwin.c"
+-#elif defined(__linux) || defined(__sun) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#elif defined(__linux) || defined(__sun) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ # include "usb-unix.c"
+ #else
+ /*
+diff -urNad cups-1.2~/config-scripts/cups-directories.m4 cups-1.2/config-scripts/cups-directories.m4
+--- cups-1.2~/config-scripts/cups-directories.m4 2006-04-25 12:14:36.000000000 +0200
++++ cups-1.2/config-scripts/cups-directories.m4 2006-04-25 12:14:51.000000000 +0200
+@@ -135,7 +135,7 @@
+ "/System/Library/StartupItems/PrintingServices")
+ ;;
+
+- Linux | GNU)
++ Linux | GNU | GNU/k*BSD*)
+ # Linux/HURD seems to choose an init.d directory at random...
+ if test -d /sbin/init.d; then
+ # SuSE
+diff -urNad cups-1.2~/configure cups-1.2/configure
+--- cups-1.2~/configure 2006-04-25 12:14:50.000000000 +0200
++++ cups-1.2/configure 2006-04-25 12:14:51.000000000 +0200
+@@ -7445,7 +7445,7 @@
+
+ ;;
+
+- Linux | GNU)
++ Linux | GNU | GNU/k*BSD*)
+ # Linux/HURD seems to choose an init.d directory at random...
+ if test -d /sbin/init.d; then
+ # SuSE
--- cupsys-1.2.2.orig/debian/patches/79_CVE-2008-3640.dpatch
+++ cupsys-1.2.2/debian/patches/79_CVE-2008-3640.dpatch
@@ -0,0 +1,90 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 78_CVE-2008-3640.dpatch by Jamie Strandboge
+##
+## DP: Upstream: STR #2911, STR #2966
+## DP: fix buffer overflow in HPGL filter. Also fix regression introduced in
+## DP: upstream fix for STR #2911 (CVE-2008-3641)
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/textcommon.c cupsys-1.2.2/filter/textcommon.c
+--- cupsys-1.2.2~/filter/textcommon.c 2005-08-04 13:40:13.000000000 -0500
++++ cupsys-1.2.2/filter/textcommon.c 2008-10-14 14:01:31.000000000 -0500
+@@ -4,6 +4,7 @@
+ * Common text filter routines for the Common UNIX Printing System (CUPS).
+ *
+ * Copyright 1997-2005 by Easy Software Products.
++ * Copyright 2007-2008 by Apple Inc.
+ *
+ * These coded instructions, statements, and computer programs are the
+ * property of Easy Software Products and are protected by Federal
+@@ -613,14 +614,38 @@
+ !strcasecmp(val, "yes");
+
+ if ((val = cupsGetOption("columns", num_options, options)) != NULL)
++ {
+ PageColumns = atoi(val);
+
++ if (PageColumns < 1)
++ {
++ fprintf(stderr, "ERROR: Bad columns value %d!\n", PageColumns);
++ return (1);
++ }
++ }
++
+ if ((val = cupsGetOption("cpi", num_options, options)) != NULL)
++ {
+ CharsPerInch = atof(val);
+
++ if (CharsPerInch <= 0.0)
++ {
++ fprintf(stderr, "ERROR: Bad cpi value %f!\n", CharsPerInch);
++ return (1);
++ }
++ }
++
+ if ((val = cupsGetOption("lpi", num_options, options)) != NULL)
++ {
+ LinesPerInch = atof(val);
+
++ if (LinesPerInch <= 0.0)
++ {
++ fprintf(stderr, "ERROR: Bad lpi value %f!\n", LinesPerInch);
++ return (1);
++ }
++ }
++
+ if (PrettyPrint)
+ PageTop -= 216.0f / LinesPerInch;
+
+diff -urNad cupsys-1.2.2~/filter/texttops.c cupsys-1.2.2/filter/texttops.c
+--- cupsys-1.2.2~/filter/texttops.c 2008-10-14 14:01:23.000000000 -0500
++++ cupsys-1.2.2/filter/texttops.c 2008-10-14 14:01:31.000000000 -0500
+@@ -181,6 +181,14 @@
+ SizeColumns = (PageRight - PageLeft) / 72.0 * CharsPerInch;
+ SizeLines = (PageTop - PageBottom) / 72.0 * LinesPerInch;
+
++ if (SizeColumns <= 0 || SizeColumns > 32767 ||
++ SizeLines <= 0 || SizeLines > 32767)
++ {
++ fprintf(stderr, "ERROR: Unable to print %dx%d text page!\n",
++ SizeColumns, SizeLines);
++ exit(1);
++ }
++
+ Page = calloc(sizeof(lchar_t *), SizeLines);
+ Page[0] = calloc(sizeof(lchar_t), SizeColumns * SizeLines);
+ for (i = 1; i < SizeLines; i ++)
+@@ -195,6 +203,13 @@
+ else
+ ColumnWidth = SizeColumns;
+
++ if (ColumnWidth <= 0)
++ {
++ fprintf(stderr, "ERROR: Unable to print %d text columns!\n",
++ PageColumns);
++ exit(1);
++ }
++
+ /*
+ * Output the DSC header...
+ */
--- cupsys-1.2.2.orig/debian/cupsys.templates
+++ cupsys-1.2.2/debian/cupsys.templates
@@ -0,0 +1,66 @@
+Template: cupsys/raw-print
+Type: boolean
+Default: true
+_Description: Do you want CUPS to print unknown jobs as raw jobs?
+ All print jobs in IPP get a MIME type. Since not all sources of print
+ jobs can attach an appropriate type, many jobs get submitted as the MIME
+ type application/octet-stream. Because of this, when CUPS receives a job
+ with that MIME type, it attempts to guess what the format is. By default,
+ if it cannot guess the proper type, it rejects the job.
+ .
+ It is possible to cause CUPS to treat all unrecognized jobs with this MIME
+ type as "raw" jobs, which causes them to be sent directly to the printer
+ without processing.
+ .
+ If you will be accepting print jobs from Windows computers, you probably
+ want this option set, as Windows gives all IPP print jobs processed by a
+ local driver the MIME type application/octet-stream. Samba also submits
+ its print jobs this way.
+
+Template: cupsys/backend
+Type: multiselect
+__Choices: ipp, lpd, parallel, scsi, serial, socket, usb
+Default: ipp, lpd, parallel, socket, usb
+_Description: Printer communication backends:
+ CUPS uses backend programs for communication with printer device or port.
+ .
+ Unfortunately, some backend programs cause some trouble.
+ (For example, some PPC kernel crashes with the parallel backend)
+ .
+ Please choose the backend program to be used by CUPS. The default choice
+ should fit the most common environments.
+
+Template: cupsys/ports
+Type: string
+Default: localhost:631 /var/run/cups/cups.sock
+_Description: Port or/and host name where CUPS will listen to:
+ Please specify the port or the host name CUPS daemon will listen to.
+ The following formats are allowed:
+ .
+ - Port number (631);
+ - Host name (debian.example.com);
+ - Host:Port (debian.example.com:631);
+ - File domain socket (/var/run/cups/cups.sock).
+ .
+ You can combine any of these by delimiting in a space-separated list.
+ .
+ The default port 631 is reserved for the Internet Printing Protocol (IPP).
+ "localhost:631" is recommended to setup a standalone environment for security
+ reasons.
+
+Template: cupsys/browse
+Type: boolean
+Default: false
+_Description: Broadcast and/or listen for CUPS printer information on the network?
+ CUPS daemon can broadcast printer information for clients on the network,
+ and detect printers on the network automatically.
+ .
+ If you choose this option, the CUPS daemon will periodically send UDP
+ broadcasts to detect printers.
+
+Template: cupsys/portserror
+Type: note
+_Description: Incorrect value entered
+ an error occurred while parsing the port number or the host name.
+ .
+ Please correct your input.
--- cupsys-1.2.2.orig/debian/HOWTO_BUGREPORT.txt
+++ cupsys-1.2.2/debian/HOWTO_BUGREPORT.txt
@@ -0,0 +1,28 @@
+Debian users,
+
+For making clear your printing problem, I need some information.
+
+1. Please describe your CUPS version/revision. This will be written
+ automatically if you use Debian bug system tools.
+2. Please describe Your printer vendor and model, and how to connect (usb,
+ parallel, serial, lpd, ipp, http, socket, smb).
+3. Please attach your /etc/cups/printers.conf (only about problematic printer)
+4. Set LogLeveld as "debug" in your /etc/cups/cupsd.conf and reload by
+ /etc/init.d/cupsys reload. After you do something causes a problem,
+ please attach gzippped your /var/log/cups/error_log.
+5. Please attach gzipped PPD file in /etc/cups/ppd/.
+
+Before you report...
+1. If you use gs as filter, please check /usr/bin/gs indicates gs-esp.
+ gs-gnu doesn't support some drivers. If gs indicates gs-gnu, please
+ change by 'update-alternatives --config gs'.
+2. Please don't set severity to 'grave' or 'critical' if you couldn't success
+ to print out. I usually test by my printer, then upload. (it means at
+ least I can success to print out)
+ I promise to look over your report. Please use 'important' for
+ "I can't print out by my printer!".
+
+Thanks,
+--
+Kenshi Muto
+kmuto@debian.org
--- cupsys-1.2.2.orig/debian/cupsys-bsd.templates
+++ cupsys-1.2.2/debian/cupsys-bsd.templates
@@ -0,0 +1,8 @@
+Template: cupsys-bsd/setuplpd
+Type: boolean
+Default: false
+_Description: Do you want to set up the BSD lpd compatibility server?
+ This package contains a server that can accept BSD-style print jobs and
+ submit them to CUPS. It should only be set up if you have other computers
+ that submit jobs over the network via "BSD" or "LPR" services, and these
+ computers cannot be converted to use the IPP protocol that CUPS uses.
--- cupsys-1.2.2.orig/debian/cupsys-bsd.postinst
+++ cupsys-1.2.2/debian/cupsys-bsd.postinst
@@ -0,0 +1,80 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+# Debconf
+. /usr/share/debconf/confmodule
+
+case "$1" in
+ configure)
+
+ # Set documentation symlinks
+ if [ -d /usr/share/doc/cupsys ]; then
+ if [ ! -e /usr/share/doc/cupsys-bsd ]; then
+ ln -sf cupsys /usr/share/doc/cupsys-bsd
+ fi
+ fi
+
+ # Add cups-lpd to inetd.conf
+ db_get cupsys-bsd/setuplpd
+ if [ "$RET" = "true" ]; then
+ update-inetd --add 'printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd'
+ fi
+
+ # Manage printcap file and associated symlinks
+ if [ -e /etc/cups/cupsd.conf ]; then
+ if [ -e /etc/printcap.cups ]; then
+ rm -f /etc/printcap.cups
+ fi
+ if [ -L /etc/printcap -a ! -e /etc/printcap ]; then
+ rm -f /etc/printcap
+ fi
+
+ printcap_file=`egrep '^Printcap ' /etc/cups/cupsd.conf | awk '{print $2}'`
+ if [ "$printcap_file" != "" ]; then
+ touch $printcap_file 2>/dev/null || true
+ if [ ! -e /etc/printcap -a -e $printcap_file ]; then
+ ln -s $printcap_file /etc/printcap
+ fi
+ fi
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst 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/changelog
+++ cupsys-1.2.2/debian/changelog
@@ -0,0 +1,2510 @@
+cupsys (1.2.2-0ubuntu0.6.06.13) dapper-security; urgency=low
+
+ * SECURITY UPDATE: fix integer overflow via large TIFF file
+ - debian/patches/81_CVE-2009-0163.dpatch: adjust CUPS_IMAGE_MAX_HEIGHT in
+ filter/image-private.h
+ - CVE-2009-0163
+
+ -- Jamie Strandboge Wed, 15 Apr 2009 09:25:58 -0500
+
+cupsys (1.2.2-0ubuntu0.6.06.12) dapper-security; urgency=low
+
+ * SECURITY UPDATE: arbitrary code execution via integer overflow from a PNG
+ image with a large height value
+ - This issue was introduced in the patch for CVE-2008-1722.
+ - debian/patches/77_CVE-2008-1722.patch: adjust patch to multiply img->xsize
+ instead of img->ysize so we don't overflow in filter/image-png.c.
+ - CVE-2008-5286
+ * SECURITY UPDATE: arbitrary file overwrite via temp log file symlink attack
+ - debian/filters/pstopdf: use the cleaned-up version from Debian.
+ - CVE-2008-5377
+
+ -- Marc Deslauriers Thu, 08 Jan 2009 10:27:16 -0500
+
+cupsys (1.2.2-0ubuntu0.6.06.11) dapper-security; urgency=low
+
+ * SECURITY UPDATE: heap-based buffer overflow due to unchecked boundary in
+ the SGI filter
+ - debian/patches/78_CVE-2008-3639.dpatch: adjust filter/image-sgilib.c to
+ properly check for xsize. Taken from Debian patch by Martin Pitt.
+ - STR #2918
+ - CVE-2008-3639
+ * SECURITY UPDATE: integer overflow in texttops filter which could lead
+ to heap-based overflow
+ - debian/patches/79_CVE-2008-3640.dpatch: adjust textcommon.c and
+ texttops.c to check for too large or negative page metrics. Based on
+ Debian patch by Martin Pitt.
+ - STR #2919
+ - CVE-2008-3640
+ * SECURITY UPDATE: buffer overflow in HPGL filter which could lead to
+ arbitrary code execution
+ - debian/patches/80_CVE-2008-3641.dpatch: adjust hpgl-attr.c to properly
+ check for an invalid number of pens. Also includes fix for regression in
+ orginal upstream patch which changed the color mapping and an off-by-one
+ loop error. Taken from Debian patch by Martin Pitt.
+ - STR #2911
+ - STR #2966
+ - CVE-2008-3641
+ * debian/patches/00list: apply 77_CVE-2008-1722.dpatch from previous update,
+ which was not applied
+
+ -- Jamie Strandboge Tue, 14 Oct 2008 14:08:29 -0500
+
+cupsys (1.2.2-0ubuntu0.6.06.9) dapper-security; urgency=low
+
+ * SECURITY UPDATE: Denial of service and possibly arbitrary code execution
+ * debian/patches/77_CVE-2008-1722.dpatch: fix for two integer overflows in
+ filter/image-png.c. Taken from Debian SVN Head.
+ * References
+ CVE-2008-1722
+ LP: #219491
+ http://www.cups.org/str.php?L2790
+
+ -- Jamie Strandboge Thu, 24 Apr 2008 13:02:31 -0400
+
+cupsys (1.2.2-0ubuntu0.6.06.8) dapper-security; urgency=low
+
+ * debian/patches/72_CVE-2008-0047.dpatch: Fix buffer overflow in
+ cgiCompileSearch() using crafted search expressions. Exploitable if
+ printer sharing is enabled. Thanks to Martin Pitt for supplying the patch.
+ * debian/patches/73_CVE-2008-0882.dpatch: Fix double-free in
+ process_browse_data(), which could be exploited to a remote DoS by sending
+ crafted data to the cups UDP port. Thanks to Martin Pitt for supplying the
+ patch.
+ * debian/patches/74_pid.dpatch: Specify PidFile in temporary directory in
+ the self test's cupsd.conf. This affects the test suite (in the sense that
+ it actually works now) and does not affect the built binaries at all.
+ (Backported from trunk). Thanks to Martin Pitt for supplying the patch.
+ * debian/patches/75_CVE-2008-0053.dpatch: Fix buffer overflows in
+ ParseCommand() in hpgl-input.c by properly checking number of parameters
+ * debian/patches/76_CVE-2008-1373.dpatch: Fix buffer overflow in
+ gif_read_image() in image-gif.c by properly validating code_size
+ * References
+ CVE-2008-0047
+ CVE-2008-0882
+ CVE-2008-0053
+ CVE-2008-1373
+ http://www.cups.org/str.php?L2729
+ http://www.cups.org/str.php?L2656
+
+ -- Jamie Strandboge Wed, 26 Mar 2008 15:02:55 -0400
+
+cupsys (1.2.2-0ubuntu0.6.06.7) dapper-proposed; urgency=low
+
+ * Reapply pending SRU which got superseded in -security.
+ * Add debian/patches/60_ipp_read_busy_loop.dpatch:
+ - Fix logic error that causes IPP client programs like gnome-cups-icon to
+ sometimes get into a state where it uses 100% CPU time.
+ - Properly handle ippReadIO() encountering IPP_IDLE and make sure to never
+ return this to the outside world, since it is interpreted as an error
+ condition which causes a busy loop.
+ - Error out if the read callback doesn't return a value/group tag, which
+ would confuse the higher layers.
+ - Patch backported from upstream SVN (fixed in 1.2.11).
+ - LP: #44196
+
+ -- Martin Pitt Wed, 09 Jan 2008 09:14:42 +0100
+
+cupsys (1.2.2-0ubuntu0.6.06.6) dapper-security; urgency=low
+
+ * SECURITY UPDATE: tempfile race, denial of service in SNMP backend.
+ * Add 70_CVE-2007-6358.dpatch, 71_CVE-2007-5849.dpatch: upstream fixes
+ thanks to Kenshi Muto.
+ * References
+ CVE-2007-6358
+ CVE-2007-5849
+
+ -- Kees Cook Mon, 07 Jan 2008 16:08:28 -0800
+
+cupsys (1.2.2-0ubuntu0.6.06.4) dapper-security; urgency=low
+
+ * SECURITY UPDATE: arbitrary code execution via stack overflow.
+ * Add debian/patches/ipptags-corruption-fix.dpatch: upstream fixes
+ from Michael Sweet.
+ * References
+ CVE-2007-4351
+
+ -- Kees Cook Thu, 01 Nov 2007 06:52:01 -0700
+
+cupsys (1.2.2-0ubuntu0.6.06.3) dapper-proposed; urgency=low
+
+ * Add debian/patches/59_title_escaping.dpatch:
+ - Escape non-ASCII characters in comment fields in the filters.
+ - This fixes printing of documents with titles containing non-ASCII
+ characters, line breaks, etc.
+ - Patch backported from upstream SVN (dropped the formatting changes):
+ http://www.cups.org/strfiles/1988/str1988.patch
+ - LP #57445.
+ * Skipping version number to .3 since .2 is in proposed and didn't verify.
+
+ -- Martin Pitt Fri, 10 Aug 2007 12:47:32 +0200
+
+cupsys (1.2.2-0ubuntu0.6.06) dapper-updates; urgency=low
+
+ * New upstream bugfix release:
+ - Fixes printing to 1.1.x servers. Closes: LP#42513, LP#42802
+ - Fixes parsing of some PostScript files which previously generated empty
+ pages. Closes: LP#51432
+ - Fixes parsing of network masks. Closes: LP#52390
+ - Lots of more fixes, see upstream changelog.
+ * Dropped debian/patches/00_r{5643,5660}.dpatch: Upstream now.
+ * debian/patches/02_configure.dpatch,
+ debian/patches/09_runasuser_autoconf.dpatch: Adapted to new upstream
+ version (taken from current edgy package).
+
+ -- Martin Pitt Thu, 27 Jul 2006 06:38:01 +0000
+
+cupsys (1.2.1-0ubuntu2) dapper-updates; urgency=low
+
+ * Add debian/patches/00_r5660.dpatch
+ - Fix for 11.22.33.* network masks (STR #1769), Closes: LP#52390
+ * Fixed debian/patches/05_avoidunknowngroup
+ - Don't create .rej files
+ * Fixed debian/rules
+ - Delete backend/*.o on clean
+
+ -- Ante Karamatic Sun, 9 Jul 2006 08:05:12 +0200
+
+cupsys (1.2.1-0ubuntu1) dapper-updates; urgency=low
+
+ * Upgrade to new upstream version 1.2.1 (backported from edgy):
+ - fix for printing on Xerox IPP printers; Closes: LP#47387
+ - fix for banners on single page
+ - fix for custom page sizes (cups ignores them now in some cases)
+ - fix for -u and -U switches for lpadmin
+ - fix for printing on some Canon printers
+ - fix for printing on CUPS server < 1.1.17 (RHEL3 and older)
+ (partly fixes LP bug #42802)
+ - couple of fixes for imagetoraster
+ * Add debian/patches/00_r5643.dpatch: Pull some fixes from upstream SVN
+ scheduled to go into 1.2.2:
+ - The lpstat command did not use the correct character
+ set when reporting the date and time (STR #1751)
+ - The cupsaddsmb command and web interface did not update
+ the Windows PPD files properly, resulting in corrupt
+ PPD files for the Windows client to use (STR #1750)
+ - The cupsd.conf man page didn't describe the Listen
+ domain socket syntax (STR #1753)
+ - The scheduler no longer tries to support more than
+ FD_SETSIZE file descriptors.
+ - The USB backend now reports a "no such device" error
+ when using the old filename-based USB URIs instead of
+ the "success" error.
+ - Increased the HTTP and IPP read timeouts to 10 seconds,
+ as 1 second was too short on congested networks (STR
+ #1719)
+ - Fixed another file descriptor leak when printing raw
+ files (STR #1736)
+ - The scheduler didn't always choose the least costly
+ filter.
+ - Fixed parsing of IPv6 addresses in Allow, Deny,
+ BrowseAllow, BrowseDeny, and BrowseRelay directives
+ (STR #1713)
+ - Special cases for the "localhost" hostname did not
+ work, causing printing to not work when the /etc/hosts
+ file did not contain a localhost entry (STR #1723)
+ - Updated the Spanish translation (STR #1720)
+ - Reverse-order page output was broken when N-up or
+ landscape orientations were used (STR #1725)
+ - The parallel, serial, socket, and USB backends needed
+ print data before they would report back-channel data,
+ causing problems with several new drivers (STR #1724)
+ * Ship /etc/cups/ssl directory. Closes: LP#44931
+ * Removed debian/patches/svn*.dpatch, these were backported from 1.2.1 in
+ 1.2.0-0ubuntu3.
+ * debian/cupsys.init.d: Add missing log_end_msg. Closes: LP#48116
+ * Bump up shlibs to >= 1.2.1 for compatibility safety.
+
+ -- Martin Pitt Thu, 6 Jul 2006 19:25:04 +0200
+
+cupsys (1.2.0-0ubuntu5) dapper; urgency=low
+
+ * Remove debian/patches/56_revert_svn_5438.dpatch: The reason for this
+ reversion has now been fixed in gnome-cups-manager 0.31-1.1ubuntu8. This
+ fixes the handling of spaces in manufacturer names. Closes: LP#33545
+
+ -- Martin Pitt Wed, 17 May 2006 13:18:05 +0200
+
+cupsys (1.2.0-0ubuntu4) dapper; urgency=low
+
+ * Add debian/patches/svn5530_str1667_octet_stream.dpatch: Fix printing of
+ application/octet-stream jobs (usually from Windows clients with locally
+ installed driver). (STR #1667) Closes: LP#43145
+
+ -- Martin Pitt Wed, 17 May 2006 08:58:16 +0200
+
+cupsys (1.2.0-0ubuntu3) dapper; urgency=low
+
+ * Pull some bug fixes from SVN head:
+ * Add debian/patches/svn5512_KCMYcm_fix.dpatch: Fix bug in KCMYcm handling
+ (typo in variable name).
+ * Add debian/patches/svn5518_12bitraster.dpatch: Make sure we swap 12/16 bit
+ chunky data in raster filter.
+ * Add debian/patches/svn5523_1_2_4bit_raster.dpatch:
+ - Fix imagetoraster generation of 1/2/4-bit raster data.
+ - Fix cupsRasterWritePixels() - bad double line termination.
+ * Add debian/patches/svn5526_str1676_stopped_jobs_active.dpatch: Fix stopped
+ jobs to be considered active (STR #1676).
+ * Add debian/patches/svn5527_LDAP_define.dpatch: Fix typo in #ifdef:
+ s/OPENDAP/OPENLDAP/.
+ * Add debian/patches/svn5527_str1683_lpstaterror.dpatch: The lpstat command
+ displayed the wrong error message for a missing destination (STR #1683).
+ * Add debian/patches/svn5527_str1689_printeroptions.dpatch: "Set Printer
+ Options" in the web interface did not update the DefaultImageableArea or
+ DefaultPaperDimension attributes in the PPD file (STR #1689).
+ * Add debian/patches/svn5528_str1680_load_custom_options.dpatch: ppdOpen*()
+ did not load custom options properly (STR #1680).
+
+ -- Martin Pitt Tue, 16 May 2006 12:39:35 +0200
+
+cupsys (1.2.0-0ubuntu2) dapper; urgency=low
+
+ * debian/cupsys.init:
+ - Load the 'lp' module. Earlier installers did not put it in /etc/modules
+ and we keep getting dozens of bug reports about that, so let's just fix it
+ here once and for all.
+ - Load the 'ppdev' module. This should fix detection of parallel printers.
+ Closes: LP#29050
+
+ -- Martin Pitt Thu, 11 May 2006 11:09:59 +0200
+
+cupsys (1.2.0-0ubuntu1) dapper; urgency=low
+
+ * Final 1.2.0 upstream release (bug fixes only). Closes: LP#43898
+ * Remove debian/patches/01_cupsimage.dpatch, fixed upstream.
+ * Remove debian/patches/57_svn_5461.dpatch, fixed upstream.
+ * debian/patches/58_cupsd.conf-AllowLocal.dpatch: Fix typo: @LOCAL@ ->
+ @LOCAL. Closes: LP#43933
+
+ -- Martin Pitt Wed, 10 May 2006 12:09:54 +0200
+
+cupsys (1.1.99.rc3-0ubuntu4) dapper; urgency=low
+
+ * Add debian/patches/58_cupsd.conf-AllowLocal.dpatch: Add 'Allow @LOCAL'
+ to server ACL to actually allow LAN computers to access the printer if
+ sharing is enabled. This avoid having to change two things for enabling
+ printer sharing (a source of much confusion and a FAQ). This does not
+ change the default behavior (port only listens on localhost by default).
+
+ -- Martin Pitt Tue, 9 May 2006 17:53:02 +0200
+
+cupsys (1.1.99.rc3-0ubuntu3) dapper; urgency=low
+
+ * debian/cupsys.config: Print migration note to stderr, not stdout, to not
+ confuse debconf. Closes: LP#41716
+ * debian/cupsys.postinst: Fix ownership of files in /var/cache/cups/ so that
+ they are writable by non-root cupsd. Earlier dapper versions got the
+ ownership wrong, so fix this for intra-dapper upgrades. Closes: LP#40795
+ * Add debian/local/{sharing_status,enable_sharing}: Scripts to control
+ printer sharing (by opening or closing the TCP port). Thanks to Ante
+ Karamatić for his initial scripts and research!
+
+ -- Martin Pitt Tue, 9 May 2006 16:33:19 +0200
+
+cupsys (1.1.99.rc3-0ubuntu2) dapper; urgency=low
+
+ * debian/cupsys.init.d: Fix log creation for real. Closes: LP#41267
+ * debian/cupsys.logrotate: Create files as cupsys:lpadmin, not root:lp.
+ (Also part of LP#41267)
+
+ -- Martin Pitt Tue, 2 May 2006 19:36:22 +0200
+
+cupsys (1.1.99.rc3-0ubuntu1) dapper; urgency=low
+
+ * New upstream bug fix release 1.2RC3, UVF exception approved by Matt
+ Zimmerman.
+ * Add debian/patches/56_revert_svn_5438.dpatch: Revert upstream svn commit
+ 5438 (fixed handling of products/manufacturers with spaces in the name)
+ for now since it causes regressions in gnome-cups-add. Will be reactivated
+ later when the issue is sorted out with upstream.
+ * Update patches for new upstream release.
+ * Remove debian/patches/20_httpGetHostname_crash.dpatch, fixed upstream.
+ * Add debian/patches/14_dont_force_ssl.dpatch: Upstream now requires
+ encryption by default for accessing /admin/, but our GUI frontends do not
+ yet cope with that. Disable SSL requirement for now to revert to the old
+ behaviour.
+ * debian/patches/08_cupsd.conf.conf.d.dpatch:
+ - Set "BrowseAddress @LOCAL"; without this, sending browsing information
+ does not work (Browsing still has to be enabled). Since enable_browsing
+ now works for exporting printers, too, this Closes: LP#17981
+ - Add some comments to point out that the Port and Browsing settings are
+ moved to /etc/cups/cups.d/.
+ * debian/cupsys.postrm: Clean up passwd.md5 on purge.
+ * debian/cupsys.init.d: Pre-create error_log, too, and clean up code a bit.
+ Closes: LP#41267
+ * debian/cupsys.postinst: If upgrading from Breezy, adapt the inclusion of
+ external browsing configuration in cupsd.conf to retain the correct
+ setting for modified cupsd.conf files.
+ * debian/cupsys.config:
+ - Fix handling of cupsd-browsing.conf -> cups.d/browse.conf transition for
+ breezy->dapper upgrades.
+ - Fix browse.conf parsing to set the correct debconf default value, so
+ that the browse setting is not reset to 'off' on upgrades.
+ Closes: LP#38704
+ * Add debian/patches/57_svn_5461.dpatch:
+ - Properly HTML-quote the printer name so that names containing e. g. '+'
+ work properly in the web interface.
+ - Upstream svn commit 5461.
+ - Closes: LP#37018
+
+ -- Martin Pitt Tue, 25 Apr 2006 20:09:37 +0200
+
+cupsys (1.1.99.rc2-0ubuntu2) dapper; urgency=low
+
+ * debian/cupsys-client.links: Fix cupsenable/cupsdisable manpage link.
+ Closes: LP#40725
+ * debian/patches/09_runasuser.dpatch: Do not drop additional group
+ privileges in scheduler/process.c. This should fix a range of bugs
+ concerning detection of parallel port printers and other 'permission
+ denied' bugs.
+
+ -- Martin Pitt Mon, 24 Apr 2006 19:17:12 +0200
+
+cupsys (1.1.99.rc2-0ubuntu1) dapper; urgency=low
+
+ * Many changes have been applied in Debian now; reapply remaining Ubuntu
+ changes from scratch to clean up some cruft (see below for details). Also,
+ maintain Ubuntu package as SVN branch of the Debian one.
+ * debian/rules: Enable --with-cups-user=cupsys and
+ --enable-privilege-dropping to not run cupsd as root.
+ * debian/control: Remove libdbus-1-dev build dependency, dbus support is not
+ something for dapper.
+ * debian/cupsys.init.d: Disable reload (it doesn't work as normal user),
+ change force-reload to restart.
+ * debian/cupsys.init.d: Pre-create access_log and error_log since cupsd
+ can't create them as normal user.
+ * debian/rules: Set rc runlevel priority to 19.
+ * debian/cupsys.{postinst,postrm}, debian/cupsys-client.postinst:
+ Setup/remove cupsys user and its needed groups.
+ * debian/cupsys.templates: Disable browsing by default due to our 'no open
+ ports in the default install' policy.
+ * debian/README.Debian: Explain disabling of administrative functions in web
+ interface and describe how to re-enable it.
+ * debian/cupsys.preinst:
+ - Migrate /etc/cups/cupsd-browsing.conf to /etc/cups/cups.d/browse.conf
+ for smooth upgrades from Hoary.
+ - Fix owner of /etc/cups/ppd/* on upgrades.
+ * debian/patches/ubuntu-nowebadmin.dpatch: Explain disabling of
+ administrative functions in the web interface and point to doc how to
+ reenable it.
+ * debian/patches/55_ppd_okidata_name.dpatch: Change "Oki" manufacturer name
+ to "Okidata" to be consistent with other PPD files.
+ * Implement http://wiki.debian.org/PpdFileStructureSpecification:
+ - debian/dirs: Create /usr/share/ppd/cups-included/.
+ - debian/rules: Install shipped PPDs into
+ /usr/share/ppd/cups-included// and provide a symlink to
+ the old /usr/share/cups/model directory for backwards compatibility.
+ * debian/libcupsys2.shlibs: Remove Debian revision to allow -0ubuntuN
+ number.
+ * Support custom PPD installation by lpadmin members (through e. g.
+ gnome-cups-manager):
+ - debian/cupsys.dirs: Create /usr/share/ppd/custom/.
+ - debian/cupsys.init.d: Fix permissions of that dir to root:lpadmin 3775.
+ - debian/rules: Install compatibility symlink
+ /usr/share/cups/model/custom.
+ * debian/cupsys.dirs: Ship /usr/lib/cups/driver/ to avoid error messages if
+ it's missing.
+ * debian/patches/09_runasuser.dpatch, scheduler/cert.c: Change root
+ certificate permissions from 0440 to 0240, so that the CGI programs cannot
+ read it any more. Without this patch, cupsd presented its own certificate
+ to itself, and *every* user could do admin tasks without authentication.
+
+ -- Martin Pitt Fri, 21 Apr 2006 16:19:37 +0200
+
+cupsys (1.1.99.rc2-0exp1) experimental; urgency=low
+
+ [ Kenshi Muto ]
+ * New upstream release 1.2RC2.
+ - Because -fpie config becomes optional, compiler works on amd64 and
+ other architectures. (closes: #335199)
+ * Enable LDAP support.
+ * Remove duplicated update-rc.d (closes: #356911)
+ * Stopped asking admin password because it works only if user chooses
+ digest authentication. The default configuration of Debian uses
+ PAM and basic authentication.
+ * Enable dbus support.
+ * 03_clean.dpatch: Remove produced and remained files during build.
+ * Now CUPS uses 'lp' user/group privilege to call backend or any other
+ programs.
+ CUPS SystemGroup is 'lpadmin'. You need to add users who are allowed
+ to add/modify/remove printers/jobs/classes.
+ * Remove image.h.patch from source. It is no longer needed.
+ * 02_configure.dpath: Remove -rpath from configure.
+ * Fix typo in cupsys-bsd description. (closes: #362070)
+ * Add Galician debconf translation. (closes: #361258)
+ * Update Danish debconf translation. (closes: #357969)
+ * Use 'reload' during logrotate instead of 'restart'. It looks safe
+ on CUPS 1.2. (though job-restart problem still remains)
+ * set TZ in init script only if TZ isn't defined yet.
+ * Use if-fi structure style for postrotate of logrotate script.
+ It solves error when cupsys is not running. (closes: #347641)
+ * Unset TMPDIR environment variable before running daemon. (closes: #347829)
+ * Removed /etc/cups/pdftops.conf because it was for pdftops of upstream
+ version. Debian CUPS uses xpdf-utils wrapper and doesn't need
+ pdftops.conf.
+ * Notice: /etc/cups/client.conf has been removed upstream.
+ * Notice: {dis,en}able have been renamed to cups{dis,en}able.
+
+ [ Martin Pitt ]
+ * debian/patches/48_stdlib.dpatch: Adapted to new upstream version.
+ * debian/cupsys.init.d:
+ - Fix arguments of start-stop-daemon and remove the hideous kill
+ algorithm.
+ - Ensure that /var/run/cupsd exists; this makes the init script work with
+ /var/run mounted on a tmpfs.
+ * debian/libcupsys2-dev.files, debian/libcupsimage2-dev.files: Remove static
+ library; upstream does not build them any more, and they are useless
+ anyway.
+ * Add debian/patches/06_disable_backend_setuid.dpatch: Remove the uid
+ changing in scheduler/cups-deviced.c which was introduced recently in
+ upstream. It totally breaks device node access (e. g. /dev/lp0 is root:lp
+ 0660, which is inaccessible for a process which runs as lp:root).
+ * debian/rules: Remove --with-cups-user, upstream does not support
+ it any more.
+ * debian/patches/09_runasuser_fixes.dpatch: RunAsUser was removed upstream;
+ rename the patch to 09_runasuser.dpatch and rewrite it:
+ - Enclose all changes in an #if CUPS_DROP_PRIVILEGES, so that it is easy to
+ enable this feature.
+ - scheduler/main.c: Drop privileges after initialization.
+ - scheduler/conf.c: If we build with CUPS_DROP_PRIVILEGES, set RunUser to
+ User instead of getuid(), since at that point we will always run as root
+ (privileges cannot yet be dropped at that point).
+ - config-scripts/cups-defaults.m4: Add --enable-privilege-dropping option.
+ - config.h.in: Add CUPS_DROP_PRIVILEGES option template.
+ * Add debian/patches/09_runasuser_autoconf.dpatch: autoconf changes for
+ 09_runasuser_fixes.dpatch changes.
+ * debian/pdftops: Fix reading from stdin (https://launchpad.net/bugs/17124)
+ * debian/cupsys.preinst: Remove dangling /etc/cups/pdftops.conf symlink on
+ upgrades to unbreak printing with poppler-utils.
+ * debian/control: Add poppler-utils alternative for xpdf-utils dependency.
+ * Add debian/patches/12_quiesce_ipp_logging.dpatch:
+ - Drop successful IPP messages to log level 'debug' and unsuccessful ones
+ to 'info'.
+ - Do not flood access_log with successful CUPS-Get-Printers and
+ Get-Printer-Attributes queries (which are generated by e. g.
+ gnome-cups-icon every 3 seconds).
+ - Closes: #280718
+ * Add debian/patches/13_default_log_warn.dpatch: Raise default log severity
+ to 'warning' to not log gazillions of IPP requests by default. (other part
+ of #280718)
+ * debian/rules, debian/cupsys.postinst: Remove obsolete /etc/cups/certs and
+ /var/lib/cups/certs (certificates are managed in /var/run/certs now).
+ * debian/cupsys.preinst: Remove obsolete /etc/cups/certs symlink on upgrades.
+ * debian/cupsys-client.files: Install cupstestdsc and manpage.
+ * debian/cupsd.init: Have force-reload to reload, not restart.
+ * debian/cupsys.logrotate: Use force-reload instead of reload, since the
+ latter is not required to exist by Debian Policy.
+ * debian/rules: Ship browsing_status and enable_browsing.
+ * debian/patches/20_httpGetHostname_crash.dpatch: Add some robustifications
+ to httpGetHostname() to hopefully fix a reported crash.
+
+ -- Kenshi Muto Sun, 16 Apr 2006 17:49:57 +0900
+
+cupsys (1.1.99.b1.r4929-0ubuntu9) dapper; urgency=low
+
+ * Correct permissions of /var/run/cups in the init script.
+
+ -- Scott James Remnant Wed, 19 Apr 2006 14:15:14 +0100
+
+cupsys (1.1.99.b1.r4929-0ubuntu8) dapper; urgency=low
+
+ * Disable 53_usr_share_ppd_support.dpatch again, too many
+ packages still have /usr/share/cups/model hardcoded.
+ * Symlink /usr/share/cups/model/cups-included to /usr/share/ppd/cups-included.
+ * Place ppd files in manufacturer specific subdirectories.
+ * Change "Oki" manufacturer name to "Okidata".
+ * Symlink /usr/share/cups/model/custom to /usr/share/ppd/custom.
+
+ -- Matthias Klose Wed, 12 Apr 2006 19:26:18 +0200
+
+cupsys (1.1.99.b1.r4929-0ubuntu7) dapper; urgency=low
+
+ * debian/cupsys.init.d: Move log_end_msg to the right place again.
+ * Add debian/patches/53_usr_share_ppd_support.dpatch:
+ - Look for PPDs in /usr/share/ppd, according to
+ http://wiki.debian.org/PpdFileStructureSpecification.
+ - Fixes Debian bug #358186.
+ * debian/rules: Install PPD files into /usr/share/ppd/cups-included,
+ according to above specification.
+ * debian/patches/54_cups-config_modeldir.dpatch: Add --modeldir to
+ cups-config so that other packages can use it to figure out the correct
+ PPD base path.
+ * debian/libcupsys2.shlibs: Bump version number so that other packages can
+ rely on cups-config's modeldir.
+ * Re-add debian/patches/51_dont_log_ipp_printer_query.dpatch, since these
+ log messages are routed through a different code path.
+ * debian/cupsys.init.d: Change custom PPD path from /usr/share/cups/ppd to
+ /usr/share/ppd/custom.
+
+ -- Martin Pitt Fri, 7 Apr 2006 17:14:25 +0200
+
+cupsys (1.1.99.b1.r4929-0ubuntu6) dapper; urgency=low
+
+ * Add debian/patches/51_ipp_log_severity_info.dpatch: Drop successful IPP
+ messages to log level 'debug' and unsuccessful ones to 'info'. This is a
+ more generic approach to avoid ridiculously huge logs due to polling by
+ gnome-cups-icon and friends.
+ * Drop debian/patches/51_dont_log_ipp_printer_query.dpatch, obsoleted by
+ above patch.
+ * Add debian/patches/52_default_log_level_warning.dpatch: Raise default log
+ level from info to warning. Closes: LP#38042
+
+ -- Martin Pitt Thu, 6 Apr 2006 12:05:45 +0200
+
+cupsys (1.1.99.b1.r4929-0ubuntu5) dapper; urgency=low
+
+ * debian/patches/51_dont_log_ipp_printer_query.dpatch: Suppress logging of
+ successful CUPS_GET_DEFAULT messages, too. Closes: LP#29895
+ * debian/pdftops: Fix reading from stdin. Closes: LP#17124
+
+ -- Martin Pitt Thu, 30 Mar 2006 19:52:20 +0200
+
+cupsys (1.1.99.b1.r4929-0ubuntu4) dapper; urgency=low
+
+ * debian/cupsys.postinst: Make sure that the scanner group exists before
+ trying to add the cupsys user to it.
+
+ -- Colin Watson Thu, 9 Mar 2006 08:20:02 +0000
+
+cupsys (1.1.99.b1.r4929-0ubuntu3) dapper; urgency=low
+
+ * debian/rules: Do not install dangling pdftops.conf symlink. (Malone #26785)
+ * debian/cupsys.preinst: Remove a dangling pdftops.conf symlink on upgrades
+ to this version.
+ * debian/cupsys.postinst: Add cupsys to group 'scanner' to be able to access
+ printer/scanner combined devices. (Malone #29050)
+ * debian/patches/44_fixconfdirperms.dpatch: Make /etc/cups/ppd group
+ writable. (Malone #31533)
+ * debian/cupsys.init.d: Make sure that page_log exists with the right
+ permissions. (Malone #33409)
+ * Add debian/patches/51_dont_log_ipp_printer_query.dpatch: Do not flood
+ access_log with successful CUPS-Get-Printers and Get-Printer-Attributes
+ queries (which are generated by gnome-cups-icon every 3 seconds). This is
+ a hideous and hackish patch, but it has to do until we dbusify cupsys
+ properly. (Malone #29895)
+
+ -- Martin Pitt Mon, 6 Mar 2006 16:08:32 +0100
+
+cupsys (1.1.99.b1.r4929-0ubuntu2) dapper; urgency=low
+
+ * Add 50_truncate_ppd.dpatch:
+ - cups/file.c: Do not forget to write the pending uncompressed tail when
+ copying a compressed file. Fixes cropped PPD files in /etc/cups/ppd.
+ - Patch taken from upstream svn commit 4942.
+ - Malone #28642
+ * debian/cupsys.init.d: Create access_log with proper permissions if it does
+ not yet exist. (Malone #28492)
+ * debian/cupsys.preinst: If we upgrade from a version earlier than this one,
+ change all root-owned PPD files in /etc/cups/ppd to be owned by cupsys.
+ (Malone #12879)
+
+ -- Martin Pitt Thu, 19 Jan 2006 16:55:51 +0100
+
+cupsys (1.1.99.b1.r4929-0ubuntu1) dapper; urgency=low
+
+ * New upstream snapshot with lots of bug fixes.
+ * Remove debian/patches/50_local_username_check.dpatch: Adopted upstream.
+ * debian/patches/02_configure.patch: Greatly simplified to be more robust
+ against upstream changes; renamed to debian/patches/02_disable_pie.patch
+ for clarity.
+ * Disable debian/patches/48_stdlib.dpatch, it shouldn't be necessary on at
+ least our platforms.
+
+ -- Martin Pitt Tue, 17 Jan 2006 16:44:47 +0100
+
+cupsys (1.1.99.b1.r4892-0ubuntu1) dapper; urgency=low
+
+ * New upstream snapshot.
+ * Adapt patches to new upstream version:
+ - 02_configure.dpatch
+ - 48_stdlib.dpatch
+ - ubuntu-nowebadmin.dpatch
+ * Add debian/patches/50_local_username_check.dpatch: Fix the restriction
+ of changing/cancelling of print jobs to the owner.
+ - scheduler/auth.c: Disable weird code that bypasses user name check for
+ local authentication.
+ - scheduler/ipp.c: Copy the determined user name of the connection to the
+ con structure, so that cupsdCheckPolicy() has a chance to actually
+ verify it.
+ - Ubuntu #12177
+
+ -- Martin Pitt Fri, 13 Jan 2006 15:28:22 +0100
+
+cupsys (1.1.99.b1.r4841-1ubuntu8) dapper; urgency=low
+
+ * debian/cupsys.init.d: Remove the hideous killing hacks and just invoke
+ start-stop-daemon with the correct arguments.
+
+ -- Martin Pitt Wed, 11 Jan 2006 19:23:47 +0100
+
+cupsys (1.1.99.b1.r4841-1ubuntu7) dapper; urgency=low
+
+ * debian/cupsys.init.d: Make sure that the PID file directory /var/run/cups
+ exists. The new approach of mounting /var/run as tmpfs removes the
+ directory that is shipped in the deb. (Ubuntu #22261)
+
+ -- Martin Pitt Wed, 11 Jan 2006 13:47:45 +0100
+
+cupsys (1.1.99.b1.r4841-1ubuntu6) dapper; urgency=low
+
+ * debian/cupsys.init: Call stop/start in the 'restart/force-reload' section
+ to make use of the much more robust 'stop' handling. This should avoid
+ frequent failures of force-reload. (Ubuntu #21787)
+ * debian/cupsys.postinst:
+ - Set permissions of /etc/cups/interfaces to root:lpadmin 2775.
+ - Make /etc/printcap writable for group lpadmin.
+ - This fixes third-party printer drivers and command line tools.
+ - Ubuntu #20891
+
+ -- Martin Pitt Thu, 5 Jan 2006 18:11:51 +0100
+
+cupsys (1.1.99.b1.r4841-1ubuntu5) dapper; urgency=low
+
+ * Synchronize to Debian's svn head to get the various configuration handling
+ RC bug fixes, but keep Ubuntu upstream version at r4841 since 4885 has
+ serious regressions.
+ * All non-Ubuntu specific patches have been applied in Debian now.
+ * Drop the following patches (accepted in Debian):
+ - ubuntu-sanitize-conffile-handling.dpatch
+ - ubuntu-localports.dpatch
+ - ubuntu-include-conf.d.dpatch
+ - ubuntu-nowebadmin.dpatch
+ - ubuntu-cupsimage.dpatch
+ * ubuntu-runasuser.dpatch: Remove the upstream code fixes (already in Debian
+ now), just add the 'RunAsUser' directive to cupsd.conf.
+ * debian/cupsys.templates: Disable browsing by default.
+
+ -- Martin Pitt Thu, 22 Dec 2005 15:08:51 +0100
+
+cupsys (1.1.99.b1.r4885-1) experimental; urgency=low
+
+ [ Kenshi Muto ]
+ * New SVN release taken from rr4885.
+ * Updated Russian debconf translation, taken from cupsys trunk.
+ * Downgrade port and browse question to low.
+ * Add timeout routine to avoid lockup.
+ * debian/patches/08_cupsd.conf.conf.d.dpatch:
+ - Commented out Port/Listen/Browsing from cupsd.conf.in.
+ CUPS crashes when there is a duplicate definition.
+ * Updated Swedish debconf translation.
+ * Set seen false flag when ports configuration is failed.
+ * Allow '*' for hostname in ports.conf.
+ * Use /bin/echo instead of shell built-in echo.
+ * Improve cupsys.templates.
+ * Updated Russian, German, Czech,French, Vietnamese debconf translation.
+ * Removed example descriptions from init.d script.
+ * Fix IPv4 validation.
+
+ [ Martin Pitt ]
+ * Adapt debian/patches/02_configure.dpatch to r4885.
+ * Move forcefully killing of cupsd if start-stop-daemon fails from
+ postinst to init script, where it belongs to. Do not kill all running
+ cupsd processes, but only the one in the pid file; this will unbreak cupsd
+ behaviour in chroots.
+ * debian/cupsys.default: Remove obsolete FORCE_RESTART option.
+ * Resurrect debian/patches/01_cupsimage.dpatch (formerly
+ 03_cupsimage.dpatch), as we get unresolved symbols if libcupsimage
+ isn't properly linked to libcupsys, causing other packages to FTBFS.
+ Thanks to Adam Conrad.
+ * debian/cupsys.init.d: Add --oknodo to not fail if cupsd is already
+ running.
+ * debian/rules: In clean rule, clean up a lot of files that are left behind
+ by 'make clean'.
+
+ -- Kenshi Muto Fri, 23 Dec 2005 06:33:05 +0000
+
+cupsys (1.1.99.b1.r4876-1) unstable; urgency=low
+
+ [ Martin Pitt ]
+ * debian/local/{enable_browsing,browsing_status}: Adapt configuration file
+ locations to new conf.d structure.
+ * debian/cupsys.templates: Fix default value for cupsys/browse: 'yes' is an
+ invalid bool option, change to true.
+ * debian/cupsys.init.d: Use LSB init functions. Add lsb-base package
+ dependency.
+ * debian/cupsys.postinst: Wait a second between kill -9'ing cupsys and
+ checking if the process still exists to avoid false positives and upgrade
+ failures.
+ * Clean up support for /etc/cups/conf.d:
+ - Add debian/patches/08_cupsd.conf.conf.d.dpatch: Add include commands to
+ default cupsd.conf file.
+ - debian/cupsys.postinst: Remove fiddling with cupsd.conf.
+ - This will ensure that cupsd.conf will remain an unchanged conffile.
+ * debian/rules: Remove empty debian/patched on clean.
+ * debian/patches/10_cupsd.conf2.dpatch: Re-enable listening to localhost to
+ make the web interface work.
+ * debian/patches/44_fixconfdirperms.dpatch:
+ - Put configuration files into group root instead of nobody to avoid
+ privilege escalation of nobody/nogroup and comply to Debian standards.
+ - Use CUPS_DEFAULT_GROUP instead of 'nobody' as the default group for
+ setgid'ing to and conffiles which must be writable for cupsd.
+ - Disable changing permissions of cupsd.conf conffile.
+ * Add debian/patches/09_runasuser_fixes.dpatch:
+ - scheduler/main.c: Generate a certificate even when running as user, just
+ as in 1.1.x; this unbreaks local certificate authorization for cupsd
+ when it runs as normal user.
+ - scheduler/main.c: When running as non-root, call initgroups() instead of
+ setgroups() to allow auxiliary groups. These are required to access
+ different device types (lp for USB/parallel printers, dialout for serial
+ printers, etc.)
+
+ [ Kenshi Muto ]
+ * New SVN release taken from r4876.
+
+ -- Kenshi Muto Thu, 8 Dec 2005 21:26:22 +0900
+
+cupsys (1.1.99.b1.r4841-1) experimental; urgency=low
+
+ * EXPERIMENTAL
+ * New SVN release taken from r4841.
+ * Remove -pie and -fpie from compiler option. pie option causes
+ a problem with Debian binutils.
+ I hope this change avoids FTBFS on sparc and others. (closes: #339120)
+
+ -- Kenshi Muto Wed, 16 Nov 2005 12:27:27 +0000
+
+cupsys (1.1.99.b1.r4748-4) experimental; urgency=low
+
+ * EXPERIMENTAL
+ * 00_r4835.dpatch: Taken from r4835.
+ Well, r4835 removes some files. It means dpkg-buildpackage always
+ fails when we rebuild source. Maybe it's time to change orig source.
+ Moved obsolete patches to patches/obsolete.
+ * 48_stdlib.dpatch: Fix FTBFS for arm, mips, and mipsel.
+ * 03_manext.dpatch: Don't use upstream's manpage file handling.
+ Debian uses dh_installman.
+ * 04_freebsd.dpatch: Apply Brian's patch to support GNU/kFreeBSD
+ (closes: #338266)
+ * Install lppasswd as owner 'lp'.
+
+ -- Kenshi Muto Fri, 4 Nov 2005 13:56:27 +0000
+
+cupsys (1.1.99.b1.r4748-3) experimental; urgency=low
+
+ * EXPERIMENTAL
+ * 47_pid.dpatch: Modified to allow to configure location of pid file.
+ (closes: #337093)
+ You can change this location by PidFile directive at your cupsd.conf.
+ * Remove example comments from init script. (closes: #334842)
+
+ -- Kenshi Muto Thu, 3 Nov 2005 11:39:07 +0000
+
+cupsys (1.1.99.b1.r4748-2) experimental; urgency=medium
+
+ * EXPERIMENTAL
+ * 02_configure.dpatch: Modified to remove -pie/-fpie if arch = x86_64.
+ (closes: #335199)
+
+ -- Kenshi Muto Mon, 24 Oct 2005 11:42:59 +0000
+
+cupsys (1.1.99.b1.r4748-1) experimental; urgency=low
+
+ * EXPERIMENTAL
+ * CUPS 1.2 snapshot (r4748) from SVN.
+
+ -- Kenshi Muto Wed, 5 Oct 2005 12:54:27 +0000
+
+cupsys (1.1.23-13) UNRELEASED; urgency=low
+
+ * 38_pdftopscan.dpatch: Apply CAN-2005-0064, CAN-2004-0888,
+ and CAN-2005-2097 patches. (closes: #324459, #324460, #324464)
+ Because Debian cupsys uses xpdf wrapper instead of forked pdftops,
+ users aren't affected these security problems.
+ This patch is just for users who want to create own pdftops from
+ source.
+ * Move Port/Listen and Browsing configurations from /etc/cups/
+ cupsd.conf to /etc/cups/cups.d/.
+
+ /etc/cups/cups.d/ports.conf: Port/Listen configuration.
+ /etc/cups/cups.d/browse.conf: Browsing configuration
+
+ Migration will be done automatically.
+ You can configure these values by using "dpkg-reconfigure cupsys".
+ (closes: #235906, #297695, #178838, #288838)
+
+ -- Kenshi Muto Mon, 22 Aug 2005 18:50:26 +0900
+
+cupsys (1.1.23-12) unstable; urgency=medium
+
+ * foomatic-rip may be treated as recommended tool.
+ Modified control file. (closes: #320196)
+ * Add debconf-2.0 as debconf alternative.
+ * Migrated to libgnutls12. (closes: #322087)
+ libcupsys2 backed as real library. libcupsys2-gnutls10 became
+ transitional package. (closes: #322018)
+ * Add procps to Depends: of cupsys. ps command is used by
+ cupsys.postinst.
+ * 47_pid.dpatch: Added a patch to make forked PID file.
+ Now init script use this file instead of one created by
+ start-stop-daemon.
+ I hope this solves Samba starting bug. (closes: #315017)
+ * Back gs-esp to Depends:. (closes: #312244)
+ PostScript printer owners may claim this, but currently
+ we Debian CUPS Maintainers team have massive complains about
+ missing gs-esp dependency. It's current best workaround to
+ avoid such printing problems.
+
+ -- Kenshi Muto Thu, 28 Jul 2005 11:35:27 +0900
+
+cupsys (1.1.23-11) unstable; urgency=low
+
+ * "At Debconf 5" release.
+ * Now CUPS is maintained by Debian CUPS Maintainers Team.
+
+ * Do "sleep 2" to wait daemon's wake up. (this is just workaround...
+ needs better solution, for #309794 and #315017)
+ * Added Vietnamese translation. (closes: #310152)
+ * Check whether daemon is running or not before restart in logrotate.
+ (closes: #310535)
+ * Add description about foomatic-rip (in foomatic-filters package)
+ to README.Debian. (closes: #309399)
+ * Remove unnecessary comment from debian/po/de.po (closes: #314135)
+ * Apply status option for init script (closes: #312683). Thanks Stephen.
+ * Suggests cupsys-driver-gutenprint, this package is new name of
+ cupsys-driver-gimpprint.
+ * 46_ppdsdat: Move /etc/cups/ppds.dat to /var/lib/cups/ppds.dat and
+ make symlink. (closes: #317905)
+ * Unapply NOAUTH handling from 33_jobauthorize. A user warns me
+ it's dangerous to use.
+
+ -- Kenshi Muto Fri, 20 May 2005 11:07:42 +0900
+
+cupsys (1.1.23-10ubuntu4) breezy; urgency=low
+
+ * Add debian/patches/ubuntu-disable-conffile-chmod.dpatch:
+ - Stop fiddling with the /etc/cups/cupsd.conf permissions at server
+ startup. The default permissions as shipped (root:root 0644) are just
+ fine for that file, and cupsys modifies it in a way that normal users
+ cannot read them any more, which breaks gnome-cups-manager.
+ - Ubuntu #15165
+ * debian/cupsys.postinst:
+ - If the package is upgraded from a version earlier than this one, correct
+ permissions of cupsd.conf.
+
+ -- Martin Pitt Wed, 14 Sep 2005 14:52:13 +0200
+
+cupsys (1.1.23-10ubuntu3) breezy; urgency=low
+
+ * Fix installation of /usr/share/cups/{enable-browsing,browsing_status} to
+ ship these scripts again. (Ubuntu #14546 )
+
+ -- Martin Pitt Fri, 2 Sep 2005 12:00:02 +0200
+
+cupsys (1.1.23-10ubuntu2) breezy; urgency=low
+
+ * Added debian/patches/ubuntu-confpermissions.dpatch:
+ - Add and document ConfigFilePerm to cupsd.conf and set it to 0600 to
+ avoid exposing SMB passwords to lpadmin members. This makes it slightly
+ harder to intercept the password. (Ubuntu #12036)
+
+ -- Martin Pitt Thu, 23 Jun 2005 12:44:14 +0200
+
+cupsys (1.1.23-10ubuntu1) breezy; urgency=low
+
+ * Debian adopted many changes and MOM output was messy; reapplied remaining
+ Ubuntu changes to pristine Debian version. Mention them here again to
+ ease further merges and Debian adoptions.
+ * Convert Ubuntu patches to dpatch and added descriptions.
+ * Convert to poppler:
+ - debian/patches/ubuntu-pdf2ps_poppler.dpatch: Replace pdftops/pdftops.cxx
+ with a port from xpdf-utils to libpoppler.
+ - debian/control: Add build dependency libpoppler-dev, remove xpdf-utils
+ dependency.
+ - Disable 06_replacepdftops.dpatch to build the pdftops/ subdir again.
+ - debian/rules: Install newly built pdftops into /usr/lib/cups/.
+ * Run as user 'cupsys' instead of root:
+ - debian/patches/ubuntu-runasuser.dpatch: Enable RunAsUser in
+ configuration.
+ - debian/patches/ubuntu-auxgroups.dpatch: When running as non-root, call
+ initgroups() instead of setgroups() to allow auxiliary groups.
+ - debian/rules: Configure with --with-cups-user=cupsys.
+ - debian/cupsys.postinst, debian/cupsys-client.postinst: Create cupsys
+ user and setup permissions.
+ - debian/cupsys.postrm: Remove cupsys user on purge.
+ * Disable web interface to avoid putting the user 'cupsys' into group
+ shadow:
+ - debian/README.Debian: Explain the change.
+ - debian/patches/ubuntu-nowebadmin.dpatch: Explain the disabled
+ administrator pages in the web interface.
+ - Add debian/local/ja-nowebadmin.ptch: Add the same explanation to the
+ Japanese translation in patches/ja.tar.gz.uu.
+ - debian/rules: Apply debian/local/ja-nowebadmin.ptch.
+ * Automatic detection of LAN printers (browsing):
+ - Add debian/local/{enable_browsing,browsing_status,cupsd-browsing.conf}
+ and install them in debian/rules.
+ - debian/patches/ubuntu-externalbrowseconf.dpatch: Externalize browsing
+ setting to cupsd-browsing.conf.
+ * Listen to local port only by default to comply to Ubuntu Security Policy:
+ - debian/patches/ubuntu-localports.dpatch
+ * debian/cupsys.init.d: LSB init script.
+
+ -- Martin Pitt Thu, 23 Jun 2005 11:23:37 +0200
+
+cupsys (1.1.23-10) unstable; urgency=high
+
+ * Recovered http backend. -8 and -9 missed it. (closes: #305169)
+ * Use absolete path for doc-root instead of relative path.
+ (closes: #305339)
+
+ -- Kenshi Muto Tue, 19 Apr 2005 20:47:49 +0900
+
+cupsys (1.1.23-9) unstable; urgency=medium
+
+ * Remove unnecessary and toxic space in doc-base file.
+ (closes: #305084)
+
+ -- Kenshi Muto Mon, 18 Apr 2005 08:08:03 +0900
+
+cupsys (1.1.23-8) unstable; urgency=medium
+
+ * "Brush up for Sarge" release.
+ * Introduced dpatch for source management.
+ * Included Spanish man pages.
+ * 43_filtercost: Applied a patch for wrong computation of cost
+ (closes: #304205)
+ * Applied many part of ubuntu patch, http://people.ubuntu.com/~scott/patches/cupsys/cupsys_1.1.23-7ubuntu1.patch.
+ (User 'cupsys' feature and Browsing feature aren't applied at this time.
+ They are post-Sarge things)
+ * Applied improved dvifilter patch. (Although you need to modify
+ /etc/cups/mime.convs and some other files to use it) (closes: #198100)
+ * Provides /var/run/cups/cupsd.pid. (closes: #301804)
+ * Added cupsys documentation to doc-base structure. (closes: #171396, #304333)
+ * Included filter for PostScript from Windows PostScript driver, created by
+ Matt Swift .
+ If you want to use, put /usr/share/doc/cupsys/examples/filters/samba-postscript.* to /etc/cups,
+ and put /usr/share/doc/cupsys/examples/filters/samba-ps-to-ps to /usr/lib/cups/filter. (closes: #246577)
+
+ -- Kenshi Muto Wed, 16 Mar 2005 10:01:57 +0900
+
+cupsys (1.1.23-7ubuntu2) breezy; urgency=low
+
+ * debian/control:
+ - Add build dependency libpoppler-dev.
+ - Drop cupsys dependency xpdf-utils.
+ * Added debian/patches/ubuntu-pdf2ps_poppler.patch:
+ - Replace pdftops/pdftops.cxx with the latest version from xpdf-3.00 code;
+ it was modified to use poppler's include files and use GooString instead
+ of GString (a simple rename in poppler).
+ - Adapt build rule.
+ * debian/rules: Install newly built pdftops into /usr/lib/cups/.
+ * debian/pdftops: Change path to pdftops from /usr/bin to /usr/lib/cups.
+ * Removed debian/patches/06replacepdftops.patch: This patch prevented the
+ building of pdftops/, but we want that again.
+
+ -- Martin Pitt Tue, 24 May 2005 14:39:14 +0200
+
+cupsys (1.1.23-7ubuntu1) breezy; urgency=low
+
+ * Resynchronise with Debian. (#9281)
+ * Fixed merging conflicts in debian/rules.
+ * Dropped patch ubuntu-lppasswd_noexistingconf.patch, now included in
+ Debian.
+ * debian/cupsys.postinst: Include /etc/default/cupsys to make the
+ #298040 patch effective (this somehow got lost in MOM).
+
+ -- Martin Pitt Fri, 15 Apr 2005 13:20:17 +0200
+
+cupsys (1.1.23-7) unstable; urgency=low
+
+ * Drop /etc/cups/printers.conf and /etc/cups/classes.conf from
+ configuration files. (closes: #298103)
+ Migration will be done automatically.
+ * Add /etc/default/cupsys. You can change force stop behavior by
+ changing FORCE_RESTART in this file. (closes: #298040)
+ * Add hplip to Suggests:. (closes: #297776)
+
+ -- Kenshi Muto Sat, 5 Mar 2005 12:27:32 +0900
+
+cupsys (1.1.23-6) unstable; urgency=medium
+
+ * Fix missing adduser dependency in cupsys-client. (closes: #296849)
+ * Apply parallel backend improvement patch.
+ - don't receive signal during writing (closes: #296222)
+ - fix 64bit problem (closes: #296223)
+
+ -- Kenshi Muto Sat, 26 Feb 2005 08:07:39 +0000
+
+cupsys (1.1.23-5) unstable; urgency=low
+
+ * Improve postinst message (closes: #295642). Thanks Adam.
+
+ -- Kenshi Muto Fri, 18 Feb 2005 21:23:10 +0900
+
+cupsys (1.1.23-4) unstable; urgency=low
+
+ * 20defaultport.patch is merged in upstream source.
+ * ARGH, libcupsys2-dev should conflict/replace against <<1.1.22-3.
+ Fix control file. (closes: #292879)
+ * Remove obsolete README_fr.txt. (closes: #293274)
+
+ -- Kenshi Muto Sun, 30 Jan 2005 08:35:17 +0900
+
+cupsys (1.1.23-3) unstable; urgency=low
+
+ * Remove $Id$ from config file: 07cvsremovetag.patch (closes: #291629)
+ * Fix 'lppasswd does not work with nonexisting passwd file' by mpitt's patch:
+ 41lppasswdnoexistingconf.patch (closes: 290011)
+
+ -- Kenshi Muto Sat, 22 Jan 2005 12:23:46 +0900
+
+cupsys (1.1.23-2) unstable; urgency=medium
+
+ * Move defvalue declaration to begin block for compile on
+ backports environment. Thanks Massimiliano.
+ * Fix Cyclades serial port name: 40cycladeserial.patch (closes: #270375)
+ * Upgrade shlibs of libcupsys2-gnutls10. cupsys-client needs newest
+ libcupsys2-gnutls10 (closes: #289930, #289939).
+
+ -- Kenshi Muto Mon, 10 Jan 2005 13:48:32 +0900
+
+cupsys (1.1.23-1ubuntu12) hoary; urgency=low
+
+ * debian/cupsys.init.d:
+ - Make the start-stop-daemon invocation in restart use the schedule
+ syntax (--retry TERM/10) to keep trying to kill cupsd for 10
+ seconds before it gives up. If it does fail, restart now fails
+ gracefully, rather than bringing down the shell. (Ubuntu #7847)
+ - Make the same changes to the stop target for consistency.
+
+ -- Adam Conrad Tue, 22 Mar 2005 03:40:51 +0000
+
+cupsys (1.1.23-1ubuntu11) hoary; urgency=low
+
+ * debian/cupsys.postinst:
+ - cleanup kill code somewhat - use pidof instead of ps aux output.
+ should fix Debian bug#298040
+ - Don't die if the kill fails.
+
+ -- LaMont Jones Thu, 17 Mar 2005 16:10:27 -0700
+
+cupsys (1.1.23-1ubuntu10) hoary; urgency=low
+
+ * debian/cupsys.postinst:
+ - Remove "--home /" from adduser invocation; sometimes adduser chowns the
+ home directory even if --no-create-home is given.
+ - If upgrading from a previous version, chown / to 0:0 to fix the bug from
+ previous releases.
+
+ -- Martin Pitt Thu, 10 Mar 2005 08:30:42 +0100
+
+cupsys (1.1.23-1ubuntu9) hoary; urgency=low
+
+ * Updated debian/patches/ubuntu-fixconfdirperms.patch:
+ - chmod /etc/cups/ppd to 2775 instead of 755 so that cupsd can actually
+ write into it. (Ubuntu #6816)
+ * Added debian/patches/ubuntu-slashprinternames.patch:
+ - When determining the path to a PPD or interface file, replace slashes
+ with underscores; otherwise the server will try to write into
+ nonexisting subdirectories of e. g. /etc/cups/ppd/. (Ubuntu #6816)
+ * Updated debian/patches/ubuntu-nowebadmin.patch:
+ - Corrected the gnome-cumps-manager menu path on all web pages and
+ translations. (Ubuntu #4725)
+
+ -- Martin Pitt Mon, 28 Feb 2005 19:04:51 +0100
+
+cupsys (1.1.23-1ubuntu8) hoary; urgency=low
+
+ * debian/patches/ubuntu-localports.patch:
+ - Removed "Browsing" patch hunk.
+ * Added debian/patches/ubuntu-externalbrowseconf.patch:
+ - Replace "Browsing" setting by "Include cupsd-browsing.conf" and update
+ the documentation comment; this allows to enable/disable browsing
+ without changing the main configuration file (which avoids dpkg
+ questions on upgrades).
+ - Enable "BrowseAddress @LOCAL" by default.
+ * Added debian/local/cupsd-browsing.conf (single "Browsing" configuration
+ parameter, default Off) and install it to /etc/cups/.
+ * Added scripts to manage browsing status to debian/local and install them
+ to /usr/share/cups/:
+ - browsing_status: Return whether browsing is currently disabled (0),
+ enabled (1) or there is a custom configuration (2).
+ - enable_browsing: Enable (1) or disable (0) browsing. Only possible with
+ non-custom configurations and with root privileges.
+ * Backend part of Ubuntu bug #2251 (user-friendly browsing configuration).
+
+ -- Martin Pitt Tue, 22 Feb 2005 13:46:02 +0100
+
+cupsys (1.1.23-1ubuntu7) hoary; urgency=low
+
+ * Reapply patch to background cupsd during startup.
+
+ -- Thom May Thu, 20 Jan 2005 17:28:30 +0000
+
+cupsys (1.1.23-1ubuntu6) hoary; urgency=low
+
+ * Must create cupsys user _AFTER_ we create the lpadmin group. sigh.
+
+ -- LaMont Jones Fri, 14 Jan 2005 15:01:21 -0700
+
+cupsys (1.1.23-1ubuntu5) hoary; urgency=low
+
+ * Need to possibly add cupsys user in cupsys-client postinst, too.
+
+ -- LaMont Jones Fri, 14 Jan 2005 12:08:14 -0700
+
+cupsys (1.1.23-1ubuntu4) hoary; urgency=low
+
+ * Fix postrm to not horribly break debconf and die.
+
+ -- LaMont Jones Thu, 13 Jan 2005 11:35:39 -0700
+
+cupsys (1.1.23-1ubuntu3) hoary; urgency=low
+
+ * debian/control: Added missing cupsys dependency 'procps'.
+ * Moved lppasswd permission setup from cupsys.postinst to
+ cupsys-client.postinst (to where it belongs).
+
+ -- Martin Pitt Thu, 13 Jan 2005 11:27:09 +0100
+
+cupsys (1.1.23-1ubuntu2) hoary; urgency=low
+
+ * Added debian/patches/ubuntu-build_avoid_unknown_chown.patch:
+ - systemv/Makefile: do not try to install lppasswd with owner CUPS_USER
+ during build since user "cupsys" does not exist on the buildds; install
+ it as root:root 755 instead
+ * debian/cupsys.postinst: setup permissions of lppasswd to cupsys:root 4755
+ * Added debian/patches/ubuntu-lppasswd_noexistingconf.patch:
+ - lppasswd tries to rename /etc/passwd.md5 to /etc/passwd.old; do not fail
+ if the former does not exist (at the very first invocation of the
+ program)
+ * debian/rules: removed silly "DEB_DH_INSTALLINIT_ARGS := -n" introduced by
+ some Ubuntu upload; this completely broke install/upgrade service
+ stopping/starting/restarting
+ * Added debian/patches/ubuntu-fixconfdirperms.patch:
+ - scheduler/conf.c: chmod /etc/cups to 3755 instead of 755:
+ + setgid forces the correct group (lpadmin) to files like passwd.md5
+ + sticky denies removing root-owned files by lpadmin members
+
+ -- Martin Pitt Wed, 12 Jan 2005 12:06:30 +0100
+
+cupsys (1.1.23-1ubuntu1) hoary; urgency=low
+
+ * Merged new Debian version
+ * Dropped patches (merged upstream):
+ + 39CAN-2004-1125.patch
+ + 40CAN-2004-1267.patch
+ + 41CAN-2004-1268+1269+1270.patch
+ * Moved change to cups/cups_C.h to ubuntu-nowebadmin.patch
+ * Reworked the following patches to work with new version:
+ + ubuntu-init.d.patch
+ + ubuntu-runasuser.patch
+ * Applied and removed Ubuntu-specific patches which patch files in debian/;
+ this plays better with merge-o-matic and my fellow developers like it that
+ way; however, it will make manual merges a pain:
+ + ubuntu-init.d.patch
+ + ubuntu-logrotate.patch
+ + ubuntu-runasuser.patch (only the parts touching debian/)
+ + ubuntu-runlevel-19.patch
+
+ -- Martin Pitt Thu, 6 Jan 2005 10:21:18 +0100
+
+cupsys (1.1.23-1) unstable; urgency=low
+
+ * New upstream release
+ * lprng disabled ipp feature since 3.8.26-1. Remove conflicts: lprng
+ of cupsys. (closes: #288531)
+
+ -- Kenshi Muto Tue, 4 Jan 2005 19:32:16 +0900
+
+cupsys (1.1.22-8) unstable; urgency=high
+
+ * Fix another security vulnerability since 1.1.21. Sigh...
+ (closes: #287835)
+
+ -- Kenshi Muto Fri, 31 Dec 2004 13:16:54 +0900
+
+cupsys (1.1.22-7) unstable; urgency=medium
+
+ * Use Depends: xpdf-utils instead of Recommends:.
+ This is RC fix (closes: #287921)
+
+ -- Kenshi Muto Fri, 31 Dec 2004 08:37:54 +0900
+
+cupsys (1.1.22-6) unstable; urgency=high
+
+ * Replaced upstream pdftops (derived from Xpdf) with pdftops.pl wrapper.
+ pdftops.pl is made by Helge Blischke, GNU GPL licensed.
+
+ CUPS 1.1.22 should enter to Sarge ASAP by some security reasons,
+ but upstream pdftops prevents to enter because it has libgcc_s.so
+ dependency and current gcc 3.4 faces difficult 'unwind' problem.
+ Now I believe cupsys 1.1.22-6 can enter soon without waiting
+ gcc problem.
+
+ If you want to print PDF files directly, you need to install
+ xpdf-utils. pdftops.pl calls pdftops in xpdf-utils package.
+ * Fix typo in control file.
+
+ -- Kenshi Muto Wed, 29 Dec 2004 14:59:28 +0000
+
+cupsys (1.1.22-5) unstable; urgency=high
+
+ * Apply upstream CVS patch (00cvs20041229.patch)
+ This includes fix of buffer overflow possibility in scheduler.
+
+ -- Kenshi Muto Wed, 29 Dec 2004 21:35:51 +0900
+
+cupsys (1.1.22-4) unstable; urgency=high
+
+ * Add Replaces migration for libcupsys2-dev.
+ It solves 'libcupsys2-dev overwrite a file in cupsys' problem.
+ (closes: #287609)
+
+ -- Kenshi Muto Wed, 29 Dec 2004 02:43:09 +0000
+
+cupsys (1.1.22-3) unstable; urgency=medium
+
+ * Remove unwanted ldflag: Back 02configure.patch (closes: #286450)
+ * Move fr/cups-config.1 to libcupsys2-dev (closes: #286449)
+ Thanks for your above two bug reports, Henrique.
+ * Note: [CAN-2004-1125] "xpdf buffer overflows" is already fixed in
+ previous Debian revision (1.1.22-2) with upstream patch.
+
+ -- Kenshi Muto Sat, 25 Dec 2004 23:40:15 +0900
+
+cupsys (1.1.22-2) unstable; urgency=medium
+
+ * Apply security fix patches from 1.1.23rc1.
+ * Revert logrotate to use 'reload'. (closes: #271872)
+
+ -- Kenshi Muto Sun, 19 Dec 2004 17:43:10 +0900
+
+cupsys (1.1.22-1) unstable; urgency=low
+
+ * New upstream release for unstable. Time is over, sarge isn't shipped.
+ I checked 1.1.21 to 1.1.22 migration doesn't break ABI quickly,
+ but I'm still scared...
+ * Apply gcc-4.0 patch for amd64: 37gfxfont.patch (closes: #285601)
+ * Do 'restart' instead of 'reload' when log is rotated.
+ 'reload' sometime causes just shutdown daemon. (Unknown problem)
+ * Fix equation in cupsys.postscript. (closes: #285205)
+ * Apply Russell's patch: 38httpwait.patch (closes: #284829)
+ (This is trial. If there is any grave problem by this, I'll off this
+ patch)
+ - Made http_wait() handle EINTR. This bug was causing cups
+ to print multiple copies of reports on remote printers.
+ - Lengthed the wait in ipp_http_read to handle connections
+ running over the internet. The short wait was causing
+ unwated multiple copies of reports to be printed.
+ - While both these bugs need to be fixed, neither completely
+ solves the original multiple copies problem. To solve
+ that no data should be printed if there was a read error.
+ * Add dependency version of smbclient. (closes: #284733)
+ * Fix SIGSEGV when remote destination goes timeout: 39remotetimeout.patch
+ (closes: #283500)
+
+ -- Kenshi Muto Wed, 15 Dec 2004 18:58:55 +0900
+
+cupsys (1.1.22-0.experimental4) experimental; urgency=low
+
+ * "I'm tired waiting Sarge forever" release.
+ I'm considering to upload 1.1.22 to unstable.
+ * I forgot to copy files from unstable version... FTBFS is solved.
+ (closes: #284574)
+ * Downgrade gs-esp dependency to Recommends.
+ I'm bore with attacks from stingy people.
+
+ -- Kenshi Muto Tue, 7 Dec 2004 21:39:55 +0900
+
+cupsys (1.1.22-0.experimental3) experimental; urgency=low
+
+ * Rebuild with -sa.
+
+ -- Kenshi Muto Tue, 7 Dec 2004 00:52:15 +0900
+
+cupsys (1.1.22-0.experimental2) experimental; urgency=low
+
+ * New upstream release
+
+ -- Kenshi Muto Mon, 6 Dec 2004 23:10:18 +0900
+
+cupsys (1.1.21-0.experimental2) experimental; urgency=low
+
+ * Fix typo in templates and unfuzzied po files. (closes: Bug#274851)
+ * Update German translation (closes: Bug#274828)
+ * Make pam.d/cupsys standard @include style (closes: Bug#265299)
+ * Set up group lpadmin in postinst instead of rules.
+ Because lpadmin isn't there on initial build environemnt
+ (closes: Bug#274985)
+
+ -- Kenshi Muto Mon, 4 Oct 2004 23:09:51 +0900
+
+cupsys (1.1.21-0.experimental1) experimental; urgency=low
+
+ * Experimental.
+ * new upstream version.
+
+ -- Kenshi Muto Sun, 3 Oct 2004 18:15:23 +0900
+
+cupsys (1.1.20final+rc1-10ubuntu8) hoary; urgency=low
+
+ * debian/patches patches patching debian/. sigh.
+
+ -- LaMont Jones Tue, 4 Jan 2005 09:29:48 -0700
+
+cupsys (1.1.20final+rc1-10ubuntu7) hoary; urgency=low
+
+ * Ignore errors on the stop phase of restart. Closes: warty#4504
+
+ -- LaMont Jones Mon, 3 Jan 2005 20:10:54 -0700
+
+cupsys (1.1.20final+rc1-10ubuntu6) hoary; urgency=low
+
+ * SECURITY UPDATE: fixed multiple buffer overflows
+ * Added patch 39CAN-2004-1125.patch:
+ - cupsys contains code from xpdf, therefore CAN-2004-1125 applies, too.
+ - References:
+ CAN-2004-1125
+ http://www.idefense.com/application/poi/display?id=172
+ * Added patch 40CAN-2004-1267.patch:
+ - filter/hpgl-input.c, ParseCommand(): Prevent reading an arbitrary string
+ into statically sized buffer "buf"; clip string if necessary.
+ - patch taken from http://www.cups.org/str.php?L1024+P0+S-2+C0+I0+E0+Qhpgl
+ - Thanks to Ariel Berkman for spotting this.
+ - References:
+ CAN-2004-1267
+ http://tigger.uic.edu/~jlongs2/holes/cups.txt
+ * Added patch 41CAN-2004-1268+1269+1270.patch: fix several vulns in
+ systemv/lppasswd.c:
+ - Check return value of fputs() and fprintf() when writing to the new
+ password file. When ignoring them, an user can truncate the new passwd
+ file by filling up the disk at the right moment. Now unlink the file on
+ error and print out a message.
+ - If the passwd.new file reaches the maximum file size system limit, the
+ new file was not deleted, thus lppasswd could not be used again. Now
+ ignores all relevant signals and unlinks the new file on write error.
+ - Check that the output file is not stdin, stdout, or stderr; otherwise
+ error messages would be written into the output file which would destroy
+ it.
+ - Thanks to Bartlomiej Sieka for spotting this.
+ - References:
+ CAN-2004-1268
+ CAN-2004-1269
+ CAN-2004-1270
+ http://tigger.uic.edu/~jlongs2/holes/cups2.txt
+
+ -- Martin Pitt Thu, 23 Dec 2004 11:18:50 +0100
+
+cupsys (1.1.20final+rc1-10ubuntu5) hoary; urgency=low
+
+ * Start cupsys using its -F switch and explicitly background it with
+ start-stop-daemon; this shaves seconds off the boot process.
+ * Rename debian/patches/ubuntu-runlevel-12.patch to
+ ubuntu-runlevel-19.patch, moving the start point from 12 to 19 and
+ migrating users who were at both 20 and 12.
+
+ -- Scott James Remnant Thu, 9 Dec 2004 09:28:35 +0100
+
+cupsys (1.1.20final+rc1-10ubuntu4) hoary; urgency=low
+
+ * Unbreak debian/patches/ubuntu-nowebadmin.patch, so that it does not create
+ other patches in debian/patches (jp-nowebadmin.patch moved to
+ debian/local), or .orig files.
+ * Add debian/patches/ubuntu-runlevel-12.patch, which moves the runlevel of
+ the init script to 12, and performs the migration accordingly.
+
+ -- Daniel Stone Mon, 6 Dec 2004 17:30:45 +0100
+
+cupsys (1.1.20final+rc1-10ubuntu3) hoary; urgency=low
+
+ * SECURITY: still CAN-2004-0888. Updated patch 36pdftopsoverflow.patch:
+ - pdftops/gmem.[ch]: change declarations of gmalloc and grealloc to use size_t
+ instead of int; int truncated sizes to 32 bits, which made xpdf still
+ vulnerable to integer (and eventually buffer) overflow attacks on 64 bit
+ platforms like amd64.
+ - pdftops/Xref.cxx: fix several unchecked negative integer conditions
+ * Thanks to Marcus Meissner for providing the patches.
+
+ -- Martin Pitt Mon, 1 Nov 2004 14:37:58 +0100
+
+cupsys (1.1.20final+rc1-10ubuntu2) hoary; urgency=low
+
+ * Fixed debian/patches/ubuntu-localports.patch: do not comment out the
+ 'Listen' statement (Warty bug #3009).
+
+ -- Martin Pitt Fri, 29 Oct 2004 08:50:56 +0200
+
+cupsys (1.1.20final+rc1-10ubuntu1) hoary; urgency=low
+
+ * Resynchronized to Debian
+ * Now keep all Ubuntu specific modification as patches prefixed with
+ "ubuntu-" to ease further merges:
+ - ubuntu-auxgroups: allow cupsd to run in auxilliary groups
+ - ubuntu-init.d: pretty initscript, make /usr/share/cups/model
+ lpadmin-writeable to install custom printer drivers
+ - ubuntu-localports: listen on localhost port only by default
+ - ubuntu-logrotate: use 'restart', not 'reload' to restart cupsd after log
+ rotation (reload does not exist any more)
+ - ubuntu-nowebadmin: display a red warning on the web interface that
+ administrative functions are disabled for security reasons
+ - ubuntu-runasuser: do not run as 'root', but as 'cupsys' by default
+ * Ubuntu-specific debian/rules (can't be patched):
+ - configure with --with-cups-user=cupsys
+ - apply patch debian/patches/ja-nowebadmin.ptch (must be done after
+ uudecoding ja.tar.gz.uu)
+
+ -- Martin Pitt Thu, 28 Oct 2004 23:56:54 +0200
+
+cupsys (1.1.20final+rc1-8) unstable; urgency=medium
+
+ * Apply GNU Hurd configure patch for fix FTBFS. (closes: Bug#274599)
+ * Improve patch test routine. (closes: Bug#272952, Bug#274564)
+
+ -- Kenshi Muto Sun, 3 Oct 2004 13:07:43 +0900
+
+cupsys (1.1.20final+rc1-7) unstable; urgency=medium
+
+ * Fix french debconf translation (closes: Bug#272520).
+ This update is important because previous version shows
+ illegal debconf choice in French.
+
+ -- Kenshi Muto Tue, 21 Sep 2004 22:31:54 +0900
+
+cupsys (1.1.20final+rc1-6) unstable; urgency=high
+
+ * Applied patch from Alvaro Martinez Echevarria to fix
+ daniel of service [scheduler/dirsvc.c, CAN-2004-0558]
+ * Apply GNU/Hurd patch (closes: Bug#263526)
+ * Update pt_PR debconf translation (closes: Bug#264096)
+ * Remove directory before making symlink (closes: Bug#270741)
+
+ -- Kenshi Muto Tue, 24 Aug 2004 10:31:32 +0900
+
+cupsys (1.1.20final+rc1-5) unstable; urgency=low
+
+ * Apply anonymous patch for /jobs. This patch avoids many
+ client-error-forbidden. (closes: Bug#184361)
+ cupsd.conf will be automatically modified to use basic user
+ authentication (Add AuthType Basic
+ AuthType User).
+
+ -- Kenshi Muto Wed, 4 Aug 2004 09:13:02 +0900
+
+cupsys (1.1.20final+rc1-4) unstable; urgency=medium
+
+ * Wait 10 seconds after reload for samba restart problem.
+ (closes: Bug#260969)
+ * Update Czech debconf translation (closes: Bug#260862)
+ * Built against libtiff4.
+ * Build against libgnutls11. (Though package name is still
+ libcupsys2-gnutls10)
+
+ -- Kenshi Muto Mon, 26 Jul 2004 22:12:18 +0900
+
+cupsys (1.1.20final+rc1-3) unstable; urgency=high
+
+ * Change guess order of USB device name for FHS compliant.
+ (closes: Bug#259965)
+
+ -- Kenshi Muto Sun, 18 Jul 2004 04:54:58 +0900
+
+cupsys (1.1.20final+rc1-2) unstable; urgency=medium
+
+ * Replace set-as-default icon of Japanese. Thanks Tomo-p.
+ * Provides libcupsys2 dummy package for smooth transition. (closes: #259378)
+
+ -- Kenshi Muto Wed, 14 Jul 2004 19:10:43 +0900
+
+cupsys (1.1.20final+rc1-1) unstable; urgency=low
+
+ * Apply a patch for fixing typo in DE templates. (Closes: Bug#250883)
+ * New upstream source, 2004-07-03 CVS.
+ * Add netbase dependency for cupsys-bsd.
+ * Move certs files to /var/lib/cups/certs. (Closes: Bug#254153)
+
+ -- Kenshi Muto Wed, 26 May 2004 08:46:35 +0900
+
+cupsys (1.1.20final+cvs20040330-4) unstable; urgency=medium
+
+ * Now libgnutls10 migration starts at 'unstable'/'testing'.
+ Packages depending libcupsys2 should be rebuit with newer
+ libcupsys2-dev.
+ * Fix log rotation problem by adding 'sharedscripts' to
+ /etc/logrotate.d/cupsys. (Closes: Bug#249023)
+
+ -- Kenshi Muto Tue, 25 May 2004 08:14:44 +0900
+
+cupsys (1.1.20final+cvs20040330-3experimental2) experimental; urgency=medium
+
+ * Rename libcupsys2 to libcupsys2-gnutls10.
+ This package doesn't 'Provides: libcupsys2' to migrate libgnutls10.
+ Sebastien Bacher plans cups/libgnutls10 migration.
+ * Add notes about backend configuration to README.Debian.
+ * Fix (I hope) log rotation problem by adding sharedscripts to
+ /etc/logrotate.d/cupsys. (Closes: Bug#249024)
+
+ -- Kenshi Muto Sat, 15 May 2004 11:17:16 +0900
+
+cupsys (1.1.20final+cvs20040330-3) unstable; urgency=low
+
+ * Remove EXPORT_SSLLIBS variable from cups-config (Closes: Bug#246102).
+ -lgnutls isn't necessary by software using libcups.
+ * Apply PJL detection patch from upstream.
+ * Translations
+ - Updated Turkish debconf messages (Closes: Bug#246075). Thanks
+ Recai and Gurkan.
+
+ -- Kenshi Muto Wed, 28 Apr 2004 00:23:59 +0900
+
+cupsys (1.1.20final+cvs20040330-2) unstable; urgency=low
+
+ * Fix typo in HOWTO_BUGREPORT.txt.
+ * Translations
+ - Update Dutch debconf messages (Closes: Bug#242260). Thanks Tim.
+
+ -- Kenshi Muto Tue, 6 Apr 2004 19:16:48 +0900
+
+cupsys (1.1.20final+cvs20040330-1) unstable; urgency=low
+
+ * New upstream CVS
+ * Revert pstops to old 1.1.20. (Closes: Bug#240792)
+ * Translations
+ - Updated Danish debconf messages.
+
+ -- Kenshi Muto Fri, 26 Mar 2004 19:00:01 +0900
+
+cupsys (1.1.20final+cvs20040317-4) unstable; urgency=low
+
+ * Chagnge backend question priority to low. (Closes: Bug#238847)
+ When you use PPC, parallel backend will be removed from default choice
+ automatically.
+ If you want to use parallel (and you know what you will do),
+ please run 'dpkg-reconfigure cupsys'.
+ * Translations
+ - Updated Danish debconf messages (Closes: Bug#239256). Thanks Claus.
+ - Updated French debconf messages (Closes: Bug#239756). Thanks Christian.
+
+ -- Kenshi Muto Wed, 24 Mar 2004 22:30:28 +0900
+
+cupsys (1.1.20final+cvs20040317-3) unstable; urgency=low
+
+ * Remove sysvinit. This package is essential. Thanks Thomas.
+ * Now choice menu is translatable (Closes: Bug#238821).
+ * Updated French debconf messages. Thanks Christian.
+ * Add socket to default choice. I think this backend doesn't
+ cause hang up anywhere.
+
+ -- Kenshi Muto Fri, 19 Mar 2004 17:16:48 +0900
+
+cupsys (1.1.20final+cvs20040317-2) unstable; urgency=medium
+
+ * Add sysvinit in dependency. (Closes: Bug#238763)
+ * Updated Brazilian Portuguese debconf messages. Thanks Andre.
+ * Fix printers.cgi crash (Closes: Bug#238800)
+ * Updated Japanese templates & images.
+
+ -- Kenshi Muto Fri, 19 Mar 2004 09:00:04 +0900
+
+cupsys (1.1.20final+cvs20040317-1) unstable; urgency=low
+
+ * New CVS release.
+ * Add asking about backend program. This is not best way to solve
+ PPC crash / i386 serial hang-up, but at least user can choose what
+ he/she want to use. serial backend becomes 'not use' by default.
+ Add notice about 'parallel of PPC may cause a problem'.
+ (closes: Bug#237613, Bug#233529, Bug#211677, Bug#224760)
+ * Updated Spanish debconf messages (closes: Bug#236470). Thanks Carlos.
+ * Updated Danish debconf messages. Thanks Claus.
+ * Updated French debconf messages. Thanks Christian.
+ * Updated Czech debconf messages. Thanks Miroslav.
+
+ -- Kenshi Muto Sat, 6 Mar 2004 21:36:35 +0900
+
+cupsys (1.1.20final-16) unstable; urgency=low
+
+ * Improved init.d/cupsys message (closes: Bug#235693). Thanks Lee.
+ * Add Czech debconf messages (closes: Bug#236276). Thanks Miroslav.
+
+ -- Kenshi Muto Tue, 2 Mar 2004 09:13:07 +0900
+
+cupsys (1.1.20final-15) unstable; urgency=low
+
+ * Add conflicts lprng for avoid conflicting ipp support.
+ * Add Danish debconf messages (closes: Bug#233067). Thanks Claus.
+ * Apply current CVS patch.
+
+ -- Kenshi Muto Sat, 14 Feb 2004 18:10:54 +0900
+
+cupsys (1.1.20final-14) unstable; urgency=medium
+
+ * Apply loop avoid patch. (closes: Bug#231676) Thanks Ray.
+
+ -- Kenshi Muto Wed, 11 Feb 2004 14:59:46 +0900
+
+cupsys (1.1.20final-13) unstable; urgency=medium
+
+ * Use pidof instead of start-stop-daemon for stopping cupsys.
+ I hope this will fix Bug#228967.
+
+ -- Kenshi Muto Thu, 22 Jan 2004 09:12:25 +0900
+
+cupsys (1.1.20final-12) unstable; urgency=low
+
+ * Fix incorrect root detection routine (closes: Bug#227733). THanks David.
+ * Continue to install whether deluser is failed (for NIS/LDAP).
+ * 22ipprewrite.patch has critical bug. Fixed by better patch.
+ (closes: Bug#162613)
+
+ -- Kenshi Muto Sat, 17 Jan 2004 12:57:47 +0900
+
+cupsys (1.1.20final-11) unstable; urgency=low
+
+ * Improved cupsys stop check.
+ * Apply username patch for Solaris lpd printing (closes: Bug#228078). Thanks
+ Lionel.
+
+ -- Kenshi Muto Sat, 17 Jan 2004 12:28:15 +0900
+
+cupsys (1.1.20final-10) unstable; urgency=low
+
+ * Apply Brazilian Portuguese debconf message (closes: Bug#227445). Thanks
+ Andre.
+ * Show verbose message when cups won't stop.
+
+ -- Kenshi Muto Wed, 14 Jan 2004 08:38:55 +0900
+
+cupsys (1.1.20final-9) unstable; urgency=low
+
+ * Apply patch for avoid infinite loop (closes: Bug#225625).
+ * Apply patch for http password authenticaion cache (closes: Bug#227143).
+
+ -- Kenshi Muto Mon, 12 Jan 2004 12:00:17 +0900
+
+cupsys (1.1.20final-8) unstable; urgency=low
+
+ * Fix typo in lpadmin.8.gz (one of Bug#226149). Thanks Dan.
+ * Unfortunately, I heard cupsys won't stop when upgrading.
+ I implemented Force-stop routine into postinst (closes: Bug#222464,
+ Bug#226140).
+
+ -- Kenshi Muto Mon, 5 Jan 2004 21:11:30 +0900
+
+cupsys (1.1.20final-7) unstable; urgency=low
+
+ * Argh, I forgot to apply default port patch.
+
+ -- Kenshi Muto Tue, 30 Dec 2003 23:01:29 +0900
+
+cupsys (1.1.20final-6) unstable; urgency=low
+
+ * Apply Dutch debconf translation (closes: Bug#225410). Thanks Tim.
+ * Set default port when any Port/Listen isn't defined (closes: Bug#225208).
+
+ -- Kenshi Muto Tue, 30 Dec 2003 08:57:10 +0900
+
+cupsys (1.1.20final-5) unstable; urgency=low
+
+ * Add pdftops.conf into /etc/cups/. This file is symlink to
+ /etc/xpdf/xpdfrc, and configuration for pdftops tool.
+
+ -- Kenshi Muto Sun, 21 Dec 2003 11:45:38 +0900
+
+cupsys (1.1.20final-4) unstable; urgency=low
+
+ * Fix cups* commands don't work (closes: Bug#224585). Thanks Rainer.
+
+ -- Kenshi Muto Sat, 20 Dec 2003 20:52:24 +0900
+
+cupsys (1.1.20final-3) unstable; urgency=low
+
+ * Apply patch into lpd.c for true compatible with RFC1179
+ (closes: Bug#223432). Thanks Lionel.
+ * Hmm, PJL patch causes a problem. Since I don't have any PJL
+ printers, I simply unapply PJL patch and reopen Bug#220611 (closes:
+ Bug#223748)
+
+ -- Kenshi Muto Fri, 12 Dec 2003 18:32:58 +0900
+
+cupsys (1.1.20final-2) unstable; urgency=low
+
+ * Apply PJL patch (closes: Bug#220611). Thanks Zed.
+
+ -- Kenshi Muto Sat, 6 Dec 2003 10:42:37 +0900
+
+cupsys (1.1.20final-1) unstable; urgency=low
+
+ * New upstream release
+ * cupsys set UTF-8 as defaultCharset, but it causes some browsing
+ problem, and looks don't need indeed. I changed defaultCharset to
+ invalid value. It will fix French screen (closes: Bug#221904).
+ * Fix dependency with libgnutls7 by dirty trick.
+ I hope libgnutls7 maintainer will fix Bug#221309.
+
+ -- Kenshi Muto Tue, 25 Nov 2003 19:17:57 +0900
+
+cupsys (1.1.20candidate6-6) unstable; urgency=low
+
+ * Set fixed version into Depends for cupsys, cupsys-client.
+
+ -- Kenshi Muto Mon, 17 Nov 2003 21:35:55 +0900
+
+cupsys (1.1.20candidate6-5) unstable; urgency=high
+
+ * I'm sorry but openssl license conflicts. I use libgnutls (closes: Bug#220902).
+ * Add euc-jp text.
+
+ -- Kenshi Muto Sat, 15 Nov 2003 23:55:06 +0900
+
+cupsys (1.1.20candidate6-4) unstable; urgency=low
+
+ * Add French translation (closes: Bug#220805). Thanks, Christian.
+ * openssl, popular SSL implementation, becomes Debian main, so I think
+ it is no reason for using libgnutls. I changed depends openssl instead of
+ libgnutls.
+
+ -- Kenshi Muto Sat, 15 Nov 2003 10:24:38 +0900
+
+cupsys (1.1.20candidate6-3) unstable; urgency=low
+
+ * Remove -Wl from configure (closes: Bug#194353)
+ * Remove /etc/sups/raw.* when purged (closes: Bug#198126)
+ * Remove always Content-Type charset header. This is test (and ad-hoc)
+ case. I'll unapply if this patch causes a problem.
+ * Add Japanese resource.
+
+ -- Kenshi Muto Thu, 13 Nov 2003 23:02:40 +0900
+
+cupsys (1.1.20candidate6-2) unstable; urgency=medium
+
+ * Fix FTBFS build error (closes: Bug#220534)
+
+ -- Kenshi Muto Thu, 13 Nov 2003 15:52:00 +0900
+
+cupsys (1.1.20candidate6-1) unstable; urgency=low
+
+ * New upstream.
+ * Rename filter, backend man page (closes: Bug#220500).
+
+ -- Kenshi Muto Wed, 12 Nov 2003 23:41:02 +0900
+
+cupsys (1.1.19final-4) unstable; urgency=low
+
+ * "Welcome patch" release.
+ * Transited packaging system to CDBS.
+ This release wll be final version for 1.1.19. I'll upload
+ 1.1.20candidate version at next time.
+ * libcupsimage2.so.2 links libcupsys.so.2. (closes: Bug#193618)
+
+ -- Kenshi Muto Mon, 10 Nov 2003 10:01:58 +0900
+
+cupsys (1.1.19final-3) unstable; urgency=low
+
+ * Fix check routine of Printcap. (closes: Bug#200278)
+ * Removed "suggests qtcups". (closes: Bug#197267)
+
+ -- Kenshi Muto Fri, 7 Nov 2003 21:43:39 +0900
+
+cupsys (1.1.19final-2) unstable; urgency=low
+
+ * lpadmin group included root user, but I didn't understand why it needs.
+ This may cause security problem, so I remove this process and
+ remove root from lpadmin group. (closes: Bug#214746)
+ * Support large file. (closes: Bug#215568)
+ * Support log rotation. (closes: Bug#200704)
+ * Force enable PAM (closes: Bug#183211, Bug#181512)
+
+ -- Kenshi Muto Thu, 6 Nov 2003 18:31:02 +0900
+
+cupsys (1.1.19final-1.5) unstable; urgency=low
+
+ * New maintainer (acknowledged from Jeff Licquia).
+ Thanks Jeff!
+ * Changed templates.* to po-debconf style (closes: Bug#199236).
+ * Added Japanese debconf translation (closes: Bug#202273).
+
+ -- Kenshi Muto Thu, 6 Nov 2003 09:50:29 +0900
+
+cupsys (1.1.19final-1.4) unstable; urgency=low
+
+ * Non-maintainer upload
+ * Removed '#include ' line from image.h from the version
+ in libcupsimage2-dev with debian/image.h.patch (Closes: #200427)
+
+ -- Roland Stigge Thu, 4 Sep 2003 14:04:15 +0200
+
+cupsys (1.1.19final-1.3) unstable; urgency=low
+
+ * Non-maintainer upload
+ * cupsys Replaces: and Conflicts: cupsys-pstoraster (Closes: #206547)
+ NOTE: the Conflicts: was made versioned (<< 2) not to Conflict
+ with gs-esp which provides cupsys-pstoraster.
+ * Build-Depends: libpam0g-dev (new) instead of libpam-dev (removed from
+ archive)
+
+ -- Roland Stigge Wed, 3 Sep 2003 19:33:09 +0200
+
+cupsys (1.1.19final-1.2) unstable; urgency=low
+
+ * NMU.
+ * Completely remove dependency on libgnutls5-dev.
+
+ -- Robin Verduijn Wed, 27 Aug 2003 18:08:50 -0100
+
+cupsys (1.1.19final-1.1) unstable; urgency=low
+
+ * NMU.
+ * Built against libgnutls7-dev instead of (obsolete) libgnutls5-dev.
+ Closes: #203059.
+
+ -- Robin Verduijn Tue, 26 Aug 2003 19:28:21 -0100
+
+cupsys (1.1.19final-1) unstable; urgency=high
+
+ * New upstream final release. DoS attack fixed; thus the urgency.
+ * Rebuilt with the latest libpng-dev, and fixed the explicit deps
+ in the control file.
+ * Removed rpath statment from output of cups-config --ldflags.
+ Closes: #194262.
+
+ -- Jeff Licquia Thu, 29 May 2003 20:44:48 -0500
+
+cupsys (1.1.19candidate4-1) unstable; urgency=low
+
+ * New upstream release candidate.
+ * Includes upstream fix to the problem with 100% CPU consumption.
+ Closes: #189795.
+ * Added a dh_makeshlibs call for libcupsimage2.
+ * Made libcupsys2 conflict with cupsys-driver-gimpprint versions
+ built before the libcupsimage split. Closes: #189175.
+ * Move /etc/printcap.cups to /var/run/cups/printcap, since it's
+ generated and non-editable. Also, take care of the /etc/printcap
+ symlink. Closes: #187954.
+ * Per suggestion from the KDE project, suggest the kdeprint package
+ instead of the kdelibs3-cups package.
+
+ -- Jeff Licquia Sat, 10 May 2003 13:05:33 -0500
+
+cupsys (1.1.19candidate1-3) unstable; urgency=low
+
+ * Make libcupsys2 conflict with gs-esp versions built before the
+ libcupsimage split. This is part of the fix for bug 189175.
+ * Add a dep on libgnutls-dev for libcupsys2-dev. Closes: #190877.
+
+ -- Jeff Licquia Mon, 28 Apr 2003 10:57:03 -0500
+
+cupsys (1.1.19candidate1-2) unstable; urgency=low
+
+ * Set Replaces: on cupsys-client to cover the move of the
+ French man page for cupstestppd. Closes: #189737, #190042.
+ * Add cupsys-pt and xpp to Suggests for cupsys-client.
+ Closes: #168399, #170929.
+ * Added some more example filters: mailto and pstopdf.
+ Closes: #152001.
+ * Pass --system to addgroup when adding the lpadmin group.
+ Closes: #189835.
+ * Set section for the -dev packages to "libdevel".
+ * Fix shlibs files for libcupsys2 and libcupsimage2 to reference
+ the right package versions. Closes: #174391.
+
+ -- Jeff Licquia Tue, 22 Apr 2003 14:27:43 -0500
+
+cupsys (1.1.19candidate1-1) unstable; urgency=low
+
+ * New upstream version. I will try to follow upstream's new
+ release policy by uploading release candidate versions to
+ unstable.
+ * Wrote a new GNU TLS patch, which was accepted by upstream.
+ Re-enable SSL support based on this.
+ * Based on recent upstream work, wrote a libpaper patch which has
+ also been accepted upstream. Closes: #60035, #88597, #101591.
+ * Upstream fix included to allow SLP-only browsing support to work.
+ Closes: #178380.
+ * Updated the Spanish debconf template for cupsys-bsd.
+ Closes: #167171.
+ * Added cupstestppd to cupsys-client. Closes: #176941.
+ * Don't respect TMPDIR if we don't have write permissions to that
+ directory. Closes: #176725.
+
+ -- Jeff Licquia Sat, 12 Apr 2003 14:36:20 -0500
+
+cupsys (1.1.18-3) unstable; urgency=low
+
+ * Split libcupsimage into its own package. Closes: #187897.
+ * Added versioned build-dep on debhelper >= 2.
+
+ -- Jeff Licquia Tue, 8 Apr 2003 02:59:57 -0500
+
+cupsys (1.1.18-2) unstable; urgency=high
+
+ * Disable SSL again. Inexplicably, the GNU TLS people put the
+ OpenSSL compatibility layer under the GPL, not the LGPL.
+ This forces the effective license on libcupsys2 to GPL, which
+ I'm not comfortable with. The urgency reflects possible
+ license conflicts for apps that link to libcupsys2.
+ Closes: #168056.
+ * Add a debconf question to ask whether unrecognized
+ application/octet-stream jobs should be printed as raw jobs.
+ * Forward-port some of the security fixes from woody.
+ * Set the default group for lppasswd to "lpadmin", in keeping
+ with the default in cupsd. Closes: #172842.
+ * Replaced the conflict with manpages-fr, versioned this time
+ to allow for easy upgrades. Also added a Replaces entry for
+ it.
+
+ -- Jeff Licquia Sun, 5 Jan 2003 23:36:50 -0500
+
+cupsys (1.1.18-1) unstable; urgency=high
+
+ * New upstream version. This is a security update for problems that
+ include remote root exploits - thus the urgency.
+ * Remove the conflict with manpages-fr per reports that the offending
+ files are now all gone. Closes: #158500.
+
+ -- Jeff Licquia Fri, 20 Dec 2002 03:27:18 -0500
+
+cupsys (1.1.16-4) unstable; urgency=low
+
+ * Documentation updates.
+ * Change the GNU TLS patch to more explicitly control which SSL
+ library is linked to, and support switching SSL libraries in
+ the build. By default, the package will not use OpenSSL, so
+ autobuilders won't accidentally build it that way.
+ Closes: #167489.
+ * Add libgnutls-dev to the Dependencies for libcupsys2-dev.
+ * Set the proper permissions on cupsys-client man pages.
+
+ -- Jeff Licquia Sat, 9 Nov 2002 16:39:54 -0500
+
+cupsys (1.1.16-3) unstable; urgency=low
+
+ * Totally nuke all script modifications for dh_installinit; do it
+ all manually instead. Closes: #166878.
+
+ -- Jeff Licquia Tue, 29 Oct 2002 23:06:20 -0500
+
+cupsys (1.1.16-2) unstable; urgency=low
+
+ * Add libpam-dev to Build-Depends. Closes: #166556.
+ * Update clean target in debian/rules to clean a few more files
+ that are missed by the Makefiles.
+ * Remove SFont.cxx and T1Font.cxx from the pdftops Makefile;
+ these two files aren't needed, and including them would pull
+ in a build dep on xlibs-dev, which is bad news. Closes: #166716.
+ * Tell dh_installdocs to not mess with the postinst/prerm, so
+ the compatibility symlinks aren't created.
+
+ -- Jeff Licquia Tue, 29 Oct 2002 00:45:38 -0500
+
+cupsys (1.1.16-1) unstable; urgency=low
+
+ * New upstream version... Closes: #165631.
+ * ...which includes bugfixes to several BSD utilities to avoid
+ segfaulting when certain options are misused. Closes: #159597.
+ * Add upstream patch to scheduler that fixes certain printer
+ operations in the web interface.
+ * Re-enabled SSL support using the OpenSSL compatibility library
+ in libgnutls. Closes: #150600.
+ * Use our own logic for stopping/restarting cupsd on upgrade,
+ instead of relying on dh_installinit. Closes: #160345, #164435.
+ * Make cupsys-client Recommend cupsys-bsd. Closes: #157974.
+ * Make sure we remove everything in /var/spool/cups on purge.
+ Closes: #163571.
+ * Make force-reload send SIGHUP, since policy prefers that mode
+ of operation.
+ * Add dependencies for libcupsys2-dev on the image libraries we
+ need. Closes: #166451.
+
+ -- Jeff Licquia