8

Most Linux software is packaged in tarballs. All of them require but a few commands to compile and install them.

My question is; we have gdebi for standalone debian packages, so why not an app to install tarballs the same way? Why is such an apparently simple process not automated? Why must we continue to intimidate and drive away new users with ideas of compiling software?

9 Answers 9

13

Those processes are automated. You get them in .deb or .rpm packages mostly. The only difference (at the level you're thinking) between a tarball and a .deb is the compilation. Tarball's generally contain source code and make files, not pre-compiled binaries (though they DO sometimes contain those too). .debs are pre-compiled across multiple architectures.

Here's an analogy for you:

a .deb is a truck carrying a whole car.

A tarball is a truck carrying a box of car parts and a manual telling you how to assemble the parts to get the car.

So, when you install something from a .deb (or a .rpm on those "other" distros) you're installing the same stuff that you'll get in that tarball, just with the work already done for you.

Though I disagree with txwikinger about progression/regression. There's nothing wrong at all with tarballs and I use them frequently to wrap up code or screenshots, log files, or what have you to send to people for various reasons. I also download source tarballs to read the source code for a program so I can see what's going on if I run into a problem.

1
  • I still don't understand how to install a tarball. Oct 26, 2021 at 18:09
5

Instead of spending time making installation of tarballs easier, it would be more beneficial overall to spend it packaging the software for Debian/Ubuntu. Not only will this enhance the offerings of Debian based distributions such as Ubuntu, it will also correctly install dependencies

3

tarballs are usually highly customizable. even though with 90% of them you just go ./configure && make install, some others require custom parameters or in the worst case they use different steps to buid the application.

imho as a normal user you should not have to deal with tarballs. you might be better off checking if it's in someone's repository first.

the problem with tarballs (as an install method for endusers) is that: - if something goes wrong you quickly need to be very tech savy to fix it - doesn't necessarily adhere to the folder structure of your disto - not always possible to easily uninstall software again.

to your second question: yes, this process is automated with debian-source packages or rpm-source packages. but those aren't problematic and i think they can just be opened in gdebi. i am not sure you know, but a tarball is the easiest way a developer can get their code out into the world. no matter what mess they have in their project, just zip up the source and upload it--- that's the only requirment i know for a tarball: it must contain the source of some app and eventually provide a build script.

so even though its not going to work to use those tarballs directly, i think you're touching on a very important issue here: linux packaging is a mess. its a lot of work even for a single distro and it's practically impossible for a small project to maintain packages for a variety of distros.

there were (and still are) a bunch of projects that tried to unify packaging across distros, but afaik this never went anywhere really. at least nothing that is as common as an msi package for windows or a dmg on the mac.

i know this answer must be frustratring, but if i haven't missed a revolution recently than that's what we're stuck with for now.

3

Checkinstall can generate debs from source. (It can also generate RPM's and slackeware packages)

You run ./configure then

checkinstall -D 

to create a debian package.

I think the tool is mainly meant to allow you to cleanly upgrade and remove software on your own machine and not for creating distributions for others - but if you don't have complex dependancies, it should do what you want.

1
  • It's very easy and effective method. I was tested it today and it worked
    – litvin05
    Nov 9, 2010 at 7:17
2

You could write a little bash script if you're doing this a lot...

#!/bin/bash
FILE=$1
DIR="${FILE%.tar.gz}"
tar -xzf $1
cd $DIR
./configure
make
sudo make install

Call it tarinstall (or something), put it in your path and then just do:

tarinstall thisnewpackage.tar.gz

Although I do agree that it's much better to be using a packaging system like .debs or .rpms.

1
  • 1
    DIR="${FILE%.tar.gz}"
    – user1686
    Aug 16, 2010 at 10:49
1

Different apps are written by different developers with different standards. It would prove to be a very difficult task to have one application to install all tarballs. Instead we have debs which are precomplied. Tarballs also provide a problem of dependency which debian and derivatives have fixed with apt and aptitude that would be next to impossible to achive with only a tarball.

1

As a normal user you probably don't want to go around installing tarballs. The Debian and Ubuntu teams spend a lot of time customizing and verifying upstream packages before they put them into the repository. Making a package is a big hairy mess of dependencies and distribution specific install scripts. There's just no simple way to automate the process.

However if you're a programmer or you are trying to contribute to an upstream project, you'll need to install official tarballs eventually. Although not automatic, there are a few tools that help make the process easier.

If you just want to patch some bug in a program you've installed, you can get the source code with apt-get source packagename and hack away. If you want to send that patch upstream though it's better if you start with an upstream tarball.

Most projects out there are using autotools which automates a fair amount of compile-time decisions. You can usually tell if a project uses autotools because there is a configure script in the folder. If there is you can build and install the package using one line ./configure && make && make install. Unless you've built the package before though, it will probably fail because you are missing some compile-time dependencies.

If the package you are trying to install is already in the Ubuntu repositories you can get APT to automatically install all the libraries you need to compile the tarball with apt-get build-dep packagename. If there are no new dependencies this is usually all you need to do before you can compile the program. If it's not in the Ubuntu repositories you are on your own, check the documentation of the project to find out what it needs.

One problem with the ./configure && make && make install procedure is that there's not usually a make uninstall. There's a program called checkinstall that will run make install for you and register the package in APT so that you can uninstall it later. checkinstall doesn't always work though, and depending on how important the package you are installing is to the system, it could be very dangerous.

0

.deb packages are tarballs with the necessary information to do proper package management added to them.

If you just install a tarball, how do you make sure that all dependencies are met? All the necessary libraries are installed?

How do you want to remove a package that is installed by only the tarball?

You lose all the safeguards that the debian based package management gives and that in particular makes it so easy to install software by new users. To make it easier for them to install tarballs as they are would be a step backwards, not progress.

This aside, how can

./configure && make && sudo make install

be further simplified? (If you consider a user that needs to be able to deal with the issues raised above)

0

As in the above posts checkinstall will help you to install and un-install source application in an efficient way. Since it creates native packages (rpm for redhat flavours and deb for debian flavours including ubuntu) it is very easy to manage these packages with native package manager such as software center. Check this article for more info: findasolution.in checkinstall package managment made easy in linux . It is originally return for Centos but will also work in ubuntu.

You must log in to answer this question.