[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#700961: [cups] AirPrint doesn't work on iOS 6 device



Package: cups
Version: 1.5.3-2.14
Severity: important
Tags: patch

As a ubuntu bugreport[1] describes the problem perfectly (and has also
the fix for the problem), I'm copying it just over, I just replaced the
release names:

--

After iOS 6 update on my iPad2 device Airprin doesn't work on my Debian
wheezy machine.
On my iPhone with iOS 5.1.1 still works fine.

[IMPACT]

Everyone with iOS 6 on his iPhone/iPad/iPod Touch, independent whether
iOS 6 was installed from the beginning or by an update, is not able to
print from his iOS device any more, as there are changes in the AirPrint
implementation. Due to Apple's updates this affects Apple hardware of
the last three years.

[TESTCASE]

Print from an Apple iOS device with iOS 6 or newer. The print queues of
your shared printers on your wheezy machine do not appear. After
applying the fixed package the queues will appear and printing will work.

[Regression Potential]

The changes are very simple (see attached debdiff) and so there are no
regressions expected.

--

As this fixes the problem with our local installation and seems
perfectly integrated in ubuntu 12.04 (which uses the same upstream
version) since 2 month, this should not end into a hassle.
Depending on configuration of cupsd, this allows to provide airprint
without any additional modifications[2]

Could we integrate this fix possibly into wheezy?

Thanks Didier Raboud for help in tracing this problem down.

Many thanks, Jan.
[1] https://bugs.launchpad.net/bugs/1054495
[2] https://github.com/cainscou/airprint-generate
-- 
Never write mail to <waja@spamfalle.info>, you have been warned!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a C+++ UL++++ P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V- PS
PE Y++
PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h---- r+++ y++++
------END GEEK CODE BLOCK------
diff -Nru cups-1.5.3/debian/changelog cups-1.5.3/debian/changelog
--- cups-1.5.3/debian/changelog	2013-01-20 17:20:15.000000000 +0100
+++ cups-1.5.3/debian/changelog	2013-02-19 14:06:37.000000000 +0100
@@ -1,3 +1,11 @@
+cups (1.5.3-2.15~jw0) unstable; urgency=low
+
+  [ Jan Wagner ]
+  * debian/patches/airprint-support.patch: Made AirPrint support also working
+    for iOS 6 (LP: #1054495), synched from ubuntu precise.
+
+ -- Didier Raboud <odyx@debian.org>  Tue, 19 Feb 2013 14:06:21 +0100
+
 cups (1.5.3-2.14) unstable; urgency=low
 
   * Add upstream patch to avoid using Kerberos over the local socket.
diff -Nru cups-1.5.3/debian/patches/airprint-support.patch cups-1.5.3/debian/patches/airprint-support.patch
--- cups-1.5.3/debian/patches/airprint-support.patch	2013-01-20 17:20:11.000000000 +0100
+++ cups-1.5.3/debian/patches/airprint-support.patch	2013-02-19 13:46:42.000000000 +0100
@@ -15,13 +15,53 @@
    cupsdSetString(&LPDConfigFile, CUPS_DEFAULT_LPD_CONFIG_FILE);
 --- a/scheduler/dirsvc.c
 +++ b/scheduler/dirsvc.c
-@@ -2522,6 +2522,9 @@
+@@ -2522,6 +2522,12 @@
    keyvalue[i  ][0] = "pdl";
    keyvalue[i++][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[i  ][0] = "URF";
-+  keyvalue[i++][1] = "none";
++  keyvalue[i++][1] = "DM3";
 +
    if (get_auth_info_required(p, air_str, sizeof(air_str)))
    {
      keyvalue[i  ][0] = "air";
+--- a/conf/mime.convs.in
++++ b/conf/mime.convs.in
+@@ -86,6 +86,9 @@
+ # PWG Raster filter for IPP Everywhere...
+ application/vnd.cups-raster	image/pwg-raster		100	rastertopwg
+ 
++# Needed for printing from iOS (AirPrint) clients
++image/urf    	      	       application/pdf			100	-
++
+ ########################################################################
+ #
+ # Raw filter...
+--- a/conf/mime.types
++++ b/conf/mime.types
+@@ -110,6 +110,9 @@
+ 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...
+--- a/scheduler/printers.c
++++ b/scheduler/printers.c
+@@ -3908,7 +3908,9 @@
+       }
+       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 -Nru cups-1.5.3/debian/patches/debian-changes-1.5.3-2.15~jw0 cups-1.5.3/debian/patches/debian-changes-1.5.3-2.15~jw0
--- cups-1.5.3/debian/patches/debian-changes-1.5.3-2.15~jw0	1970-01-01 01:00:00.000000000 +0100
+++ cups-1.5.3/debian/patches/debian-changes-1.5.3-2.15~jw0	2013-02-19 14:11:23.000000000 +0100
@@ -0,0 +1,46 @@
+Description: Upstream changes introduced in version 1.5.3-2.15~jw0
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ cups (1.5.3-2.15~jw0) unstable; urgency=low
+ .
+   [ Jan Wagner ]
+   * debian/patches/airprint-support.patch: Made AirPrint support also working
+     for iOS 6 (LP: #1054495), synched from ubuntu precise.
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Didier Raboud <odyx@debian.org>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054495
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- /dev/null
++++ cups-1.5.3/scheduler/conf.c.rej
+@@ -0,0 +1,15 @@
++--- scheduler/conf.c
+++++ scheduler/conf.c
++@@ -1056,10 +1056,12 @@
++ 			     Group, 1, 1) < 0 ||
++        cupsdCheckPermissions(ServerRoot, "ssl", 0700, RunUser,
++ 			     Group, 1, 0) < 0 ||
+++       /* Never alter permissions of central conffiles
++        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 -Nru cups-1.5.3/debian/patches/series cups-1.5.3/debian/patches/series
--- cups-1.5.3/debian/patches/series	2013-01-20 17:20:15.000000000 +0100
+++ cups-1.5.3/debian/patches/series	2013-02-19 14:11:23.000000000 +0100
@@ -51,3 +51,4 @@
 tests-slow-lpstat.patch
 tests-fix-ppdLocalize-on-unclean-env.patch
 fix_kerberos_auth_local.patch
+debian-changes-1.5.3-2.15~jw0

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: