Posts: 21
HardwareGuru
Joined: 13 Jan 2013
#1
I want to learn how to mess with the command-line more. First I'd like to learn how to install tarballs properly.

Here is how I think tarballs are install on Debian (correct me if I'm wrong):

Code: Select all

wget (insert url)/filename.tar.gz

tar -xvzf filename.tar.gz

cd filename

./configure

./build

make

make install
Here is the new easier way to do it???

Code: Select all

wget (insert url)/filename.tar.gz

tar -xvzf filename.tar.gz

cd filename

dpkg-buildpackage
I'd like to finally be able to install stuff that requires dependencies. I was trying to install software-center on the Debian pc, but it wouldn't work due to lack of dependencies. So basically I'd have to install the dependency of the dependency to first then work my way to software-center?

Also there are source rpm's for rpm based distros, does that mean there are source debs that need to be compiled before installing?

The OSes I'm running are Debian 7.0 GNOME 3 and OpenSUSE 12.3 GNOME 3 (other pc). I took antiX 12 off it due to being unable to get sound working, didn't figure out how to install OSS4. Though, I think highly of antiX and recommended it to my friends. Maybe if there is an antiX flavor with sound working without too much tweaking, I'll give it another try.

Moreover, I'd like to learn any antiX commands not found in Debian. I'll probably give antiX another try later.

However, I'd like to know when I need to login terminal as root and when to not be root. Some websites say you shouldn't be root when compiling source packages or tarballs.
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#2
Check into build-essentials and check install packages in synaptic for proper tools to try what you want to do.


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.falkotimme.com/howtos/checkinstall/"
linktext was:"http://www.falkotimme.com/howtos/checkinstall/"
====================================
nadir
Posts 0
nadir
#3
middle of the night, i am just shooting, don't take my word for it:
You download a tarball. That's called the upstream version.
You unpack it, that is called the source directory.
You cd to the source directory.
To use dpkg-buildpackage the source directory needs to contain a debian/ directory
Inside the debian directory (inside the source directory) you will find certain files which contain important information. The most important ones are debian/control, debian/copyright and debian/changelog (but there are more, those three are the ones you usually have to edit).
To make the story short: Install dh-make, cd to the source directory, run dh_make and edit the according files (control, including the dependencies, is the most important one. copyright and changelog are only to do it the right way, being debian complient).

There is a quick how-to at the mepis wiki and there is a quick tutorial by SoulSinging, sticky, at forums debian net), there is also a pdf file by stevepusser, but i ain't got the link. All three should get you started for private usage. There are more elaborate tutorial at wiki.debian.org. I just ran into this how-to, which is a quite big overview:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial"
linktext was:"http://www.debian.org/doc/manuals/packa ... g-tutorial"
====================================


packaging-dev is a metapackage which contains all but the kitchen sink to build packages.
Once you think you got the main idea, get the head into lintian (to make the packages lintian clean, check for problems in copyright and changelog, etc)

You don't need to and you shouldn't build packages as root. Look at fakeroot (in case needed, but i don't think it is. Not sure myself).
Best practise is some form of chroot environment to build packages (for example pbuilder). pbuilder will also make sure that you got the dependencies right in debian/control.

Short version:
Either go for the checkinstall path, mentioned by rokytnji, or install dh-make and use it to create a debian/ directory, then use dpkg-buildpackage.
If dpkg-buildpackage complains about missing dependencies run

Code: Select all

apt-get build-dep packagename
as root. Then run dpkg-buildpackage again

I'd like to finally be able to install stuff that requires dependencies. I was trying to install software-center on the Debian pc, but it wouldn't work due to lack of dependencies. So basically I'd have to install the dependency of the dependency to first then work my way to software-center?
What packages do we speak of? If you install packages with software-center, synaptic, apt-get or aptitude, all dependencies should be available (should be means: _are_. If someone packages x, and y and z are dependencies, he will first package y and z, then x, then upload all to the debian archives. _Then_ they are listed by any of the frontends, say"apt-cache search x").
I was trying to install software-center on the Debian pc,
That one?

Code: Select all

apt-get install software-center
Last edited by Guest on 08 Jul 2013, 00:28, edited 2 times in total.
nadir
Posts 0
nadir
#4
to have a quick glance at a debian/ directory add the deb-src line to /etc/apt/sources list, run apt-get update and download any package source, say

Code: Select all

apt-get source sl