Friday, February 4, 2011

Simplifying Offline Application Installation on Linux

I love package managers, they are a fantastic tool that allow systems to save space by having libraries shared between multiple applications and allow the system to be easily updated. Something that can be excessively difficult on many Linux systems is installing software on a computer without an internet connection. If you have never had to do this, I've found it typically goes like this -

1.) Acquire a computer with an internet connection

2.) Download the .deb/.rpm package for the application you want to install. Then download the .deb/.rpm package for every dependency for your application. Then download the .deb/.rpm package for every dependency of the dependencies of your application. Rinse and repeat.

3.) Take the tens of package files you have downloaded and bring them over to your offline system with a flash drive.

4.) Install the packages in the correct order so they all configure/setup properly (you remember which packages depend on which other packages right?)

My question is this: Why is this headache necessary? Simple, it isn't!

One of the things the Bodhi team and I have created are neatly packaged offline application installers. These ".bod" files are a combination shell script and tar archive that when run neatly unzip all the necessary dependencies of a given application and then install the program (and it's dependencies) via the system's package manager. What used to be a giant headache has been simplified down to a few clicks and the entering of a password:






What do you think - something interesting/worthwhile?

~Jeff Hoogland

16 comments:

  1. I would like to say that if you install them with a glob (say dpkg -i ./*.deb) they will work out the dependencies so that you don't have to worry about what depends on what at install time. (This works for rpms as well, not sure about other systems)

    That being said, you still have to figure them out at download time and have to know command line to get it to work well(the GUIs sometimes work and sometimes don't with multiple packages) so your idea still simplifies things a LOT especially for new users. I think it is a great idea, and other distros should follow in making a similar system.

    ReplyDelete
  2. HATS OFF TO THE BODHI TEAM FOR THIS INGENIOUS WORK . Indeed ,this would be revolutionary . Do the .bod packages work in ubuntu and it's derivatives ? Or are they bodhi specific ?I would check it out , but i am one of your target audiences , my mobile connection has limited data and speed , and so is not suitable for big downloads . If there offline installers work in ubuntu , then it would be a phenomenon . Many people complain that to install software in linux , you need a fast internet , while in windows , most installers don't require internet . But no more ;-) thank you all for your hard work. It is really great to know that there are people who have facilities and think for others who don't have all the facilities .

    ReplyDelete
  3. I am not sure as all of the systems in my house currently run Bodhi... If there is a brave soul out there willing to give these packages a try under Lucid/Maverick - then please let me know if they work :D

    ~Jeff

    ReplyDelete
  4. After a years using Linux, I think we all should work on universal package manager, since lots of linux distros have a lots of different package formats... So many hours and efforts are lost in repackaging source files for the various distros.... If we look from energy saving point there are countless hours of machines running on electricity compiling packages just because they are in different format...
    We need standardizedpackage manager across all linux distros...

    Denis

    ReplyDelete
  5. Portable Synaptic that executable in Windows is my wet dream.
    And for now, i am quite satisfied with keryx [http://keryxproject.org/].

    ReplyDelete
  6. Wonderful!
    I really wanted this feature when I first started using linux.
    An awful lot of people think that everyone in the world has broadband internet. That is hardly the case here.
    I later found out that I could use synaptic to generate a script that will do the job for me. But it's not perfect by any means. First you'd have to know where it is and even if you knew how to use it you'd still have to use the CLI.
    Good work Bhodi team! And wish you all the best in building an awsome distro.

    ReplyDelete
  7. A shell script? That's dangerous!! You should have a GENERIC shell script already included on the system that you can open the .tar.gz with.

    Don't turn GNU+Linux into windows.

    - Jon

    ReplyDelete
  8. Interesting Jeff, and innovative.
    As far as having one universal package manager and format; if the people don't move towards one then I don't want to see it happen. I don't want some would be monarch making that decision.
    I do wish you well with this one.

    ReplyDelete
  9. Debian has had this for years. Just buy (or download and burn) the full set of CDs or DVDs, it's a snapshot of the repositories. During install, you'll be prompted to insert them for indexing by the package system. Then install using apt-get or synaptic and you'll be prompted to insert the appropriate disc. Problem solved!

    ReplyDelete
  10. @Roland Getting several gigs of software when I just need 100megs worth of software for a few packages is less elegant than downloading all the debs by hand IMO

    ReplyDelete
  11. Really good for offline installation. I was fed up of carrying packages and updates. I didnt read the complete article,but grasped the concept,hope it works for updates too.

    ReplyDelete
  12. Anything to make the task easier is helpful to some extent, though the ability to rise to a challenge (any challenge) & master it, is by far, the most worthwhile asset. To a degree, I can empathise, but doing manual installs demonstrates the enormous differences between rpm & deb pkg management; for me, with it's versatility, rpm being the clear winner.

    ReplyDelete
  13. Everyway seems to have disadvantages.

    Aptoncd is similar to what roland said.

    The most optimal method is the one thats most practical at the time. If you at some point, but not frequently have access to an extreme highend connection (2mB/s or more), the aptoncd method works absolute wonders. However if you want nearly up to date, the .bod method works better.

    I personally would like a fully copy of the repo on isoimage over a .bod file.

    Aptoncd on flash as isos mounted makes an extremely efficient way to upgrade the entire system, especially if you are doing like 20 systems at once. At my current job, as the IT person, I'm updating 76 different computers. Admittingly they do run windows, but if I was in a different situation and they did run linux, I'd rather have the repos next to me, as opposed to clogging up the network.

    ReplyDelete
  14. @anoymous Note the word "Simplifying" in the title. Downloading a single file is easier than having to download an entire repository to a disk.

    ReplyDelete
  15. I have another problem. because www.bodhilinux.com and the websites for downing offline installer or wallpapers,themes are blocked here in China, I tried phproxy as a workaround to open the website, but because the proxy servers only allow 1MB attachment downloads at maximum, when the off-line installers etc are bigger than 1MB(most of them are bigger than 1 MB), the proxy server will report error message. Are there other way for downloading them?

    ReplyDelete
  16. If all Linux distribuition put it, I will leave Windows and MacOSX forever!

    ReplyDelete