Hi, After upgrading from Mageia 5 to 6, I discovered that "/usr/lib/cups/backend/smb" was a dangling link, so printing failed for a printer accessed via SMB protocol. The link referenced "/etc/alternatives/smb", which referenced "/usr/lib/cups/backend/smb3" from samba-client-3.6.25-2.7.mga5. In Mageia 6, samba-client-4.6.5-1.mga6 contains "/usr/libexec/samba/cups_backend_smb". When I did "ln -svf /usr/libexec/samba/cups_backend_smb /usr/lib/cups/backend/smb", printing worked again. Moreover, I found several other dangling links related to samba3 in "/etc/alternatives/" but those links where not referenced elsewhere. Best regards, Nico.
Assigning to the registered samba maintainer
Summary: Problem with SMB backend for CUPS => Problem with SMB backend for CUPS, caused by /usr/lib/cups/backend/smb danging linkCC: (none) => marja11Assignee: bugsquad => bgmilneSource RPM: (none) => samba-4.6.5-1.mga6
Bug confirmed here : https://www.mageialinux-online.org/forum/topic-24043-1+probleme-mageia6-pour-configurer-une-imprimante-avec-le-protocol-smb.php#m231071 and workaround also confirmed. Thanks Nicolas. We need now a packager to correct the problem.
CC: (none) => yves.brungard_mageia
CC: (none) => doktor5000
Please, add this information in Mageia 7 Errata. Still valid.
CC: (none) => lrampazzo
The problem was introduced by the switch from samba-3.x to samba-4.x (where a different distribution's samba package was imported without considering all the possible impact, in http://svnweb.mageia.org/packages/cauldron/samba/current/SPECS/samba.spec?r1=852307&r2=854335 ) Previously, the samba (samba-client) package managed the /usr/lib/cups/backend/smb symlink as a slave of the smbclient alternative ( http://svnweb.mageia.org/packages/cauldron/samba/current/SPECS/samba.spec?revision=852307&view=markup&pathrev=852307#l1728 ), and systems that had the previous version still have the alternative installed: [root@media ~]# update-alternatives --display smbclient smbclient - status is auto. link currently points to /usr/bin/smbclient3 /usr/bin/smbclient3 - priority 10 slave cups_smb: /usr/lib/cups/backend/smb3 slave findsmb.1: /usr/share/man/man1/findsmb3.1.xz slave findsmb: /usr/bin/findsmb3 slave smbspool.8: /usr/share/man/man8/smbspool3.8.xz slave smbget.1: /usr/share/man/man1/smbget3.1.xz slave smbtar.1: /usr/share/man/man1/smbtar3.1.xz slave nmblookup: /usr/bin/nmblookup3 slave smbgetrc.5: /usr/share/man/man5/smbgetrc3.5.xz slave smbget: /usr/bin/smbget3 slave smbtar: /usr/bin/smbtar3 slave nmblookup.1: /usr/share/man/man1/nmblookup3.1.xz slave eventlogadm: /usr/bin/eventlogadm3 slave smbclient.1: /usr/share/man/man1/smbclient3.1.xz slave smbprint: /usr/bin/smbprint3 slave smbspool: /usr/bin/smbspool3 Current `best' version is /usr/bin/smbclient3. [root@media ~]# There are now ( http://svnweb.mageia.org/packages/cauldron/samba/current/SPECS/samba.spec?revision=1436819&view=markup#l892 ) update-alternatives configurations that maintain the symlink /usr/libexec/samba/cups_backend_smb: [root@buchan-desktop ~]# update-alternatives --display cups_backend_smb cups_backend_smb - status is auto. link currently points to /usr/bin/smbspool /usr/bin/smbspool - priority 10 Current `best' version is /usr/bin/smbspool. [root@buchan-desktop ~]# cat /var/lib/alternatives/cups_backend_smb auto /usr/libexec/samba/cups_backend_smb /usr/bin/smbspool 10 [root@buchan-desktop ~]# Another alternative is provided in the samba-krb5-printing sub-package, for a kerberos-wrapped backend. So, the real question is, which package should own the /usr/lib/cups/backend/smb symlink? If the samba package should own it, I would maybe rather change this update-alternatives config to add a "slave", but e.g. in Fedora, the cups package owns the /usr/lib/cups/backend symlink: https://src.fedoraproject.org/rpms/cups/blob/master/f/cups.spec#_591 I propose: * samba package to add removal of the old smbclient alternatives * cups package adds the symlink via trigger following Fedora's convention pointing to the existing symlink /usr/libexec/samba/cups_backend_smb which is already present in the samba-client package. (I wouldn't mind resolving this soon so I could potentially include this for the pending samba update for Mageia 7). (trying to re-assign to cups maintainer tv@)
Source RPM: samba-4.6.5-1.mga6 => cups-2.2.11-2.mga7.src.rpmCC: (none) => bgmilneAssignee: bgmilne => bugsquad
Assignee: bugsquad => thierry.vignaud
To clean up what is in scope for the samba package, it looks like calling: update-alternatives --remove smbclient /usr/bin/smbclient3 || : should be enough: [root@media ~]# ls -l /usr/lib/cups/backend/smb lrwxrwxrwx 1 root root 26 Jun 23 2013 /usr/lib/cups/backend/smb -> /etc/alternatives/cups_smb [root@media ~]# ls -l /etc/alternatives/cups_smb lrwxrwxrwx 1 root root 26 Jul 22 2017 /etc/alternatives/cups_smb -> /usr/lib/cups/backend/smb3 [root@media ~]# update-alternatives --remove smbclient /usr/bin/smbclient3 [root@media ~]# ls -l /etc/alternatives/cups_smb ls: cannot access '/etc/alternatives/cups_smb': No such file or directory [root@media ~]# ls -l /usr/lib/cups/backend/smb ls: cannot access '/usr/lib/cups/backend/smb': No such file or directory [root@media ~]# update-alternatives --remove smbclient /usr/bin/smbclient3 [root@media ~]# echo $? 2 [root@media ~]# But, I need to test some more. Putting the correct symlink in /usr/lib/cups/backend will need to be done by cups.
Since there wasn't any traction, and it makes just as much sense to add the symlink to samba-client, I have committed a fix in http://svnweb.mageia.org/packages?view=revision&revision=1439385 (cauldron) and http://svnweb.mageia.org/packages?view=revision&revision=1439417 for 7, and I have submitted this to core/updates_testing (samba-4.10.8-2.mga7) Affected users could help by testing this package on affected machines currently running Mageia 7. Testing procedure: 1)Before upgrading, run the following commands: ls -l $(readlink -f /usr/lib/cups/backend/smb ) ls -l $(readlink -f /etc/alternatives/smb*) /usr/sbin/update-alternatives --list|grep smb /usr/sbin/update-alternatives --display smbclient cat /var/lib/alternatives/smbclient The first command should return: ls: cannot access '/etc/alternatives/cups_smb': No such file or directory The 2 command should show a lot of broken symlinks The other 3 commands provide more information in case the update doesn't do the right thing. 2)Upgrade at least samba-client from updates_testing by running the following commands as root: urpmi.update "Core Updates Testing" urpmi --media "Core Updates Testing" samba-client 3)Run the commands from (1) again This time, the first command should return the listing for /usr/bin/smbspool, e.g.: -rwxr-xr-x 1 root root 27664 Sep 10 16:10 /usr/bin/smbspool* The 2nd command should return: ls: cannot access '/etc/alternatives/smb*': No such file or directory Ideally, the last 3 commands should return nothing, but it looks like the /var/lib/alternatives/smbclient gets left behind. Since this is mainly cosmetic, I will update cauldron to clean this up, and on upgrading to Mageia 8 (or, if we need to do another update for 7, on applying that update) this remnant should also be removed. It would be useful to have the all of the output from the 3 sets of commands from anyone who tests this.
Source RPM: cups-2.2.11-2.mga7.src.rpm => samba-4.6.5-1.mga6Status: NEW => ASSIGNEDAssignee: thierry.vignaud => bugsquad
Created attachment 11274 [details] Results for commands proposed @ comment #6
Blocks: (none) => 25518
This generates an error while updating cups (see bug#25518). /usr/lib/cups/backend/smb -> /usr/libexec/samba/cups_backend_smb (In reply to Buchan Milne from comment #4) > The problem was introduced by the switch from samba-3.x to samba-4.x (where > a different distribution's samba package was imported without considering > all the possible impact, in (...) > Previously, the samba (samba-client) package managed the > /usr/lib/cups/backend/smb symlink as a slave of the smbclient alternative ( (...) > If the samba package should own it, I would maybe rather change this > update-alternatives config to add a "slave", but e.g. in Fedora, the cups > package owns the /usr/lib/cups/backend symlink: (In reply to Buchan Milne from comment #5) > Putting the correct symlink in /usr/lib/cups/backend will need to be done by > cups. it's debatable since /usr/lib/cups/backend/smb is a symlink to /usr/libexec/samba/cups_backend_smb, owned by samba, but I'm OK to add the triggersin into cups
CC: (none) => thierry.vignaud
Currently Samba is samba-4.12.6-1.mga8 > samba-4.6.5-1.mga6 Cups is cups-2.3.3-6.mga8. Does this still apply in Cauldron Mageia 8 Beta 1? Assigning meanwhile to Base System Team.
CC: (none) => ouaurelienAssignee: bugsquad => basesystem
Source RPM: samba-4.6.5-1.mga6 => samba-4.12.6-1.mga8.src.rpm