Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package sane-airscan for openSUSE:Factory checked in at 2025-04-16 20:41:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sane-airscan (Old) and /work/SRC/openSUSE:Factory/.sane-airscan.new.30101 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sane-airscan" Wed Apr 16 20:41:55 2025 rev:8 rq:1269820 version:0.99.34 Changes: -------- --- /work/SRC/openSUSE:Factory/sane-airscan/sane-airscan.changes 2025-03-24 13:28:34.398601584 +0100 +++ /work/SRC/openSUSE:Factory/.sane-airscan.new.30101/sane-airscan.changes 2025-04-20 20:09:42.253487811 +0200 @@ -1,0 +2,7 @@ +Wed Apr 16 07:33:13 UTC 2025 - Richard Rahl <rra...@opensuse.org> + +- Update to version 0.99.34: + * eSCL quirks for Xerox B205/B215 + * Add Brother MFC-L3740CDWE to support list + +------------------------------------------------------------------- Old: ---- sane-airscan-0.99.33.tar.zst New: ---- sane-airscan-0.99.34.tar.zst ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sane-airscan.spec ++++++ --- /var/tmp/diff_new_pack.oQ7dxq/_old 2025-04-20 20:09:43.025520258 +0200 +++ /var/tmp/diff_new_pack.oQ7dxq/_new 2025-04-20 20:09:43.025520258 +0200 @@ -17,7 +17,7 @@ Name: sane-airscan -Version: 0.99.33 +Version: 0.99.34 Release: 0 Summary: Universal driver for Apple AirScan (eSCL) and WSD License: SUSE-GPL-2.0+-with-sane-exception ++++++ _service ++++++ --- /var/tmp/diff_new_pack.oQ7dxq/_old 2025-04-20 20:09:43.053521436 +0200 +++ /var/tmp/diff_new_pack.oQ7dxq/_new 2025-04-20 20:09:43.057521604 +0200 @@ -2,7 +2,7 @@ <service name="tar_scm" mode="manual"> <param name="url">https://github.com/alexpevzner/sane-airscan.git</param> <param name="scm">git</param> - <param name="revision">0.99.33</param> + <param name="revision">0.99.34</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> </service> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.oQ7dxq/_old 2025-04-20 20:09:43.077522444 +0200 +++ /var/tmp/diff_new_pack.oQ7dxq/_new 2025-04-20 20:09:43.081522613 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/alexpevzner/sane-airscan.git</param> - <param name="changesrevision">0ed6a1421352c94d10ca23cec55c4e390f62c316</param></service></servicedata> + <param name="changesrevision">6e5222c32133793f2e06bf9caa0d36d39f8ef254</param></service></servicedata> (No newline at EOF) ++++++ sane-airscan-0.99.33.tar.zst -> sane-airscan-0.99.34.tar.zst ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sane-airscan-0.99.33/README.md new/sane-airscan-0.99.34/README.md --- old/sane-airscan-0.99.33/README.md 2025-03-17 13:21:23.000000000 +0100 +++ new/sane-airscan-0.99.34/README.md 2025-04-15 16:08:36.000000000 +0200 @@ -80,6 +80,7 @@ | Brother MFC-L2710DW | Yes | Yes | | Brother MFC-L2720DW | No | Yes | | Brother MFC-L2750DW | Yes | Yes | +| Brother MFC-L3740CDWE | Yes | | | Brother MFC-L3750CDW | No | Yes | | Brother MFC-L3780CDW | No | Yes | | Brother MFC-T910DW | Yes | Yes | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sane-airscan-0.99.33/airscan-escl.c new/sane-airscan-0.99.34/airscan-escl.c --- old/sane-airscan-0.99.33/airscan-escl.c 2025-03-17 13:21:23.000000000 +0100 +++ new/sane-airscan-0.99.34/airscan-escl.c 2025-04-15 16:08:36.000000000 +0200 @@ -55,6 +55,10 @@ bool quirk_canon_mf410_series; /* Canon MF410 Series */ bool quirk_port_in_host; /* Always set port in Host: header */ bool quirk_next_load_delay; /* Use ESCL_NEXT_LOAD_DELAY */ + bool quirk_retry_on_404; /* Retry GET NextDocunemt on HTTP 404 */ + bool quirk_retry_on_410; /* Retry GET NextDocunemt on HTTP 410 */ + bool quirk_broken_ipv6_location; /* Invalid hostname in IPv6 Location: */ + bool quirk_skip_cleanup; /* Don't cleanup after normal operations*/ } proto_handler_escl; /* XML namespace for XML writer @@ -65,7 +69,6 @@ {NULL, NULL} }; - /******************** Miscellaneous types ********************/ /* escl_scanner_status represents decoded ScannerStatus response */ @@ -566,6 +569,16 @@ escl->quirk_port_in_host = true; } else if (!strncasecmp(m, "Brother ", 8)) { escl->quirk_next_load_delay = true; + } else if (!strcmp(m, "B205") || !strcmp(m, "B215")) { + /* Xerox B205/B215 machines may indicate temporary + * unavailability of the scanned document (the need + * for retry) using HTTP 404/410 codes. Normally, + * HTTP 503 used for this purpose... + */ + escl->quirk_retry_on_404 = true; + escl->quirk_retry_on_410 = true; + escl->quirk_broken_ipv6_location = true; + escl->quirk_skip_cleanup = true; } } else if (xml_rd_node_name_match(xml, "scan:Manufacturer")) { const char *m = xml_rd_node_value(xml); @@ -886,10 +899,11 @@ static proto_result escl_scan_decode (const proto_ctx *ctx) { - proto_result result = {0}; - error err = NULL; - const char *location; - http_uri *uri; + proto_handler_escl *escl = (proto_handler_escl*) ctx->proto; + proto_result result = {0}; + error err = NULL; + const char *location; + http_uri *uri; /* Check HTTP status */ if (http_query_status(ctx->query) != HTTP_STATUS_CREATED) { @@ -907,6 +921,34 @@ goto ERROR; } + /* Fix broken IPv6 location */ + if (escl->quirk_broken_ipv6_location) { + /* Xerox B205/B215 return Location that looks like this: + * + * Location: http://[fe80/eSCL/ScanJobs/4060 + * + * Note unbalanced square bracket and truncated IPv6 address. + * As we anyway ignore Location: hostname, it is easy to fix... + */ + if (str_has_prefix(location, "http://[") || + str_has_prefix(location, "https://[")) { + if (strchr(location, ']') == NULL) { + const char *s = strstr(location, "://"); + s += 3; + while (*s && *s != '/') { + s ++; + } + if (*s == '/') { + /* Skip URL until /path/... + */ + log_debug(ctx->log, "Broken IPv6 Location: %s", location); + location = s; + log_debug(ctx->log, "Fixed Location: %s", location); + } + } + } + } + /* Validate and save location */ uri = http_uri_new_relative(ctx->base_uri, location, true, false); if (uri == NULL) { @@ -973,6 +1015,9 @@ if (err != NULL) { if (ctx->params.src == ID_SOURCE_PLATEN && ctx->images_received > 0) { result.next = PROTO_OP_CLEANUP; + if (escl->quirk_skip_cleanup) { + result.next = PROTO_OP_FINISH; + } } else { result.next = PROTO_OP_CHECK; result.err = eloop_eprintf("HTTP: %s", ESTRING(err)); @@ -1119,10 +1164,12 @@ static proto_result escl_status_decode (const proto_ctx *ctx) { - proto_result result = {0}; - error err = NULL; - SANE_Status status; - int max_attempts; + proto_handler_escl *escl = (proto_handler_escl*) ctx->proto; + proto_result result = {0}; + error err = NULL; + SANE_Status status; + int max_attempts; + bool temporary = false; /* Decode status */ err = http_query_error(ctx->query); @@ -1140,8 +1187,25 @@ max_attempts = ESCL_RETRY_ATTEMPTS_LOAD; } - if (ctx->failed_http_status == HTTP_STATUS_SERVICE_UNAVAILABLE && - ctx->failed_attempt < max_attempts) { + switch (ctx->failed_http_status) { + case HTTP_STATUS_SERVICE_UNAVAILABLE: + temporary = true; + break; + + case HTTP_STATUS_NOT_FOUND: + if (escl->quirk_retry_on_404) { + temporary = true; + } + break; + + case HTTP_STATUS_GONE: + if (escl->quirk_retry_on_410) { + temporary = true; + } + break; + } + + if (temporary && ctx->failed_attempt < max_attempts) { /* Note, some devices may return HTTP 503 error core, meaning * that it makes sense to come back after small delay @@ -1203,6 +1267,10 @@ /* Fill the result */ FAIL: result.next = ctx->location ? PROTO_OP_CLEANUP : PROTO_OP_FINISH; + if (escl->quirk_skip_cleanup) { + result.next = PROTO_OP_FINISH; + } + result.status = status; result.err = err; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sane-airscan-0.99.33/airscan.h new/sane-airscan-0.99.34/airscan.h --- old/sane-airscan-0.99.33/airscan.h 2025-03-17 13:21:23.000000000 +0100 +++ new/sane-airscan-0.99.34/airscan.h 2025-04-15 16:08:36.000000000 +0200 @@ -2149,6 +2149,7 @@ HTTP_STATUS_OK = 200, HTTP_STATUS_CREATED = 201, HTTP_STATUS_NOT_FOUND = 404, + HTTP_STATUS_GONE = 410, HTTP_STATUS_SERVICE_UNAVAILABLE = 503 }; #endif