How to install when there's no DEB available?

If none of the more specific forums is the right place to ask

How to install when there's no DEB available?

Postby EMD » 2008-01-31 09:27

I've seen a lot of debate on these forums about how one should install software from source, but Googling has not helped me find much information about the pros and cons of available methods. I'm sure it's out there somewhere, but it's buried under a mountain of "here's how you do it."

I know that there are problems with make install, I know that there are problems with checkinstall, and I know that there are problems with alien. But I've never seen anyone recommend a classic method of creating a deb package (e.g. dpkg -b) on these forums.

So I'm wondering what you use to install software when there's no DEB available. What are the pros and cons are of each method?
.
User avatar
EMD
 
Posts: 989
Joined: 2007-06-10 03:03
Location: /dev/tty7 (Don't deny it. You're here too!)

Postby edbarx » 2008-01-31 09:46

The following thread may help you. Note that, the first few posts are irrelevant to what you are looking for.
What is the "DEBIAN WAY"?
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.
User avatar
edbarx
 
Posts: 5394
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E

Postby shoof » 2008-01-31 15:21

I build my own packages, here is a quick and dirty method for it.

Code: Select all
apt-get install dh-make


Untar your tarball go into it's root dir and run:

Code: Select all
dh_make


It asks a few questions you can just usually do the defaults and it will create a /debian directory for you.

Most cases you can just run:

Code: Select all
dpkg-buildpackage


next and it will build a debian package out of it.


It's also a good way to start learning the innards of a Debian package.
shoof
 
Posts: 379
Joined: 2006-09-08 20:41
Location: My chair

Re: How to install when there's no DEB available?

Postby Issyer » 2008-01-31 17:21

edoviak wrote:I know that there are problems with make install,

There are no problems with make install. The problems have the guys who have no clue how to do that properly. "Make install" is the classical and the only "Linux" way to install the programs compiled from source..
Last edited by Issyer on 2008-01-31 18:02, edited 1 time in total.
User avatar
Issyer
 
Posts: 3055
Joined: 2007-05-23 02:59
Location: Khakassia

Re: How to install when there's no DEB available?

Postby Telemachus » 2008-01-31 18:01

Issyer wrote:
edoviak wrote:I know that there are problems with make install,

There are no problems with make install. The problems have the guys who have no clue how to do that properly. "Make install" is the classical and the only "Linux" may to install the programs compiled from source..

There are actually at least two problems with "make install" although neither is directly a problem with the command itself. The first problem is that many people don't include a "make uninstall" script in their tarball, and as a result it is often a pain in the ass to remove software installed with "make install". The second problem is that a Debian system is set up in some non-Unix standard ways, and so it is generally safer (not better, just easier and less likely to cause trouble) to do things using the standard parts of the Debian system because that way you know that one thing won't overwrite another or one library break another etc. So, all things being equal, I prefer to use .debs, though I do agree that when all else fails, make install works fine. It does help if you know enough to install your custom items in a custom directory (as I saw from your tutorial that you do), but not everyone thinks to do that and it can get complicated to keep track of everything.
User avatar
Telemachus
 
Posts: 4677
Joined: 2006-12-25 15:53

Re: How to install when there's no DEB available?

Postby Issyer » 2008-01-31 18:19

Telemachus wrote:
Issyer wrote:
edoviak wrote:I know that there are problems with make install,

There are no problems with make install. The problems have the guys who have no clue how to do that properly. "Make install" is the classical and the only "Linux" may to install the programs compiled from source..

There are actually at least two problems with "make install" although neither is directly a problem with the command itself. The first problem is that many people don't include a "make uninstall" script in their tarball, and as a result it is often a pain in the ass to remove software installed with "make install". The second problem is that a Debian system is set up in some non-Unix standard ways, and so it is generally safer (not better, just easier and less likely to cause trouble) to do things using the standard parts of the Debian system because that way you know that one thing won't overwrite another or one library break another etc. So, all things being equal, I prefer to use .debs, though I do agree that when all else fails, make install works fine. It does help if you know enough to install your custom items in a custom directory (as I saw from your tutorial that you do), but not everyone thinks to do that and it can get complicated to keep track of everything.

"Make install" very seldom, almost never writes to the debian directories. The default is /usr/local. Debian never uses this directory. If in doubt, delete the intire /usr/local, and that won't cause any harm to debian itself. How can something overwrite anything if debian and linux ways are not crossed? Read ./configure --help for all the possible options and Debian policy.
User avatar
Issyer
 
Posts: 3055
Joined: 2007-05-23 02:59
Location: Khakassia

Re: How to install when there's no DEB available?

Postby Bro.Tiag » 2008-01-31 21:59

Issyer wrote:
edoviak wrote:I know that there are problems with make install,

There are no problems with make install. The problems have the guys who have no clue how to do that properly. "Make install" is the classical and the only "Linux" way to install the programs compiled from source..


I tend to agree, and I'd go one further then installing to the default location of /usr/local and install to opt, --prefix=/opt, that's what it is there for. If one wants rid of something it's just one directory to delete, if one likes it, then a re-install is just as easy.

Cheers
User avatar
Bro.Tiag
 
Posts: 1937
Joined: 2007-06-02 19:14

Postby plugwash » 2008-02-01 10:34

make install is tollerable for applications but installing to /usr risks conflicts with the package manager and installing to /usr/local can confuse some stuff if two versions of the same thing get installed one in /usr one in /usr/local . Also for uninstall you are at the mercy of upstreams makefile which may or may not do a decent job.

Sure you can blow away /usr/local/* if you absoloutely have to but that is like using ICBMs to swat mosquitos.

Checkinstall makes it easier to uninstall the package and may make it slightly harder to break it. but it has also had some disasterous bugs of it's own a while ago (which caused it to be missed out of the etch release) but I think at least for debian the really serious ones were squashed a while ago (while that post on the slackware forums was made in late 2007 the author seems to ignore all changes since late 2006).

alien works sometimes but you are bringing the assumptions of redhat maintainers onto a debian based distro with potentially disasterous results.

using dpkg -b (which is really just an alias for dpkg-deb -b ) directly is not really reccomended either. You can do it but you are essentially going to end up doing manually for every update what the debian scripts are meant to automate and you won't be able to take advantage of things like the shlibs mechanism.

The proper way to build a deb is from a debianised source tree. When distributed this is generally distributed as a set of three files, a .dsc a .orig.tar.gz and a .diff.gz (sometimes just a dsc and a tar.gz ) . when extracted you get what looks like a normal source tree but with a "debian" directory and you can then build the package(s) using dpkg-buildpackage.

you can make this yourself from scratch but it is not reccomended. Much easier and in the hands of all but experts proabblly better is to start with dh_make to get started and then only make the changes your particular package needs. How extensive theese changes will be depends on the application you are packaging and it's build system.
plugwash
 
Posts: 2508
Joined: 2006-09-17 01:10

Postby Lou » 2008-04-28 15:26

First of all, i'm no guru and don't know shit from shinola when it comes to compiling apps. I usually compile 1-2 apps and that's it, the rest i install with apt-get.

1. I make sure i got the following apps installed:
zip
unzip
bzip2
build-essential
xorg-dev
checkinstall

2. I create a directory (named 'source' where all my compiling goes) in my /home.

3. I d/l the .tar.gz to my

~/source

4. Then from the terminal i do:
$ sudo apt-get build-dep <name of app>

5. then i move to that file:

$ cd ~/source/name_of_app

6. then i extract it there with my file manager xfe. (right-click on the file and choose 'extract here' from the menu.

7. then i do the proverbial

$ ./configure && make
$ sudo checkintall -D

after this is done:

$ sudo dpkg -i <name of app>
$ sudo updatedb

voilá!
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid
Lou
 
Posts: 1775
Joined: 2006-05-08 02:15

Postby Christmas » 2008-04-28 19:13

I always prefer to install from source. In the past I used to do a './configure' and on each error install the needed development library until the configure script wouldn't complain about anything, then do 'make' and 'make install'.

But there is also a very useful command, which can be used for newer software versions of the ones already in the repositories (e.g. Amarok, Wine, Wesnoth etc):
Code: Select all
apt-get build-dep <application_name>

And it installs all the needed dependencies and you can proceed on compiling and installing the source.

As for the backports, I only used them on Ubuntu.

So, bassically, to keep your system updated with the newest software, I only need:
1. the complete Debian CDs and DVDs (or internet connection), so I can have all the needed libraries
2. a CD or DVD with all the new sources
Overhead the albatross hangs motionless upon the air...
TuxArena
User avatar
Christmas
 
Posts: 94
Joined: 2006-05-16 19:52
Location: Bucharest

Postby EMD » 2008-05-11 21:23

This post from the Want to install new version of Sylpheed on Etch thread is somewhat related to this thread, so I thought I would copy it over to here.
powertron wrote:Ok, so after a bunch of screwing around and not being able to build this into a deb, someone gave me an awesome suggestion.

To preface this: the reason I didn't install the lenny (testing) deb was that apt flagged a large number of core packages to upgrade to testing.

Ricardo Mones (Debian Sylpheed maintainer) wrote:To the OP, there's several other methods, but basically:

You need a build environment to build some package:

$ apt-get install build-essential devscripts fakeroot

You need the source package too (the unstable version can do the job,
you may try other):

$ dget -x http://ftp.de.debian.org/debian/pool/ma ... eta3-1.dsc

Now you need the libraries to build the package, look at the
Build-Depends: line in the sylpheed-2.5.0~beta3/debian/control file
and install them:

$ apt-get install libcompfaceg1-dev libglib2.0-dev libgtk2.0-dev
libpng12-dev libgpgme11-dev libssl-dev libpisock-dev flex bison
libreadline5-dev cdbs libgtkspell-dev libonig-dev

Now you only need to build the package:

$ cd sylpheed-2.5.0~beta3
$ dpkg-buildpackage -rfakeroot -us -uc


I don't know why I didn't do this before...it's SO simple!

If the testing deb has a bunch of dependencies that you don't really need, download the debian source and compile on your own system.

This would work on any package, provided there is a deb in unstable. The process is:
Code: Select all
apt-get source -t unstable sylpheed
cd sylpheed-2.5.0~beta3/
dpkg-buildpackage -rfakeroot -us -uc


And that's it. It is much easier than compiling from original source, especially because there is a file in the debian subdirectory called control and this file lists all the dependencies you need to build! That's half the work right there.

I'm seriously loving debian right now :)
.
User avatar
EMD
 
Posts: 989
Joined: 2007-06-10 03:03
Location: /dev/tty7 (Don't deny it. You're here too!)

Postby plugwash » 2008-05-11 22:57

This would work on any package, provided there is a deb in unstable.

This is often a usefull trick for getting a newer package on a stable with minimial disruption but it is by no means gauranteed to work.
plugwash
 
Posts: 2508
Joined: 2006-09-17 01:10

Postby Lavendem » 2008-06-18 15:27

One thing _most_ have overlooked or don't understand is that "make install" is NOT an application in itself. GNU make merely interprets scripts the developer has written and in case of a bad developer "make install" might even rm your ass. It depends on who has written the program and of what quality the program was made. A high-quality program is written with clean code using no hacks or workarounds to accomplish something and a high-quality program has a well-written configure and make script making the program not only better overall, but makes the risk of having a spoiled up system to zero.

Many many many many lazy lazy lazy lazy developers write poor make scripts and use many hacks to accomplish something in their application. Not only is this likely to make the program use a library in a wrong way, but also can lead to a disaster in your system, especially if the make script is not well-written.

So having all this said "problems" arising from the use of "make install" is to blame on the developers, not someone else or Debian. So get some good applications and you won't need to go through a hassle like "OMG there's no make uninstall!!!". Most good applications are in the repositories anyway. Trust 3rd party code only when the code trusts its developer. :)
Lavendem
 
Posts: 416
Joined: 2007-09-06 19:09

Postby plugwash » 2008-06-18 16:37

of course a malicious or badly packaged deb can also quite easilly trash the system.
plugwash
 
Posts: 2508
Joined: 2006-09-17 01:10

Postby infinitycircuit » 2008-06-18 19:03

I normally do:

fakeroot debian/rules binary

Instead of:

dpkg-buildpackage -rfakeroot -uc -us

Does anyone know the difference between the two for the end user?
I am currently a Debian Maintainer. I am also in the New Maintainers' Queue.
infinitycircuit
 
Posts: 1137
Joined: 2007-07-24 03:31
Location: California

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable