Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[solved] how to pin ssh 7.x so it will install?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
ericx
Posts: 2
Joined: 2017-04-28 12:02

[solved] how to pin ssh 7.x so it will install?

#1 Post by ericx »

openssh-client 7.x is available in archive stretch (testing); but I don't want everything from stretch; so I pinned the testing archive low:

Code: Select all

Package: *
Pin: release a=stable
Pin-Priority: 500

Package: *
Pin: release l=Debian-Security
Pin-Priority: 1000

Package: *
Pin: release a=testing
Pin-Priority: 100
This results in what appears to be the correct priority:

Code: Select all

root@mycomp:/etc/ssh# apt-cache policy openssh-client
openssh-client:
  Installed: 1:6.7p1-5+deb8u3
  Candidate: 1:6.7p1-5+deb8u3
  Version table:
     1:7.4p1-10 0
        100 http://deb.debian.org/debian/ testing/main amd64 Packages
        100 http://mirror.cc.columbia.edu/debian/ testing/main amd64 Packages
 *** 1:6.7p1-5+deb8u3 0
        500 http://ftp.us.debian.org/debian/ jessie/main amd64 Packages
       1000 http://security.debian.org/ jessie/updates/main amd64 Packages
       1000 http://security.debian.org/ stable/updates/main amd64 Packages
        500 http://deb.debian.org/debian/ stable/main amd64 Packages
        500 http://mirror.cc.columbia.edu/debian/ stable/main amd64 Packages
        100 /var/lib/dpkg/status
However, when I use "apt-get -t testing", it refuses to push the priority up:

Code: Select all

root@mycomp:/etc/ssh# apt-get install -t testing openssh-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssh-client is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 520 not upgraded.
If I'm reading the documentation correctly, the -t (target) is supposed to push the pin all the way up to 950?
Further, if I hard-code a pin just for openssh-client:

Code: Select all

Package: openssh-client
Pin: release a=testing
Pin-Priority: 700

Package: *
Pin: release a=stable
Pin-Priority: 500

Package: *
Pin: release l=Debian-Security
Pin-Priority: 1000

Package: *
Pin: release a=testing
Pin-Priority: 100
The priority sort of looks better:

Code: Select all

root@mycomp:/etc/ssh# apt-cache policy openssh-client
openssh-client:
  Installed: 1:6.7p1-5+deb8u3
  Candidate: 1:6.7p1-5+deb8u3
  Package pin: 1:7.4p1-10
  Version table:
     1:7.4p1-10 700
        100 http://deb.debian.org/debian/ testing/main amd64 Packages
        100 http://mirror.cc.columbia.edu/debian/ testing/main amd64 Packages
 *** 1:6.7p1-5+deb8u3 700
        500 http://ftp.us.debian.org/debian/ jessie/main amd64 Packages
       1000 http://security.debian.org/ jessie/updates/main amd64 Packages
       1000 http://security.debian.org/ stable/updates/main amd64 Packages
        500 http://deb.debian.org/debian/ stable/main amd64 Packages
        500 http://mirror.cc.columbia.edu/debian/ stable/main amd64 Packages
        100 /var/lib/dpkg/status
But it still won't install:

Code: Select all

root@mycomp:/etc/ssh# apt-get install openssh-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssh-client is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
root@mycomp:/etc/ssh# apt-get install -t testing openssh-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssh-client is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 520 not upgraded.
Last edited by ericx on 2017-05-01 11:52, edited 1 time in total.

cronoik
Posts: 310
Joined: 2015-05-20 21:17

Re: how to pin ssh 7.x so it will install?

#2 Post by cronoik »

I have just glanced at your post and noticed that you have pinned Debian-Security with 1000. This is still above 990 (-t parameter of apt-get) and therefore apt won't install anything from testing. Just remove the security and stable pin. Both have a default pin of 500, which is enough. You should also use the release name stretch instead of testing. Otherwise you will get a different version after the freeze has ended.
Have a nice day!

ericx
Posts: 2
Joined: 2017-04-28 12:02

Re: how to pin ssh 7.x so it will install?

#3 Post by ericx »

Thanks. That's a very clear explanation.
I'm still using "testing" in the release expression. I changed the archive string in source.lists to "stretch" explicitly; but "a=stretch" does not match the contents of stretch. I seem to remember seeing an ldif'like list of attributes for each of the archives; but I can't find it in /var/lib/apt/lists/*. Is there something other than 'a' that should be used in the release expression to match "stretch?"

Code: Select all

Package: *
Pin: release a=testing
Pin-Priority: 100

cronoik
Posts: 310
Joined: 2015-05-20 21:17

Re: how to pin ssh 7.x so it will install?

#4 Post by cronoik »

It is

Code: Select all

Pin: release n=stretch
More information can be found in the manpage of apt_preferences.
Have a nice day!

Post Reply