LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 05:34 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 48
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, 08: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, 09:05 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
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, 06:08 AM   #4
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
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, 04:40 PM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
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, 12:14 PM   #6
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
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, 06:17 PM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
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, 09:59 AM   #8
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

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

Original Poster
Rep: Reputation: 48
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, 08:58 PM   #10
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
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, 07:58 AM   #11
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:08 PM
need help building deb package of qemu fakie_flip Programming 0 10-28-2007 05:54 PM
An unwanted link getting generated automatically: building .deb package varun_shrivastava Debian 0 10-08-2007 05:06 AM
Building my own .deb package (help on postinst config) odiseo77 Debian 3 01-28-2007 11:49 AM
building optimized deb-src packages (debian/rules) Rounan Debian 1 02-17-2004 01:03 PM


All times are GMT -5. The time now is 01:19 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration