Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to install when there's no DEB available?

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
User avatar
Telemachus
Posts: 4574
Joined: 2006-12-25 15:53
Been thanked: 2 times

#31 Post by Telemachus »

Issyer wrote:There are some that go to /bin. They happen quite seldom, though.
Such as? I'm not doubting you, just curious.
"We have not been faced with the need to satisfy someone else's requirements, and for this freedom we are grateful."
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

#32 Post by Issyer »

Oops! Sorry. Weird posting.
Last edited by Issyer on 2008-06-20 01:54, edited 2 times in total.

User avatar
EMD
Posts: 983
Joined: 2007-06-10 03:03
Location: /dev/tty7 (Don't deny it. You're here too!)

#33 Post by EMD »

Having reread this thread and thought about what Issyer and Telemachus wrote, I'm retracting my previous statement that "make install sucks." Issyer and Telemachus have shown that -- when used properly -- make install is a very useful tool for installing software.

That having been said, I still prefer to build my own DEBs. For system-wide installations, it is safer. It allows APT to know where all installed software is located. And it really helps you learn, understand and appreciate Debian packaging.

Most importantly, I think it is extremely important to inform newcomers to GNU/Linux of how to use make install properly and of the alternatives to make install, such as 1.) building from Debian Unstable source 2.) using dh_make and 3.) using checkinstall.

saulgoode wrote:I have never encountered an autotools-based source package that didn't install under either /usr/local or /opt by default. Does anyone have an example?
I used to compile the latest versions of RKWard when they were regularly making major advancements every month or so last year. The DEBs that I produced with checkinstall used to overwrite some of the files installed by KWrite and another package (sorry, I can't remember which one!). Prior to that I used to run ./configure && make && make install (because I didn't know about the --prefix option) and I'm sure that make install also overwrote those files. The difference is that when I built DEB packages, installation (with dpkg) would fail unless I used the --force-overwrite option.

Overwriting the files didn't do any damage. My system was just as usable as before, but I prefer to informed that installation requires an overwrite, so that I can decide if I want to take my chances or not. make install doesn't provide such notifications.

rickh wrote:If you don't know how to build packages from source, your responsibility is to learn it.

BULLSHIT! I didn't see any advice how to use the --prefix option or warnings about the dangers associated with make install in this post:
rickh wrote:
make install sucks !!!
Not nearly as bad as checkinstall. Personally, I think everyone should work with ./configure, make, make install enough to be confident about using it. It's like having a working knowledge of vim, apt-get/aptitude, and the command line in general. If you can't do it, you're not Linux qualified.
There are no caveats in there. You just told everyone to throw caution to the wind and run ./configure && make && make install without thinking about what they're doing.
rickh wrote:The difference between Telemachus or Issyer observations here (as opposed to the teen-aged whiners) is that they know what they're talking about.
Oooh! It's getting personal now! I'm a "teen-aged whiner" who doesn't "know what [he's] talking about." I guess my instructions on how to build PDF Edit were pulled out of thin air and the DEBs that I distributed fell from the sky like manna from Heaven. :roll:

Does it hurt your ego that a Fake Debian User knows more than you, Rick? :lol:
.

User avatar
rickh
Posts: 3434
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

#34 Post by rickh »

You just told everyone to throw caution to the wind and run ./configure && make && make install without thinking about what they're doing.
I don't recall ever suggesting that someone should not think about what they are doing.
Does it hurt your ego that a Fake Debian User knows more than you, Rick?
Nope. Lots of people know more than me about a lot of things. The difference between Real Debian users, and other people has almost nothing to do with how much we know.

I'll admit to having no interest at all in building .deb packages. (./configure, make, make install just works too easily and too well.) If I did want to make one, though, I wouldn't make one that would be in the repos the next day anyway. What did you or anyone else gain by that?

I have taken several intermediate Linux classes at the local community college, and one of the first surprises I had is that building packages from source is part and parcel of what is expected from a Linux administrator. Professors and job interviewers are not a bit impressed with the fact that you can do anything from a GUI. They want to see you build from source, and use the command line.

Also, if I was interested in making .deb packages, the reason would be so that I could make a legitimate contribution to Debian. So rather than mess around with dh_make, checkinstall, alien, or other fake package builders, I would start out building the package completely from scratch, one layer at a time so I really understood what goes into a package, and why, and what standards and conventions would be expected by maintainers and DDs who would be reviewing it. That's the procedure recommended in The Debian System, and it makes a lot of sense to me.
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97

User avatar
EMD
Posts: 983
Joined: 2007-06-10 03:03
Location: /dev/tty7 (Don't deny it. You're here too!)

#35 Post by EMD »

saulgoode wrote:I have never encountered an autotools-based source package that didn't install under either /usr/local or /opt by default. Does anyone have an example?
I just took another look at this question and I can now confirm that RKWard 0.4.7 (which is an autotools-based source package) installs to /usr/ by default (i.e. when ./configure is run without the prefix option).

Interestingly, line 716 of the configure script reads:
configure wrote:ac_default_prefix=/usr/local
but that "default" is overridden somewhere else in the script. When ./configure is run without the prefix option, line 315 of the generated Makefile reads:
Makefile wrote:prefix = /usr


To double-check my findings, I also ran ./configure --prefix=/usr/local/. When I did that, the Makefile's prefix was set to /usr/local/.

These findings highlight the need to advise users to use the --prefix=/usr/local/ option when building a package from source.

==================================================================================

I also found the following notes about a "pre-release version" that I built with checkinstall and installed with dpkg -i --force-overwrite rkward_0.4.9pre2-1_i386.deb:
EMD's notes wrote:When I installed RKWard 0.4.9pre1, it overwrote four files:

three were in r-base-core:
* /usr/share/R/doc/html/packages.html
* /usr/share/R/doc/html/index.txt
* /usr/lib/R/library/R.css

one was in kdelibs-data
* /usr/share/apps/katepart/syntax/r.xml


If you need to upgrade kdelibs-data, r-base-core or RKWard:
1. remove RKWard (# dpkg -r rkward)
2. then upgrade or reinstall kdelibs-data and r-base-core
3. then reinstall RKWard
Unfortunately, that "pre-release version" was the last one that I built from source and I no longer have my notes on the other versions that I built.

[EDITED] Thinking back on these installations. I'm fairly certain that this problem did not occur when I built from the official releases. Nonetheless, given the fact that the official releases do install to /usr/ by default, I think we should advise people to be very careful when using make install and to always use the --prefix=/usr/local/ option.
.

User avatar
EMD
Posts: 983
Joined: 2007-06-10 03:03
Location: /dev/tty7 (Don't deny it. You're here too!)

#36 Post by EMD »

rickh wrote:If I did want to make one, though, I wouldn't make one that would be in the repos the next day anyway. What did you or anyone else gain by that?
Well, if I had known that it would be in the repositories the next day, I wouldn't have built it. That having been said, the version of PDF Edit in Etch-Backports is a relatively new.

rickh wrote:Also, if I was interested in making .deb packages, the reason would be so that I could make a legitimate contribution to Debian. So rather than mess around with dh_make, checkinstall, alien, or other fake package builders, I would start out building the package completely from scratch, one layer at a time so I really understood what goes into a package, and why, and what standards and conventions would be expected by maintainers and DDs who would be reviewing it. That's the procedure recommended in The Debian System, and it makes a lot of sense to me.
You should check out Miriam Ruiz' HowTo on the subject. If and when I ever get some time, I'm going to follow that page to learn how to build without a helper.
.

Lavene
Site admin
Site admin
Posts: 4958
Joined: 2006-01-04 04:26
Location: Oslo, Norway

#37 Post by Lavene »

It all comes down to what level of stupidity you want to cater for. When I give an advice I expect anyone taking the advice to do their part. Like if I suggest a dist-upgrade if someone asks how to move from one dist to another I expect them to read and understand what apt is about to do before they hit that "y". If they come back and say "Hey, it just removed 90% of my system" I blame them, not my self because I know apt told them.

If someone give me an advice, say a command or a script, I always verify it before I do it by reading the man page or whatever.

There is no inherent danger in building stuff from source but of course there are risks and it's up to the user to learn about those risks. It's also their responsibility to learn how to use configure, make and make install *and* to know their system. There is no magic involved here...

My point is: If you don't understand what you're about to do whatever happens is your own fault.

(Oh man... did I just agree with rickh?? Watch out for flying pigs ;) )

User avatar
EMD
Posts: 983
Joined: 2007-06-10 03:03
Location: /dev/tty7 (Don't deny it. You're here too!)

#38 Post by EMD »

Lavene wrote:My point is: If you don't understand what you're about to do whatever happens is your own fault.
I don't disagree with you. If someone wants to use an electric saw, then it is his/her responsibility to learn how the saw works before using it. However if you recommend an electric saw to someone, then you should also provide a few pointers on its use, so that he/she does not cut his/her fingers off.

You don't hand someone an electric saw, tell them to "read the f--king manual" and walk away.

In this case, the electric saw (i.e. make install) has a few dangerous features that are not well documented, so it is particularly important that we inform people of those dangers and how to avoid them.
.

User avatar
MeanDean
Posts: 3866
Joined: 2007-09-01 01:14

#39 Post by MeanDean »

EMD wrote: You don't hand someone an electric saw, tell them to "read the f--king manual" and walk away.
nope....I dont tell them anything. If they ask I will inform what I know but otherwise the adventure is all theirs - why would I spoil it for them?

Lavene
Site admin
Site admin
Posts: 4958
Joined: 2006-01-04 04:26
Location: Oslo, Norway

#40 Post by Lavene »

EMD wrote:You don't hand someone an electric saw, tell them to "read the f--king manual" and walk away.
If the manual was attached to the saw I probably would expect them to look at it if they had never used such a thing before.

Then again I'm soooo naive because I read manuals my self. I even read the "Safety on board" card whenever I fly in an airplane I'm not familiar with (and I find the safety instructions done by the crew utterly silly, it's all there in the 'manual') and I look at the floorplans and fire escapes when I stay in a hotel. I just like to know that if something happens I can go left, six doors down and to the right instead of standing in a dark smoke filled corridor, wondering where the hell the nearest exit is, together with the candidates for the next Darwin award.

Applications and commands in Linux is like the saw with the manual attached. I just don't see why I should read it to someone that's more than capable to read them selves.

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

#41 Post by Issyer »

Lavene wrote:
EMD wrote:You don't hand someone an electric saw, tell them to "read the f--king manual" and walk away.
If the manual was attached to the saw I probably would expect them to look at it if they had never used such a thing before.

Then again I'm soooo naive because I read manuals my self.
Funny. I've never heard that someone has ever managed to cut his fingers off with an electric saw. But my Canadian friend doctor assures that that happens quite often in Canada. It's off topic, though.

pcalvert
Posts: 1939
Joined: 2006-04-21 11:19
Location: Sol Sector
Has thanked: 1 time
Been thanked: 2 times

#42 Post by pcalvert »

EMD wrote:Thinking back on these installations. I'm fairly certain that this problem did not occur when I built from the official releases. Nonetheless, given the fact that the official releases do install to /usr/ by default, I think we should advise people to be very careful when using make install and to always use the --prefix=/usr/local/ option.
.
I agree with you. It's a good practice, and it doesn't require a lengthy explanation, so there's no good reason not to include it.

BTW, it should be --prefix=/usr/local (the trailing slash is not necessary). Also, since Debian already has the /opt directory for this purpose, perhaps that would be a better choice?

Phil
Freespoke is a new search engine that respects user privacy and does not engage in censorship.

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

#43 Post by Issyer »

pcalvert wrote:I agree with you. It's a good practice, and it doesn't require a lengthy explanation, so there's no good reason not to include it.

BTW, it should be --prefix=/usr/local (the trailing slash is not necessary). Also, since Debian already has the /opt directory for this purpose, perhaps that would be a better choice?

Phil
It depends on the Makefile. The --prefix switch doesn't work always. I don't understand why all this fuss and hysteria happened. That root's make install is needed not because it's such a law, but because the files cannot be copied to unwritable directories.

User avatar
EMD
Posts: 983
Joined: 2007-06-10 03:03
Location: /dev/tty7 (Don't deny it. You're here too!)

#44 Post by EMD »

Issyer wrote:I don't understand why all this fuss and hysteria happened.
All this fuss and hysteria happened because I made it happen.

make install has a few dangerous features that are not well documented and I want new users to be aware of them. I want users to learn some of tips that you and Telemachus provided in this thread (e.g. using the prefix option and installing to non-root directories).

I don't want anyone to "cut their fingers off."
.

User avatar
BioTube
Posts: 7520
Joined: 2007-06-01 04:34

#45 Post by BioTube »

make install is a script that copies things. That's it. Stop calling bad designs 'dangerous features'.
Image
Ludwig von Mises wrote:The elite should be supreme by virtue of persuasion, not by the assistance of firing squads.

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

#46 Post by Issyer »

EMD wrote:I don't want anyone to "cut their fingers off."
But it's fun. There's no vital necessity. They have windows for that.

User avatar
Soul Singin'
Posts: 1605
Joined: 2008-12-21 07:02

#47 Post by Soul Singin' »

Just had a new experience: Using Debian source files to build a DEB without apt-get source (details here), so I thought I'd share what I learned.

First you download the splashy_0.3.10.orig.tar.gz file, the splashy_0.3.10-2.1.dsc file and the splashy_0.3.10-2.1.diff.gz file and place them into a directory within your home directory, e.g. $HOME/splashy/.

Next, you extract the tarball, apply the Debian patches and build the DEBs (as normal user!):

Code: Select all

cd $HOME/splashy
tar xzf splashy_0.3.10.orig.tar.gz
mkdir splashy-0.3.10/debian
cd splashy-0.3.10/debian
zcat ../../splashy_0.3.10-2.1.diff.gz | patch -l
chmod a+x rules
cd ..
dpkg-buildpackage -rfakeroot -us -uc

If I recall correctly, the DEBs were placed in the $HOME/splashy/ directory. In any case, you use dpkg -i *.deb to install them (as root) from the appropriate directory.

Happy DEB building!
.

User avatar
bugsbunny
Posts: 5354
Joined: 2008-07-06 17:04
Been thanked: 1 time

#48 Post by bugsbunny »

Note that if you have the .dsc, diff.gz, and orig files there's a simpler way to unpack and patch. Simply run:
dpkg-source -x <.dsc file>

That will extract all the files and apply the patches, creating a <packagename> directory in the process (or you can append [output directory] to the command). See man page.

infinitycircuit
Posts: 1137
Joined: 2007-07-24 03:31
Location: California

#49 Post by infinitycircuit »

Even if you couldn't use dpkg-source, it wouldn't be necessary to mkdir debian--patch will handle it for you from the base directory.

Post Reply