Hacker News new | ask | show | jobs
by SkyMarshal 4568 days ago
Since you're on Debian and are already putting it in /opt, try the Debian Alternatives tool [1], it's great for managing multiple versions of software you don't install from Deb repos.

It lets you put multiple versions of the same program in /opt or anywhere else (say, /opt/firefox/25, /opt/firefox/26, etc) and config one of them to be the system version (soft links all the bins and man into /usr/bin, /usr/local/bin, /usr/share/man, etc), then swap between versions, rollback if there's a problem, etc as necessary with a single command: `update-alternatives --config firefox`.

It works very similarly to those Ruby version managers, RVM and RBENV, by holding multiple versions somewhere out of the way and soft-linking the chosen one into the system folders. So similar in fact, that the Debian repo RBENV package has been rewritten to use Debian Alternatives instead of its home-brewed linker code.

Takes some upfront setup but that's scriptable and reusable for all subsequent versions [2], and is well worth it, especially for programs where you don't want to use the Debian repo version, don't want to install a 3rd party .deb, and don't want to compile directly to your system folders.

[1]: https://wiki.debian.org/DebianAlternatives

[2]: https://github.com/byrongibson/scripts/tree/master/install/h..., https://github.com/byrongibson/scripts/tree/master/install/j..., https://github.com/byrongibson/scripts/tree/master/install/s...

1 comments

That can be useful but it doesn't solve my problem of more automatic updating really. What I need is something close to native pacakge updating - i.e. replace old files with new ones when update is available with minimal hassle.
http://mozilla.debian.net/ is probably what you're after.

Debian uses the 'ESR' versions (long-term support, for enterprises etc) of firefox as it's stock browser, as it's impractical to review the latest and greatest every few weeks for security. The above link gives you the appropriate lines to add to your apt sources.list to get whichever version you like for whichever flavour you're running.

This gives you Iceweasel though, not Firefox, however the only difference is the branding.

Yes, I know about that. I'm using Debian testing, so for me that page redirects to unstable and experimental anyway, and I don't really want to mix with those. In the past the difference was more than branding, so I'm already used to sticking to stock Mozilla builds.