Hide Forgot
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.
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?
Yes, that is acceptable. Also, please make sure explicit systemd support is also included $ rpm -ql sane-backends | grep syst $ <nothing>
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
Created attachment 1357525 [details] Patch from Fedora
Created attachment 1357526 [details] Socket unit file from Fedora
Created attachment 1357528 [details] Service unit file from Fedora
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.
(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 :) .
> sane-backends is compiled with systemd support Oh, I overlooked it - it isn't. I'll look into it if it would backportable.
(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.
> 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.
(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
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.
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)
(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)
(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.
(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.)
(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.
(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?
(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.
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
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
I went to try downloading the RPMs to try out, but it's a 404 now. Is this bug going to be fixed?
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.
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