[arch-commits] Commit in sane/trunk (6 files)

Tobias Powalowski tpowa at nymeria.archlinux.org
Tue Feb 26 16:26:48 UTC 2013


    Date: Tuesday, February 26, 2013 @ 17:26:48
  Author: tpowa
Revision: 178745

upgpkg: sane 1.0.23-3

fix #33731 #33657 and fixed network

Added:
  sane/trunk/kodakaio.c.patch
  sane/trunk/network.patch
Modified:
  sane/trunk/PKGBUILD
  sane/trunk/sane.xinetd
Deleted:
  sane/trunk/libv4l-0.8.3.patch
  sane/trunk/xerox_mfp_fix_usb_devices.patch

---------------------------------+
 PKGBUILD                        |   17 +++++++--
 kodakaio.c.patch                |   11 ++++++
 libv4l-0.8.3.patch              |   64 ------------------------------------
 network.patch                   |   42 +++++++++++++++++++++++
 sane.xinetd                     |    2 -
 xerox_mfp_fix_usb_devices.patch |   67 --------------------------------------
 6 files changed, 67 insertions(+), 136 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-02-26 16:24:13 UTC (rev 178744)
+++ PKGBUILD	2013-02-26 16:26:48 UTC (rev 178745)
@@ -6,7 +6,7 @@
 
 pkgname=sane
 pkgver=1.0.23
-pkgrel=2
+pkgrel=3
 pkgdesc="Scanner Access Now Easy"
 url="http://www.sane-project.org/"
 arch=('i686' 'x86_64')
@@ -18,12 +18,19 @@
 source=(ftp://ftp.archlinux.org/other/sane/$pkgname-backends-$pkgver.tar.gz
         'sane.xinetd'
         'saned.socket'
-        'saned.service')
+        'saned.service'
+        'kodakaio.c.patch'
+        'network.patch')
 options=(!libtool)
 
 build() {
   cd "${srcdir}/${pkgname}-backends-${pkgver}"
 
+   # fix FS#33657
+   patch -Np0 -i ${srcdir}/kodakaio.c.patch
+   # fix http://vasks.debian.org/tracker/?func=detail&atid=410366&aid=313760&group_id=30186
+   patch -Np1 -i ${srcdir}/network.patch
+
   ./configure --prefix=/usr \
     --sysconfdir=/etc \
     --localstatedir=/var \
@@ -59,6 +66,8 @@
       "${pkgdir}/usr/lib/systemd/system/saned at .service"
 }
 md5sums=('e226a89c54173efea80e91e9a5eb6573'
-         'da946cc36fb83612162cf9505986d4b2'
+         '5f519030392d599e2ad348159ec4c96f'
          'e57e9e15528f47f5f1b3f1411135ed5d'
-         'e44bd4c994a52d6f472463d1eb0a03be')
+         'e44bd4c994a52d6f472463d1eb0a03be'
+         'e65dbefb7c3d69955fb6eb3ace14aa12'
+         '44e77692c52db15b0f530a1d9a8e1296')

Added: kodakaio.c.patch
===================================================================
--- kodakaio.c.patch	                        (rev 0)
+++ kodakaio.c.patch	2013-02-26 16:26:48 UTC (rev 178745)
@@ -0,0 +1,11 @@
+--- backend/kodakaio.c.bad	2013-01-31 20:42:10.627296894 +0100
++++ backend/kodakaio.c	2013-01-31 20:42:46.040397213 +0100
+@@ -2197,7 +2197,7 @@
+ 
+ 	reply = cupsGetDevices(CUPS_HTTP_DEFAULT, CUPS_TIMEOUT_DEFAULT, 
+ 		"dnssd", CUPS_EXCLUDE_NONE, ProcessDevice, Dummy);
+-	if(reply != IPP_OK) printf("Failed cupsGetDevices\n");
++	if(reply != IPP_OK) DBG(1, "Failed cupsGetDevices\n");
+ 
+ 	return 0;
+ }

Deleted: libv4l-0.8.3.patch
===================================================================
--- libv4l-0.8.3.patch	2013-02-26 16:24:13 UTC (rev 178744)
+++ libv4l-0.8.3.patch	2013-02-26 16:26:48 UTC (rev 178745)
@@ -1,64 +0,0 @@
-From 26c69b228b29f612faf4b0cc85db969ee7cc4ea6 Mon Sep 17 00:00:00 2001
-From: Nils Philippsen <nils at redhat.com>
-Date: Mon, 14 Mar 2011 13:35:05 +0100
-Subject: [PATCH] patch: v4l
-
-Squashed commit of the following:
-
-commit 23381932c76846191b42a48e505b37cd74711265
-Author: Julien BLACHE <jb at jblache.org>
-Date:   Wed Feb 16 19:37:43 2011 +0100
-
-    Fix v4l build with libv4l 0.8.3+
-
-    (cherry picked from commit c5ca46c2d1be78c651afb843cc834cf2b5b24953)
-
-    Conflicts:
-
-    	ChangeLog
-
-    Signed-off-by: Nils Philippsen <nils at redhat.com>
----
- backend/v4l.c |    3 +--
- backend/v4l.h |    3 ++-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/backend/v4l.c b/backend/v4l.c
-index 6510ef0..38595ed 100644
---- a/backend/v4l.c
-+++ b/backend/v4l.c
-@@ -84,9 +84,8 @@
- #include "../include/sane/sanei_config.h"
- #define V4L_CONFIG_FILE "v4l.conf"
- 
--#include "v4l.h"
--
- #include <libv4l1.h>
-+#include "v4l.h"
- 
- static const SANE_Device **devlist = NULL;
- static int num_devices;
-diff --git a/backend/v4l.h b/backend/v4l.h
-index 588b96e..6aee586 100644
---- a/backend/v4l.h
-+++ b/backend/v4l.h
-@@ -29,6 +29,7 @@
- #ifndef v4l_h
- #define v4l_h
- 
-+#ifndef __LINUX_VIDEODEV_H
- /* Kernel interface */
- /* Only the stuff we need. For more features, more defines are needed */
- 
-@@ -165,7 +166,7 @@ struct video_channel
- 
- 
- /* end of kernel interface */
--
-+#endif /* !__LINUX_VIDEODEV_H */
- 
- #include <../include/sane/sane.h>
- 
--- 
-1.7.4
-

Added: network.patch
===================================================================
--- network.patch	                        (rev 0)
+++ network.patch	2013-02-26 16:26:48 UTC (rev 178745)
@@ -0,0 +1,42 @@
+diff --git a/sanei/sanei_tcp.c b/sanei/sanei_tcp.c
+index a57d7c7..d0a1e92 100644
+--- a/sanei/sanei_tcp.c
++++ b/sanei/sanei_tcp.c
+@@ -45,6 +45,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <time.h>
+ 
+ #ifdef HAVE_WINSOCK2_H
+ #include <winsock2.h>
+@@ -123,14 +124,27 @@ sanei_tcp_write(int fd, const u_char * buf, int count)
+ ssize_t
+ sanei_tcp_read(int fd, u_char * buf, int count)
+ {
+-        ssize_t bytes_recv = 0, rc = 1;
++    ssize_t bytes_recv = 0, rc = 1;
++	int retry = 5;
+ 
+ 	while (bytes_recv < count && rc > 0)
+ 	{
+ 		rc = recv(fd, buf+bytes_recv, count-bytes_recv, 0);
++		DBG(1, "%s: bytes received %d\n", __FUNCTION__, rc);
+ 		if (rc > 0)
+ 		  bytes_recv += rc;
+-
++		else {
++			if ( errno == EAGAIN && retry-- ) {
++				DBG(1, "%s: waiting  %d\n", __FUNCTION__, retry);
++				/* wait for max 1s */
++				struct timespec req;
++				struct timespec rem;
++				req.tv_sec = 0;
++				req.tv_nsec= 100000000;
++				nanosleep(&req, &rem);	
++				rc = 1;
++			}
++		}
+ 	}
+ 	return bytes_recv;
+ }

Modified: sane.xinetd
===================================================================
--- sane.xinetd	2013-02-26 16:24:13 UTC (rev 178744)
+++ sane.xinetd	2013-02-26 16:26:48 UTC (rev 178745)
@@ -3,7 +3,7 @@
 	port        = 6566
 	socket_type = stream
 	wait        = no
-	user        = root
+	user        = nobody 
 	group       = scanner
 	server      = /usr/sbin/saned
 	# disabled by default!

Deleted: xerox_mfp_fix_usb_devices.patch
===================================================================
--- xerox_mfp_fix_usb_devices.patch	2013-02-26 16:24:13 UTC (rev 178744)
+++ xerox_mfp_fix_usb_devices.patch	2013-02-26 16:26:48 UTC (rev 178745)
@@ -1,67 +0,0 @@
-commit 5ea227caeacd504b64eef301e83fa63e0a25b3f7
-Author: Alex Belkin <abc at telekom.ru>
-Date:   Tue Mar 8 17:57:19 2011 +0300
-
-    keep usb device by default (correct for bug introduced by tcp sub-backend
-
-diff --git a/backend/xerox_mfp.c b/backend/xerox_mfp.c
-index e08b50f..d4672a7 100644
---- a/backend/xerox_mfp.c
-+++ b/backend/xerox_mfp.c
-@@ -37,10 +37,10 @@
- static const SANE_Device **devlist = NULL;	/* sane_get_devices array */
- static struct device *devices_head = NULL;	/* sane_get_devices list */
- 
--transport available_transports[] = {
-+enum { TRANSPORT_USB, TRANSPORT_TCP, TRANSPORTS_MAX };
-+transport available_transports[TRANSPORTS_MAX] = {
-     { "usb", usb_dev_request, usb_dev_open, usb_dev_close, usb_configure_device },
-     { "tcp", tcp_dev_request, tcp_dev_open, tcp_dev_close, tcp_configure_device },
--    { 0 }
- };
- 
- static int resolv_state(int state)
-@@ -824,7 +824,13 @@ free_devices (void)
-   devices_head = NULL;
- }
- 
--/* SANE API ignores return code of this callback */
-+static transport *tr_from_devname(SANE_String_Const devname)
-+{
-+  if (strncmp("tcp", devname, 3) == 0)
-+    return &available_transports[TRANSPORT_TCP];
-+  return &available_transports[TRANSPORT_USB];
-+}
-+
- static SANE_Status
- list_one_device (SANE_String_Const devname)
- {
-@@ -839,12 +845,7 @@ list_one_device (SANE_String_Const devname)
-       return SANE_STATUS_GOOD;
-   }
- 
--  for (tr = available_transports; tr->ttype; tr++) {
--    if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
--      break;
--  }
--  if (!tr->ttype)
--    return SANE_STATUS_INVAL;
-+  tr = tr_from_devname(devname);
- 
-   dev = calloc (1, sizeof (struct device));
-   if (dev == NULL)
-@@ -878,13 +879,7 @@ list_one_device (SANE_String_Const devname)
- static SANE_Status
- list_conf_devices (UNUSED (SANEI_Config * config), const char *devname)
- {
--    transport *tr;
--
--    for (tr = available_transports; tr->ttype; tr++) {
--	if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
--	    return tr->configure_device(devname, list_one_device);
--    }
--    return	SANE_STATUS_INVAL;
-+  return tr_from_devname(devname)->configure_device(devname, list_one_device);
- }
- 
- SANE_Status




More information about the arch-commits mailing list