New upstream version 1.13.1
Didier Raboud
7 years ago
0 | INSTALL - OpenPrinting CUPS Filters v1.13.0 - 2016-12-09 | |
0 | INSTALL - OpenPrinting CUPS Filters v1.13.1 - 2016-12-17 | |
1 | 1 | -------------------------------------------------------- |
2 | 2 | |
3 | 3 | This file describes how to compile and install OpenPrinting CUPS |
0 | NEWS - OpenPrinting CUPS Filters v1.13.0 - 2016-12-09 | |
0 | NEWS - OpenPrinting CUPS Filters v1.13.1 - 2016-12-17 | |
1 | 1 | ----------------------------------------------------- |
2 | ||
3 | CHANGES IN V1.13.1 | |
4 | ||
5 | - cups-browsed: Avoid erroring out when restarting after a | |
6 | crash (with generated queues not deleted due to the crash) | |
7 | and the configuration option | |
8 | CreateRemoteCUPSPrinterQueues=No being set. | |
9 | - cups-browsed: If CUPS is stopped while cups-browsed is | |
10 | running and there are queue for IPP network printers (not | |
11 | remote CUPS queues) on restart of CUPS the still existing | |
12 | local CUPS queue is not correctly re-connected with | |
13 | cups-browsed and therefore gets removed after a | |
14 | timeout. This should be fixed after a clean-up of | |
15 | re-connecting with remaining queues from a previous session | |
16 | (Debian bug #848223). | |
17 | - cups-browsed: Generated queues did not get removed on | |
18 | shutdown (Debian bug #848167). | |
19 | - libcupsfilters: Let PPD generator for driverless printing | |
20 | suppress page sizes which the printer reports more than | |
21 | once (CUPS Issue #4933). | |
22 | - driverless, libcupsfilters: Make "driverless list" output | |
23 | and output of driverless as CUPS backend in discovery mode | |
24 | add the word "driverless" to its output, to make it easier | |
25 | to set up driverless printers with printer setup tools. | |
26 | Made the NickName of the generated PPDs also match with the | |
27 | "driverless list" output. | |
2 | 28 | |
3 | 29 | CHANGES IN V1.13.0 |
4 | 30 |
0 | README - OpenPrinting CUPS Filters v1.13.0 - 2016-12-09 | |
0 | README - OpenPrinting CUPS Filters v1.13.1 - 2016-12-17 | |
1 | 1 | ------------------------------------------------------- |
2 | 2 | |
3 | 3 | Looking for compile instructions? Read the file "INSTALL.txt" |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.69 for cups-filters 1.13.0. | |
2 | # Generated by GNU Autoconf 2.69 for cups-filters 1.13.1. | |
3 | 3 | # |
4 | 4 | # |
5 | 5 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. |
586 | 586 | # Identity of this package. |
587 | 587 | PACKAGE_NAME='cups-filters' |
588 | 588 | PACKAGE_TARNAME='cups-filters' |
589 | PACKAGE_VERSION='1.13.0' | |
590 | PACKAGE_STRING='cups-filters 1.13.0' | |
589 | PACKAGE_VERSION='1.13.1' | |
590 | PACKAGE_STRING='cups-filters 1.13.1' | |
591 | 591 | PACKAGE_BUGREPORT='' |
592 | 592 | PACKAGE_URL='' |
593 | 593 | |
1492 | 1492 | # Omit some internal or obsolete options to make the list less imposing. |
1493 | 1493 | # This message is too long to be a string in the A/UX 3.1 sh. |
1494 | 1494 | cat <<_ACEOF |
1495 | \`configure' configures cups-filters 1.13.0 to adapt to many kinds of systems. | |
1495 | \`configure' configures cups-filters 1.13.1 to adapt to many kinds of systems. | |
1496 | 1496 | |
1497 | 1497 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1498 | 1498 | |
1563 | 1563 | |
1564 | 1564 | if test -n "$ac_init_help"; then |
1565 | 1565 | case $ac_init_help in |
1566 | short | recursive ) echo "Configuration of cups-filters 1.13.0:";; | |
1566 | short | recursive ) echo "Configuration of cups-filters 1.13.1:";; | |
1567 | 1567 | esac |
1568 | 1568 | cat <<\_ACEOF |
1569 | 1569 | |
1787 | 1787 | test -n "$ac_init_help" && exit $ac_status |
1788 | 1788 | if $ac_init_version; then |
1789 | 1789 | cat <<\_ACEOF |
1790 | cups-filters configure 1.13.0 | |
1790 | cups-filters configure 1.13.1 | |
1791 | 1791 | generated by GNU Autoconf 2.69 |
1792 | 1792 | |
1793 | 1793 | Copyright (C) 2012 Free Software Foundation, Inc. |
2425 | 2425 | This file contains any messages produced by compilers while |
2426 | 2426 | running configure, to aid debugging if configure makes a mistake. |
2427 | 2427 | |
2428 | It was created by cups-filters $as_me 1.13.0, which was | |
2428 | It was created by cups-filters $as_me 1.13.1, which was | |
2429 | 2429 | generated by GNU Autoconf 2.69. Invocation command line was |
2430 | 2430 | |
2431 | 2431 | $ $0 $@ |
3460 | 3460 | |
3461 | 3461 | # Define the identity of the package. |
3462 | 3462 | PACKAGE='cups-filters' |
3463 | VERSION='1.13.0' | |
3463 | VERSION='1.13.1' | |
3464 | 3464 | |
3465 | 3465 | |
3466 | 3466 | cat >>confdefs.h <<_ACEOF |
21052 | 21052 | # report actual input values of CONFIG_FILES etc. instead of their |
21053 | 21053 | # values after options handling. |
21054 | 21054 | ac_log=" |
21055 | This file was extended by cups-filters $as_me 1.13.0, which was | |
21055 | This file was extended by cups-filters $as_me 1.13.1, which was | |
21056 | 21056 | generated by GNU Autoconf 2.69. Invocation command line was |
21057 | 21057 | |
21058 | 21058 | CONFIG_FILES = $CONFIG_FILES |
21118 | 21118 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
21119 | 21119 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
21120 | 21120 | ac_cs_version="\\ |
21121 | cups-filters config.status 1.13.0 | |
21121 | cups-filters config.status 1.13.1 | |
21122 | 21122 | configured by $0, generated by GNU Autoconf 2.69, |
21123 | 21123 | with options \\"\$ac_cs_config\\" |
21124 | 21124 |
6 | 6 | # ==================== |
7 | 7 | m4_define([cups_filters_version_major],[1]) |
8 | 8 | m4_define([cups_filters_version_minor],[13]) |
9 | m4_define([cups_filters_version_micro],[0]) | |
9 | m4_define([cups_filters_version_micro],[1]) | |
10 | 10 | m4_define([cups_filters_version],[cups_filters_version_major.cups_filters_version_minor.cups_filters_version_micro]) |
11 | 11 | |
12 | 12 | # ============= |
330 | 330 | int duplex) /* O - Error/status message */ |
331 | 331 | { |
332 | 332 | cups_file_t *fp; /* PPD file */ |
333 | cups_array_t *sizes; /* Media sizes we've added */ | |
333 | 334 | ipp_attribute_t *attr, /* xxx-supported */ |
334 | 335 | *defattr, /* xxx-default */ |
335 | 336 | *x_dim, *y_dim; /* Media dimensions */ |
477 | 478 | cupsFilePrintf(fp, "*Manufacturer: \"%s\"\n", make); |
478 | 479 | cupsFilePrintf(fp, "*ModelName: \"%s %s\"\n", make, model); |
479 | 480 | cupsFilePrintf(fp, "*Product: \"(%s %s)\"\n", make, model); |
480 | cupsFilePrintf(fp, "*NickName: \"%s %s, cups-filters %s\"\n", make, model, | |
481 | cupsFilePrintf(fp, "*NickName: \"%s %s, driverless, cups-filters %s\"\n", make, model, | |
481 | 482 | VERSION); |
482 | 483 | cupsFilePrintf(fp, "*ShortNickName: \"%s %s\"\n", make, model); |
483 | 484 | |
634 | 635 | cupsFilePrintf(fp, "*OpenUI *PageSize: PickOne\n" |
635 | 636 | "*OrderDependency: 10 AnySetup *PageSize\n" |
636 | 637 | "*DefaultPageSize: %s\n", ppdname); |
638 | ||
639 | sizes = cupsArrayNew3((cups_array_func_t)strcmp, NULL, NULL, 0, | |
640 | (cups_acopy_func_t)strdup, (cups_afree_func_t)free); | |
641 | ||
637 | 642 | for (i = 0, count = ippGetCount(attr); i < count; i ++) |
638 | 643 | { |
639 | 644 | if (ippGetValueTag(attr) == IPP_TAG_BEGIN_COLLECTION) |
652 | 657 | char twidth[256], /* Width string */ |
653 | 658 | tlength[256]; /* Length string */ |
654 | 659 | |
660 | if (cupsArrayFind(sizes, (void *)pwg->ppd)) | |
661 | { | |
662 | cupsFilePrintf(fp, "*%% warning: Duplicate size '%s' reported by printer.\n", | |
663 | pwg->ppd); | |
664 | continue; | |
665 | } | |
666 | ||
667 | cupsArrayAdd(sizes, (void *)pwg->ppd); | |
668 | ||
655 | 669 | _cupsStrFormatd(twidth, twidth + sizeof(twidth), pwg->width * 72.0 / 2540.0, loc); |
656 | 670 | _cupsStrFormatd(tlength, tlength + sizeof(tlength), pwg->length * 72.0 / 2540.0, loc); |
657 | 671 | |
659 | 673 | } |
660 | 674 | } |
661 | 675 | cupsFilePuts(fp, "*CloseUI: *PageSize\n"); |
676 | ||
677 | cupsArrayDelete(sizes); | |
678 | sizes = cupsArrayNew3((cups_array_func_t)strcmp, NULL, NULL, 0, | |
679 | (cups_acopy_func_t)strdup, (cups_afree_func_t)free); | |
662 | 680 | |
663 | 681 | cupsFilePrintf(fp, "*OpenUI *PageRegion: PickOne\n" |
664 | 682 | "*OrderDependency: 10 AnySetup *PageRegion\n" |
681 | 699 | char twidth[256], /* Width string */ |
682 | 700 | tlength[256]; /* Length string */ |
683 | 701 | |
702 | if (cupsArrayFind(sizes, (void *)pwg->ppd)) | |
703 | continue; | |
704 | ||
705 | cupsArrayAdd(sizes, (void *)pwg->ppd); | |
706 | ||
684 | 707 | _cupsStrFormatd(twidth, twidth + sizeof(twidth), pwg->width * 72.0 / 2540.0, loc); |
685 | 708 | _cupsStrFormatd(tlength, tlength + sizeof(tlength), pwg->length * 72.0 / 2540.0, loc); |
686 | 709 | |
688 | 711 | } |
689 | 712 | } |
690 | 713 | cupsFilePuts(fp, "*CloseUI: *PageRegion\n"); |
714 | ||
715 | cupsArrayDelete(sizes); | |
716 | sizes = cupsArrayNew3((cups_array_func_t)strcmp, NULL, NULL, 0, | |
717 | (cups_acopy_func_t)strdup, (cups_afree_func_t)free); | |
691 | 718 | |
692 | 719 | cupsFilePrintf(fp, "*DefaultImageableArea: %s\n" |
693 | 720 | "*DefaultPaperDimension: %s\n", ppdname, ppdname); |
713 | 740 | twidth[256], /* Width string */ |
714 | 741 | tlength[256]; /* Length string */ |
715 | 742 | |
743 | if (cupsArrayFind(sizes, (void *)pwg->ppd)) | |
744 | continue; | |
745 | ||
746 | cupsArrayAdd(sizes, (void *)pwg->ppd); | |
747 | ||
716 | 748 | _cupsStrFormatd(tleft, tleft + sizeof(tleft), left * 72.0 / 2540.0, loc); |
717 | 749 | _cupsStrFormatd(tbottom, tbottom + sizeof(tbottom), bottom * 72.0 / 2540.0, loc); |
718 | 750 | _cupsStrFormatd(tright, tright + sizeof(tright), (pwg->width - right) * 72.0 / 2540.0, loc); |
724 | 756 | cupsFilePrintf(fp, "*PaperDimension %s: \"%s %s\"\n", pwg->ppd, twidth, tlength); |
725 | 757 | } |
726 | 758 | } |
759 | cupsArrayDelete(sizes); | |
727 | 760 | } else { |
728 | 761 | cupsFilePrintf(fp, |
729 | 762 | "*%% Printer did not supply page size info via IPP, using defaults\n" |
2974 | 2974 | /* Flag to mark whether this printer was discovered through a legacy |
2975 | 2975 | CUPS broadcast (1) or through DNS-SD/Bonjour (0) */ |
2976 | 2976 | p->is_legacy = 0; |
2977 | ||
2978 | if (is_cups_queue) { | |
2979 | if (CreateRemoteCUPSPrinterQueues == 0) { | |
2977 | ||
2978 | /* Remote CUPS printer or local queue remaining from previous cups-browsed | |
2979 | session */ | |
2980 | if (is_cups_queue == 1 || is_cups_queue == -1) { | |
2981 | if (is_cups_queue == 1 && CreateRemoteCUPSPrinterQueues == 0) { | |
2980 | 2982 | debug_printf("Printer %s (%s) is a remote CUPS printer and cups-browsed is not configured to set up such printers automatically, ignoring this printer.\n", |
2981 | 2983 | p->name, p->uri); |
2982 | 2984 | goto fail; |
2983 | 2985 | } |
2984 | /* Our local queue must be raw, so that the PPD file and driver | |
2985 | on the remote CUPS server get used */ | |
2986 | /* For a remote CUPS printer Our local queue must be raw, so that the | |
2987 | PPD file and driver on the remote CUPS server get used */ | |
2986 | 2988 | p->netprinter = 0; |
2987 | 2989 | p->ppd = NULL; |
2988 | 2990 | p->model = NULL; |
4300 | 4302 | char *backup_queue_name = NULL, *local_queue_name = NULL, |
4301 | 4303 | *local_queue_name_lower = NULL; |
4302 | 4304 | int is_cups_queue; |
4303 | /*size_t hl = 0;*/ | |
4304 | gboolean create = TRUE; | |
4305 | 4305 | |
4306 | 4306 | |
4307 | 4307 | is_cups_queue = 0; |
4450 | 4450 | |
4451 | 4451 | local_queue_name = remote_queue; |
4452 | 4452 | |
4453 | /* Is there a local queue with the same URI as the remote queue? */ | |
4454 | if (g_hash_table_find (local_printers, | |
4455 | local_printer_has_uri, | |
4456 | uri)) | |
4457 | create = FALSE; | |
4458 | ||
4459 | if (create) { | |
4460 | /* Is there a local queue with the name of the remote queue? */ | |
4453 | /* Is there a local queue with the name of the remote queue? */ | |
4454 | local_queue_name_lower = g_ascii_strdown(local_queue_name, -1); | |
4455 | local_printer = g_hash_table_lookup (local_printers, | |
4456 | local_queue_name_lower); | |
4457 | free(local_queue_name_lower); | |
4458 | /* Only consider CUPS queues not created by us */ | |
4459 | if (local_printer && !local_printer->cups_browsed_controlled) { | |
4460 | /* Found local queue with same name as remote queue */ | |
4461 | /* Is there a local queue with the name <queue>@<host>? */ | |
4462 | local_queue_name = backup_queue_name; | |
4463 | debug_printf("%s already taken, using fallback name: %s\n", | |
4464 | remote_queue, local_queue_name); | |
4461 | 4465 | local_queue_name_lower = g_ascii_strdown(local_queue_name, -1); |
4462 | 4466 | local_printer = g_hash_table_lookup (local_printers, |
4463 | 4467 | local_queue_name_lower); |
4464 | 4468 | free(local_queue_name_lower); |
4465 | /* Only consider CUPS queues not created by us */ | |
4466 | 4469 | if (local_printer && !local_printer->cups_browsed_controlled) { |
4467 | /* Found local queue with same name as remote queue */ | |
4468 | /* Is there a local queue with the name <queue>@<host>? */ | |
4469 | local_queue_name = backup_queue_name; | |
4470 | debug_printf("%s already taken, using fallback name: %s\n", | |
4471 | remote_queue, local_queue_name); | |
4472 | local_queue_name_lower = g_ascii_strdown(local_queue_name, -1); | |
4473 | local_printer = g_hash_table_lookup (local_printers, | |
4474 | local_queue_name_lower); | |
4475 | free(local_queue_name_lower); | |
4476 | if (local_printer && !local_printer->cups_browsed_controlled) { | |
4477 | /* Found also a local queue with name <queue>@<host>, so | |
4478 | ignore this remote printer */ | |
4479 | debug_printf("%s also taken, printer ignored.\n", | |
4480 | local_queue_name); | |
4481 | free (backup_queue_name); | |
4482 | free (remote_host); | |
4483 | free (pdl); | |
4484 | free (remote_queue); | |
4485 | free (make_model); | |
4486 | return NULL; | |
4487 | } | |
4470 | /* Found also a local queue with name <queue>@<host>, so | |
4471 | ignore this remote printer */ | |
4472 | debug_printf("%s also taken, printer ignored.\n", | |
4473 | local_queue_name); | |
4474 | free (backup_queue_name); | |
4475 | free (remote_host); | |
4476 | free (pdl); | |
4477 | free (remote_queue); | |
4478 | free (make_model); | |
4479 | return NULL; | |
4488 | 4480 | } |
4489 | 4481 | } |
4490 | 4482 | |
4511 | 4503 | (!strcasecmp(p->host, remote_host) && p->port == port))) |
4512 | 4504 | break; |
4513 | 4505 | |
4514 | if (!create) { | |
4506 | /* Is there a local queue with the same URI as the remote queue? */ | |
4507 | if (!p && g_hash_table_find (local_printers, | |
4508 | local_printer_has_uri, | |
4509 | uri)) { | |
4510 | /* Found a local queue with the same URI as our discovered printer | |
4511 | would get, so ignore this remote printer */ | |
4512 | debug_printf("Printer with URI %s already exists, printer ignored.\n", | |
4513 | uri); | |
4515 | 4514 | free (remote_host); |
4516 | 4515 | free (backup_queue_name); |
4517 | 4516 | free (pdl); |
4518 | 4517 | free (remote_queue); |
4519 | 4518 | free (make_model); |
4520 | if (p) { | |
4521 | return p; | |
4522 | } else { | |
4523 | /* Found a local queue with the same URI as our discovered printer | |
4524 | would get, so ignore this remote printer */ | |
4525 | debug_printf("Printer with URI %s already exists, printer ignored.\n", | |
4526 | uri); | |
4527 | return NULL; | |
4528 | } | |
4519 | return NULL; | |
4529 | 4520 | } |
4530 | 4521 | |
4531 | 4522 | if (p) { |
4628 | 4619 | free (p->domain); |
4629 | 4620 | p->domain = strdup(domain); |
4630 | 4621 | } |
4622 | p->netprinter = is_cups_queue ? 0 : 1; | |
4631 | 4623 | } else { |
4632 | 4624 | |
4633 | 4625 | /* We need to create a local queue pointing to the |
6613 | 6605 | /* Queue found, add to our list */ |
6614 | 6606 | p = create_local_queue (name, |
6615 | 6607 | printer->device_uri, |
6616 | "", "", 0, "", "", "", NULL, 0, 0, NULL, NULL, 1); | |
6608 | "", "", 0, "", "", "", NULL, 0, 0, NULL, NULL, -1); | |
6617 | 6609 | if (p) { |
6618 | 6610 | /* Mark as unconfirmed, if no Avahi report of this queue appears |
6619 | 6611 | in a certain time frame, we will remove the queue */ |
7117 | 7109 | g_object_unref (proxy); |
7118 | 7110 | |
7119 | 7111 | /* Remove all queues which we have set up */ |
7120 | for (p = (remote_printer_t *)cupsArrayFirst(remote_printers); | |
7121 | p; p = (remote_printer_t *)cupsArrayNext(remote_printers)) { | |
7112 | while ((p = (remote_printer_t *)cupsArrayFirst(remote_printers)) != NULL) { | |
7122 | 7113 | p->status = STATUS_DISAPPEARED; |
7123 | 7114 | p->timeout = time(NULL) + TIMEOUT_IMMEDIATELY; |
7124 | } | |
7125 | recheck_timer(); | |
7115 | handle_cups_queues(NULL); | |
7116 | } | |
7126 | 7117 | |
7127 | 7118 | cancel_subscription (subscription_id); |
7128 | 7119 | if (cups_notifier) |
309 | 309 | |
310 | 310 | if (mode == 1) |
311 | 311 | /* Call with "list" argument (PPD generator in list mode */ |
312 | printf("\"driverless:%s\" en \"%s\" \"%s, cups-filters " VERSION | |
312 | printf("\"driverless:%s\" en \"%s\" \"%s, driverless, cups-filters " VERSION | |
313 | 313 | "\" \"%s\"\n", service_uri, make, make_and_model, device_id); |
314 | 314 | else |
315 | 315 | /* Call without arguments and env variable "SOFTWARE" starting |
316 | 316 | with "CUPS" (Backend in discovery mode) */ |
317 | printf("network %s \"%s\" \"%s (via IPP)\" \"%s\" \"\"\n", service_uri, make_and_model, make_and_model, device_id); | |
317 | printf("network %s \"%s\" \"%s (driverless)\" \"%s\" \"\"\n", service_uri, make_and_model, make_and_model, device_id); | |
318 | 318 | |
319 | 319 | read_error: |
320 | 320 | continue; |