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

Bug#989161: marked as done ([pre-approval] unblock: cups/2.3.3op2-3+deb11u1)



Your message dated Sun, 30 May 2021 13:38:08 +0000
with message-id <E1lnLdo-0000ip-54@respighi.debian.org>
and subject line unblock cups
has caused the Debian Bug report #989161,
regarding [pre-approval] unblock: cups/2.3.3op2-3+deb11u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
989161: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989161
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: cups@packages.debian.org

Please approve the following update for src:cups

[ Reason ]
Mikko Rapeli reported a USB printing regression in #989073, which, lukily
enough, was already reported and fixed upstream. It matters for Bullseye's
quality to ensure smooth USB printing.

[ Impact ]
Failure to print without comprehensible error messages nor configurable ways
to fix USB printing.

[ Tests ]
There are none, but as you'll see, these patches merely extend timeouts; also,
they have been reviewed and merged upstream, by the long-term upstream author,
Michael Sweet.

[ Risks ]
Given the trivialness of the patches as well as the extended review, I
consider the risks to be negligible.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]
I'm also attaching the "direct" patches, as my use of git debrebase produces a
noisy debdiff. I have also picked the 2.3.3op2-3+deb11u1 version, as
2.3.3op2-4 was already uploaded in experimental; please advise if a change is
needed.

Many thanks for your work!

unblock cups/2.3.3op2-3+deb11u1
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Tue, 13 Apr 2021 15:44:14 +0200
Subject: backend/usb-libusb.c: Use 60s timeout for reading at backchannel

Some older models malfunction if timeout is too short.

Origin: upstream, https://github.com/OpenPrinting/cups/pull/174
Bug: https://github.com/OpenPrinting/cups/issues/160
Bug-Debian: https://bugs.debian.org/989073
---
 backend/usb-libusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
index d6b0eb4..fbb0d9d 100644
--- a/backend/usb-libusb.c
+++ b/backend/usb-libusb.c
@@ -1704,7 +1704,7 @@ static void *read_thread(void *reference)
     readstatus = libusb_bulk_transfer(g.printer->handle,
 				      g.printer->read_endp,
 				      readbuffer, rbytes,
-				      &rbytes, 250);
+				      &rbytes, 60000);
     if (readstatus == LIBUSB_SUCCESS && rbytes > 0)
     {
       fprintf(stderr, "DEBUG: Read %d bytes of back-channel data...\n", (int)rbytes);
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Tue, 13 Apr 2021 15:47:37 +0200
Subject: backend/usb-libusb.c: Revert enforcing read limits

This commit reverts the change introduced by 2.2.12 [1] - its
implementation caused a regression with Lexmark filters.

[1] https://github.com/apple/cups/commit/35e927f83529cd9b4bc37bcd418c50e307fced35

Origin: upstream, https://github.com/OpenPrinting/cups/pull/174
Bug: https://github.com/OpenPrinting/cups/issues/72
---
 backend/usb-libusb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
index fbb0d9d..89b5182 100644
--- a/backend/usb-libusb.c
+++ b/backend/usb-libusb.c
@@ -1721,7 +1721,8 @@ static void *read_thread(void *reference)
     * Make sure this loop executes no more than once every 250 miliseconds...
     */
 
-    if ((g.wait_eof || !g.read_thread_stop))
+    if ((readstatus != LIBUSB_SUCCESS || rbytes == 0) &&
+	 (g.wait_eof || !g.read_thread_stop))
       usleep(250000);
   }
   while (g.wait_eof || !g.read_thread_stop);
diff -Nru cups-2.3.3op2/debian/changelog cups-2.3.3op2/debian/changelog
--- cups-2.3.3op2/debian/changelog	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/changelog	2021-05-27 08:49:36.000000000 +0200
@@ -1,3 +1,12 @@
+cups (2.3.3op2-3+deb11u1) unstable; urgency=medium
+
+  * Backport 2 upstream USB backend fixes:
+    - Revert enforcing read limits (caused a regression with Lexmark filters)
+    - Use 60s timeout (instead of 250ms) for reading at backchannel, as some
+      older models malfunction if timeout is too short (Closes: #989073)
+
+ -- Didier Raboud <odyx@debian.org>  Thu, 27 May 2021 08:49:36 +0200
+
 cups (2.3.3op2-3) unstable; urgency=medium
 
   [ Helge Kreutzmann ]
diff -Nru cups-2.3.3op2/debian/patches/0001-backend-usb-libusb.c-Use-60s-timeout-for-reading-at-.patch cups-2.3.3op2/debian/patches/0001-backend-usb-libusb.c-Use-60s-timeout-for-reading-at-.patch
--- cups-2.3.3op2/debian/patches/0001-backend-usb-libusb.c-Use-60s-timeout-for-reading-at-.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0001-backend-usb-libusb.c-Use-60s-timeout-for-reading-at-.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,26 @@
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Tue, 13 Apr 2021 15:44:14 +0200
+Subject: backend/usb-libusb.c: Use 60s timeout for reading at backchannel
+
+Some older models malfunction if timeout is too short.
+
+Origin: upstream, https://github.com/OpenPrinting/cups/pull/174
+Bug: https://github.com/OpenPrinting/cups/issues/160
+Bug-Debian: https://bugs.debian.org/989073
+---
+ backend/usb-libusb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
+index d6b0eb4..fbb0d9d 100644
+--- a/backend/usb-libusb.c
++++ b/backend/usb-libusb.c
+@@ -1704,7 +1704,7 @@ static void *read_thread(void *reference)
+     readstatus = libusb_bulk_transfer(g.printer->handle,
+ 				      g.printer->read_endp,
+ 				      readbuffer, rbytes,
+-				      &rbytes, 250);
++				      &rbytes, 60000);
+     if (readstatus == LIBUSB_SUCCESS && rbytes > 0)
+     {
+       fprintf(stderr, "DEBUG: Read %d bytes of back-channel data...\n", (int)rbytes);
diff -Nru cups-2.3.3op2/debian/patches/0001-Let-cups.1-point-to-client.conf.5-not-client.conf.7.patch cups-2.3.3op2/debian/patches/0001-Let-cups.1-point-to-client.conf.5-not-client.conf.7.patch
--- cups-2.3.3op2/debian/patches/0001-Let-cups.1-point-to-client.conf.5-not-client.conf.7.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0001-Let-cups.1-point-to-client.conf.5-not-client.conf.7.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-From: Didier Raboud <odyx@debian.org>
-Date: Fri, 12 Feb 2021 13:47:22 +0100
-Subject: Let cups.1 point to client.conf.5, not client.conf.7
-
-Bug: https://github.com/OpenPrinting/cups/pull/92
-Closes: #982303
----
- man/cups.1 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/man/cups.1 b/man/cups.1
-index 706620d..751ad9a 100644
---- a/man/cups.1
-+++ b/man/cups.1
-@@ -125,7 +125,7 @@ Printers that do not support IPP can be supported using applications such as
- .BR ippeveprinter (1).
- .SH SEE ALSO
- .BR cancel (1),
--.BR client.conf (7),
-+.BR client.conf (5),
- .BR cupsctl (8),
- .BR cupsd (8),
- .BR lp (1),
diff -Nru cups-2.3.3op2/debian/patches/0002-Apple-AirPrint-support.patch cups-2.3.3op2/debian/patches/0002-Apple-AirPrint-support.patch
--- cups-2.3.3op2/debian/patches/0002-Apple-AirPrint-support.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0002-Apple-AirPrint-support.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,90 +0,0 @@
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Tue, 9 Aug 2016 18:11:29 +0200
-Subject: Apple AirPrint support
-
-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
-Bug: https://github.com/OpenPrinting/cups/pull/27
----
- 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 74531a8..bfd1b0b 100644
---- a/scheduler/conf.c
-+++ b/scheduler/conf.c
-@@ -750,7 +750,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 7e9a9f2..3e00874 100644
---- a/scheduler/printers.c
-+++ b/scheduler/printers.c
-@@ -3733,7 +3733,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 -Nru cups-2.3.3op2/debian/patches/0002-backend-usb-libusb.c-Revert-enforcing-read-limits.patch cups-2.3.3op2/debian/patches/0002-backend-usb-libusb.c-Revert-enforcing-read-limits.patch
--- cups-2.3.3op2/debian/patches/0002-backend-usb-libusb.c-Revert-enforcing-read-limits.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0002-backend-usb-libusb.c-Revert-enforcing-read-limits.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,29 @@
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Tue, 13 Apr 2021 15:47:37 +0200
+Subject: backend/usb-libusb.c: Revert enforcing read limits
+
+This commit reverts the change introduced by 2.2.12 [1] - its
+implementation caused a regression with Lexmark filters.
+
+[1] https://github.com/apple/cups/commit/35e927f83529cd9b4bc37bcd418c50e307fced35
+
+Origin: upstream, https://github.com/OpenPrinting/cups/pull/174
+Bug: https://github.com/OpenPrinting/cups/issues/72
+---
+ backend/usb-libusb.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
+index fbb0d9d..89b5182 100644
+--- a/backend/usb-libusb.c
++++ b/backend/usb-libusb.c
+@@ -1721,7 +1721,8 @@ static void *read_thread(void *reference)
+     * Make sure this loop executes no more than once every 250 miliseconds...
+     */
+ 
+-    if ((g.wait_eof || !g.read_thread_stop))
++    if ((readstatus != LIBUSB_SUCCESS || rbytes == 0) &&
++	 (g.wait_eof || !g.read_thread_stop))
+       usleep(250000);
+   }
+   while (g.wait_eof || !g.read_thread_stop);
diff -Nru cups-2.3.3op2/debian/patches/0003-Keep-foomatic-PPDs-recommended-stanzas-in-NickNames.patch cups-2.3.3op2/debian/patches/0003-Keep-foomatic-PPDs-recommended-stanzas-in-NickNames.patch
--- cups-2.3.3op2/debian/patches/0003-Keep-foomatic-PPDs-recommended-stanzas-in-NickNames.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0003-Keep-foomatic-PPDs-recommended-stanzas-in-NickNames.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,37 +0,0 @@
-From: Till Kampetter <till.kampetter@gmail.com>
-Date: Tue, 9 Aug 2016 18:11:36 +0200
-Subject: Keep foomatic PPDs "(recommended)" stanzas in NickNames
-
-Bug-Upstream: https://github.com/OpenPrinting/cups/pull/33
----
- 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 -Nru cups-2.3.3op2/debian/patches/0003-Let-cups.1-point-to-client.conf.5-not-client.conf.7.patch cups-2.3.3op2/debian/patches/0003-Let-cups.1-point-to-client.conf.5-not-client.conf.7.patch
--- cups-2.3.3op2/debian/patches/0003-Let-cups.1-point-to-client.conf.5-not-client.conf.7.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0003-Let-cups.1-point-to-client.conf.5-not-client.conf.7.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,23 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Fri, 12 Feb 2021 13:47:22 +0100
+Subject: Let cups.1 point to client.conf.5, not client.conf.7
+
+Bug: https://github.com/OpenPrinting/cups/pull/92
+Closes: #982303
+---
+ man/cups.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/man/cups.1 b/man/cups.1
+index 706620d..751ad9a 100644
+--- a/man/cups.1
++++ b/man/cups.1
+@@ -125,7 +125,7 @@ Printers that do not support IPP can be supported using applications such as
+ .BR ippeveprinter (1).
+ .SH SEE ALSO
+ .BR cancel (1),
+-.BR client.conf (7),
++.BR client.conf (5),
+ .BR cupsctl (8),
+ .BR cupsd (8),
+ .BR lp (1),
diff -Nru cups-2.3.3op2/debian/patches/0004-Apple-AirPrint-support.patch cups-2.3.3op2/debian/patches/0004-Apple-AirPrint-support.patch
--- cups-2.3.3op2/debian/patches/0004-Apple-AirPrint-support.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0004-Apple-AirPrint-support.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,90 @@
+From: Till Kamppeter <till.kamppeter@gmail.com>
+Date: Tue, 9 Aug 2016 18:11:29 +0200
+Subject: Apple AirPrint support
+
+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
+Bug: https://github.com/OpenPrinting/cups/pull/27
+---
+ 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 74531a8..bfd1b0b 100644
+--- a/scheduler/conf.c
++++ b/scheduler/conf.c
+@@ -750,7 +750,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 7e9a9f2..3e00874 100644
+--- a/scheduler/printers.c
++++ b/scheduler/printers.c
+@@ -3733,7 +3733,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 -Nru cups-2.3.3op2/debian/patches/0004-Debian-Set-LogFileGroup-to-adm.patch cups-2.3.3op2/debian/patches/0004-Debian-Set-LogFileGroup-to-adm.patch
--- cups-2.3.3op2/debian/patches/0004-Debian-Set-LogFileGroup-to-adm.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0004-Debian-Set-LogFileGroup-to-adm.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-From: Martin Pitt <mpitt@debian.org>
-Date: Tue, 9 Aug 2016 18:11:38 +0200
-Subject: Debian: Set LogFileGroup to adm
-
----
- conf/cups-files.conf.in | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/conf/cups-files.conf.in b/conf/cups-files.conf.in
-index af11fcc..80ca351 100644
---- a/conf/cups-files.conf.in
-+++ b/conf/cups-files.conf.in
-@@ -29,6 +29,10 @@ SystemGroup @CUPS_SYSTEM_GROUPS@
- #ConfigFilePerm 0@CUPS_CONFIG_FILE_PERM@
- #LogFilePerm 0@CUPS_LOG_FILE_PERM@
- 
-+# Specifies the group name or ID that will be used for log files.
-+# The default group in Debian is "adm".
-+LogFileGroup adm
-+
- # Location of the file logging all access to the scheduler; may be the name
- # "syslog". If not an absolute path, the value of ServerRoot is used as the
- # root directory.  Also see the "AccessLogLevel" directive in cupsd.conf.
diff -Nru cups-2.3.3op2/debian/patches/0005-Debian-Move-cupsd.conf.default-from-SERVERROOT-to-DA.patch cups-2.3.3op2/debian/patches/0005-Debian-Move-cupsd.conf.default-from-SERVERROOT-to-DA.patch
--- cups-2.3.3op2/debian/patches/0005-Debian-Move-cupsd.conf.default-from-SERVERROOT-to-DA.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0005-Debian-Move-cupsd.conf.default-from-SERVERROOT-to-DA.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,62 +0,0 @@
-From: Didier Raboud <odyx@debian.org>
-Date: Tue, 9 Aug 2016 18:11:24 +0200
-Subject: Debian: Move cupsd.conf.default from SERVERROOT to DATADIR
-
-Origin: vendor
-Bug: https://github.com/apple/cups/issues/4342
-Bug: https://github.com/OpenPrinting/cups/pull/26
-Bug-Debian: https://bugs.debian.org/640124
----
- 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 -Nru cups-2.3.3op2/debian/patches/0005-Keep-foomatic-PPDs-recommended-stanzas-in-NickNames.patch cups-2.3.3op2/debian/patches/0005-Keep-foomatic-PPDs-recommended-stanzas-in-NickNames.patch
--- cups-2.3.3op2/debian/patches/0005-Keep-foomatic-PPDs-recommended-stanzas-in-NickNames.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0005-Keep-foomatic-PPDs-recommended-stanzas-in-NickNames.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,37 @@
+From: Till Kampetter <till.kampetter@gmail.com>
+Date: Tue, 9 Aug 2016 18:11:36 +0200
+Subject: Keep foomatic PPDs "(recommended)" stanzas in NickNames
+
+Bug-Upstream: https://github.com/OpenPrinting/cups/pull/33
+---
+ 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 -Nru cups-2.3.3op2/debian/patches/0006-Debian-Do-not-alter-the-permissions-of-cupsd.conf-ev.patch cups-2.3.3op2/debian/patches/0006-Debian-Do-not-alter-the-permissions-of-cupsd.conf-ev.patch
--- cups-2.3.3op2/debian/patches/0006-Debian-Do-not-alter-the-permissions-of-cupsd.conf-ev.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0006-Debian-Do-not-alter-the-permissions-of-cupsd.conf-ev.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-From: Martin Pitt <mpitt@debian.org>
-Date: Tue, 9 Aug 2016 18:11:41 +0200
-Subject: Debian: Do not alter the permissions of cupsd.conf, ever
-
-Origin: vendor
-Bug: https://github.com/OpenPrinting/cups/pull/36
----
- scheduler/conf.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/scheduler/conf.c b/scheduler/conf.c
-index bfd1b0b..c8cd5ea 100644
---- a/scheduler/conf.c
-+++ b/scheduler/conf.c
-@@ -1140,10 +1140,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 -Nru cups-2.3.3op2/debian/patches/0006-Debian-Set-LogFileGroup-to-adm.patch cups-2.3.3op2/debian/patches/0006-Debian-Set-LogFileGroup-to-adm.patch
--- cups-2.3.3op2/debian/patches/0006-Debian-Set-LogFileGroup-to-adm.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0006-Debian-Set-LogFileGroup-to-adm.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,23 @@
+From: Martin Pitt <mpitt@debian.org>
+Date: Tue, 9 Aug 2016 18:11:38 +0200
+Subject: Debian: Set LogFileGroup to adm
+
+---
+ conf/cups-files.conf.in | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/conf/cups-files.conf.in b/conf/cups-files.conf.in
+index af11fcc..80ca351 100644
+--- a/conf/cups-files.conf.in
++++ b/conf/cups-files.conf.in
+@@ -29,6 +29,10 @@ SystemGroup @CUPS_SYSTEM_GROUPS@
+ #ConfigFilePerm 0@CUPS_CONFIG_FILE_PERM@
+ #LogFilePerm 0@CUPS_LOG_FILE_PERM@
+ 
++# Specifies the group name or ID that will be used for log files.
++# The default group in Debian is "adm".
++LogFileGroup adm
++
+ # Location of the file logging all access to the scheduler; may be the name
+ # "syslog". If not an absolute path, the value of ServerRoot is used as the
+ # root directory.  Also see the "AccessLogLevel" directive in cupsd.conf.
diff -Nru cups-2.3.3op2/debian/patches/0007-Debian-Move-cupsd.conf.default-from-SERVERROOT-to-DA.patch cups-2.3.3op2/debian/patches/0007-Debian-Move-cupsd.conf.default-from-SERVERROOT-to-DA.patch
--- cups-2.3.3op2/debian/patches/0007-Debian-Move-cupsd.conf.default-from-SERVERROOT-to-DA.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0007-Debian-Move-cupsd.conf.default-from-SERVERROOT-to-DA.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,62 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:24 +0200
+Subject: Debian: Move cupsd.conf.default from SERVERROOT to DATADIR
+
+Origin: vendor
+Bug: https://github.com/apple/cups/issues/4342
+Bug: https://github.com/OpenPrinting/cups/pull/26
+Bug-Debian: https://bugs.debian.org/640124
+---
+ 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 -Nru cups-2.3.3op2/debian/patches/0007-Debian-Show-compile-command-lines.patch cups-2.3.3op2/debian/patches/0007-Debian-Show-compile-command-lines.patch
--- cups-2.3.3op2/debian/patches/0007-Debian-Show-compile-command-lines.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0007-Debian-Show-compile-command-lines.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-From: Till Kampetter <till.kampetter@gmail.com>
-Date: Tue, 9 Aug 2016 18:11:43 +0200
-Subject: Debian: Show compile command lines
-
----
- 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 -Nru cups-2.3.3op2/debian/patches/0008-Debian-Do-not-alter-the-permissions-of-cupsd.conf-ev.patch cups-2.3.3op2/debian/patches/0008-Debian-Do-not-alter-the-permissions-of-cupsd.conf-ev.patch
--- cups-2.3.3op2/debian/patches/0008-Debian-Do-not-alter-the-permissions-of-cupsd.conf-ev.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0008-Debian-Do-not-alter-the-permissions-of-cupsd.conf-ev.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,27 @@
+From: Martin Pitt <mpitt@debian.org>
+Date: Tue, 9 Aug 2016 18:11:41 +0200
+Subject: Debian: Do not alter the permissions of cupsd.conf, ever
+
+Origin: vendor
+Bug: https://github.com/OpenPrinting/cups/pull/36
+---
+ scheduler/conf.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/scheduler/conf.c b/scheduler/conf.c
+index bfd1b0b..c8cd5ea 100644
+--- a/scheduler/conf.c
++++ b/scheduler/conf.c
+@@ -1140,10 +1140,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 -Nru cups-2.3.3op2/debian/patches/0008-Debian-Use-dpkg-architecture-in-cups-config-to-make-.patch cups-2.3.3op2/debian/patches/0008-Debian-Use-dpkg-architecture-in-cups-config-to-make-.patch
--- cups-2.3.3op2/debian/patches/0008-Debian-Use-dpkg-architecture-in-cups-config-to-make-.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0008-Debian-Use-dpkg-architecture-in-cups-config-to-make-.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,49 +0,0 @@
-From: Didier Raboud <odyx@debian.org>
-Date: Tue, 9 Aug 2016 18:11:49 +0200
-Subject: Debian: 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
----
- 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 -Nru cups-2.3.3op2/debian/patches/0009-Debian-Build-mantohtml-with-the-build-architecture-c.patch cups-2.3.3op2/debian/patches/0009-Debian-Build-mantohtml-with-the-build-architecture-c.patch
--- cups-2.3.3op2/debian/patches/0009-Debian-Build-mantohtml-with-the-build-architecture-c.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0009-Debian-Build-mantohtml-with-the-build-architecture-c.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,110 +0,0 @@
-From: Helmut Grohne <helmut@subdivi.de>
-Date: Tue, 9 Aug 2016 18:11:49 +0200
-Subject: Debian: 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
----
- 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 93a4b97..b60b832 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -20,6 +20,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 -Nru cups-2.3.3op2/debian/patches/0009-Debian-Show-compile-command-lines.patch cups-2.3.3op2/debian/patches/0009-Debian-Show-compile-command-lines.patch
--- cups-2.3.3op2/debian/patches/0009-Debian-Show-compile-command-lines.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0009-Debian-Show-compile-command-lines.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,20 @@
+From: Till Kampetter <till.kampetter@gmail.com>
+Date: Tue, 9 Aug 2016 18:11:43 +0200
+Subject: Debian: Show compile command lines
+
+---
+ 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 -Nru cups-2.3.3op2/debian/patches/0010-Debian-Reproducibility-httpAddrGetHostname-test-fail.patch cups-2.3.3op2/debian/patches/0010-Debian-Reproducibility-httpAddrGetHostname-test-fail.patch
--- cups-2.3.3op2/debian/patches/0010-Debian-Reproducibility-httpAddrGetHostname-test-fail.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0010-Debian-Reproducibility-httpAddrGetHostname-test-fail.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-From: Didier Raboud <odyx@debian.org>
-Date: Wed, 3 Feb 2021 14:27:34 +0100
-Subject: Debian: Reproducibility: httpAddrGetHostname() test fails under
- reprotest; skip it
-
----
- cups/testhttp.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/cups/testhttp.c b/cups/testhttp.c
-index dfb767c..8cb87d6 100644
---- a/cups/testhttp.c
-+++ b/cups/testhttp.c
-@@ -416,8 +416,7 @@ main(int  argc,				/* I - Number of command-line arguments */
-     }
-     else
-     {
--      failures ++;
--      puts("FAIL");
-+      puts("FAIL (Debian Reproducibility; failure allowed, as this is known to fail under reprotest");
-     }
- 
-    /*
diff -Nru cups-2.3.3op2/debian/patches/0010-Debian-Use-dpkg-architecture-in-cups-config-to-make-.patch cups-2.3.3op2/debian/patches/0010-Debian-Use-dpkg-architecture-in-cups-config-to-make-.patch
--- cups-2.3.3op2/debian/patches/0010-Debian-Use-dpkg-architecture-in-cups-config-to-make-.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0010-Debian-Use-dpkg-architecture-in-cups-config-to-make-.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,49 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:49 +0200
+Subject: Debian: 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
+---
+ 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 -Nru cups-2.3.3op2/debian/patches/0011-Debian-Build-mantohtml-with-the-build-architecture-c.patch cups-2.3.3op2/debian/patches/0011-Debian-Build-mantohtml-with-the-build-architecture-c.patch
--- cups-2.3.3op2/debian/patches/0011-Debian-Build-mantohtml-with-the-build-architecture-c.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0011-Debian-Build-mantohtml-with-the-build-architecture-c.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,110 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Date: Tue, 9 Aug 2016 18:11:49 +0200
+Subject: Debian: 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
+---
+ 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 93a4b97..b60b832 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,6 +20,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 -Nru cups-2.3.3op2/debian/patches/0011-Debian-Reproducibility-Do-not-run-stp-tests-as-root.patch cups-2.3.3op2/debian/patches/0011-Debian-Reproducibility-Do-not-run-stp-tests-as-root.patch
--- cups-2.3.3op2/debian/patches/0011-Debian-Reproducibility-Do-not-run-stp-tests-as-root.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0011-Debian-Reproducibility-Do-not-run-stp-tests-as-root.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-From: Didier Raboud <odyx@debian.org>
-Date: Wed, 3 Feb 2021 16:30:08 +0100
-Subject: Debian: Reproducibility: Do not run stp tests as root
-
-Reprotest insist in running these tests as root; skip them there.
----
- test/run-stp-tests.sh | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
-index 4498a8c..ce868ea 100755
---- a/test/run-stp-tests.sh
-+++ b/test/run-stp-tests.sh
-@@ -19,7 +19,8 @@ argcount=$#
- 
- if test "x`id -u`" = x0; then
- 	echo Please run this as a normal user. Not supported when run as root.
--	exit 1
-+	echo "Debian Reproducibility: Skipping allowed, as this is known to break under reprotest. This message MUST NOT be visible in normal Debian buildd logs."
-+	exit 0
- fi
- 
- #
diff -Nru cups-2.3.3op2/debian/patches/0012-Debian-Reproducibility-httpAddrGetHostname-test-fail.patch cups-2.3.3op2/debian/patches/0012-Debian-Reproducibility-httpAddrGetHostname-test-fail.patch
--- cups-2.3.3op2/debian/patches/0012-Debian-Reproducibility-httpAddrGetHostname-test-fail.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0012-Debian-Reproducibility-httpAddrGetHostname-test-fail.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,23 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Wed, 3 Feb 2021 14:27:34 +0100
+Subject: Debian: Reproducibility: httpAddrGetHostname() test fails under
+ reprotest; skip it
+
+---
+ cups/testhttp.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/cups/testhttp.c b/cups/testhttp.c
+index dfb767c..8cb87d6 100644
+--- a/cups/testhttp.c
++++ b/cups/testhttp.c
+@@ -416,8 +416,7 @@ main(int  argc,				/* I - Number of command-line arguments */
+     }
+     else
+     {
+-      failures ++;
+-      puts("FAIL");
++      puts("FAIL (Debian Reproducibility; failure allowed, as this is known to fail under reprotest");
+     }
+ 
+    /*
diff -Nru cups-2.3.3op2/debian/patches/0012-Debian-Reproducibility-Run-testlang-for-each-provide.patch cups-2.3.3op2/debian/patches/0012-Debian-Reproducibility-Run-testlang-for-each-provide.patch
--- cups-2.3.3op2/debian/patches/0012-Debian-Reproducibility-Run-testlang-for-each-provide.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0012-Debian-Reproducibility-Run-testlang-for-each-provide.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
-From: Didier Raboud <odyx@debian.org>
-Date: Wed, 3 Feb 2021 16:20:20 +0100
-Subject: Debian: Reproducibility: Run testlang for each provided CUPS locale
-MIME-Version: 1.0
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
-… and only for these.
-
-Of the build environment forces LC_ALL to a non-provided locale, the build will fail.
----
- cups/Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/cups/Makefile b/cups/Makefile
-index 4e2aa6d..2068349 100644
---- a/cups/Makefile
-+++ b/cups/Makefile
-@@ -639,9 +639,9 @@ testlang:	testlang.o $(LIBCUPSSTATIC)
- 		lang=`basename $$po .po | sed -e '1,$$s/^cups_//'`; \
- 		$(MKDIR) locale/$$lang; \
- 		$(LN) ../../$$po locale/$$lang; \
-+		echo Running language API tests for $$lang...; \
-+		LOCALEDIR=locale ./testlang -l $$lang; \
- 	done
--	echo Running language API tests...
--	LOCALEDIR=locale ./testlang
- 
- 
- #
diff -Nru cups-2.3.3op2/debian/patches/0013-Debian-po4a-infrastructure-and-translations-for-manp.patch cups-2.3.3op2/debian/patches/0013-Debian-po4a-infrastructure-and-translations-for-manp.patch
--- cups-2.3.3op2/debian/patches/0013-Debian-po4a-infrastructure-and-translations-for-manp.patch	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0013-Debian-po4a-infrastructure-and-translations-for-manp.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,341 +0,0 @@
-From: Didier Raboud <odyx@debian.org>
-Date: Tue, 9 Aug 2016 18:11:50 +0200
-Subject: Debian: 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
----
- 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 -Nru cups-2.3.3op2/debian/patches/0013-Debian-Reproducibility-Do-not-run-stp-tests-as-root.patch cups-2.3.3op2/debian/patches/0013-Debian-Reproducibility-Do-not-run-stp-tests-as-root.patch
--- cups-2.3.3op2/debian/patches/0013-Debian-Reproducibility-Do-not-run-stp-tests-as-root.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0013-Debian-Reproducibility-Do-not-run-stp-tests-as-root.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,23 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Wed, 3 Feb 2021 16:30:08 +0100
+Subject: Debian: Reproducibility: Do not run stp tests as root
+
+Reprotest insist in running these tests as root; skip them there.
+---
+ test/run-stp-tests.sh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
+index 4498a8c..ce868ea 100755
+--- a/test/run-stp-tests.sh
++++ b/test/run-stp-tests.sh
+@@ -19,7 +19,8 @@ argcount=$#
+ 
+ if test "x`id -u`" = x0; then
+ 	echo Please run this as a normal user. Not supported when run as root.
+-	exit 1
++	echo "Debian Reproducibility: Skipping allowed, as this is known to break under reprotest. This message MUST NOT be visible in normal Debian buildd logs."
++	exit 0
+ fi
+ 
+ #
diff -Nru cups-2.3.3op2/debian/patches/0014-Debian-Reproducibility-Run-testlang-for-each-provide.patch cups-2.3.3op2/debian/patches/0014-Debian-Reproducibility-Run-testlang-for-each-provide.patch
--- cups-2.3.3op2/debian/patches/0014-Debian-Reproducibility-Run-testlang-for-each-provide.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0014-Debian-Reproducibility-Run-testlang-for-each-provide.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,30 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Wed, 3 Feb 2021 16:20:20 +0100
+Subject: Debian: Reproducibility: Run testlang for each provided CUPS locale
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+… and only for these.
+
+Of the build environment forces LC_ALL to a non-provided locale, the build will fail.
+---
+ cups/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cups/Makefile b/cups/Makefile
+index 4e2aa6d..2068349 100644
+--- a/cups/Makefile
++++ b/cups/Makefile
+@@ -639,9 +639,9 @@ testlang:	testlang.o $(LIBCUPSSTATIC)
+ 		lang=`basename $$po .po | sed -e '1,$$s/^cups_//'`; \
+ 		$(MKDIR) locale/$$lang; \
+ 		$(LN) ../../$$po locale/$$lang; \
++		echo Running language API tests for $$lang...; \
++		LOCALEDIR=locale ./testlang -l $$lang; \
+ 	done
+-	echo Running language API tests...
+-	LOCALEDIR=locale ./testlang
+ 
+ 
+ #
diff -Nru cups-2.3.3op2/debian/patches/0015-Debian-po4a-infrastructure-and-translations-for-manp.patch cups-2.3.3op2/debian/patches/0015-Debian-po4a-infrastructure-and-translations-for-manp.patch
--- cups-2.3.3op2/debian/patches/0015-Debian-po4a-infrastructure-and-translations-for-manp.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-2.3.3op2/debian/patches/0015-Debian-po4a-infrastructure-and-translations-for-manp.patch	2021-05-27 08:49:36.000000000 +0200
@@ -0,0 +1,341 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 9 Aug 2016 18:11:50 +0200
+Subject: Debian: 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
+---
+ 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 -Nru cups-2.3.3op2/debian/patches/series cups-2.3.3op2/debian/patches/series
--- cups-2.3.3op2/debian/patches/series	2021-02-12 14:09:29.000000000 +0100
+++ cups-2.3.3op2/debian/patches/series	2021-05-27 08:49:36.000000000 +0200
@@ -1,13 +1,15 @@
-0001-Let-cups.1-point-to-client.conf.5-not-client.conf.7.patch
-0002-Apple-AirPrint-support.patch
-0003-Keep-foomatic-PPDs-recommended-stanzas-in-NickNames.patch
-0004-Debian-Set-LogFileGroup-to-adm.patch
-0005-Debian-Move-cupsd.conf.default-from-SERVERROOT-to-DA.patch
-0006-Debian-Do-not-alter-the-permissions-of-cupsd.conf-ev.patch
-0007-Debian-Show-compile-command-lines.patch
-0008-Debian-Use-dpkg-architecture-in-cups-config-to-make-.patch
-0009-Debian-Build-mantohtml-with-the-build-architecture-c.patch
-0010-Debian-Reproducibility-httpAddrGetHostname-test-fail.patch
-0011-Debian-Reproducibility-Do-not-run-stp-tests-as-root.patch
-0012-Debian-Reproducibility-Run-testlang-for-each-provide.patch
-0013-Debian-po4a-infrastructure-and-translations-for-manp.patch
+0001-backend-usb-libusb.c-Use-60s-timeout-for-reading-at-.patch
+0002-backend-usb-libusb.c-Revert-enforcing-read-limits.patch
+0003-Let-cups.1-point-to-client.conf.5-not-client.conf.7.patch
+0004-Apple-AirPrint-support.patch
+0005-Keep-foomatic-PPDs-recommended-stanzas-in-NickNames.patch
+0006-Debian-Set-LogFileGroup-to-adm.patch
+0007-Debian-Move-cupsd.conf.default-from-SERVERROOT-to-DA.patch
+0008-Debian-Do-not-alter-the-permissions-of-cupsd.conf-ev.patch
+0009-Debian-Show-compile-command-lines.patch
+0010-Debian-Use-dpkg-architecture-in-cups-config-to-make-.patch
+0011-Debian-Build-mantohtml-with-the-build-architecture-c.patch
+0012-Debian-Reproducibility-httpAddrGetHostname-test-fail.patch
+0013-Debian-Reproducibility-Do-not-run-stp-tests-as-root.patch
+0014-Debian-Reproducibility-Run-testlang-for-each-provide.patch
+0015-Debian-po4a-infrastructure-and-translations-for-manp.patch

--- End Message ---
--- Begin Message ---
Unblocked.

--- End Message ---

Reply to: