Bug#770709: unblock: cups-filters/1.0.61-4
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package cups-filters; it has the following change:
* Backport upstream's patch to add support for 'BrowseAllow all' in
cups-browsed.conf (Closes: #766334)
#766334 is severity: normal (I should've bumped it up, it says "all remote
printers became disallowed by default").
In order to move the CUPS browsing configuration from cups (< 1.6, wheezy) to
cups-browsed (in jessie), the cups-daemon (src:cups) and the cups-browsed
(src:cups-filters) postinst collaborate to get the correct stanzas in the new
package. "BrowseAllow all", which was supported in CUPS < 1.6, wasn't supported
in cups-browsed, with the evil detail that it had the exact inverse effect. The
upstream patch backport fixes this.
(The -3 upload had a spurious unwanted change, reverted in -4, sorry for that…)
I'm attaching the full debdiff as well as the patch alone.
unblock cups-filters/1.0.61-4
TIA, cheers,
OdyX
diff -Nru cups-filters-1.0.61/debian/changelog cups-filters-1.0.61/debian/changelog
--- cups-filters-1.0.61/debian/changelog 2014-10-16 14:47:56.000000000 +0200
+++ cups-filters-1.0.61/debian/changelog 2014-11-23 14:57:19.000000000 +0100
@@ -1,3 +1,17 @@
+cups-filters (1.0.61-4) unstable; urgency=medium
+
+ * Brown-paper bag upload: revert unwanted change from previous upload in
+ installed files.
+
+ -- Didier Raboud <odyx@debian.org> Sun, 23 Nov 2014 14:56:37 +0100
+
+cups-filters (1.0.61-3) unstable; urgency=medium
+
+ * Backport upstream's patch to add support for 'BrowseAllow all' in
+ cups-browsed.conf (Closes: #766334)
+
+ -- Didier Raboud <odyx@debian.org> Sun, 23 Nov 2014 14:00:47 +0100
+
cups-filters (1.0.61-2) unstable; urgency=medium
[ Jamie Strandboge ]
diff -Nru cups-filters-1.0.61/debian/patches/r7303_browsed_support_BrowseAllow_all.patch cups-filters-1.0.61/debian/patches/r7303_browsed_support_BrowseAllow_all.patch
--- cups-filters-1.0.61/debian/patches/r7303_browsed_support_BrowseAllow_all.patch 1970-01-01 01:00:00.000000000 +0100
+++ cups-filters-1.0.61/debian/patches/r7303_browsed_support_BrowseAllow_all.patch 2014-10-30 18:13:32.000000000 +0100
@@ -0,0 +1,63 @@
+Description: cups-browsed: support 'BrowseAllow All'
+Bug-Debian: https://bugs.debian.org/766334
+Origin: http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7303
+Author: Tim Waugh <twaugh@redhat.com>
+Last-Update: 2014-10-30
+=== modified file 'utils/cups-browsed.c'
+--- a/utils/cups-browsed.c
++++ b/utils/cups-browsed.c
+@@ -117,6 +117,7 @@
+ cups_array_t *remote_printers;
+ static cups_array_t *netifs;
+ static cups_array_t *browseallow;
++static gboolean browseallow_all = FALSE;
+
+ static GMainLoop *gmainloop = NULL;
+ #ifdef HAVE_AVAHI
+@@ -1669,8 +1670,8 @@
+ allowed (struct sockaddr *srcaddr)
+ {
+ allow_t *allow;
+- if (cupsArrayCount(browseallow) == 0) {
+- /* No "BrowseAllow" line, allow all servers */
++ if (browseallow_all || cupsArrayCount(browseallow) == 0) {
++ /* "BrowseAllow All", or no "BrowseAllow" line, so allow all servers */
+ return TRUE;
+ }
+ for (allow = cupsArrayFirst (browseallow);
+@@ -2522,7 +2523,14 @@
+ {
+ char *p;
+ struct in_addr addr;
+- allow_t *allow = calloc (1, sizeof (allow_t));
++ allow_t *allow;
++
++ if (!strcasecmp (value, "all")) {
++ browseallow_all = TRUE;
++ return 0;
++ }
++
++ allow = calloc (1, sizeof (allow_t));
+ if (value == NULL)
+ goto fail;
+ p = strchr (value, '/');
+--- a/utils/cups-browsed.conf.5
++++ b/utils/cups-browsed.conf.5
+@@ -16,6 +16,7 @@
+ .PP
+ .nf
+ .fam C
++ BrowseAllow All
+ BrowseAllow 192.168.7.20
+ BrowseAllow 192.168.7.0/24
+ BrowseAllow 192.168.7.0/255.255.255.0
+--- a/utils/cups-browsed.conf.in
++++ b/utils/cups-browsed.conf.in
+@@ -14,6 +14,7 @@
+ # BrowseProtocols none
+
+ # Only browse remote printers from selected servers
++# BrowseAllow all
+ # BrowseAllow cups.example.com
+ # BrowseAllow 192.168.1.12
+ # BrowseAllow 192.168.1.0/24
diff -Nru cups-filters-1.0.61/debian/patches/series cups-filters-1.0.61/debian/patches/series
--- cups-filters-1.0.61/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ cups-filters-1.0.61/debian/patches/series 2014-10-30 18:11:17.000000000 +0100
@@ -0,0 +1 @@
+r7303_browsed_support_BrowseAllow_all.patch
Description: cups-browsed: support 'BrowseAllow All'
Bug-Debian: https://bugs.debian.org/766334
Origin: http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7303
Author: Tim Waugh <twaugh@redhat.com>
Last-Update: 2014-10-30
=== modified file 'utils/cups-browsed.c'
--- a/utils/cups-browsed.c
+++ b/utils/cups-browsed.c
@@ -117,6 +117,7 @@
cups_array_t *remote_printers;
static cups_array_t *netifs;
static cups_array_t *browseallow;
+static gboolean browseallow_all = FALSE;
static GMainLoop *gmainloop = NULL;
#ifdef HAVE_AVAHI
@@ -1669,8 +1670,8 @@
allowed (struct sockaddr *srcaddr)
{
allow_t *allow;
- if (cupsArrayCount(browseallow) == 0) {
- /* No "BrowseAllow" line, allow all servers */
+ if (browseallow_all || cupsArrayCount(browseallow) == 0) {
+ /* "BrowseAllow All", or no "BrowseAllow" line, so allow all servers */
return TRUE;
}
for (allow = cupsArrayFirst (browseallow);
@@ -2522,7 +2523,14 @@
{
char *p;
struct in_addr addr;
- allow_t *allow = calloc (1, sizeof (allow_t));
+ allow_t *allow;
+
+ if (!strcasecmp (value, "all")) {
+ browseallow_all = TRUE;
+ return 0;
+ }
+
+ allow = calloc (1, sizeof (allow_t));
if (value == NULL)
goto fail;
p = strchr (value, '/');
--- a/utils/cups-browsed.conf.5
+++ b/utils/cups-browsed.conf.5
@@ -16,6 +16,7 @@
.PP
.nf
.fam C
+ BrowseAllow All
BrowseAllow 192.168.7.20
BrowseAllow 192.168.7.0/24
BrowseAllow 192.168.7.0/255.255.255.0
--- a/utils/cups-browsed.conf.in
+++ b/utils/cups-browsed.conf.in
@@ -14,6 +14,7 @@
# BrowseProtocols none
# Only browse remote printers from selected servers
+# BrowseAllow all
# BrowseAllow cups.example.com
# BrowseAllow 192.168.1.12
# BrowseAllow 192.168.1.0/24
Reply to: