RHEL 9.0.0 Alpha bootstrap

The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/sane-backends#e74855ce7e70772b50c980c582f52be711149f07
This commit is contained in:
Troy Dawson 2020-10-15 09:18:32 -07:00
parent ab6bbf80d2
commit 4ea97043bd
13 changed files with 1665 additions and 0 deletions

10
.gitignore vendored
View File

@ -0,0 +1,10 @@
sane-backends-1.0.21.tar.gz
/sane-backends-1.0.22.tar.gz
/sane-backends-1.0.23.tar.gz
/sane-backends-1.0.24.tar.gz
/sane-backends-1.0.25.tar.gz
/sane-backends-1.0.27.tar.gz
/sane-backends-1.0.28.tar.gz
/sane-backends-1.0.29.tar.gz
/sane-backends-1.0.30.tar.gz
/sane-backends-1.0.31.tar.gz

2
66-saned.rules Normal file
View File

@ -0,0 +1,2 @@
# udev rule for saned (SANE scanning daemon) to be able to write on usb port
ENV{libsane_matched}=="yes", ENV{DEVNAME}!="", RUN+="/usr/bin/setfacl -m g:saned:rw $env{DEVNAME}"

28
README.Fedora Normal file
View File

@ -0,0 +1,28 @@
README.Fedora
-------------
This file is meant as README for Fedora specific changes for sane-backends
package.
SANE daemon is moved to subpackage
----------------------------------
sane-backends daemon - saned - its manual page and systemd unit files are moved
into subpackage named sane-backends-daemon. It was done because daemon provides
access to scanning devices on remote server, which nowadays isn't common
usage of sane-backends, so it wasn't necessary to ship it with main package.
Several scanners need proprietary driver for working
----------------------------------------------------
Several scanners (e.g. Samsung, Brother, Epson) sometimes need special backends,
whose isn't shipped with sane-backends or cannot be shipped in Fedora because of
licensing problem. If your scanner isn't working with basic sane-backends:
1) if your scanner is Epson, try to install iscan-firmware package or Image Scan from Epson official site
2) if your scanner is Samsung, try to find driver on https://support.hp.com/gb-en/drivers/selfservice/
3) if your scanner is Brother, see http://support.brother.com/g/s/id/linux/en/download_scn.html
Ad2) Samsung proprietary driver is needed when user needs JPEG compression - this
feature support was added to sane-backends upstream by commit 926bfade544de4a4fd5,
which contained patches from Samsung. But this commit broke scanning for Samsung
scanners, so this patch was reverted with consequences of losing JPEG compression
feature for Samsung scanners.

View File

@ -0,0 +1,36 @@
From d0c61e7e9b13185f424dff1f4ac697ec53089d69 Mon Sep 17 00:00:00 2001
From: Nils Philippsen <nils@redhat.com>
Date: Tue, 4 Sep 2012 16:45:14 +0200
Subject: [PATCH] patch: sane-config-multilib
Squashed commit of the following:
commit 81aa4f41bf102b08258c8e1de1c0476835329ec5
Author: Nils Philippsen <nils@redhat.com>
Date: Tue Sep 4 16:43:34 2012 +0200
make installed sane-config multi-lib aware again
This partially reverts commit 77c4ea1a7aa680fb1c3ee4daa1404f21439b2c9b.
---
tools/sane-config.in | 4 ----
1 file changed, 4 deletions(-)
diff --git a/tools/sane-config.in b/tools/sane-config.in
index 8e4b52a..1fae2e5 100644
--- a/tools/sane-config.in
+++ b/tools/sane-config.in
@@ -10,10 +10,6 @@ scriptname="sane-config"
prefix="@prefix@"
exec_prefix="@exec_prefix@"
-# using our installed *.pc only - neither default nor user paths
-export PKG_CONFIG_LIBDIR="@libdir@/pkgconfig"
-export PKG_CONFIG_PATH=""
-
pkgconfig_package=sane-backends
usage ()
--
1.7.11.4

View File

@ -0,0 +1,27 @@
diff -up sane-backends-1.0.28/ltmain.sh.soname sane-backends-1.0.28/ltmain.sh
--- sane-backends-1.0.28/ltmain.sh.soname 2019-09-12 09:57:10.979802716 +0200
+++ sane-backends-1.0.28/ltmain.sh 2019-09-12 10:27:21.719895206 +0200
@@ -9615,23 +9615,6 @@ EOF
dlname=$soname
fi
- # If -module or -export-dynamic was specified, set the dlname
- if test "$module" = yes || test "$export_dynamic" = yes; then
- # On all known operating systems, these are identical.
- dlname="$soname"
- fi
-
- # On sane-backends the internal name for every lib is "libsane"
- # not "libsane-backendname" so that linking to each backend is possible.
- case $host in
- *mingw*)
- ;;
- *aix*)
- ;;
- *)
- soname=`echo $soname | sed -e "s/libsane-[A-Za-z_0-9]*/libsane/g"`
- esac
-
lib=$output_objdir/$realname
linknames=
for link

View File

@ -0,0 +1,72 @@
From 252f347d59fff3ab1877f77a36613b318651725e Mon Sep 17 00:00:00 2001
From: Nils Philippsen <nils@redhat.com>
Date: Tue, 8 Oct 2013 16:29:13 +0200
Subject: [PATCH] patch: udev
Squashed commit of the following:
commit fb6d1f4c0d17f1df33429bf03a64cd4fbb819ea5
Author: Nils Philippsen <nils@redhat.com>
Date: Tue Oct 8 16:24:49 2013 +0200
adapt generated udev rules for Fedora
commit 8bffaccc1eeb19ecbaddb4ac9da73954af4c5d4f
Author: Nils Philippsen <nils@redhat.com>
Date: Mon Sep 10 12:20:43 2012 +0200
use group and mode macros consistently
---
tools/sane-desc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/sane-desc.c b/tools/sane-desc.c
index badc8ce..f992bf5 100644
--- a/tools/sane-desc.c
+++ b/tools/sane-desc.c
@@ -57,9 +57,9 @@
#define COLOR_NEW "\"#F00000\""
#define COLOR_UNKNOWN "\"#000000\""
-#define DEVMODE "0664"
+#define DEVMODE "0644"
#define DEVOWNER "root"
-#define DEVGROUP "scanner"
+#define DEVGROUP "root"
#ifndef PATH_MAX
# define PATH_MAX 1024
@@ -3564,7 +3564,8 @@ print_udev (void)
}
printf("\n# The following rule will disable USB autosuspend for the device\n");
- printf("ENV{libsane_matched}==\"yes\", RUN+=\"/bin/sh -c 'if test -e /sys/$env{DEVPATH}/power/control; then echo on > /sys/$env{DEVPATH}/power/control; elif test -e /sys/$env{DEVPATH}/power/level; then echo on > /sys/$env{DEVPATH}/power/level; fi'\"\n");
+ printf("ENV{libsane_matched}==\"yes\", TEST==\"power/control\", ATTR{power/control}=\"on\"\n");
+ printf("ENV{libsane_matched}==\"yes\", TEST!=\"power/control\", TEST==\"power/level\", ATTR{power/level}=\"on\"\n");
printf ("\nLABEL=\"libsane_usb_rules_end\"\n\n");
@@ -3641,10 +3642,8 @@ print_udev (void)
}
printf ("LABEL=\"libsane_scsi_rules_end\"\n");
- if (mode == output_mode_udevacl)
- printf("\nENV{libsane_matched}==\"yes\", RUN+=\"/bin/setfacl -m g:%s:rw $env{DEVNAME}\"\n", DEVGROUP);
- else
- printf ("\nENV{libsane_matched}==\"yes\", MODE=\"664\", GROUP=\"scanner\"\n");
+ if (mode != output_mode_udevacl)
+ printf ("\nENV{libsane_matched}==\"yes\", MODE=\"%s\", GROUP=\"%s\"\n", DEVMODE, DEVGROUP);
printf ("\nLABEL=\"libsane_rules_end\"\n");
}
@@ -3695,6 +3694,7 @@ print_udevhwdb (void)
printf("# The following rule will disable USB autosuspend for the device\n");
printf("ENV{DEVTYPE}==\"usb_device\", ENV{libsane_matched}==\"yes\", TEST==\"power/control\", ATTR{power/control}=\"on\"\n\n");
+ printf("ENV{DEVTYPE}==\"usb_device\", ENV{libsane_matched}==\"yes\", TEST!=\"power/control\", TEST==\"power/level\", ATTR{power/level}=\"on\"\n");
printf ("SUBSYSTEMS==\"scsi\", GOTO=\"libsane_scsi_rules_begin\"\n");
printf ("GOTO=\"libsane_rules_end\"\n\n");
--
2.5.0

View File

@ -0,0 +1,28 @@
diff -up sane-backends-1.0.28/doc/saned.man.saned-manpage sane-backends-1.0.28/doc/saned.man
--- sane-backends-1.0.28/doc/saned.man.saned-manpage 2019-09-12 10:28:11.572506087 +0200
+++ sane-backends-1.0.28/doc/saned.man 2019-09-12 10:35:49.445861686 +0200
@@ -257,8 +257,22 @@ installed on the system. this is the pre
Saned can be used wih systemd without the systemd integration
compiled in, but then logging of debug information is not supported.
-The systemd configuration is different for the 2 options, so
-both are described below.
+The systemd configuration is different for the 2 options, but you need
+to create unit files in both options and then run as root:
+.PP
+.RS
+systemctl start saned.socket
+.RE
+.PP
+to start saned. If you want to have saned.socket running after startup, run as
+root:
+.PP
+.RS
+systemctl enable saned.socket
+.RE
+.PP
+
+The systemd configuration of both options is described below.
.SH Systemd configuration for saned with systemd support compiled in
for the systemd configuration we need to add 2 configuration files in
.I /etc/systemd/system.

1414
sane-backends.spec Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
diff --git a/backend/plustek-usbhw.c b/backend/plustek-usbhw.c
index 05d3cc7..28cbd52 100644
--- a/backend/plustek-usbhw.c
+++ b/backend/plustek-usbhw.c
@@ -1451,6 +1451,14 @@ usb_ResetRegisters( Plustek_Device *dev )
* CanoScan devices to work properly after power-up
*/
sanei_lm983x_write_byte( dev->fd, 0x5b, regs[0x5b] );
+
+ /* At least CanoScan N650U can have a problem with writing
+ * to register 0x59 due XHCI USB controller is too
+ * fast for him. Simulate EHCI USB controller's
+ * behavior here - wait 1ms.
+ */
+ usleep(1000);
+
sanei_lm983x_write_byte( dev->fd, 0x59, regs[0x59] );
sanei_lm983x_write_byte( dev->fd, 0x5a, regs[0x5a] );
} else {

BIN
sane.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

10
saned.socket Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description=saned incoming socket
[Socket]
ListenStream=6566
Accept=yes
MaxConnections=1
[Install]
WantedBy=sockets.target

18
saned@.service.in Normal file
View File

@ -0,0 +1,18 @@
[Unit]
Description=Scanner Service
Requires=saned.socket
[Service]
ExecStart=/usr/sbin/saned
User=saned
Group=saned
StandardInput=null
StandardOutput=syslog
StandardError=syslog
Environment=SANE_CONFIG_DIR=@CONFIGDIR@
# If you need to debug your configuration uncomment the next line and
# change it as appropriate to set the desired debug options
# Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_NET=255
[Install]
Also=saned.socket

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (sane-backends-1.0.31.tar.gz) = 5d49ca698af38a30a3d23349f2fe82a4a21262b014ca38407d5ea0b3fe7cec72860a39c8651c8a5e2f561a9a740008658a36ed6bd96324be84646dbcf1461bfb