From 536b50b891942b300ed1247fab9789a6504e8085 Mon Sep 17 00:00:00 2001
From: Didier Raboud <odyx@debian.org>
Date: Thu, 6 Jun 2013 08:10:48 +0200
Subject: [PATCH] Add a cups-client.NEWS notice, a cups-client manpage patch
 and amend the client.conf example file to inform about IPP default version
 change to 2.0 and circumvention measures.

Closes: #704238
Closes: #711192
Thanks: Daniel Richard G.
Thanks: Vincent Lefevre
---
 debian/client.conf                                 |  6 ++-
 debian/cups-client.NEWS                            | 11 ++++++
 ...tion-ipp-version-specifier-in-man-and-ref.patch | 45 ++++++++++++++++++++++
 debian/patches/series                              |  2 +
 4 files changed, 62 insertions(+), 2 deletions(-)
 create mode 100644 debian/cups-client.NEWS
 create mode 100644 debian/patches/mention-ipp-version-specifier-in-man-and-ref.patch

diff --git a/debian/client.conf b/debian/client.conf
index 754c71a..5081ade 100644
--- a/debian/client.conf
+++ b/debian/client.conf
@@ -39,11 +39,13 @@
 # ONLY ONE SERVER NAME MAY BE SPECIFIED AT A TIME.  To use
 # more than one server you must use a local scheduler with browsing
 # and possibly polling.
+# The IPP version (2.0 by default, can be 1.1 or 1.0) can be specified
+# to access older servers.
 #
 
 #ServerName /domain/socket
-#ServerName myhost.domain.com[:port]
-#ServerName ip-address[:port]
+#ServerName myhost.domain.com[:port][/version=1.1]
+#ServerName ip-address[:port][/version=1.1]
 
 #
 # Encryption: whether or not to use encryption; this depends on having
diff --git a/debian/cups-client.NEWS b/debian/cups-client.NEWS
new file mode 100644
index 0000000..ee75765
--- /dev/null
+++ b/debian/cups-client.NEWS
@@ -0,0 +1,11 @@
+cups (1.6.2-9) UNRELEASED; urgency=low
+
+  From Cups 1.6, the default IPP version for requests is now 2.0. For
+  remote connections such as configured with an explicit ServerName in
+  /etc/cups/cups-client.conf, an older IPP version such as 1.1 or even
+  1.0 might need to be explicitely set for printing to keep working, for
+  example:
+
+    ServerName remote-print-server.example.com/version=1.1
+
+ -- Didier Raboud <odyx@debian.org>  Thu, 06 Jun 2013 08:05:57 +0200
diff --git a/debian/patches/mention-ipp-version-specifier-in-man-and-ref.patch b/debian/patches/mention-ipp-version-specifier-in-man-and-ref.patch
new file mode 100644
index 0000000..81cf6f6
--- /dev/null
+++ b/debian/patches/mention-ipp-version-specifier-in-man-and-ref.patch
@@ -0,0 +1,45 @@
+Description: Mention the possibility to add /version=1.1 to the ServerName
+ configuration in various places:
+ - man client.conf
+ - doc/help/ref-client-conf.html
+Bug-Debian: http://bugs.debian.org/704238
+Bug-Debian: http://bugs.debian.org/711192
+Author: Didier Raboud <odyx@debian.org>
+Last-Update: 2013-06-06
+
+--- a/man/client.conf.man.in
++++ b/man/client.conf.man.in
+@@ -40,12 +40,12 @@
+ ("name@server.example.com") for you. The default name is
+ "@CUPS_DEFAULT_GSSSERVICENAME@".
+ .TP 5
+-ServerName hostname-or-ip-address[:port]
++ServerName hostname-or-ip-address[:port][/version=1.1]
+ .TP 5
+ ServerName /domain/socket
+ .br
+ Specifies the address and optionally the port to use when connecting to the
+-server. \fBNote: Not supported on OS X 10.7 or later.\fR
++server. The IPP version (2.0 by default, can be 1.1 or 1.0) can be specified to access older servers. \fBNote: Not supported on OS X 10.7 or later.\fR
+ .TP 5
+ User name
+ .br
+--- a/doc/help/ref-client-conf.html
++++ b/doc/help/ref-client-conf.html
+@@ -56,6 +56,7 @@
+ ServerName foo.bar.com
+ ServerName 11.22.33.44
+ ServerName foo.bar.com:8631
++ServerName foo.bar.com/version=1.1
+ </PRE>
+ 
+ <H3>Description</H3>
+@@ -64,6 +65,8 @@
+ 
+ <P>The default port number is 631 but can be overridden by adding a colon followed by the desired port number to the value.</P>
+ 
++<P>The default IPP version is 2.0 but can be overriden by adding a slash followed by <CODE>/version=</CODE> and the desired IPP version (can be 1.0 or 1.1).</P>
++
+ <P>The default is to use the local server ("<VAR>localhost</VAR>") or domain socket, if so configured.</P>
+ 
+ <BLOCKQUOTE><B>Note:</B>
diff --git a/debian/patches/series b/debian/patches/series
index a941df0..2fe5105 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,6 +7,8 @@ get-ppd-file-for-statically-configured-ipp-shared-queues.patch
 pidfile.patch
 ppd-poll-with-client-conf.patch
 manpage-hyphen-minus.patch
+# Not sent, but needs to be before manpages translation patch
+mention-ipp-version-specifier-in-man-and-ref.patch
 # no answer yet, po4a might not be appropriate
 manpage-translations.patch
 rootbackends-worldreadable.patch
-- 
1.8.2

