|Summary:||RFE: please include the systemd's config files|
|Product:||Red Hat Enterprise Linux 7||Reporter:||Todd <ToddAndMargo>|
|Component:||sane-backends||Assignee:||Zdenek Dohnal <zdohnal>|
|Status:||CLOSED ERRATA||QA Contact:||Dominik Rehák <drehak>|
|Severity:||medium||Docs Contact:||Marie Dolezelova <mdolezel>|
|Version:||7.4||CC:||akhaitov, drehak, mdolezel, salmy, thozza, ToddAndMargo, wberrier, zdohnal|
|Target Milestone:||rc||Keywords:||EasyFix, FastFix, FutureFeature, Patch|
|Fixed In Version:||sane-backends-1.0.24-12.el7||Doc Type:||Release Note|
The _sane-backends_ package is now built with systemd support Scanner Access Now Easy (SANE) is a universal scanner interface whose backend's and library's features are provided by the _sane-backends_ package. This update brings the following changes to SANE: * The _sane-backends_ package is built with systemd support. * The _saned_ daemon can be run without the need to create unit files manually, because these files are now shipped with _sane-backends_.
|Last Closed:||2018-10-30 08:09:38 UTC||Type:||Bug|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
|Bug Depends On:|
|Bug Blocks:||1549614, 1534569|
Description Todd 2017-11-12 02:41:12 UTC
Dear Red Hat, I am coming from the community: Scientific Linux 7.4. # find /usr/lib/systemd -iname \*saned\* <nothing> # yum --enablerepo=* whatprovides saned sane-backends-1.0.24-9.el7.x86_64 : Scanner access software Repo : @sl Matched from: Filename : /usr/sbin/saned # rpm -qa sane-backends sane-backends-1.0.24-9.el7.x86_64 Problem: the RPM post install scripts of sane-backends does not install systemd configuration files. What a pain in the neck to have to do it manually. Not everyone is a Linux litter system administrator (I am, but it is still a pain in the neck). (Samba, etc., etc., etc. all come with them.) Request for Enhancement: Please include these scripts Many thanks, -T From the man page: SYSTEMD CONFIGURATION for systemd we need to add 2 configuation files in /etc/systemd/system. The first file we need to add here is called saned.socket. It shall have the following contents: [Unit] Description=saned incoming socket [Socket] ListenStream=6566 Accept=yes MaxConnections=1 [Install] WantedBy=sockets.target The second file to be added is saned@.service with the following con‐ tents: [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=/etc/sane.d SANE_DEBUG_DLL=255 Is you need to set an environment variable for saned like SANE_CON‐ FIG_DIR you will have to remove the # on the last line and set the variable appropriately. Multiple variables can be set by separating the assignments by spaces as shown in the example above. Unlike (x)inetd systemd allows debugging output from backends set using SANE_DEBUG_<backend_name> to be captured. With the service unit as described above, the debugging output is forwarded to the system log.
Comment 3 Zdenek Dohnal 2017-11-21 09:43:13 UTC
Hi Todd, I'm sorry for late response - I looked into sane-backends in Fedora and I found there .socket and .service file with these contents: saned@.service: [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 saned.socket: [Unit] Description=saned incoming socket [Socket] ListenStream=6566 Accept=yes MaxConnections=1 [Install] WantedBy=sockets.target Is it acceptable for you if I take these files and add it in RHEL 7?
Comment 4 Todd 2017-11-21 10:45:24 UTC
Yes, that is acceptable. Also, please make sure explicit systemd support is also included $ rpm -ql sane-backends | grep syst $ <nothing>
Comment 5 Todd 2017-11-21 11:13:17 UTC
Also, it would be nice if the "man page" included # systemctl enable saned.socket (one time only) # systemctl -l start saned.socket So the user knew which syctemd script to enable and start
Comment 6 Zdenek Dohnal 2017-11-22 14:06:03 UTC
Created attachment 1357525 [details] Patch from Fedora
Comment 7 Zdenek Dohnal 2017-11-22 14:06:35 UTC
Created attachment 1357526 [details] Socket unit file from Fedora
Comment 8 Zdenek Dohnal 2017-11-22 14:07:05 UTC
Created attachment 1357528 [details] Service unit file from Fedora
Comment 9 Todd 2017-11-23 03:45:10 UTC
Would you add to this RFE to port sane-backends-daemon. (Fedora has one.) Systemd support won't work without it. Please annotate the necessity of sane-backends-daemon to the man page too. I would adore it if you ported Fedora's 1.0.27 (the 27 is coincidence) over to RHEL! Please note that saned.socket WILL NOT run without the daemon.
Comment 10 Zdenek Dohnal 2017-11-23 08:07:14 UTC
(In reply to Todd from comment #9) > Would you add to this RFE to port sane-backends-daemon. (Fedora has one.) > Systemd support won't work without it. Please annotate the necessity of > sane-backends-daemon to the man page too. There is no need to port sane-backends-daemon subpackage - saned binary is in main package in RHEL 7 and sane-backends is compiled with systemd support, only issue is that systemd unit files are missing (I guess there was assumption that user will open saned manpage and will create systemd unit files accordingly). What happened in Fedora is that saned was moved from main package to sane-backends subpackage and packed together with systemd unit files, because they represent different usage of sane-backends (not so common one), so it isn't necessary to drag it into distribution with main package. > > I would adore it if you ported Fedora's 1.0.27 (the 27 is coincidence) over > to RHEL! What you want is basically rebase of sane-backends, which can bring a lot of trouble, so we are doing rebase only when something is really broken or missing and cannot be backport by patch. IMHO there is no need for rebase for this issue. > > Please note that saned.socket WILL NOT run without the daemon. Mentioned above. Saned is still there :) .
Comment 11 Zdenek Dohnal 2017-11-23 15:10:49 UTC
> sane-backends is compiled with systemd support Oh, I overlooked it - it isn't. I'll look into it if it would backportable.
Comment 12 Zdenek Dohnal 2017-11-23 15:27:15 UTC
(In reply to Zdenek Dohnal from comment #11) > > sane-backends is compiled with systemd support > Oh, I overlooked it - it isn't. I'll look into it if it would backportable. I take it back - sane-backends is compiled with systemd support by default if systemd is installed. Only configure option is missing.
Comment 13 Zdenek Dohnal 2017-11-24 08:46:13 UTC
> What and where is this "configure option"? I mean option of configure script (named 'configure') by "Configure option". There isn't such option as in Fedora like '--with-systemd', but sane-backend is built with it if systemd is installed. From configure script: $as_echo_n "Checking for systemd..." if test -e /usr/include/systemd/sd-daemon.h ; then $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h with_systemd="yes" SYSTEMD_LIBS=" -lsystemd-daemon" $as_echo "yes" else with_systemd="no" That means sane-backends is installed with systemd everytime when systemd is installed and sane-backends does not provide configure option, by which you can tell to sane-backends to be built WITHOUT systemd, when systemd is installed. And this fact I do not find critical to fix it, because I want sane-backends to be built with systemd support. Please do not open more bugzillas for it, this is clearly one issue.
Comment 14 Todd 2017-11-24 10:41:28 UTC
(In reply to Zdenek Dohnal from comment #13) > That means sane-backends is installed with systemd everytime when systemd is > installed and sane-backends does not provide configure option, by which you > can tell to sane-backends to be built WITHOUT systemd, when systemd is > installed. And this fact I do not find critical to fix it, because I want > sane-backends to be built with systemd support. > > Please do not open more bugzillas for it, this is clearly one issue. Okay, I understand now. Would you please "suffer" a support question (I know this is not the right forum for such)? If $ ls -al /usr/sbin/saned -rwxr-xr-x. 1 root root 48456 May 2 2014 /usr/sbin/saned exists, may I presume that the "daemon" was BOTH successfully installed and supported? And if PDF Studio does not spawn an instance of saned when requested, that the issue rests with PDF Studio? How does one test if saned.socket is operating properly? PDF Studio has an unlimited trial, so it can be used to test if saned.socket is working properly: https://www.qoppa.com/pdfstudio/ (It is well worth every cent they charge for it if you want to upgrade the trial.) Many thanks, -T
Comment 15 Zdenek Dohnal 2017-11-24 11:31:06 UTC
There was Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=1091566 about saned systemd configuration. This bug is in RHEL 7 too, I'll work on patch for it. That bug was about bad configuration mentioned in saned manpage. (In reply to Todd from comment #14) > $ ls -al /usr/sbin/saned > -rwxr-xr-x. 1 root root 48456 May 2 2014 /usr/sbin/saned > > exists, may I presume that the "daemon" was BOTH successfully installed and > supported? You can presume it is installed. I'm not sure what you mean by 'supported'. In my interpretation it means I'm obliged to fix issues with it. But you probably mean it like 'SW is ready to use by other programs' - which is not - you need to configure it after installation (like allowed users etc. and for RHEL 7 it means creating unit files for now). > > And if PDF Studio does not spawn an instance of saned when requested, that > the issue rests with PDF Studio? How does one test if saned.socket is > operating properly? > Set debug level in saned.service, restart .socket unit, open journal and try to scan - you will see logs in journal.
Comment 16 Todd 2017-11-24 11:42:34 UTC
In saned@.service, I set Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_BJNP=5 And for the life of me, I can not figure out where this debugging goes. It would help if I could see where PDF Studio was going wrong. I also have: 192.168.255.10 127.0.0.1 in saned.conf, but am not seeing where to configure users and there is no "man saned.conf" (as there is for smb.conf)
Comment 17 Zdenek Dohnal 2017-11-24 12:04:24 UTC
(In reply to Todd from comment #16) > In saned@.service, I set > Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_BJNP=5 > And for the life of me, I can not figure out where this debugging goes. In journal, see 'man journalctl'. > > It would help if I could see where PDF Studio was going wrong. > > I also have: > 192.168.255.10 > 127.0.0.1 This is what I meant by 'configure users'. Sorry for mystification. BTW you can google several pages with instructions how to set saned (and in bugzilla link from comment#15 too)
Comment 18 Todd 2017-11-24 23:59:38 UTC
(In reply to Zdenek Dohnal from comment #17) > (In reply to Todd from comment #16) > > In saned@.service, I set > > Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_BJNP=5 > > And for the life of me, I can not figure out where this debugging goes. > > In journal, see 'man journalctl'. I tried both "journalctl -efx" and "tail /var/spool/messages". Zip. Nothing.
Comment 19 Todd 2017-11-25 03:25:30 UTC
(In reply to Todd from comment #18) > (In reply to Zdenek Dohnal from comment #17) > > (In reply to Todd from comment #16) > > > In saned@.service, I set > > > Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_BJNP=5 > > > And for the life of me, I can not figure out where this debugging goes. > > > > In journal, see 'man journalctl'. > > I tried both "journalctl -efx" and "tail /var/spool/messages". Zip. Nothing. I changed saned@service to "StandardInput=socket" and "Environment=SANE_CONFIG_DIR=/etc/sane.d SANE_DEBUG_DLL=255 SANE_DEBUG_BJNP=5 SANE_DEBUG_NET=128" Now "journalctl -efx" lights up like Christmas tree. I do believe the man page is incorrect about "StandardInput=socket" as pointed out in https://bugzilla.redhat.com/show_bug.cgi?id=1091566#c8 The journal log is a nightmare and I have no idea what I am cooking at, especially the crypto errors. I posted it over on the sane mailing list: [sane-devel] where is my socket error? https://lists.freedesktop.org/archives/systemd-devel/2017-November/subject.html (Give it a bit to show up. If you want it, I can email it to you privately.)
Comment 20 Zdenek Dohnal 2017-11-27 11:32:55 UTC
(In reply to Zdenek Dohnal from comment #13) > From configure script: > > $as_echo_n "Checking for systemd..." > if test -e /usr/include/systemd/sd-daemon.h ; then > > $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h > > with_systemd="yes" > SYSTEMD_LIBS=" -lsystemd-daemon" > > $as_echo "yes" > else > with_systemd="no" I've checked SPEC file of sane-backends in RHEL 7, Fedora's git log and bugzilla mentioned above. As I mentioned in previous comments, sane-backends is built with systemd support every time if systemd is installed - but that means systemd-devel must be in RPM BuildRequires and it isn't right now (it confirms what you wrote in comment#19), I'm sorry for mystification. I'll build it with systemd too.
Comment 21 Todd 2017-11-27 13:21:27 UTC
(In reply to Zdenek Dohnal from comment #20) > I've checked SPEC file of sane-backends in RHEL 7, Fedora's git log and > bugzilla mentioned above. As I mentioned in previous comments, sane-backends > is built with systemd support every time if systemd is installed - but that > means systemd-devel must be in RPM BuildRequires and it isn't right now (it > confirms what you wrote in comment#19), I'm sorry for mystification. I'll > build it with systemd too. Where can I download the new RPMs from?
Comment 22 Zdenek Dohnal 2017-11-27 13:28:24 UTC
(In reply to Todd from comment #21) > Where can I download the new RPMs from? When I build it, I'll post download link here.
Comment 23 Zdenek Dohnal 2017-12-19 08:38:04 UTC
Hi Todd, sorry for being late, I wanted to test it more and other things came up. Here they are https://zdohnal.fedorapeople.org/.sane-backends/sane-backends.tar.gz . Would you mind testing it? Ways how to set network scanner are described on the internet. But please remember, if you have scanner in MF printer and that printer is connected by usb, you will need to add saned user into lp group like this: $ sudo usermod -aG lp saned
Comment 24 Todd 2017-12-20 03:11:41 UTC
Hi Zdenek, My RAID SAS controller card crashed and I had to rebuild everything on SATA drives. Since I had to reinstall everything, I upgraded to Fedora 27. RHEL is a really poor fit for what I am trying to do, so it was a long time overdue. My USB2 is now 2 to 3 times faster too. And wine.i686 when on smooth as silk. qemu-kvm is now working with USB devices properly. I am rather enjoying all the things that did not work right that starting working. I have to get sane working still to do my banking on Thursday, so hopefully that will be just as smooth as everything else Is there something I can test in Fedora for you? My scanner is a stand alone scanner -T
Comment 37 Wade Berrier 2018-10-21 22:15:18 UTC
I went to try downloading the RPMs to try out, but it's a 404 now. Is this bug going to be fixed?
Comment 38 Zdenek Dohnal 2018-10-22 09:00:47 UTC
You see the bug is in VERIFIED state and errata attached, so when new minor version of RHEL 7 is going to be released, then it will be fixed.
Comment 40 errata-xmlrpc 2018-10-30 08:09:38 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3078