I would like to use the Natty Narwhal repository for puppet packages, but I don’t want to upgrade my whole server. Is that possible ?
My current solution is to fetch the .deb packages by hand
I would like to use the Natty Narwhal repository for puppet packages, but I don’t want to upgrade my whole server. Is that possible ?
My current solution is to fetch the .deb packages by hand
Pinning is an advanced package management technique that allows you to remain on a stable release while grabbing packages from a more recent version. Mixing repositories is not supported, and can get you into trouble if the package you want has been compiled against different library versions than you have on your system. If possible, you should try getting the package from the backports repository (or possibly a well supported PPA) first. That said, you seem to already know that puppet
from Natty works well on your system.
In order to pin puppet
to the natty version, we will have to edit a few files. First you will need to set your default release in /etc/apt/apt.conf.d/01ubuntu
(I'm assuming you are using lucid, obviously substitute the actual release):
APT
{
Default-Release "lucid";
};
Next, you need to add natty to your /etc/apt/sources.list
or create a the new file /etc/apt/sources.list.d/natty.sources.list
with the following sources:
deb http://archive.ubuntu.com/ubuntu natty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu natty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu natty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu natty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu natty-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu natty-security main restricted universe multiverse
Then, you need to set the "Pin-Priority" for the puppet
package from Natty higher than the priority for your default release. Setting the default release in /etc/apt/apt.conf.d/01ubuntu
essentially sets the priority for all packages originating in that release to 990. So in /etc/apt/preferences
we need to over-ride this for puppet
, using something higher like:
Package: puppet
Pin: release n=natty
Pin-Priority: 995
Now you simply need to run and apt-get update && apt-get upgrade
Package: * Pin: release n=yakkety Pin-Priority: 400
, but that doesn't seem to work.
Also I think it's worth doing a dry-install of the packages you want from the newer repo to see if any other dependent packages need updating. Then you can note them and space-separate them in the "Package:" line of the preferences file.
– Scott Apr 21 '17 at 17:59