LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-26-2008, 04:34 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
which method is better for building deb package


Hello,

Recently I was digging into compiling .deb packages from source debian packages i.e. from .dsc, .orig.tar.gz and .diff.gz.

I came across two methods to do this which are as follow:

Method1:
Code:
$ dpkg-source -x squid_2.6.1-3.dsc
$ cd squid-2.6.1/
$ fakeroot debian/rules binary

Methold2:
Code:
$ dpkg-source -x squid_2.6.1-3.dsc
$ cd squid-2.6.1/
debuild -uc -us

In short what is the difference when we give "fakeroot" and "debuild" command in the above two methods.
 
Old 01-26-2008, 07:04 PM   #2
pentode
Member
 
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488

Rep: Reputation: 38
Debhelper

I thought that was what debhelper was for.
 
Old 01-26-2008, 08:05 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by pentode View Post
I thought that was what debhelper was for.
I apologize for not being able to understand your reply. Can you explain a bit further?
 
Old 01-27-2008, 05:08 AM   #4
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
http://www.debian.org/doc/maint-guide/ch-build.en.html

btw, "fakeroot" isn't a build command, it just lets you run debian/rules without becoming root.
 
Old 01-27-2008, 03:40 PM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by makuyl View Post
http://www.debian.org/doc/maint-guide/ch-build.en.html

btw, "fakeroot" isn't a build command, it just lets you run debian/rules without becoming root.
Thank you for the reference. I think I came across that page before when I was searching but I was not sure if I understand the entire scenario correctly. Hence the question.

It seems that:
Code:
dpkg-buildpackage -rfakeroot
is the way to go.
 
Old 01-28-2008, 11:14 AM   #6
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Quote:
Originally Posted by kushalkoolwal View Post
It seems that:
Code:
dpkg-buildpackage -rfakeroot
is the way to go.
Kind of depends on what you want. If you do a complete build, debuild will do it, it starts by running dpkg-buildpackage. See "man debuild"
 
Old 01-28-2008, 05:17 PM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by makuyl View Post
Kind of depends on what you want. If you do a complete build, debuild will do it, it starts by running dpkg-buildpackage. See "man debuild"
Interestingly, I don't get anything when I type:

man debuild.

It says:

No Manual entry for debuild
 
Old 01-29-2008, 08:59 AM   #8
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
I suppose you don't have devscripts installed then.
 
Old 01-31-2008, 07:05 PM   #9
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by makuyl View Post
I suppose you don't have devscripts installed then.
Yes you were right makuyl. Now I can see the man page....
 
Old 01-31-2008, 07:58 PM   #10
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
One last question hopefully...

I read the man pages for debuild and now I am confused regarding the difference between the following two commands:

debuild -rfakeroot
and
dpkg-buildpackages -rfakeroot


Thanks
 
Old 02-02-2008, 06:58 AM   #11
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
debuild lets you automate stuff, like adding gpg signatures you've saved in /etc/devscripts.conf or ~/.devscripts.
Also debuild lets you validate package with lintian after running dpkg-buildpackages, see: http://www.debian-administration.org/articles/336
http://www.debian-administration.org/articles/337
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Building .deb with customized prefix path SamTim74 Debian 0 01-22-2008 07:08 PM
need help building deb package of qemu fakie_flip Programming 0 10-28-2007 04:54 PM
An unwanted link getting generated automatically: building .deb package varun_shrivastava Debian 0 10-08-2007 04:06 AM
Building my own .deb package (help on postinst config) Hungry ghost Debian 3 01-28-2007 10:49 AM
building optimized deb-src packages (debian/rules) Rounan Debian 1 02-17-2004 12:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration