Bug 19891 - 6_rc0: failed to link /usr/lib64/ssh/ssh-askpass
Summary: 6_rc0: failed to link /usr/lib64/ssh/ssh-askpass
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-04 21:47 CET by Bit Twister
Modified: 2016-12-07 15:07 CET (History)
2 users (show)

See Also:
Source RPM: openssh-7.3p1-3.mga6.src.rpm seahorse-3.20.0-2.mga6.src.rpm
CVE:
Status comment:


Attachments

Description Bit Twister 2016-12-04 21:47:45 CET
Description of problem:

failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
failed to link /usr/lib64/ssh/ssh-askpass -> /etc/alternatives/ssh-askpass: No such file or directory

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. urpmi --download-all  --downloader wget --auto --auto-update


Snippet of the update:

installing lib64kf5package5-5.28.0-1.mga6.x86_64.rpm lib64kf5filemetadata5-5.28.0-1.mga6.x86_64.rpm lib64kf5notifications5-5.28.0-1.mga6.x86_64.rpm lib64kf5jobwidgets5-5.28.0-1.mga6.x86_64.rpm lib64kf5crash5-5.28.0-1.mga6.x86_64.rpm seahorse-3.20.0-2.mga6.x86_64.rpm lib64kf5pty5-5.28.0-1.mga6.x86_64.rpm kfilemetadata-5.28.0-1.mga6.x86_64.rpm from /var/cache/urpmi/rpms
Preparing...                     #######################
    41/56: lib64kf5filemetadata5 #########################
    42/56: kfilemetadata         ########################
    43/56: lib64kf5pty5          ########################
    44/56: seahorse              #########################
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
failed to link /usr/lib64/ssh/ssh-askpass -> /etc/alternatives/ssh-askpass: No such file or directory
    45/56: lib64kf5crash5        #######################################################
Comment 1 Marja Van Waes 2016-12-05 12:14:14 CET
Assigning to all packagers collectively, since there is no registered maintainer for this package.

The real issue might be with openssh-askpass-qt4, which gave problems before.
See bug 18458 and 18748

Do you have openssh-askpass-qt4 installed?

CC: (none) => makowski.mageia, marja11
Assignee: bugsquad => pkg-bugs

Comment 2 Bit Twister 2016-12-05 15:34:11 CET
(In reply to Marja van Waes from comment #1)
> Assigning to all packagers collectively, since there is no registered
> maintainer for this package.
> 
> Do you have openssh-askpass-qt4 installed?

Yes

> The real issue might be with openssh-askpass-qt4, which gave problems before.
> See bug 18458 and 18748

Yes, but those bugs show resolved 2016-06-29 15:30. and my test bed node has -qt4 installed. test bed node was a clean network install Oct 25 04:23

Interesting that seahorse install on that node has
     5/16: seahorse              #######################
the primary link for shs-askpass must be /usr/libexec/openssh/ssh-askpass

NOTE: spelling of shs-askpass 


Workaround:  uninstall/install openssh-askpass-common on cauldron installs.
Comment 3 Rémi Verschelde 2016-12-05 15:37:32 CET
seahorse needs to be fixed like the other packages were in bug 18458 and bug 18748, it still uses the old path in its update-alternatives: http://svnweb.mageia.org/packages/cauldron/seahorse/current/SPECS/seahorse.spec?revision=1072383&view=markup&pathrev=1072383
Comment 4 Philippe Makowski 2016-12-05 21:03:15 CET
hum, and why on my cauldron I have :
/usr/lib64/ssh/ssh-askpass -> /etc/alternatives/ssh-askpass
and 
/etc/alternatives/ssh-askpass -> /usr/lib64/seahorse/seahorse-ssh-askpass

?
Comment 5 Philippe Makowski 2016-12-05 21:27:06 CET
I submitted the following change, please report if it is better.

$ svn diff
Index: SPECS/seahorse.spec
===================================================================
--- SPECS/seahorse.spec	(révision 1072662)
+++ SPECS/seahorse.spec	(copie de travail)
@@ -3,7 +3,7 @@
 Name:		seahorse
 Summary:	GNOME frontend to GnuPG
 Version:	3.20.0
-Release:	%mkrel 2
+Release:	%mkrel 3
 License:	GPLv2+
 Group:		Graphical desktop/GNOME
 URL:		http://seahorse.sourceforge.net/
@@ -66,7 +66,7 @@
 %{find_lang} %{name} --all-name --with-help
  
 %post
-update-alternatives --install %{_libdir}/ssh/ssh-askpass ssh-askpass %{_libdir}/%{name}/%{name}-ssh-askpass 15
+update-alternatives --install %{_libexecdir}/openssh/ssh-askpass ssh-askpass %{_libdir}/%{name}/%{name}-ssh-askpass 15
 update-alternatives --install %{_bindir}/ssh-askpass bssh-askpass %{_libdir}/%{name}/%{name}-ssh-askpass 15
 
 %postun
Comment 6 Bit Twister 2016-12-06 00:58:32 CET
(In reply to Philippe Makowski from comment #5)
> I submitted the following change, please report if it is better.

Not much better.

Test procedure:
 urpme seahorse
 urpme openssh-askpass-qt4
 urpme openssh-askpass

 urpmi openssh-askpass
 urpmi seahorse

Note error:
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
the primary link for ssh-askpass must be /usr/lib64/ssh/ssh-askpass
Comment 7 Philippe Makowski 2016-12-06 11:59:43 CET
(In reply to Bit Twister from comment #6)

did you really tested seahorse-3.20.0-3.mga6 ?

can you explain me that ?
> Note error:
> failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
> the primary link for ssh-askpass must be /usr/lib64/ssh/ssh-askpass

I don't understand

what are the results of :
update-alternatives --display ssh-askpass
update-alternatives --display bssh-askpass
ls -la /usr/lib64/ssh/ssh-askpass
ls -la /usr/libexec/openssh/ssh-askpass
ls -la /etc/alternatives/ssh-askpass
Comment 8 Bit Twister 2016-12-06 13:35:06 CET
(In reply to Philippe Makowski from comment #7)
> (In reply to Bit Twister from comment #6)
> 
> did you really tested seahorse-3.20.0-3.mga6 ?

# rpm -qf $(type -p seahorse)
seahorse-3.20.0-3.mga6

> can you explain me that ?
> > Note error:
> > failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
> > the primary link for ssh-askpass must be /usr/lib64/ssh/ssh-askpass
> 
> I don't understand
> 
> what are the results of :
> update-alternatives --display ssh-askpass
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory

> update-alternatives --display bssh-askpass
bssh-askpass - status is auto.
 link currently points to /usr/lib64/seahorse/seahorse-ssh-askpass
/usr/libexec/openssh/x11-ssh-askpass - priority 10
/usr/lib64/seahorse/seahorse-ssh-askpass - priority 15
Current `best' version is /usr/lib64/seahorse/seahorse-ssh-askpass.

> ls -la /usr/lib64/ssh/ssh-askpass
ls: cannot access '/usr/lib64/ssh/ssh-askpass': No such file or directory

> ls -la /usr/libexec/openssh/ssh-askpass
ls: cannot access '/usr/libexec/openssh/ssh-askpass': No such file or directory

> ls -la /etc/alternatives/ssh-askpass
ls: cannot access '/etc/alternatives/ssh-askpass': No such file or directory
Comment 9 Philippe Makowski 2016-12-06 14:22:07 CET
Sorry I'm lost, I don't understand

that the same code than in openssh.spec

if someone else have an idea, I don't

(In reply to Bit Twister from comment #8)

can you try doing again :
 urpme seahorse
 urpme openssh-askpass-qt4
 urpme openssh-askpass

 update-alternatives --display ssh-askpass
 urpmi openssh-askpass
 update-alternatives --display ssh-askpass
 urpmi seahorse
 update-alternatives --display ssh-askpass

thanks
Comment 10 Bit Twister 2016-12-06 15:07:55 CET
[root@wb ~]#  urpme seahorse
removing seahorse-3.20.0-3.mga6.x86_64
removing package seahorse-3.20.0-3.mga6.x86_64
      1/1: removing seahorse-3.20.0-3.mga6.x86_64
                                 ##########################
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory

[root@wb ~]#  urpme openssh-askpass-qt4
unknown package: openssh-askpass-qt4

[root@wb ~]#  urpme openssh-askpass
removing openssh-askpass-7.3p1-3.mga6.x86_64
removing package openssh-askpass-7.3p1-3.mga6.x86_64
      1/1: removing openssh-askpass-7.3p1-3.mga6.x86_64
                                 ###########################
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory

The following package:
  openssh-askpass-common-7.3p1-3.mga6.x86_64
is now orphaned, if you wish to remove it, you can use "urpme --auto-orphans"

[root@wb ~]#  update-alternatives --display ssh-askpass
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory

[root@wb ~]#  urpmi openssh-askpass


    http://mirrors.kernel.org/mageia/distrib/cauldron/x86_64/media/core/release/openssh-askpass-7.3p1-3.mga6.x86_64.rpm
installing openssh-askpass-7.3p1-3.mga6.x86_64.rpm from /var/cache/urpmi/rpms  
Preparing...                     #########################
      1/1: openssh-askpass       ######################
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
the primary link for ssh-askpass must be /usr/lib64/ssh/ssh-askpass

[root@wb ~]#  update-alternatives --display ssh-askpass
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory

[root@wb ~]#  urpmi seahorse


    http://mirrors.kernel.org/mageia/distrib/cauldron/x86_64/media/core/release/seahorse-3.20.0-3.mga6.x86_64.rpm
installing seahorse-3.20.0-3.mga6.x86_64.rpm from /var/cache/urpmi/rpms        
Preparing...                     ########################
      1/1: seahorse              #############################
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
the primary link for ssh-askpass must be /usr/lib64/ssh/ssh-askpass

[root@wb ~]#  update-alternatives --display ssh-askpass
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
Comment 11 Philippe Makowski 2016-12-06 19:49:59 CET
so seahorse is ok, but your box is not, the problem is coming from openssh-askpass itself when the change was made to /usr/libexec/openssh/

what is the result of :
cat /var/lib/alternatives/ssh-askpass ?

I guess that you have two lines like :
auto
/usr/lib64/ssh/ssh-askpass

and since, for a reason I don't know, you don't have anymore the link
/usr/lib64/ssh/ssh-askpass -> /etc/alternatives/ssh-askpass*

recreating the link should solve the problem, but I don't know why you don't have it
as root :
ln -s /etc/alternatives/ssh-askpass /usr/lib64/ssh/ssh-askpass

and I don't think that as you said comment #2
> Workaround:  uninstall/install openssh-askpass-common on cauldron installs.
is enough, I don't have myself this package on my system.

Someone else ?

Source RPM: seahorse-3.20.0-2.mga6.src.rpm => openssh-7.3p1-3.mga6.src.rpm seahorse-3.20.0-2.mga6.src.rpm

Comment 12 Bit Twister 2016-12-06 22:52:42 CET
(In reply to Philippe Makowski from comment #11)
> so seahorse is ok, 

No ideal on how to test seahorse.

> but your box is not, 

on my web browsing node, test bed node, virtual box node.


> the problem is coming from
> openssh-askpass itself when the change was made to /usr/libexec/openssh/
> 
> what is the result of :
> cat /var/lib/alternatives/ssh-askpass ?

# cat /var/lib/alternatives/ssh-askpass
auto
/usr/lib64/ssh/ssh-askpass

/usr/lib64/seahorse/seahorse-ssh-askpass
15


> I guess that you have two lines like :
> auto
> /usr/lib64/ssh/ssh-askpass
> 
> and since, for a reason I don't know, you don't have anymore the link
> /usr/lib64/ssh/ssh-askpass -> /etc/alternatives/ssh-askpass*
> 
> recreating the link should solve the problem, but I don't know why you don't
> have it
> as root :
> ln -s /etc/alternatives/ssh-askpass /usr/lib64/ssh/ssh-askpass
> 
> and I don't think that as you said comment #2
> > Workaround:  uninstall/install openssh-askpass-common on cauldron installs.
> is enough, I don't have myself this package on my system.

That was a mistake, should have been I tried uninstall/install openssh-askpass based on reading bug links in comment 1. 

I went back and noticed I missed qt4 from bug 18748#c7.
So I installed openssh-askpass-qt4, removed/installed seahorse and still have
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
the primary link for ssh-askpass must be /usr/lib64/ssh/ssh-askpass

> Someone else ?
Comment 13 Rémi Verschelde 2016-12-07 08:43:20 CET
Back when I debugged a similar issue in another package, I remember having a hard time getting rid of the broken alternative on my installed system, even after the packages had been fixed.

So it may be that the issue Bit Twister is having now is still caused by the bad alternatives created by the previous version of the package, but it wouldn't affect new installs with the fixed seahorse (not sure about upgrades, but I *think* it would behave OK, at least I haven't seen bug reports about this for the other packages with a changed ssh alternative).

If I'm right, the bug would actually be fixed, but Bit Twister still needs to fix his system by managing to get rid of this broken alternative (which is not trivial, I think I had to recreate the expected symlinks manually before update-alternatives let me remove it).
Comment 14 Philippe Makowski 2016-12-07 12:17:30 CET
(In reply to Rémi Verschelde from comment #13)
> If I'm right, the bug would actually be fixed, but Bit Twister still needs
> to fix his system by managing to get rid of this broken alternative 

I think so too

Bit Twister, here what you can try :

1/ urpme seahorse openssh-askpass-qt4 openssh-askpass

Ideally,  /var/lib/alternatives/ssh-askpass shouldn't exist anymore
if it still exist, then
 
2/ rm /var/lib/alternatives/ssh-askpass

3/ urpmi seahorse openssh-askpass

then check with :
update-alternatives --display ssh-askpass
Comment 15 Bit Twister 2016-12-07 15:05:04 CET
What a mess. Four different clean network installs in different months, with updates, and all seem to be different.  :(

 @Philippe Makowski
NOTE: urpme quits removing packages if a package does not exist.  :(

Not sure if a bug report should be generated. I would think it should report the package not found and continue removing other packages.

Workaround:
      urpme seahorse
      urpme openssh-askpass-qt4
      urpme openssh-askpass
      urpme openssh-askpass-common

      rm -f /usr/bin/ssh-askpass
      rm -f /var/lib/rpm/alternatives/ssh-askpass
      rm -f /usr/libexec/openssh/ssh-askpass

Suggest checking for any other ssh-askpass links with
     symlinks -r / | grep dangling | grep /ssh-askpass

and removing any found then update the locate database
     /etc/cron.daily/mlocate.cron
     locate /ssh-askpass

and remove anything found.


Now do the install
     urpmi seahorse openssh-askpass
Comment 16 Bit Twister 2016-12-07 15:07:58 CET
Going to mark this as resolved.

No idea if a Mga5->6 upgrade will work as well.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.