summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2020-11-06 15:21:54 +0100
committerDidier Raboud <odyx@debian.org>2020-11-06 15:21:54 +0100
commit78de01c02f29667be6c46a7afd212baa6d04ea80 (patch)
treed7cd973eb31da05c09f53a274d7cc51dadb10f08
parent3a01c445b867d3fdde637f1be76c20f93b17330f (diff)
Commit patch queue (exported by git-debrebase)
[git-debrebase make-patches: export and commit patches]
-rw-r--r--debian/patches/0001-Fix-jobs-with-multiple-files-or-multiple-formats.patch27
-rw-r--r--debian/patches/0002-Tests-Ignore-warnings-from-colord-and-Avahi.patch28
-rw-r--r--debian/patches/0003-Tests-ignore-errors-triggered-on-ipv6-deprived-hosts.patch25
-rw-r--r--debian/patches/0004-Tests-Do-not-run-the-CUPS_EUC_JP-test-case-on-BSD-Hu.patch24
-rw-r--r--debian/patches/0005-Tests-Make-sure-that-all-scheduled-jobs-are-finished.patch28
-rw-r--r--debian/patches/0006-Tests-Force-LC_-environment-variables-when-testing-n.patch31
-rw-r--r--debian/patches/0007-Tests-Use-127.0.0.1-instead-of-localhost-to-help-pbu.patch64
-rw-r--r--debian/patches/0008-Tests-Force-LC_ALL-C-environment-variable-when-grepp.patch24
-rw-r--r--debian/patches/0009-Tests-Do-not-test-pdftourf.patch68
-rw-r--r--debian/patches/0010-Move-cupsd.conf.default-from-SERVERROOT-to-DATADIR.patch62
-rw-r--r--debian/patches/0011-Patch-to-support-Apple-AirPrint-printing-from-iPhone.patch91
-rw-r--r--debian/patches/0012-CUPS-removes-the-recommended-comments-of-the-NickNam.patch39
-rw-r--r--debian/patches/0013-Make-log-files-readable-to-group-adm-if-present.patch60
-rw-r--r--debian/patches/0014-Deactivate-CUPS-own-log-rotating-as-the-system-alrea.patch25
-rw-r--r--debian/patches/0015-Do-not-mess-with-the-permissions-of-cupsd.conf.patch26
-rw-r--r--debian/patches/0016-Show-compile-command-lines.patch21
-rw-r--r--debian/patches/0017-Set-the-default-for-SyncOnClose-to-Yes.patch64
-rw-r--r--debian/patches/0018-Set-default-job-error-policy-to-retry-job.patch73
-rw-r--r--debian/patches/0019-Drop-dangling-references-from-cups-lpd.man.patch24
-rw-r--r--debian/patches/0020-Use-dpkg-architecture-in-cups-config-to-make-it-arch.patch49
-rw-r--r--debian/patches/0021-Make-lpoptions-list-a-printer-s-options-correctly-al.patch29
-rw-r--r--debian/patches/0022-Fix-fax-numbers-supplied-via-GTK-print-dialog-removi.patch86
-rw-r--r--debian/patches/0023-Let-the-rastertopwg-filter-check-rounding-errors-whe.patch77
-rw-r--r--debian/patches/0024-Build-mantohtml-with-the-build-architecture-compiler.patch110
-rw-r--r--debian/patches/0025-po4a-infrastructure-and-translations-for-manpages.patch342
-rw-r--r--debian/patches/series25
26 files changed, 1522 insertions, 0 deletions
diff --git a/debian/patches/0001-Fix-jobs-with-multiple-files-or-multiple-formats.patch b/debian/patches/0001-Fix-jobs-with-multiple-files-or-multiple-formats.patch
new file mode 100644
index 000000000..c62b4b5ea
--- /dev/null
+++ b/debian/patches/0001-Fix-jobs-with-multiple-files-or-multiple-formats.patch
@@ -0,0 +1,27 @@
+From: Tim Waugh <twaugh@redhat.com>
+Date: Tue, 9 Aug 2016 18:11:07 +0200
+Subject: Fix jobs with multiple files or multiple formats
+
+Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=972242
+Bug: https://github.com/apple/cups/issues/4348
+Patch-Name: fixes-for-jobs-with-multiple-files-and-multiple-formats.patch
+---
+ backend/ipp.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/backend/ipp.c b/backend/ipp.c
+index 35c0711..a4039ba 100644
+--- a/backend/ipp.c
++++ b/backend/ipp.c
+@@ -1804,7 +1804,10 @@ main(int argc, /* I - Number of command-line args */
+ ippAddBoolean(request, IPP_TAG_OPERATION, "last-document",
+ (i + 1) >= num_files);
+
+- if (document_format)
++ if (num_files > 1)
++ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
++ "document-format", NULL, "application/octet-stream");
++ else if (document_format)
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
+ "document-format", NULL, document_format);
+
diff --git a/debian/patches/0002-Tests-Ignore-warnings-from-colord-and-Avahi.patch b/debian/patches/0002-Tests-Ignore-warnings-from-colord-and-Avahi.patch
new file mode 100644
index 000000000..a0c55e473
--- /dev/null
+++ b/debian/patches/0002-Tests-Ignore-warnings-from-colord-and-Avahi.patch
@@ -0,0 +1,28 @@
+From: Martin Pitt <mpitt@debian.org>
+Date: Tue, 9 Aug 2016 18:11:09 +0200
+Subject: Tests: Ignore warnings from colord and Avahi
+
+These warnings change the expected number of warnings
+
+Patch-Name: tests-ignore-warnings.patch
+---
+ test/run-stp-tests.sh | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
+index 2f9630f..a601581 100755
+--- a/test/run-stp-tests.sh
++++ b/test/run-stp-tests.sh
+@@ -1040,7 +1040,11 @@ else
+ fi
+
+ # Warning log messages
+-count=`$GREP '^W ' $BASE/log/error_log | $GREP -v CreateProfile | wc -l | awk '{print $1}'`
++count=`$GREP '^W ' $BASE/log/error_log | $GREP -v CreateProfile | \
++ $GREP -v 'Unable to initialize USB access via libusb, libusb error' | \
++ $GREP -v 'org.freedesktop.ColorManager' | \
++ $GREP -v -E 'Avahi client failed: -(1|26)' | \
++ wc -l | awk '{print $1}'`
+ if test $count != 8; then
+ echo "FAIL: $count warning messages, expected 8."
+ $GREP '^W ' $BASE/log/error_log
diff --git a/debian/patches/0003-Tests-ignore-errors-triggered-on-ipv6-deprived-hosts.patch b/debian/patches/0003-Tests-ignore-errors-triggered-on-ipv6-deprived-hosts.patch
new file mode 100644
index 000000000..495263fbf
--- /dev/null
+++ b/debian/patches/0003-Tests-ignore-errors-triggered-on-ipv6-deprived-hosts.patch
@@ -0,0 +1,25 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:33:56 +0200
+Subject: Tests: ignore errors triggered on ipv6-deprived hosts
+
+Ignore the 'Address family not supported by protocol' error that breaks the
+errorlines counting on buildds without a working IPv6 stack.
+---
+ test/run-stp-tests.sh | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
+index a601581..0d4e88e 100755
+--- a/test/run-stp-tests.sh
++++ b/test/run-stp-tests.sh
+@@ -1025,7 +1025,9 @@ else
+ fi
+
+ # Error log messages
+-count=`$GREP '^E ' $BASE/log/error_log | $GREP -v 'Unknown default SystemGroup' | wc -l | awk '{print $1}'`
++count=`$GREP '^E ' $BASE/log/error_log | $GREP -v 'Unknown default SystemGroup' | \
++ $GREP -v -E 'Unable to open listen socket for address .* Address family not supported by protocol.' | \
++ wc -l | awk '{print $1}'`
+ if test $count != 33; then
+ echo "FAIL: $count error messages, expected 33."
+ $GREP '^E ' $BASE/log/error_log
diff --git a/debian/patches/0004-Tests-Do-not-run-the-CUPS_EUC_JP-test-case-on-BSD-Hu.patch b/debian/patches/0004-Tests-Do-not-run-the-CUPS_EUC_JP-test-case-on-BSD-Hu.patch
new file mode 100644
index 000000000..931feb799
--- /dev/null
+++ b/debian/patches/0004-Tests-Do-not-run-the-CUPS_EUC_JP-test-case-on-BSD-Hu.patch
@@ -0,0 +1,24 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:16 +0200
+Subject: Tests: Do not run the CUPS_EUC_JP test case on BSD/Hurd either,
+ as glibc's iconv behavior is different than what the test expects.
+
+Bug-Debian: https://bugs.debian.org/662996
+Patch-Name: test-i18n-nonlinux.patch
+---
+ cups/testi18n.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cups/testi18n.c b/cups/testi18n.c
+index 45e1cab..449670c 100644
+--- a/cups/testi18n.c
++++ b/cups/testi18n.c
+@@ -410,7 +410,7 @@ main(int argc, /* I - Argument Count */
+ puts("PASS");
+ }
+
+-#ifndef __linux
++#if !defined(__linux__) && !defined(__GLIBC__)
+ fputs("cupsCharsetToUTF8(CUPS_EUC_JP): ", stdout);
+
+ strlcpy(legsrc, legdest, sizeof(legsrc));
diff --git a/debian/patches/0005-Tests-Make-sure-that-all-scheduled-jobs-are-finished.patch b/debian/patches/0005-Tests-Make-sure-that-all-scheduled-jobs-are-finished.patch
new file mode 100644
index 000000000..dd3bbd779
--- /dev/null
+++ b/debian/patches/0005-Tests-Make-sure-that-all-scheduled-jobs-are-finished.patch
@@ -0,0 +1,28 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:17 +0200
+Subject: Tests: Make sure that all scheduled jobs are finished before
+
+ running a new test. Fixes failures on slow architectures like armel and
+ mipsel.
+Bug-Debian: https://bugs.debian.org/670878
+Patch-Name: tests-wait-on-unfinished-jobs-everytime.patch
+---
+ test/run-stp-tests.sh | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
+index 0d4e88e..b140dc8 100755
+--- a/test/run-stp-tests.sh
++++ b/test/run-stp-tests.sh
+@@ -776,6 +776,11 @@ echo " $date by $user on `hostname`." >>$strfile
+ echo " <pre>" >>$strfile
+
+ for file in 5*.sh; do
++ #
++ # Make sure the past jobs are done before going on.
++ #
++ ./waitjobs.sh 1800
++
+ echo $ac_n "Performing $file: $ac_c"
+ echo "" >>$strfile
+ echo "`date '+[%d/%b/%Y:%H:%M:%S %z]'` \"$file\":" >>$strfile
diff --git a/debian/patches/0006-Tests-Force-LC_-environment-variables-when-testing-n.patch b/debian/patches/0006-Tests-Force-LC_-environment-variables-when-testing-n.patch
new file mode 100644
index 000000000..9c3a8463e
--- /dev/null
+++ b/debian/patches/0006-Tests-Force-LC_-environment-variables-when-testing-n.patch
@@ -0,0 +1,31 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:18 +0200
+Subject: Tests: Force LC_* environment variables when testing (non)
+ l10n'isation.
+
+ Permits building in non-"C" environments.
+Origin: vendor
+Patch-Name: tests-fix-ppdLocalize-on-unclean-env.patch
+---
+ cups/testppd.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/cups/testppd.c b/cups/testppd.c
+index 36707f2..a4ab7bf 100644
+--- a/cups/testppd.c
++++ b/cups/testppd.c
+@@ -658,6 +658,14 @@ main(int argc, /* I - Number of command-line arguments */
+ * Test localization...
+ */
+
++ /*
++ * Enforce void localization
++ */
++ putenv("LANG=C");
++ putenv("LC_ALL=C");
++ putenv("LC_CTYPE=C");
++ putenv("LC_MESSAGES=C");
++
+ fputs("ppdLocalizeIPPReason(text): ", stdout);
+ if (ppdLocalizeIPPReason(ppd, "foo", NULL, buffer, sizeof(buffer)) &&
+ !strcmp(buffer, "Foo Reason"))
diff --git a/debian/patches/0007-Tests-Use-127.0.0.1-instead-of-localhost-to-help-pbu.patch b/debian/patches/0007-Tests-Use-127.0.0.1-instead-of-localhost-to-help-pbu.patch
new file mode 100644
index 000000000..314f7c655
--- /dev/null
+++ b/debian/patches/0007-Tests-Use-127.0.0.1-instead-of-localhost-to-help-pbu.patch
@@ -0,0 +1,64 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:21 +0200
+Subject: Tests: Use 127.0.0.1 instead of localhost to help pbuilder
+
+This should make the test-suite work in pbuilder. It apparently also fixes an
+ipp backend problem in the test-suite.
+
+Origin: vendor
+Patch-Name: tests-use-ipv4-lo-address.patch
+---
+ test/5.1-lpadmin.sh | 4 ++--
+ test/run-stp-tests.sh | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/test/5.1-lpadmin.sh b/test/5.1-lpadmin.sh
+index 7efc398..08b8c50 100644
+--- a/test/5.1-lpadmin.sh
++++ b/test/5.1-lpadmin.sh
+@@ -52,8 +52,8 @@ echo ""
+
+ echo "Add Shared Printer Test"
+ echo ""
+-echo " lpadmin -p Test3 -E -v ipp://localhost:$IPP_PORT/printers/Test2 -m everywhere"
+-$runcups $VALGRIND ../systemv/lpadmin -p Test3 -E -v ipp://localhost:$IPP_PORT/printers/Test2 -m everywhere 2>&1
++echo " lpadmin -p Test3 -E -v ipp://127.0.0.1:$IPP_PORT/printers/Test2 -m everywhere"
++$runcups $VALGRIND ../systemv/lpadmin -p Test3 -E -v ipp://127.0.0.1:$IPP_PORT/printers/Test2 -m everywhere 2>&1
+ if test $? != 0; then
+ echo " FAILED"
+ exit 1
+diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
+index b140dc8..73d1494 100755
+--- a/test/run-stp-tests.sh
++++ b/test/run-stp-tests.sh
+@@ -490,7 +490,7 @@ fi
+ cat >$BASE/cupsd.conf <<EOF
+ StrictConformance Yes
+ Browsing Off
+-Listen localhost:$port
++Listen 127.0.0.1:$port
+ Listen $BASE/sock
+ MaxSubscriptions 3
+ MaxLogSize 0
+@@ -617,7 +617,7 @@ fi
+
+ # These get exported because they don't have side-effects...
+ CUPS_DISABLE_APPLE_DEFAULT=yes; export CUPS_DISABLE_APPLE_DEFAULT
+-CUPS_SERVER=localhost:$port; export CUPS_SERVER
++CUPS_SERVER=127.0.0.1:$port; export CUPS_SERVER
+ CUPS_SERVERROOT=$BASE; export CUPS_SERVERROOT
+ CUPS_STATEDIR=$BASE; export CUPS_STATEDIR
+ CUPS_DATADIR=$BASE/share; export CUPS_DATADIR
+@@ -743,10 +743,10 @@ for file in 4*.test ../examples/ipp-2.1.test; do
+ echo $ac_n "`date '+[%d/%b/%Y:%H:%M:%S %z]'` $ac_c" >>$strfile
+
+ if test $file = ../examples/ipp-2.1.test; then
+- uri="ipp://localhost:$port/printers/Test1"
++ uri="ipp://127.0.0.1:$port/printers/Test1"
+ options="-V 2.1 -d NOPRINT=1 -f testfile.ps"
+ else
+- uri="ipp://localhost:$port/printers"
++ uri="ipp://127.0.0.1:$port/printers"
+ options=""
+ fi
+ $runcups $VALGRIND ../tools/ipptool -tI $options $uri $file >> $strfile
diff --git a/debian/patches/0008-Tests-Force-LC_ALL-C-environment-variable-when-grepp.patch b/debian/patches/0008-Tests-Force-LC_ALL-C-environment-variable-when-grepp.patch
new file mode 100644
index 000000000..cacf2eedd
--- /dev/null
+++ b/debian/patches/0008-Tests-Force-LC_ALL-C-environment-variable-when-grepp.patch
@@ -0,0 +1,24 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:22 +0200
+Subject: Tests: Force LC_ALL=C environment variable when grepping the output
+ of lpstat
+
+Permits testing in non-"C" environments.
+Origin: vendor
+Patch-Name: tests-make-lpstat-call-reproducible.patch
+---
+ test/run-stp-tests.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
+index 73d1494..58f502b 100755
+--- a/test/run-stp-tests.sh
++++ b/test/run-stp-tests.sh
+@@ -642,6 +642,7 @@ echo "DYLD_LIBRARY_PATH=\"$DYLD_LIBRARY_PATH\"; export DYLD_LIBRARY_PATH" >>$run
+ echo "LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\"; export LD_LIBRARY_PATH" >>$runcups
+ echo "LD_PRELOAD=\"$LD_PRELOAD\"; export LD_PRELOAD" >>$runcups
+ echo "LOCALEDIR=\"$LOCALEDIR\"; export LOCALEDIR" >>$runcups
++echo "LC_ALL=\"C\"; export LC_ALL" >>$runcups
+ if test "x$CUPS_DEBUG_LEVEL" != x; then
+ echo "CUPS_DEBUG_FILTER='$CUPS_DEBUG_FILTER'; export CUPS_DEBUG_FILTER" >>$runcups
+ echo "CUPS_DEBUG_LEVEL=$CUPS_DEBUG_LEVEL; export CUPS_DEBUG_LEVEL" >>$runcups
diff --git a/debian/patches/0009-Tests-Do-not-test-pdftourf.patch b/debian/patches/0009-Tests-Do-not-test-pdftourf.patch
new file mode 100644
index 000000000..8aa2c30d0
--- /dev/null
+++ b/debian/patches/0009-Tests-Do-not-test-pdftourf.patch
@@ -0,0 +1,68 @@
+From: Michael Sweet <michael.r.sweet@gmail.com>
+Date: Tue, 9 Aug 2016 18:11:23 +0200
+Subject: Tests: Do not test pdftourf
+
+ Revert commit 830cfed95a5349b008999eebd34f5233bc35829c
+
+ "Update "make test" to include alternate filter."
+ .
+ This fixes the error lines counting in the test, and is unneeded as pdftourf
+ is not shipped in Debian.
+Origin: upstream
+Patch-Name: tests-no-pdftourf.patch
+---
+ test/run-stp-tests.sh | 4 +---
+ test/test.convs | 1 -
+ test/test.types | 2 --
+ 3 files changed, 1 insertion(+), 6 deletions(-)
+ delete mode 100644 test/test.types
+
+diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
+index 58f502b..4ed84ae 100755
+--- a/test/run-stp-tests.sh
++++ b/test/run-stp-tests.sh
+@@ -268,7 +268,7 @@ case "$usedebugprintfs" in
+ echo "Enabling debug printfs (level $usedebugprintfs); log files can be found in $BASE/log..."
+ CUPS_DEBUG_LOG="$BASE/log/debug_printfs.%d"; export CUPS_DEBUG_LOG
+ CUPS_DEBUG_LEVEL="$usedebugprintfs"; export CUPS_DEBUG_LEVEL
+- CUPS_DEBUG_FILTER='^(http|_http|ipp|_ipp|cups.*Request|cupsGetResponse|cupsSend|mime).*$'; export CUPS_DEBUG_FILTER
++ CUPS_DEBUG_FILTER='^(http|_http|ipp|_ipp|cups.*Request|cupsGetResponse|cupsSend).*$'; export CUPS_DEBUG_FILTER
+ ;;
+
+ *)
+@@ -443,14 +443,12 @@ EOF
+ }
+
+ ln -s $root/test/test.convs $BASE/share/mime
+-ln -s $root/test/test.types $BASE/share/mime
+
+ if test `uname` = Darwin; then
+ instfilter cgimagetopdf imagetopdf pdf
+ instfilter cgpdftopdf pdftopdf passthru
+ instfilter cgpdftops pdftops ps
+ instfilter cgpdftoraster pdftoraster raster
+- instfilter cgpdftoraster pdftourf raster
+ instfilter cgtexttopdf texttopdf pdf
+ instfilter pstocupsraster pstoraster raster
+ else
+diff --git a/test/test.convs b/test/test.convs
+index 77a9ce0..57540aa 100644
+--- a/test/test.convs
++++ b/test/test.convs
+@@ -2,7 +2,6 @@
+ application/pdf application/vnd.cups-pdf 100 pdftopdf
+ application/pdf application/postscript 100 pdftops
+ application/pdf application/vnd.cups-raster 100 pdftoraster
+-application/pdf image/urf 100 pdftourf
+ application/postscript application/vnd.cups-raster 100 pstoraster
+ image/jpeg application/pdf 100 imagetopdf
+ text/plain application/pdf 100 texttopdf
+diff --git a/test/test.types b/test/test.types
+deleted file mode 100644
+index 914081c..0000000
+--- a/test/test.types
++++ /dev/null
+@@ -1,2 +0,0 @@
+-# Test file listing potential MIME media types that are not in the standard mime.types file
+-image/urf
+\ No newline at end of file
diff --git a/debian/patches/0010-Move-cupsd.conf.default-from-SERVERROOT-to-DATADIR.patch b/debian/patches/0010-Move-cupsd.conf.default-from-SERVERROOT-to-DATADIR.patch
new file mode 100644
index 000000000..c770a8764
--- /dev/null
+++ b/debian/patches/0010-Move-cupsd.conf.default-from-SERVERROOT-to-DATADIR.patch
@@ -0,0 +1,62 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:24 +0200
+Subject: Move cupsd.conf.default from SERVERROOT to DATADIR
+
+Origin: vendor
+Bug: https://github.com/apple/cups/issues/4342
+Bug-Debian: https://bugs.debian.org/640124
+Patch-Name: move-cupsd-conf-default-to-share.patch
+---
+ cgi-bin/admin.c | 6 +++++-
+ conf/Makefile | 5 +++--
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
+index c648938..5ff7501 100644
+--- a/cgi-bin/admin.c
++++ b/cgi-bin/admin.c
+@@ -1636,6 +1636,7 @@ do_config_server(http_t *http) /* I - HTTP connection */
+ int ch; /* Character from file */
+ char filename[1024]; /* Filename */
+ const char *server_root; /* Location of config files */
++ const char *data_dir; /* Location of data files */
+
+
+ /*
+@@ -1719,7 +1720,10 @@ do_config_server(http_t *http) /* I - HTTP connection */
+ * well...
+ */
+
+- strlcat(filename, ".default", sizeof(filename));
++ if ((data_dir = getenv("CUPS_DATADIR")) == NULL)
++ data_dir = CUPS_DATADIR;
++
++ snprintf(filename, sizeof(filename), "%s/cupsd.conf.default",data_dir);
+
+ if (!stat(filename, &info) && info.st_size < (1024 * 1024) &&
+ (cupsd = cupsFileOpen(filename, "r")) != NULL)
+diff --git a/conf/Makefile b/conf/Makefile
+index e249e60..42a123f 100644
+--- a/conf/Makefile
++++ b/conf/Makefile
+@@ -70,7 +70,7 @@ install-data:
+ else \
+ $(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT) ; \
+ fi ; \
+- $(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT)/$$file.default; \
++ $(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(DATADIR)/$$file.default; \
+ done
+ $(INSTALL_DIR) -m 755 $(DATADIR)/mime
+ for file in $(REPLACE); do \
+@@ -118,9 +118,10 @@ install-libs:
+ #
+
+ uninstall:
+- for file in $(KEEP) $(REPLACE) cupsd.conf.default; do \
++ for file in $(KEEP) $(REPLACE); do \
+ $(RM) $(SERVERROOT)/$$file; \
+ done
++ $(RM) $(DATADIR)/cupsd.conf.default
+ -$(RMDIR) $(SERVERROOT)
+ for file in $(REPLACE); do \
+ $(RM) $(DATADIR)/mime/$$file; \
diff --git a/debian/patches/0011-Patch-to-support-Apple-AirPrint-printing-from-iPhone.patch b/debian/patches/0011-Patch-to-support-Apple-AirPrint-printing-from-iPhone.patch
new file mode 100644
index 000000000..cc7a66648
--- /dev/null
+++ b/debian/patches/0011-Patch-to-support-Apple-AirPrint-printing-from-iPhone.patch
@@ -0,0 +1,91 @@
+From: Till Kamppeter <till.kamppeter@gmail.com>
+Date: Tue, 9 Aug 2016 18:11:29 +0200
+Subject: Patch to support Apple AirPrint (printing from iPhone, iPad,
+ iPod Touch to a CUPS server)
+
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/711779
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054495
+Bug-Debian: https://bugs.debian.org/700961
+Bug: https://github.com/apple/cups/issues/4341
+Patch-Name: airprint-support.patch
+---
+ conf/mime.convs.in | 3 +++
+ conf/mime.types | 3 +++
+ scheduler/conf.c | 2 +-
+ scheduler/dirsvc.c | 6 ++++++
+ scheduler/printers.c | 4 +++-
+ 5 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/conf/mime.convs.in b/conf/mime.convs.in
+index 57b459d..e042e01 100644
+--- a/conf/mime.convs.in
++++ b/conf/mime.convs.in
+@@ -44,6 +44,9 @@ application/postscript application/vnd.cups-postscript 66 pstops
+ application/vnd.cups-raster image/pwg-raster 100 rastertopwg
+ application/vnd.cups-raster image/urf 100 rastertopwg
+
++# Needed for printing from iOS (AirPrint) clients
++image/urf application/pdf 100 -
++
+ ########################################################################
+ #
+ # Raw filter...
+diff --git a/conf/mime.types b/conf/mime.types
+index fcd6b6e..ebb0525 100644
+--- a/conf/mime.types
++++ b/conf/mime.types
+@@ -108,6 +108,9 @@ image/x-alias pix short(8,8) short(8,24)
+ image/x-bitmap bmp string(0,BM) + !printable(2,14)
+ image/x-icon ico
+
++# Needed for printing from iOS (AirPrint) clients
++image/urf urf string(0,UNIRAST<00>)
++
+ ########################################################################
+ #
+ # Text files...
+diff --git a/scheduler/conf.c b/scheduler/conf.c
+index 755cef5..e734c7c 100644
+--- a/scheduler/conf.c
++++ b/scheduler/conf.c
+@@ -745,7 +745,7 @@ cupsdReadConfiguration(void)
+ DefaultShared = CUPS_DEFAULT_DEFAULT_SHARED;
+
+ #if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
+- cupsdSetString(&DNSSDSubTypes, "_cups,_print");
++ cupsdSetString(&DNSSDSubTypes, "_cups,_print,_universal");
+ cupsdClearString(&DNSSDHostName);
+ #endif /* HAVE_DNSSD || HAVE_AVAHI */
+
+diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c
+index ddd3701..fb2a305 100644
+--- a/scheduler/dirsvc.c
++++ b/scheduler/dirsvc.c
+@@ -440,6 +440,12 @@ dnssdBuildTxtRecord(
+ keyvalue[count ][0] = "pdl";
+ keyvalue[count++][1] = p->pdl ? p->pdl : "application/postscript";
+
++ /* iOS 6 does not accept this printer as AirPrint printer if there is
++ no URF txt record or "URF=none", "DM3" is the minimum needed found
++ by try and error */
++ keyvalue[count ][0] = "URF";
++ keyvalue[count++][1] = "DM3";
++
+ if (get_auth_info_required(p, air_str, sizeof(air_str)))
+ {
+ keyvalue[count ][0] = "air";
+diff --git a/scheduler/printers.c b/scheduler/printers.c
+index 60ea016..8437a43 100644
+--- a/scheduler/printers.c
++++ b/scheduler/printers.c
+@@ -3734,7 +3734,9 @@ add_printer_formats(cupsd_printer_t *p) /* I - Printer */
+ }
+ else if (!_cups_strcasecmp(type->super, "image"))
+ {
+- if (!_cups_strcasecmp(type->type, "jpeg"))
++ if (!_cups_strcasecmp(type->type, "urf"))
++ strlcat(pdl, "image/urf,", sizeof(pdl));
++ else if (!_cups_strcasecmp(type->type, "jpeg"))
+ strlcat(pdl, "image/jpeg,", sizeof(pdl));
+ else if (!_cups_strcasecmp(type->type, "png"))
+ strlcat(pdl, "image/png,", sizeof(pdl));
diff --git a/debian/patches/0012-CUPS-removes-the-recommended-comments-of-the-NickNam.patch b/debian/patches/0012-CUPS-removes-the-recommended-comments-of-the-NickNam.patch
new file mode 100644
index 000000000..f30429b4c
--- /dev/null
+++ b/debian/patches/0012-CUPS-removes-the-recommended-comments-of-the-NickNam.patch
@@ -0,0 +1,39 @@
+From: Till Kampetter <till.kampetter@gmail.com>
+Date: Tue, 9 Aug 2016 18:11:36 +0200
+Subject: CUPS removes the "(recommended)" comments of the NickNames of
+ Foomatic PPDs when listing available PPDs. This patch removes this removal
+ action.
+
+Patch-Name: reactivate_recommended_driver.patch
+---
+ scheduler/cups-driverd.cxx | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/scheduler/cups-driverd.cxx b/scheduler/cups-driverd.cxx
+index 85516eb..874eb3c 100644
+--- a/scheduler/cups-driverd.cxx
++++ b/scheduler/cups-driverd.cxx
+@@ -240,7 +240,6 @@ add_ppd(const char *filename, /* I - PPD filename */
+ const char *scheme) /* I - PPD scheme */
+ {
+ ppd_info_t *ppd; /* PPD */
+- char *recommended; /* Foomatic driver string */
+
+
+ /*
+@@ -278,15 +277,6 @@ add_ppd(const char *filename, /* I - PPD filename */
+ strlcpy(ppd->record.device_id, device_id, sizeof(ppd->record.device_id));
+ strlcpy(ppd->record.scheme, scheme, sizeof(ppd->record.scheme));
+
+- /*
+- * Strip confusing (and often wrong) "recommended" suffix added by
+- * Foomatic drivers...
+- */
+-
+- if ((recommended = strstr(ppd->record.make_and_model,
+- " (recommended)")) != NULL)
+- *recommended = '\0';
+-
+ /*
+ * Add the PPD to the PPD arrays...
+ */
diff --git a/debian/patches/0013-Make-log-files-readable-to-group-adm-if-present.patch b/debian/patches/0013-Make-log-files-readable-to-group-adm-if-present.patch
new file mode 100644
index 000000000..7b93a2da1
--- /dev/null
+++ b/debian/patches/0013-Make-log-files-readable-to-group-adm-if-present.patch
@@ -0,0 +1,60 @@
+From: Martin Pitt <mpitt@debian.org>
+Date: Tue, 9 Aug 2016 18:11:38 +0200
+Subject: Make log files readable to group "adm", if present.
+
+Bug-Ubuntu: https://launchpad.net/bugs/345953
+Patch-Name: logfiles_adm_readable.patch
+---
+ scheduler/log.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/scheduler/log.c b/scheduler/log.c
+index 2bd1952..ae0aa55 100644
+--- a/scheduler/log.c
++++ b/scheduler/log.c
+@@ -21,6 +21,7 @@
+ # include <systemd/sd-journal.h>
+ #endif /* HAVE_ASL_H */
+ #include <syslog.h>
++#include <grp.h>
+
+
+ /*
+@@ -110,6 +111,7 @@ cupsdCheckLogFile(cups_file_t **lf, /* IO - Log file */
+ filename[1024], /* Formatted log filename */
+ *ptr; /* Pointer into filename */
+ const char *logptr; /* Pointer into log filename */
++ struct group *loggrp; /* Group entry of log filename */
+
+
+ /*
+@@ -129,6 +131,11 @@ cupsdCheckLogFile(cups_file_t **lf, /* IO - Log file */
+ return (1);
+ }
+
++ /*
++ * Use adm group if possible, fall back to Group
++ */
++ loggrp = getgrnam("adm");
++
+ /*
+ * Format the filename as needed...
+ */
+@@ -241,7 +248,7 @@ cupsdCheckLogFile(cups_file_t **lf, /* IO - Log file */
+ * Change ownership and permissions of non-device logs...
+ */
+
+- fchown(cupsFileNumber(*lf), RunUser, Group);
++ fchown(cupsFileNumber(*lf), RunUser, loggrp ? loggrp->gr_gid : Group);
+ fchmod(cupsFileNumber(*lf), LogFilePerm);
+ }
+ }
+@@ -284,7 +291,7 @@ cupsdCheckLogFile(cups_file_t **lf, /* IO - Log file */
+ * Change ownership and permissions of non-device logs...
+ */
+
+- fchown(cupsFileNumber(*lf), RunUser, Group);
++ fchown(cupsFileNumber(*lf), RunUser, loggrp ? loggrp->gr_gid : Group);
+ fchmod(cupsFileNumber(*lf), LogFilePerm);
+ }
+
diff --git a/debian/patches/0014-Deactivate-CUPS-own-log-rotating-as-the-system-alrea.patch b/debian/patches/0014-Deactivate-CUPS-own-log-rotating-as-the-system-alrea.patch
new file mode 100644
index 000000000..c5e7fb2a1
--- /dev/null
+++ b/debian/patches/0014-Deactivate-CUPS-own-log-rotating-as-the-system-alrea.patch
@@ -0,0 +1,25 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:40 +0200
+Subject: Deactivate CUPS' own log rotating as the system already provides a
+ more sophisticated log rotating
+
+Patch-Name: default_log_settings.patch
+---
+ conf/cupsd.conf.in | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/conf/cupsd.conf.in b/conf/cupsd.conf.in
+index ab37ca6..78189e5 100644
+--- a/conf/cupsd.conf.in
++++ b/conf/cupsd.conf.in
+@@ -8,6 +8,10 @@
+ LogLevel @CUPS_LOG_LEVEL@
+ @CUPS_PAGE_LOG_FORMAT@
+
++# Deactivate CUPS' internal logrotating, as we provide a better one, especially
++# LogLevel debug2 gets usable now
++MaxLogSize 0
++
+ # Only listen for connections from the local machine.
+ Listen localhost:@DEFAULT_IPP_PORT@
+ @CUPS_LISTEN_DOMAINSOCKET@
diff --git a/debian/patches/0015-Do-not-mess-with-the-permissions-of-cupsd.conf.patch b/debian/patches/0015-Do-not-mess-with-the-permissions-of-cupsd.conf.patch
new file mode 100644
index 000000000..136e67104
--- /dev/null
+++ b/debian/patches/0015-Do-not-mess-with-the-permissions-of-cupsd.conf.patch
@@ -0,0 +1,26 @@
+From: Martin Pitt <mpitt@debian.org>
+Date: Tue, 9 Aug 2016 18:11:41 +0200
+Subject: Do not mess with the permissions of cupsd.conf.
+
+Patch-Name: confdirperms.patch
+---
+ scheduler/conf.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/scheduler/conf.c b/scheduler/conf.c
+index e734c7c..550cccb 100644
+--- a/scheduler/conf.c
++++ b/scheduler/conf.c
+@@ -1135,10 +1135,12 @@ cupsdReadConfiguration(void)
+ Group, 1, 1) < 0 ||
+ cupsdCheckPermissions(ServerRoot, "ssl", 0700, RunUser,
+ Group, 1, 0) < 0 ||
++ /* Never alter permissions of central conffile
+ cupsdCheckPermissions(ConfigurationFile, NULL, ConfigFilePerm, RunUser,
+ Group, 0, 0) < 0 ||
+ cupsdCheckPermissions(CupsFilesFile, NULL, ConfigFilePerm, RunUser,
+ Group, 0, 0) < 0 ||
++ */
+ cupsdCheckPermissions(ServerRoot, "classes.conf", 0600, RunUser,
+ Group, 0, 0) < 0 ||
+ cupsdCheckPermissions(ServerRoot, "printers.conf", 0600, RunUser,
diff --git a/debian/patches/0016-Show-compile-command-lines.patch b/debian/patches/0016-Show-compile-command-lines.patch
new file mode 100644
index 000000000..10df65dcf
--- /dev/null
+++ b/debian/patches/0016-Show-compile-command-lines.patch
@@ -0,0 +1,21 @@
+From: Till Kampetter <till.kampetter@gmail.com>
+Date: Tue, 9 Aug 2016 18:11:43 +0200
+Subject: Show compile command lines
+
+Patch-Name: show-compile-command-lines.patch
+---
+ Makedefs.in | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makedefs.in b/Makedefs.in
+index 9ee7585..038bb94 100644
+--- a/Makedefs.in
++++ b/Makedefs.in
+@@ -263,7 +263,6 @@ USBQUIRKS = @USBQUIRKS@
+ # Rules...
+ #
+
+-.SILENT:
+ .SUFFIXES: .a .c .cxx .h .o
+
+ .c.o:
diff --git a/debian/patches/0017-Set-the-default-for-SyncOnClose-to-Yes.patch b/debian/patches/0017-Set-the-default-for-SyncOnClose-to-Yes.patch
new file mode 100644
index 000000000..4f1ede719
--- /dev/null
+++ b/debian/patches/0017-Set-the-default-for-SyncOnClose-to-Yes.patch
@@ -0,0 +1,64 @@
+From: Tim Waugh <twaugh@redhat.com>
+Date: Tue, 9 Aug 2016 18:11:46 +0200
+Subject: Set the default for SyncOnClose to Yes
+
+Patch-Name: cupsd-set-default-for-SyncOnClose-to-Yes.patch
+---
+ conf/cups-files.conf.in | 2 +-
+ doc/help/man-cups-files.conf.html | 2 +-
+ man/cups-files.conf.5 | 2 +-
+ scheduler/conf.c | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/conf/cups-files.conf.in b/conf/cups-files.conf.in
+index 4a78ba6..a3d088d 100644
+--- a/conf/cups-files.conf.in
++++ b/conf/cups-files.conf.in
+@@ -7,7 +7,7 @@
+ #FatalErrors @CUPS_FATAL_ERRORS@
+
+ # Do we call fsync() after writing configuration or status files?
+-#SyncOnClose No
++#SyncOnClose Yes
+
+ # Default user and group for filters/backends/helper programs; this cannot be
+ # any user or group that resolves to ID 0 for security reasons...
+diff --git a/doc/help/man-cups-files.conf.html b/doc/help/man-cups-files.conf.html
+index c567cbb..f2f6802 100644
+--- a/doc/help/man-cups-files.conf.html
++++ b/doc/help/man-cups-files.conf.html
+@@ -150,7 +150,7 @@ The default is "/var/run/cups" or "/etc/cups" depending on the platform.
+ <dd style="margin-left: 5.0em">Specifies whether the scheduler calls
+ <b>fsync</b>(2)
+ after writing configuration or state files.
+-The default is "No".
++The default is "Yes".
+ <dt><a name="SystemGroup"></a><b>SystemGroup </b><i>group-name </i>[ ... <i>group-name</i> ]
+ <dd style="margin-left: 5.0em">Specifies the group(s) to use for <i>@SYSTEM</i> group authentication.
+ The default contains "admin", "lpadmin", "root", "sys", and/or "system".
+diff --git a/man/cups-files.conf.5 b/man/cups-files.conf.5
+index b451e2f..38acff1 100644
+--- a/man/cups-files.conf.5
++++ b/man/cups-files.conf.5
+@@ -211,7 +211,7 @@ The default is "/var/run/cups" or "/etc/cups" depending on the platform.
+ Specifies whether the scheduler calls
+ .BR fsync (2)
+ after writing configuration or state files.
+-The default is "No".
++The default is "Yes".
+ .\"#SystemGroup
+ .TP 5
+ \fBSystemGroup \fIgroup-name \fR[ ... \fIgroup-name\fR ]
+diff --git a/scheduler/conf.c b/scheduler/conf.c
+index 550cccb..8b21f20 100644
+--- a/scheduler/conf.c
++++ b/scheduler/conf.c
+@@ -735,7 +735,7 @@ cupsdReadConfiguration(void)
+ RootCertDuration = 300;
+ Sandboxing = CUPSD_SANDBOXING_STRICT;
+ StrictConformance = FALSE;
+- SyncOnClose = FALSE;
++ SyncOnClose = TRUE;
+ Timeout = 900;
+ WebInterface = CUPS_DEFAULT_WEBIF;
+
diff --git a/debian/patches/0018-Set-default-job-error-policy-to-retry-job.patch b/debian/patches/0018-Set-default-job-error-policy-to-retry-job.patch
new file mode 100644
index 000000000..ce27b9e7b
--- /dev/null
+++ b/debian/patches/0018-Set-default-job-error-policy-to-retry-job.patch
@@ -0,0 +1,73 @@
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Tue, 9 Aug 2016 18:11:47 +0200
+Subject: Set default job error policy to "retry-job"
+
+It it is less confusing and a better default on most machines.
+Amend documentation accordingly.
+
+Author: Didier Raboud <odyx@debian.org>
+Origin: vendor
+Patch-Name: cups-set-default-error-policy-retry-job.patch
+---
+ doc/help/man-cupsd.conf.html | 4 ++--
+ man/cupsd.conf.5 | 4 ++--
+ scheduler/conf.c | 6 +++---
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/doc/help/man-cupsd.conf.html b/doc/help/man-cupsd.conf.html
+index 1668eee..7d161ed 100644
+--- a/doc/help/man-cupsd.conf.html
++++ b/doc/help/man-cupsd.conf.html
+@@ -95,9 +95,9 @@ The default is typically the server's ".local" hostname.
+ <dt><b>ErrorPolicy retry-current-job</b>
+ <dd style="margin-left: 5.0em">Specifies that a failed print job should be retried immediately unless otherwise specified for the printer.
+ <dt><b>ErrorPolicy retry-job</b>
+-<dd style="margin-left: 5.0em">Specifies that a failed print job should be retried at a later time unless otherwise specified for the printer.
++<dd style="margin-left: 5.0em">Specifies that a failed print job should be retried at a later time unless otherwise specified for the printer. The 'retry-job' error policy is the default.
+ <dt><b>ErrorPolicy stop-printer</b>
+-<dd style="margin-left: 5.0em">Specifies that a failed print job should stop the printer unless otherwise specified for the printer. The 'stop-printer' error policy is the default.
++<dd style="margin-left: 5.0em">Specifies that a failed print job should stop the printer unless otherwise specified for the printer.
+ <dt><a name="FilterLimit"></a><b>FilterLimit </b><i>limit</i>
+ <dd style="margin-left: 5.0em">Specifies the maximum cost of filters that are run concurrently, which can be used to minimize disk, memory, and CPU resource problems.
+ A limit of 0 disables filter limiting.
+diff --git a/man/cupsd.conf.5 b/man/cupsd.conf.5
+index 00b1a22..6b260e6 100644
+--- a/man/cupsd.conf.5
++++ b/man/cupsd.conf.5
+@@ -140,10 +140,10 @@ Specifies that a failed print job should be aborted (discarded) unless otherwise
+ Specifies that a failed print job should be retried immediately unless otherwise specified for the printer.
+ .TP 5
+ \fBErrorPolicy retry-job\fR
+-Specifies that a failed print job should be retried at a later time unless otherwise specified for the printer.
++Specifies that a failed print job should be retried at a later time unless otherwise specified for the printer. The 'retry-job' error policy is the default.
+ .TP 5
+ \fBErrorPolicy stop-printer\fR
+-Specifies that a failed print job should stop the printer unless otherwise specified for the printer. The 'stop-printer' error policy is the default.
++Specifies that a failed print job should stop the printer unless otherwise specified for the printer.
+ .\"#FilterLimit
+ .TP 5
+ \fBFilterLimit \fIlimit\fR
+diff --git a/scheduler/conf.c b/scheduler/conf.c
+index 8b21f20..ffce0bd 100644
+--- a/scheduler/conf.c
++++ b/scheduler/conf.c
+@@ -752,7 +752,7 @@ cupsdReadConfiguration(void)
+ cupsdSetString(&LPDConfigFile, CUPS_DEFAULT_LPD_CONFIG_FILE);
+ cupsdSetString(&SMBConfigFile, CUPS_DEFAULT_SMB_CONFIG_FILE);
+
+- cupsdSetString(&ErrorPolicy, "stop-printer");
++ cupsdSetString(&ErrorPolicy, "retry-job");
+
+ JobHistory = DEFAULT_HISTORY;
+ JobFiles = DEFAULT_FILES;
+@@ -1233,8 +1233,8 @@ cupsdReadConfiguration(void)
+ strcmp(ErrorPolicy, "retry-job") &&
+ strcmp(ErrorPolicy, "stop-printer"))
+ {
+- cupsdLogMessage(CUPSD_LOG_ALERT, "Invalid ErrorPolicy \"%s\", resetting to \"stop-printer\".", ErrorPolicy);
+- cupsdSetString(&ErrorPolicy, "stop-printer");
++ cupsdLogMessage(CUPSD_LOG_ALERT, "Invalid ErrorPolicy \"%s\", resetting to \"retry-job\".", ErrorPolicy);
++ cupsdSetString(&ErrorPolicy, "retry-job");
+ }
+
+ /*
diff --git a/debian/patches/0019-Drop-dangling-references-from-cups-lpd.man.patch b/debian/patches/0019-Drop-dangling-references-from-cups-lpd.man.patch
new file mode 100644
index 000000000..70ff0b6e3
--- /dev/null
+++ b/debian/patches/0019-Drop-dangling-references-from-cups-lpd.man.patch
@@ -0,0 +1,24 @@
+From: =?utf-8?q?Bastien_ROUCARI=C3=88S?= <bastien.roucaries@u-cergy.fr>
+Date: Tue, 9 Aug 2016 18:11:48 +0200
+Subject: Drop dangling references from cups-lpd.man
+
+Bug-Debian: https://bugs.debian.org/570157
+Patch-Name: man-cups-lpd-drop-dangling-references.patch
+---
+ man/cups-lpd.8 | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/man/cups-lpd.8 b/man/cups-lpd.8
+index e8ce325..963735b 100644
+--- a/man/cups-lpd.8
++++ b/man/cups-lpd.8
+@@ -109,9 +109,7 @@ Simply enable the
+ .B cups-lpd
+ service using the corresponding control program.
+ .SH SEE ALSO
+-.BR cups (1),
+ .BR cupsd (8),
+-.BR inetconv (1m),
+ .BR inetd (8),
+ .BR launchd (8),
+ .BR xinetd (8),
diff --git a/debian/patches/0020-Use-dpkg-architecture-in-cups-config-to-make-it-arch.patch b/debian/patches/0020-Use-dpkg-architecture-in-cups-config-to-make-it-arch.patch
new file mode 100644
index 000000000..142ad8a04
--- /dev/null
+++ b/debian/patches/0020-Use-dpkg-architecture-in-cups-config-to-make-it-arch.patch
@@ -0,0 +1,49 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:49 +0200
+Subject: Use dpkg-architecture in cups-config to make it
+ architecture-independant
+
+ Also filter -L/usr/lib/(triplet) out of LDFLAGS.
+ Also strip unnecessary libs from --libs.
+ Also launch krb5-config at runtime to avoid getting usr/lib/(triplet) from krb5-config
+Bug-Debian: https://bugs.debian.org/741519
+Bug-Debian: https://bugs.debian.org/727058
+Bug-Debian: https://bugs.debian.org/730838
+Bug-Debian: https://bugs.debian.org/751157
+Patch-Name: debianize_cups-config.patch
+---
+ cups-config.in | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/cups-config.in b/cups-config.in
+index 9dd094d..b073a07 100755
+--- a/cups-config.in
++++ b/cups-config.in
+@@ -17,7 +17,7 @@ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ bindir=@bindir@
+ includedir=@includedir@
+-libdir=@libdir@
++libdir=${prefix}/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)
+ datarootdir=@datadir@
+ datadir=@datadir@
+ sysconfdir=@sysconfdir@
+@@ -29,7 +29,8 @@ INSTALLSTATIC=@INSTALLSTATIC@
+ # flags for compiler and linker...
+ CFLAGS=""
+ LDFLAGS="@EXPORT_LDFLAGS@"
+-LIBS="@LIBGSSAPI@ @DNSSDLIBS@ @EXPORT_SSLLIBS@ @LIBZ@ @LIBS@"
++LIBGSSAPI=`[ ! -x /usr/bin/krb5-config ] || /usr/bin/krb5-config --libs`
++LIBS="$LIBGSSAPI @DNSSDLIBS@ @EXPORT_SSLLIBS@ @LIBZ@ @LIBS@"
+
+ # Check for local invocation...
+ selfdir=`dirname $0`
+@@ -43,7 +44,7 @@ else
+ CFLAGS="$CFLAGS -I$includedir"
+ fi
+
+- if test $libdir != /usr/lib -a $libdir != /usr/lib32 -a $libdir != /usr/lib64; then
++ if test $libdir != /usr/lib -a $libdir != /usr/lib32 -a $libdir != /usr/lib64 -a $libdir != /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH); then
+ LDFLAGS="$LDFLAGS -L$libdir"
+ fi
+ fi
diff --git a/debian/patches/0021-Make-lpoptions-list-a-printer-s-options-correctly-al.patch b/debian/patches/0021-Make-lpoptions-list-a-printer-s-options-correctly-al.patch
new file mode 100644
index 000000000..8e13e4967
--- /dev/null
+++ b/debian/patches/0021-Make-lpoptions-list-a-printer-s-options-correctly-al.patch
@@ -0,0 +1,29 @@
+From: Till Kamppeter <till.kamppeter@gmail.com>
+Date: Tue, 25 Aug 2020 21:34:00 +0200
+Subject: Make lpoptions list a printer's options correctly also when CUPS is
+ running on an alternative port
+
+---
+ systemv/lpoptions.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/systemv/lpoptions.c b/systemv/lpoptions.c
+index 08746c0..c55f281 100644
+--- a/systemv/lpoptions.c
++++ b/systemv/lpoptions.c
+@@ -480,14 +480,13 @@ static void
+ list_options(cups_dest_t *dest) /* I - Destination to list */
+ {
+ http_t *http; /* Connection to destination */
+- char resource[1024]; /* Resource path */
+ int i; /* Looping var */
+ const char *filename; /* PPD filename */
+ ppd_file_t *ppd; /* PPD data */
+ ppd_group_t *group; /* Current group */
+
+
+- if ((http = cupsConnectDest(dest, CUPS_DEST_FLAGS_NONE, 30000, NULL, resource, sizeof(resource), NULL, NULL)) == NULL)
++ if ((http = _cupsConnect()) == NULL)
+ {
+ _cupsLangPrintf(stderr, _("lpoptions: Unable to get PPD file for %s: %s"),
+ dest->name, cupsLastErrorString());
diff --git a/debian/patches/0022-Fix-fax-numbers-supplied-via-GTK-print-dialog-removi.patch b/debian/patches/0022-Fix-fax-numbers-supplied-via-GTK-print-dialog-removi.patch
new file mode 100644
index 000000000..964ac8dc1
--- /dev/null
+++ b/debian/patches/0022-Fix-fax-numbers-supplied-via-GTK-print-dialog-removi.patch
@@ -0,0 +1,86 @@
+From: Till Kamppeter <till.kamppeter@gmail.com>
+Date: Wed, 26 Aug 2020 13:03:00 +0200
+Subject: Fix fax numbers supplied via GTK print dialog,
+ removing a "Custom." prefix;
+ do not choke if the GTK dialog sends "None" as phone number or pre-dial
+ prefix
+
+---
+ backend/ipp.c | 54 ++++++++++++++++++++++++++++++++++++++++++------------
+ 1 file changed, 42 insertions(+), 12 deletions(-)
+
+diff --git a/backend/ipp.c b/backend/ipp.c
+index a4039ba..1b1837f 100644
+--- a/backend/ipp.c
++++ b/backend/ipp.c
+@@ -2828,7 +2828,21 @@ new_request(
+ */
+
+ _httpDecodeURI(phone, keyword, sizeof(phone));
+- for (ptr = phone; *ptr;)
++ ptr = phone;
++
++ /*
++ * Weed out "Custom." in the beginning, this allows to put the
++ * "phone" option as custom string option into the PPD so that
++ * print dialogs not supporting fax display the option and
++ * allow entering the phone number. Print dialogs also send "None"
++ * if no phone number got entered, filter this, too.
++ */
++ if (!_cups_strcasecmp(phone, "None"))
++ *ptr = '\0';
++ if (!_cups_strncasecmp(phone, "Custom.", 7))
++ _cups_strcpy(ptr, ptr + 7);
++
++ for (; *ptr;)
+ {
+ if (*ptr == ',')
+ *ptr = 'p';
+@@ -2838,20 +2852,36 @@ new_request(
+ ptr ++;
+ }
+
+- httpAssembleURI(HTTP_URI_CODING_ALL, tel_uri, sizeof(tel_uri), "tel", NULL, NULL, 0, phone);
+- ippAddString(destination, IPP_TAG_JOB, IPP_TAG_URI, "destination-uri", NULL, tel_uri);
+-
+- if ((keyword = cupsGetOption("faxPrefix", num_options,
+- options)) != NULL && *keyword)
++ if (strlen(phone) > 0)
+ {
+- char predial[1024]; /* Pre-dial string */
++ httpAssembleURI(HTTP_URI_CODING_ALL, tel_uri, sizeof(tel_uri), "tel", NULL, NULL, 0, phone);
++ ippAddString(destination, IPP_TAG_JOB, IPP_TAG_URI, "destination-uri", NULL, tel_uri);
++ fprintf(stderr, "DEBUG: Faxing to phone %s; destination-uri: %s\n", phone, tel_uri);
+
+- _httpDecodeURI(predial, keyword, sizeof(predial));
+- ippAddString(destination, IPP_TAG_JOB, IPP_TAG_TEXT, "pre-dial-string", NULL, predial);
+- }
++ if ((keyword = cupsGetOption("faxPrefix", num_options, options)) != NULL && *keyword)
++ {
++ char predial[1024]; /* Pre-dial string */
++
++ _httpDecodeURI(predial, keyword, sizeof(predial));
++ ptr = predial;
++ if (!_cups_strcasecmp(ptr, "None"))
++ *ptr = '\0';
++ if (!_cups_strncasecmp(ptr, "Custom.", 7))
++ ptr += 7;
++ if (strlen(ptr) > 0)
++ {
++ ippAddString(destination, IPP_TAG_JOB, IPP_TAG_TEXT, "pre-dial-string", NULL, ptr);
++ fprintf(stderr, "DEBUG: Pre-dialing %s; pre-dial-string: %s\n", ptr, ptr);
++ }
++ else
++ fprintf(stderr, "WARNING: Pre-dial number for fax not valid! Sending fax without pre-dial number.\n");
++ }
+
+- ippAddCollection(request, IPP_TAG_JOB, "destination-uris", destination);
+- ippDelete(destination);
++ ippAddCollection(request, IPP_TAG_JOB, "destination-uris", destination);
++ ippDelete(destination);
++ }
++ else
++ fprintf(stderr, "ERROR: Phone number for fax not valid! Fax cannot be sent.\n");
+ }
+ }
+ else
diff --git a/debian/patches/0023-Let-the-rastertopwg-filter-check-rounding-errors-whe.patch b/debian/patches/0023-Let-the-rastertopwg-filter-check-rounding-errors-whe.patch
new file mode 100644
index 000000000..bb1bdd9e8
--- /dev/null
+++ b/debian/patches/0023-Let-the-rastertopwg-filter-check-rounding-errors-whe.patch
@@ -0,0 +1,77 @@
+From: Till Kamppeter <till.kamppeter@gmail.com>
+Date: Thu, 27 Aug 2020 10:22:00 +0200
+Subject: Let the rastertopwg filter check rounding errors when calculating
+ the page geometry
+
+---
+ filter/rastertopwg.c | 28 ++++++++++++++++++++++------
+ 1 file changed, 22 insertions(+), 6 deletions(-)
+
+diff --git a/filter/rastertopwg.c b/filter/rastertopwg.c
+index 0fa127e..d56cecd 100644
+--- a/filter/rastertopwg.c
++++ b/filter/rastertopwg.c
+@@ -41,8 +41,10 @@ main(int argc, /* I - Number of command-line args */
+ page_top, /* Top margin */
+ page_bottom, /* Bottom margin */
+ page_left, /* Left margin */
++ page_right, /* Right margin */
+ linesize, /* Bytes per line */
+ lineoffset; /* Offset into line */
++ int tmp;
+ unsigned char white; /* White pixel */
+ ppd_file_t *ppd; /* PPD file */
+ ppd_attr_t *back; /* cupsBackSide attribute */
+@@ -120,14 +122,30 @@ main(int argc, /* I - Number of command-line args */
+ fprintf(stderr, "PAGE: %d %d\n", page, inheader.NumCopies);
+
+ page_width = (unsigned)(inheader.cupsPageSize[0] * inheader.HWResolution[0] / 72.0);
++ if (page_width < inheader.cupsWidth &&
++ page_width >= inheader.cupsWidth - 1)
++ page_width = (unsigned)inheader.cupsWidth;
+ page_height = (unsigned)(inheader.cupsPageSize[1] * inheader.HWResolution[1] / 72.0);
++ if (page_height < inheader.cupsHeight &&
++ page_height >= inheader.cupsHeight - 1)
++ page_height = (unsigned)inheader.cupsHeight;
+ page_left = (unsigned)(inheader.cupsImagingBBox[0] * inheader.HWResolution[0] / 72.0);
+ page_bottom = (unsigned)(inheader.cupsImagingBBox[1] * inheader.HWResolution[1] / 72.0);
+- page_top = page_height - page_bottom - inheader.cupsHeight;
++ tmp = (int)(page_height - page_bottom - inheader.cupsHeight);
++ if (tmp < 0 && tmp >= -1) /* Rounding error */
++ page_top = 0;
++ else
++ page_top = (unsigned)tmp;
++ tmp = (int)(page_width - page_left - inheader.cupsWidth);
++ if (tmp < 0 && tmp >= -1) /* Rounding error */
++ page_right = 0;
++ else
++ page_right = (unsigned)tmp;
+ linesize = (page_width * inheader.cupsBitsPerPixel + 7) / 8;
+ lineoffset = page_left * inheader.cupsBitsPerPixel / 8; /* Round down */
+
+- if (page_left > page_width || page_top > page_height || page_bottom > page_height)
++ fprintf(stderr, "DEBUG: In pixels: Width: %u Height: %u Left: %u Right: %u Top: %u Bottom: %u\n", page_width, page_height, page_left, page_right, page_top, page_bottom);
++ if (page_left > page_width || page_top > page_height || page_bottom > page_height || page_right > page_width)
+ {
+ _cupsLangPrintFilter(stderr, "ERROR", _("Unsupported raster data."));
+ fprintf(stderr, "DEBUG: Bad bottom/left/top margin on page %d.\n", page);
+@@ -290,8 +308,7 @@ main(int argc, /* I - Number of command-line args */
+ outheader.cupsInteger[1] = ~0U;/* CrossFeedTransform */
+ outheader.cupsInteger[2] = 1; /* FeedTransform */
+
+- outheader.cupsInteger[3] = page_width - page_left -
+- inheader.cupsWidth;
++ outheader.cupsInteger[3] = page_right;
+ /* ImageBoxLeft */
+ outheader.cupsInteger[4] = page_top;
+ /* ImageBoxTop */
+@@ -354,8 +371,7 @@ main(int argc, /* I - Number of command-line args */
+ outheader.cupsInteger[1] = ~0U;/* CrossFeedTransform */
+ outheader.cupsInteger[2] = ~0U;/* FeedTransform */
+
+- outheader.cupsInteger[3] = page_width - page_left -
+- inheader.cupsWidth;
++ outheader.cupsInteger[3] = page_right;
+ /* ImageBoxLeft */
+ outheader.cupsInteger[4] = page_bottom;
+ /* ImageBoxTop */
diff --git a/debian/patches/0024-Build-mantohtml-with-the-build-architecture-compiler.patch b/debian/patches/0024-Build-mantohtml-with-the-build-architecture-compiler.patch
new file mode 100644
index 000000000..9e0bb0299
--- /dev/null
+++ b/debian/patches/0024-Build-mantohtml-with-the-build-architecture-compiler.patch
@@ -0,0 +1,110 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Date: Tue, 9 Aug 2016 18:11:49 +0200
+Subject: Build mantohtml with the build architecture compiler
+
+mantohtml is run during build. Thus it needs to be built with the build
+architecture compiler (or execution fails). The obvious part is switching to
+CC_FOR_BUILD. That also depends on it not requiring any other cups components.
+In particular, removing uses of strlcpy and replacing host architecture-
+specific includes is thus needed.
+Bug-Debian: https://bugs.debian.org/837936
+Patch-Name Build-mantohtml-with-the-build-architecture-compiler.patch
+---
+ Makedefs.in | 1 +
+ configure.ac | 9 +++++++++
+ man/Makefile | 5 ++---
+ man/mantohtml.c | 15 ++++++++++-----
+ 4 files changed, 22 insertions(+), 8 deletions(-)
+
+diff --git a/Makedefs.in b/Makedefs.in
+index 038bb94..291099c 100644
+--- a/Makedefs.in
++++ b/Makedefs.in
+@@ -22,6 +22,7 @@ CUPS_VERSION = @CUPS_VERSION@
+ AR = @AR@
+ AWK = @AWK@
+ CC = @LIBTOOL_CC@ @CC@
++CC_FOR_BUILD = @CC_FOR_BUILD@
+ CHMOD = @CHMOD@
+ CXX = @LIBTOOL_CXX@ @CXX@
+ DSO = @DSO@
+diff --git a/configure.ac b/configure.ac
+index 1f75f72..cfa8deee 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,6 +19,15 @@ sinclude(config-scripts/cups-common.m4)
+ sinclude(config-scripts/cups-directories.m4)
+ sinclude(config-scripts/cups-manpages.m4)
+
++AC_MSG_CHECKING([for build system compiler])
++if test "$cross_compiling" = yes; then
++ CC_FOR_BUILD=${CC_FOR_BUILD-cc}
++else
++ CC_FOR_BUILD=${CC}
++fi
++AC_MSG_RESULT(${CC_FOR_BUILD})
++AC_SUBST(CC_FOR_BUILD)
++
+ sinclude(config-scripts/cups-sharedlibs.m4)
+ sinclude(config-scripts/cups-libtool.m4)
+ sinclude(config-scripts/cups-compiler.m4)
+diff --git a/man/Makefile b/man/Makefile
+index 621fe60..e01591a 100644
+--- a/man/Makefile
++++ b/man/Makefile
+@@ -222,6 +222,5 @@ html: $(MAN1) $(MAN5) $(MAN7) $(MAN8) mantohtml
+ ./mantohtml $$file >../doc/help/man-`basename $$file .8`.html; \
+ done
+
+-mantohtml: mantohtml.o ../cups/$(LIBCUPSSTATIC)
+- $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ mantohtml.o $(LINKCUPSSTATIC)
+- $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
++mantohtml: mantohtml.c
++ $(CC_FOR_BUILD) -o $@ $<
+diff --git a/man/mantohtml.c b/man/mantohtml.c
+index 2a9353a..6223f17 100644
+--- a/man/mantohtml.c
++++ b/man/mantohtml.c
+@@ -11,8 +11,10 @@
+ * Include necessary headers.
+ */
+
+-#include <cups/string-private.h>
+-#include <cups/array-private.h>
++#include <ctype.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <unistd.h>
+
+
+@@ -811,7 +813,8 @@ main(int argc, /* I - Number of command-line args */
+ * Anchor for HTML output...
+ */
+
+- strlcpy(anchor, line + 4, sizeof(anchor));
++ strncpy(anchor, line + 4, sizeof(anchor) - 1);
++ anchor[sizeof(anchor) - 1] = '\0';
+ }
+ else if (strncmp(line, ".\\\"", 3))
+ {
+@@ -940,7 +943,8 @@ html_alternate(const char *s, /* I - String */
+ manfile[1024], /* Man page filename */
+ manurl[1024]; /* Man page URL */
+
+- strlcpy(name, s, sizeof(name));
++ strncpy(name, s, sizeof(name) - 1);
++ name[sizeof(name) - 1] = '\0';
+ if ((size_t)(end - s) < sizeof(name))
+ name[end - s] = '\0';
+
+@@ -1173,7 +1177,8 @@ html_fputs(const char *s, /* I - String */
+ if (end[-1] == ',' || end[-1] == '.' || end[-1] == ')')
+ end --;
+
+- strlcpy(temp, s, sizeof(temp));
++ strncpy(temp, s, sizeof(temp) - 1);
++ temp[sizeof(temp) - 1] = '\0';
+ if ((size_t)(end -s) < sizeof(temp))
+ temp[end - s] = '\0';
+
diff --git a/debian/patches/0025-po4a-infrastructure-and-translations-for-manpages.patch b/debian/patches/0025-po4a-infrastructure-and-translations-for-manpages.patch
new file mode 100644
index 000000000..ecfe58203
--- /dev/null
+++ b/debian/patches/0025-po4a-infrastructure-and-translations-for-manpages.patch
@@ -0,0 +1,342 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:50 +0200
+Subject: po4a infrastructure and translations for manpages
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Author: Nicolas François <nicolas.francois@centraliens.net>, Helge Kreutzmann <debian@helgefjell.de>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/478597
+Patch-Name: manpage-translations.patch
+---
+ man/Makefile | 17 +++-
+ man/Makefile.l10n | 235 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ man/de/Makefile | 7 ++
+ man/fr/Makefile | 7 ++
+ 4 files changed, 264 insertions(+), 2 deletions(-)
+ create mode 100644 man/Makefile.l10n
+ create mode 100644 man/de/Makefile
+ create mode 100644 man/fr/Makefile
+
+diff --git a/man/Makefile b/man/Makefile
+index e01591a..48f06c4 100644
+--- a/man/Makefile
++++ b/man/Makefile
+@@ -63,12 +63,18 @@ MAN8 = cupsaccept.8 \
+ lpmove.8 \
+ lpc.8
+
++LANGUAGES=de fr
+
+ #
+ # Make everything...
+ #
+
+-all: $(MAN1) $(MAN5) $(MAN7) $(MAN8)
++all: $(MAN1) $(MAN5) $(MAN7) $(MAN8) translations
++
++translations:
++ # Update the translations and build the translated material
++ po4a --previous ../debian/manpage-po4a/cups.cfg
++ for lang in $(LANGUAGES); do $(MAKE) -C $$lang; done
+
+
+ #
+@@ -91,6 +97,12 @@ unittests:
+
+ clean:
+ $(RM) mantohtml mantohtml.o
++ $(RM) $(MAN1) $(MAN5) $(MAN7) $(MAN8)
++ for lang in $(LANGUAGES); do $(MAKE) -C $$lang clean; done
++ # Make sure the PO files are updated and remove generated
++ # translations.
++ po4a --previous --rm-translations ../debian/manpage-po4a/cups.cfg
++ $(RM) ../debian/manpage-po4a/po/cups.pot
+
+
+ #
+@@ -142,6 +154,7 @@ install-data: all
+ $(RM) $(MANDIR)/man8/$$file; \
+ $(LN) cupsd-helper.8 $(MANDIR)/man8/$$file; \
+ done
++ for lang in $(LANGUAGES); do $(MAKE) -C $$lang install; done
+
+
+ #
+@@ -189,7 +202,7 @@ uninstall:
+ for file in $(MAN8) cupsenable.8 cupsreject.8 cups-deviced.8 cups-driverd.8 cups-exec.8; do \
+ $(RM) $(MANDIR)/man8/$$file; \
+ done
+- -$(RMDIR) $(MANDIR)/man8
++ -$(RMDIR) $(AMANDIR)/man$(MAN8DIR)
+
+
+ #
+diff --git a/man/Makefile.l10n b/man/Makefile.l10n
+new file mode 100644
+index 0000000..08390f5
+--- /dev/null
++++ b/man/Makefile.l10n
+@@ -0,0 +1,235 @@
++#
++# Man page makefile for CUPS.
++#
++# Copyright © 2007-2019 by Apple Inc.
++# Copyright © 1993-2006 by Easy Software Products.
++#
++# Licensed under Apache License v2.0. See the file "LICENSE" for more
++# information.
++#
++
++include ../../Makedefs
++
++
++#
++# Man pages...
++#
++
++MAN1 = cancel.1 \
++ cups.1 \
++ cups-config.1 \
++ cupstestppd.1 \
++ ippeveprinter.1 \
++ $(IPPFIND_MAN) \
++ ipptool.1 \
++ lp.1 \
++ lpoptions.1 \
++ lpq.1 \
++ lprm.1 \
++ lpr.1 \
++ lpstat.1 \
++ ppdc.1 \
++ ppdhtml.1 \
++ ppdi.1 \
++ ppdmerge.1 \
++ ppdpo.1
++MAN5 = classes.conf.5 \
++ client.conf.5 \
++ cups-files.conf.5 \
++ cups-snmp.conf.5 \
++ cupsd.conf.5 \
++ cupsd-logs.5 \
++ ipptoolfile.5 \
++ mailto.conf.5 \
++ mime.convs.5 \
++ mime.types.5 \
++ ppdcfile.5 \
++ printers.conf.5 \
++ subscriptions.conf.5
++MAN7 = backend.7 \
++ filter.7 \
++ ippevepcl.7 \
++ notifier.7
++MAN8 = cupsaccept.8 \
++ cupsctl.8 \
++ cupsfilter.8 \
++ cups-lpd.8 \
++ cups-snmp.8 \
++ cupsd.8 \
++ cupsd-helper.8 \
++ cupsenable.8 \
++ lpadmin.8 \
++ lpinfo.8 \
++ lpmove.8 \
++ lpc.8
++
++
++#
++# Make everything...
++#
++
++# Debian-specific patch: Just assume all files are here.
++all:
++
++
++#
++# Make library targets...
++#
++
++libs:
++
++
++#
++# Make unit tests...
++#
++
++unittests:
++
++
++#
++# Clean all config and object files...
++#
++
++clean:
++ $(RM) mantohtml mantohtml.o
++
++
++#
++# Dummy depend target...
++#
++
++depend:
++
++
++#
++# Install all targets...
++#
++
++# Debian-specific patch: directory-based language namespace
++MANDIR := $(MANDIR)/$(LANGUAGE)
++
++install: all install-data install-headers install-libs install-exec
++
++
++#
++# Install data files...
++#
++
++# Debian-specific patch: skip if doesn't exist
++install-data: all
++ echo Installing man pages in $(MANDIR)/man1...
++ $(INSTALL_DIR) -m 755 $(MANDIR)/man1
++ for file in $(MAN1); do \
++ [ ! -r $$file ] || \
++ $(INSTALL_MAN) $$file $(MANDIR)/man1; \
++ done
++ echo Installing man pages in $(MANDIR)/man5...
++ $(INSTALL_DIR) -m 755 $(MANDIR)/man5
++ for file in $(MAN5); do \
++ [ ! -r $$file ] || \
++ $(INSTALL_MAN) $$file $(MANDIR)/man5; \
++ done
++ echo Installing man pages in $(MANDIR)/man7...
++ $(INSTALL_DIR) -m 755 $(MANDIR)/man7
++ for file in $(MAN7); do \
++ [ ! -r $$file ] || \
++ $(INSTALL_MAN) $$file $(MANDIR)/man7; \
++ done
++ $(RM) $(MANDIR)/man7/ippeveps.7
++ $(LN) ippevepcl.7 $(MANDIR)/man7/ippeveps.7
++ echo Installing man pages in $(MANDIR)/man8...
++ $(INSTALL_DIR) -m 755 $(MANDIR)/man8
++ for file in $(MAN8); do \
++ [ ! -r $$file ] || \
++ $(INSTALL_MAN) $$file $(MANDIR)/man8; \
++ done
++ $(RM) $(MANDIR)/man8/cupsdisable.8
++ $(LN) cupsenable.8 $(MANDIR)/man8/cupsdisable.8
++ $(RM) $(MANDIR)/man8/cupsreject.8
++ $(LN) cupsaccept.8 $(MANDIR)/man8/cupsreject.8
++ for file in cups-deviced.8 cups-driverd.8 cups-exec.8; do \
++ $(RM) $(MANDIR)/man8/$$file; \
++ $(LN) cupsd-helper.8 $(MANDIR)/man8/$$file; \
++ done
++
++
++#
++# Install programs...
++#
++
++install-exec:
++
++
++#
++# Install headers...
++#
++
++install-headers:
++
++
++#
++# Install libraries...
++#
++
++install-libs:
++
++
++#
++# Uninstall files...
++#
++
++uninstall:
++ echo Uninstalling man pages from $(MANDIR)/man1...
++ for file in $(MAN1); do \
++ $(RM) $(MANDIR)/man1/$$file; \
++ done
++ -$(RMDIR) $(MANDIR)/man1
++ echo Uninstalling man pages from $(MANDIR)/man5...
++ for file in $(MAN5); do \
++ $(RM) $(MANDIR)/man5/$$file; \
++ done
++ -$(RMDIR) $(MANDIR)/man5
++ echo Uninstalling man pages from $(MANDIR)/man7...
++ for file in $(MAN7) ippeveps.7; do \
++ $(RM) $(MANDIR)/man7/$$file; \
++ done
++ -$(RMDIR) $(MANDIR)/man7
++ echo Uninstalling man pages from $(MANDIR)/man8...
++ for file in $(MAN8) cupsenable.8 cupsreject.8 cups-deviced.8 cups-driverd.8 cups-exec.8; do \
++ $(RM) $(MANDIR)/man8/$$file; \
++ done
++ -$(RMDIR) $(MANDIR)/man8
++
++
++#
++# Local programs (not built when cross-compiling...)
++#
++
++local: html
++
++
++#
++# Make html versions of man pages...
++#
++
++html: $(MAN1) $(MAN5) $(MAN7) $(MAN8) mantohtml
++ echo Converting man pages to HTML...
++ for file in $(MAN1); do \
++ echo " $$file..."; \
++ ./mantohtml $$file >../doc/help/man-`basename $$file .1`.html; \
++ done
++ for file in $(MAN5); do \
++ echo " $$file..."; \
++ ./mantohtml $$file >../doc/help/man-`basename $$file .5`.html; \
++ done
++ for file in $(MAN7); do \
++ echo " $$file..."; \
++ ./mantohtml $$file >../doc/help/man-`basename $$file .7`.html; \
++ done
++ for file in $(MAN8); do \
++ echo " $$file..."; \
++ ./mantohtml $$file >../doc/help/man-`basename $$file .8`.html; \
++ done
++
++mantohtml: mantohtml.c
++ $(CC_FOR_BUILD) -o $@ $<
+diff --git a/man/de/Makefile b/man/de/Makefile
+new file mode 100644
+index 0000000..7c23784
+--- /dev/null
++++ b/man/de/Makefile
+@@ -0,0 +1,7 @@
++#
++# Man page makefile for the Common UNIX Printing System (CUPS).
++#
++
++LANGUAGE=de
++
++include ../Makefile.l10n
+diff --git a/man/fr/Makefile b/man/fr/Makefile
+new file mode 100644
+index 0000000..6a50e93
+--- /dev/null
++++ b/man/fr/Makefile
+@@ -0,0 +1,7 @@
++#
++# Man page makefile for the Common UNIX Printing System (CUPS).
++#
++
++LANGUAGE=fr
++
++include ../Makefile.l10n
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 000000000..338fda8d4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,25 @@
+0001-Fix-jobs-with-multiple-files-or-multiple-formats.patch
+0002-Tests-Ignore-warnings-from-colord-and-Avahi.patch
+0003-Tests-ignore-errors-triggered-on-ipv6-deprived-hosts.patch
+0004-Tests-Do-not-run-the-CUPS_EUC_JP-test-case-on-BSD-Hu.patch
+0005-Tests-Make-sure-that-all-scheduled-jobs-are-finished.patch
+0006-Tests-Force-LC_-environment-variables-when-testing-n.patch
+0007-Tests-Use-127.0.0.1-instead-of-localhost-to-help-pbu.patch
+0008-Tests-Force-LC_ALL-C-environment-variable-when-grepp.patch
+0009-Tests-Do-not-test-pdftourf.patch
+0010-Move-cupsd.conf.default-from-SERVERROOT-to-DATADIR.patch
+0011-Patch-to-support-Apple-AirPrint-printing-from-iPhone.patch
+0012-CUPS-removes-the-recommended-comments-of-the-NickNam.patch
+0013-Make-log-files-readable-to-group-adm-if-present.patch
+0014-Deactivate-CUPS-own-log-rotating-as-the-system-alrea.patch
+0015-Do-not-mess-with-the-permissions-of-cupsd.conf.patch
+0016-Show-compile-command-lines.patch
+0017-Set-the-default-for-SyncOnClose-to-Yes.patch
+0018-Set-default-job-error-policy-to-retry-job.patch
+0019-Drop-dangling-references-from-cups-lpd.man.patch
+0020-Use-dpkg-architecture-in-cups-config-to-make-it-arch.patch
+0021-Make-lpoptions-list-a-printer-s-options-correctly-al.patch
+0022-Fix-fax-numbers-supplied-via-GTK-print-dialog-removi.patch
+0023-Let-the-rastertopwg-filter-check-rounding-errors-whe.patch
+0024-Build-mantohtml-with-the-build-architecture-compiler.patch
+0025-po4a-infrastructure-and-translations-for-manpages.patch