I want to install some software (varnish) on a server and noticed that an older version 2.1.0 is in the current Ubuntu release 10.04 and the new version (2.1.3) is being build in the 10.10 ubuntu release.
is it safe to use the newer package? and if so, how can I do this?
First of all, do you really need the new version? Remember, with new features come new bugs. And an advantage of older versions is that the bugs tend to be known.
The first place to look is the backports, which contains packages from the unstable repository recompiled for released versions of Ubuntu.
Next, you can try to install the new version; if the package manager doesn't complain about missing dependencies, there's a good chance it'll work.
Failing this, you can also look if someone has compiled the new version of the program for your release of Ubuntu and made it available in a PPA.
You can also try to recompile the source package from the unstable repository on your release. This might succeed where the binary package failed because binary packages declare a dependency on the library version they've been compiled with, to be on the safe side, even though the dependencies could often be relaxed.
And if the new version hasn't been compiled for Ubuntu yet, you can try compiling it yourself by taking the source package for the version in your release and substituting the new version for the original program archive. You may need to tweak or completely rewrite the build scripts, depending on how much the program has changed.
Or you can take a non-Ubuntu binary (either compiled by yourself or by someone else), and install it under
/opt
or/usr/local
or your home directory.