diff -Nru cups-filters-1.13.2/configure cups-filters-1.13.3/configure --- cups-filters-1.13.2/configure 2016-12-28 16:00:25.000000000 +0000 +++ cups-filters-1.13.3/configure 2017-01-18 23:13:47.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for cups-filters 1.13.2. +# Generated by GNU Autoconf 2.69 for cups-filters 1.13.3. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='cups-filters' PACKAGE_TARNAME='cups-filters' -PACKAGE_VERSION='1.13.2' -PACKAGE_STRING='cups-filters 1.13.2' +PACKAGE_VERSION='1.13.3' +PACKAGE_STRING='cups-filters 1.13.3' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1493,7 +1493,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures cups-filters 1.13.2 to adapt to many kinds of systems. +\`configure' configures cups-filters 1.13.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1564,7 +1564,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cups-filters 1.13.2:";; + short | recursive ) echo "Configuration of cups-filters 1.13.3:";; esac cat <<\_ACEOF @@ -1788,7 +1788,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cups-filters configure 1.13.2 +cups-filters configure 1.13.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2426,7 +2426,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by cups-filters $as_me 1.13.2, which was +It was created by cups-filters $as_me 1.13.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3461,7 +3461,7 @@ # Define the identity of the package. PACKAGE='cups-filters' - VERSION='1.13.2' + VERSION='1.13.3' cat >>confdefs.h <<_ACEOF @@ -21053,7 +21053,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by cups-filters $as_me 1.13.2, which was +This file was extended by cups-filters $as_me 1.13.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21119,7 +21119,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -cups-filters config.status 1.13.2 +cups-filters config.status 1.13.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru cups-filters-1.13.2/configure.ac cups-filters-1.13.3/configure.ac --- cups-filters-1.13.2/configure.ac 2016-12-28 15:50:26.000000000 +0000 +++ cups-filters-1.13.3/configure.ac 2017-01-18 23:11:38.000000000 +0000 @@ -7,7 +7,7 @@ # ==================== m4_define([cups_filters_version_major],[1]) m4_define([cups_filters_version_minor],[13]) -m4_define([cups_filters_version_micro],[2]) +m4_define([cups_filters_version_micro],[3]) m4_define([cups_filters_version],[cups_filters_version_major.cups_filters_version_minor.cups_filters_version_micro]) # ============= diff -Nru cups-filters-1.13.2/cupsfilters/ppdgenerator.c cups-filters-1.13.3/cupsfilters/ppdgenerator.c --- cups-filters-1.13.2/cupsfilters/ppdgenerator.c 2016-12-21 23:17:35.000000000 +0000 +++ cups-filters-1.13.3/cupsfilters/ppdgenerator.c 2017-01-15 23:53:28.000000000 +0000 @@ -548,6 +548,9 @@ formatfound = 1; is_apple = 1; #endif + } else if (!_cups_strncasecmp(format, "image/jpeg", 10)) { + cupsFilePuts(fp, "*cupsFilter2: \"image/jpeg image/jpeg 0 -\"\n"); + formatfound = 1; } if (attr) /* Next format in attribute */ @@ -1203,6 +1206,79 @@ } /* + * Output bin... + */ + + if ((attr = ippFindAttribute(response, "output-bin-default", IPP_TAG_ZERO)) != NULL) + pwg_ppdize_name(ippGetString(attr, 0, NULL), ppdname, sizeof(ppdname)); + else + strlcpy(ppdname, "Unknown", sizeof(ppdname)); + + if ((attr = ippFindAttribute(response, "output-bin-supported", IPP_TAG_ZERO)) != NULL && (count = ippGetCount(attr)) > 1) + { + static const char * const output_bins[][2] = + { /* "output-bin" strings */ + { "auto", _("Automatic") }, + { "bottom", _("Bottom Tray") }, + { "center", _("Center Tray") }, + { "face-down", _("Face Down") }, + { "face-up", _("Face Up") }, + { "large-capacity", _("Large Capacity Tray") }, + { "left", _("Left Tray") }, + { "mailbox-1", _("Mailbox 1") }, + { "mailbox-2", _("Mailbox 2") }, + { "mailbox-3", _("Mailbox 3") }, + { "mailbox-4", _("Mailbox 4") }, + { "mailbox-5", _("Mailbox 5") }, + { "mailbox-6", _("Mailbox 6") }, + { "mailbox-7", _("Mailbox 7") }, + { "mailbox-8", _("Mailbox 8") }, + { "mailbox-9", _("Mailbox 9") }, + { "mailbox-10", _("Mailbox 10") }, + { "middle", _("Middle") }, + { "my-mailbox", _("My Mailbox") }, + { "rear", _("Rear Tray") }, + { "right", _("Right Tray") }, + { "side", _("Side Tray") }, + { "stacker-1", _("Stacker 1") }, + { "stacker-2", _("Stacker 2") }, + { "stacker-3", _("Stacker 3") }, + { "stacker-4", _("Stacker 4") }, + { "stacker-5", _("Stacker 5") }, + { "stacker-6", _("Stacker 6") }, + { "stacker-7", _("Stacker 7") }, + { "stacker-8", _("Stacker 8") }, + { "stacker-9", _("Stacker 9") }, + { "stacker-10", _("Stacker 10") }, + { "top", _("Top Tray") }, + { "tray-1", _("Tray 1") }, + { "tray-2", _("Tray 2") }, + { "tray-3", _("Tray 3") }, + { "tray-4", _("Tray 4") }, + { "tray-5", _("Tray 5") }, + { "tray-6", _("Tray 6") }, + { "tray-7", _("Tray 7") }, + { "tray-8", _("Tray 8") }, + { "tray-9", _("Tray 9") }, + { "tray-10", _("Tray 10") } + }; + + cupsFilePrintf(fp, "*OpenUI *OutputBin: PickOne\n" + "*OrderDependency: 10 AnySetup *OutputBin\n" + "*DefaultOutputBin: %s\n", ppdname); + for (i = 0; i < (int)(sizeof(output_bins) / sizeof(output_bins[0])); i ++) + { + if (!ippContainsString(attr, output_bins[i][0])) + continue; + + pwg_ppdize_name(output_bins[i][0], ppdname, sizeof(ppdname)); + + cupsFilePrintf(fp, "*OutputBin %s/%s: \"\"\n", ppdname, _cupsLangString(lang, output_bins[i][1])); + } + cupsFilePuts(fp, "*CloseUI: *OutputBin\n"); + } + + /* * Finishing options... */ diff -Nru cups-filters-1.13.2/debian/changelog cups-filters-1.13.3/debian/changelog --- cups-filters-1.13.2/debian/changelog 2016-12-29 08:33:24.000000000 +0000 +++ cups-filters-1.13.3/debian/changelog 2017-01-19 13:02:51.000000000 +0000 @@ -1,3 +1,13 @@ +cups-filters (1.13.3-1) experimental; urgency=medium + + * New upstream version 1.13.3 + - libcupsfilters: When auto-generating PPD files added support for + passing through JPEG input to printers which understand JPEG. This + is also done in CUPS-generated PPDs (Closes: #851499) + * Build-Depend on CUPS 2.2.2 + + -- Didier Raboud Thu, 19 Jan 2017 14:02:51 +0100 + cups-filters (1.13.2-1) experimental; urgency=medium * New upstream version 1.13.2 diff -Nru cups-filters-1.13.2/debian/control cups-filters-1.13.3/debian/control --- cups-filters-1.13.2/debian/control 2016-12-29 08:30:05.000000000 +0000 +++ cups-filters-1.13.3/debian/control 2017-01-19 13:01:41.000000000 +0000 @@ -27,7 +27,7 @@ libjpeg-dev, libpng-dev, libtiff-dev, - libcups2-dev (>= 2.2.1-41-g49c592936), + libcups2-dev (>= 2.2.2), libcupsimage2-dev (>= 1.5.2-6~), libijs-dev, zlib1g-dev, diff -Nru cups-filters-1.13.2/INSTALL cups-filters-1.13.3/INSTALL --- cups-filters-1.13.2/INSTALL 2016-12-28 15:50:11.000000000 +0000 +++ cups-filters-1.13.3/INSTALL 2017-01-18 23:11:23.000000000 +0000 @@ -1,4 +1,4 @@ -INSTALL - OpenPrinting CUPS Filters v1.13.2 - 2016-12-28 +INSTALL - OpenPrinting CUPS Filters v1.13.3 - 2017-01-18 -------------------------------------------------------- This file describes how to compile and install OpenPrinting CUPS diff -Nru cups-filters-1.13.2/NEWS cups-filters-1.13.3/NEWS --- cups-filters-1.13.2/NEWS 2016-12-28 15:56:05.000000000 +0000 +++ cups-filters-1.13.3/NEWS 2017-01-18 23:10:39.000000000 +0000 @@ -1,6 +1,17 @@ -NEWS - OpenPrinting CUPS Filters v1.13.2 - 2016-12-28 +NEWS - OpenPrinting CUPS Filters v1.13.3 - 2017-01-18 ----------------------------------------------------- +CHANGES IN V1.13.3 + + - libcupsfilters: When auto-generating PPD files added support + for passing through JPEG input to printers which understand + JPEG. This is also done in CUPS-generated PPDs (Debian bug + #851499). + - libcupsfilters: Added the "output-bin" option support from + CUPS' PPD generator to our PPD generator (CUPS Issue #4938). + - cups-browsed: Make support for printers with IPv6 IP address + work. Both link-local and regular addresses work. + CHANGES IN V1.13.2 - cupsfilters.drv: Corrected cupsFilter entry for the "Generic diff -Nru cups-filters-1.13.2/README cups-filters-1.13.3/README --- cups-filters-1.13.2/README 2016-12-28 15:49:51.000000000 +0000 +++ cups-filters-1.13.3/README 2017-01-18 23:11:00.000000000 +0000 @@ -1,4 +1,4 @@ -README - OpenPrinting CUPS Filters v1.13.2 - 2016-12-28 +README - OpenPrinting CUPS Filters v1.13.3 - 2017-01-18 ------------------------------------------------------- Looking for compile instructions? Read the file "INSTALL.txt" diff -Nru cups-filters-1.13.2/utils/cups-browsed.c cups-filters-1.13.3/utils/cups-browsed.c --- cups-filters-1.13.2/utils/cups-browsed.c 2016-12-17 17:18:07.000000000 +0000 +++ cups-filters-1.13.3/utils/cups-browsed.c 2017-01-05 01:36:38.000000000 +0000 @@ -4821,11 +4821,18 @@ (!browseallow_all && cupsArrayCount(browseallow) > 0)) { struct sockaddr saddr; struct sockaddr *addr = &saddr; - char addrstr[256]; + char *addrstr; + int addrlen; + char ifname[IF_NAMESIZE]; int addrfound = 0; + if ((addrstr = calloc(256, sizeof(char))) == NULL) { + debug_printf("Avahi Resolver: Service '%s' of type '%s' in domain '%s' skipped, could not allocate memory to determine IP address.\n", + name, type, domain); + goto clean_up; + } if (address->proto == AVAHI_PROTO_INET && IPBasedDeviceURIs != IP_BASED_URIS_IPV6_ONLY) { - avahi_address_snprint(addrstr, sizeof(addrstr), address); + avahi_address_snprint(addrstr, 256, address); addr->sa_family = AF_INET; if (inet_aton(addrstr, &((struct sockaddr_in *) addr)->sin_addr) && @@ -4834,16 +4841,25 @@ } else if (address->proto == AVAHI_PROTO_INET6 && interface != AVAHI_IF_UNSPEC && IPBasedDeviceURIs != IP_BASED_URIS_IPV4_ONLY) { - char ifname[IF_NAMESIZE]; - addrstr[0] = '['; - avahi_address_snprint(addrstr + 1, sizeof(addrstr) - 1, address); + strncpy(addrstr, "[v1.", 256); + avahi_address_snprint(addrstr + 4, 256 - 6, address); + addrlen = strlen(addrstr + 4); addr->sa_family = AF_INET6; - if (inet_pton(AF_INET6, addrstr + 1, + if (inet_pton(AF_INET6, addrstr + 4, &((struct sockaddr_in6 *) addr)->sin6_addr) && allowed(addr)) { - snprintf(addrstr + strlen(addrstr), sizeof(addrstr) - - strlen(addrstr), "+%s]", - if_indextoname(interface, ifname)); + if (!strncasecmp(addrstr + 4, "fe", 2) && + (addrstr[6] == '8' || addrstr[6] == '9' || + addrstr[6] == 'A' || addrstr[6] == 'B' || + addrstr[6] == 'a' || addrstr[6] == 'B')) + /* Link-local address, needs specification of interface */ + snprintf(addrstr + addrlen + 4, 256 - + addrlen - 4, "%%%s]", + if_indextoname(interface, ifname)); + else { + addrstr[addrlen + 4] = ']'; + addrstr[addrlen + 5] = '\0'; + } addrfound = 1; } } @@ -4859,6 +4875,7 @@ } else debug_printf("Avahi Resolver: Service '%s' of type '%s' in domain '%s' skipped, could not determine IP address.\n", name, type, domain); + free(addrstr); } else { /* Check remote printer type and create appropriate local queue to point to it */ @@ -4866,6 +4883,8 @@ } } + clean_up: + /* Clean up */ if (rp_entry) {