dpkg-buildpackage and fakeroot

2007-07-10 Thread Kamaraju S Kusumanchi
Hi all

Can someone please tell me the difference between

dpkg-buildpackage -rfakeroot
fakeroot dpkg-buildpackage
fakeroot dpkg-buildpackage -rfakeroot

Which one should I use for building packages in Debian?

thanks
raju

-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: dpkg-buildpackage and fakeroot

2007-07-10 Thread Nico Golde
Hi,
* Kamaraju S Kusumanchi <[EMAIL PROTECTED]> [2007-07-10 20:22]:
> Can someone please tell me the difference between
> 
> dpkg-buildpackage -rfakeroot
> fakeroot dpkg-buildpackage

In this case the two are equivalent I think (apart from the 
process perspective). But you can use other programs than 
fakeroot with -r thats why its there, for example sudo.

> fakeroot dpkg-buildpackage -rfakeroot

Since dpkg prefixes the command which needs root permissions 
with the specified command I guess this would result in some
kind of double fakeroot.

> Which one should I use for building packages in Debian?

I guess most of the people (and the available documentation 
for developers) ues -rfakeroot.
Cheers
Nico

-- 
Nico Golde - http://ngolde.de - [EMAIL PROTECTED] - GPG: 0x73647CFF
For security reasons, all text in this mail is double-rot13 encrypted.
http://people.debian.org/~nion/sponsoring-checklist.html


pgp9g8GeIp7p3.pgp
Description: PGP signature


Re: dpkg-buildpackage and fakeroot

2007-07-10 Thread Thomas Jollans
On Tue, 2007-07-10 at 14:19 -0400, Kamaraju S Kusumanchi wrote:
> Hi all
> 
> Can someone please tell me the difference between
> 
> dpkg-buildpackage -rfakeroot
dpkg-buildpackage uses fakeroot when being a normal user doesn't
suffice.

> fakeroot dpkg-buildpackage
dpkg-buildpackage is run 100% in fakeroot.

> fakeroot dpkg-buildpackage -rfakeroot
That's overkill.

> Which one should I use for building packages in Debian?
If you must use dpkg-buildpackage, I'd say the first. But you should
really use a chroot, maybe not for every rebuild, but for every package.
pdebuild (from pbuilder) is a useful tool here - it can also use
cowdancer's cowbuilder to avoid all the nasty base.tgz unpacking.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: dpkg-buildpackage and fakeroot

2007-07-10 Thread Steve Langasek
On Tue, Jul 10, 2007 at 02:19:35PM -0400, Kamaraju S Kusumanchi wrote:
> Hi all

> Can someone please tell me the difference between

> dpkg-buildpackage -rfakeroot
> fakeroot dpkg-buildpackage
> fakeroot dpkg-buildpackage -rfakeroot

> Which one should I use for building packages in Debian?

dpkg-buildpackage -rfakeroot.

'fakeroot dpkg-buildpackage' runs the build target under fakeroot, which is
undesirable primarily because Debian 'build' targets are required to not
depend on root privileges, and running them under fakeroot can hide bugs of
this nature.

'fakeroot dpkg-buildpackage -rfakeroot' is a double-invocation of fakeroot
which may fail altogether.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: dpkg-buildpackage and fakeroot

2007-07-11 Thread Kamaraju S Kusumanchi
Steve Langasek wrote:

> On Tue, Jul 10, 2007 at 02:19:35PM -0400, Kamaraju S Kusumanchi wrote:
>> Hi all
> 
>> Can someone please tell me the difference between
> 
>> dpkg-buildpackage -rfakeroot
>> fakeroot dpkg-buildpackage
>> fakeroot dpkg-buildpackage -rfakeroot
> 
>> Which one should I use for building packages in Debian?
> 
> dpkg-buildpackage -rfakeroot.
> 
> 'fakeroot dpkg-buildpackage' runs the build target under fakeroot, which
> is undesirable primarily because Debian 'build' targets are required to
> not depend on root privileges, and running them under fakeroot can hide
> bugs of this nature.
> 
> 'fakeroot dpkg-buildpackage -rfakeroot' is a double-invocation of fakeroot
> which may fail altogether.
> 

Thank you Nico, Thomas and Steve. Your replies answered my questions and
helped me a lot.

raju

-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: dpkg-buildpackage and fakeroot

2007-07-13 Thread Manoj Srivastava
On Tue, 10 Jul 2007 11:46:13 -0700, Steve Langasek <[EMAIL PROTECTED]> said: 

> 'fakeroot dpkg-buildpackage' runs the build target under fakeroot,
> which is undesirable primarily because Debian 'build' targets are
> required to not depend on root privileges, and running them under
> fakeroot can hide bugs of this nature.

I also vaguely recall some actions which work as an ordinary
 user but fail under fakeroot; due to a difference in behaviour.  I no
 longer can recall the details, though, so I could be mistaken.

manoj
-- 
The rate at which a disease spreads through a corn field is a precise
measurement of the speed of blight.
Manoj Srivastava <[EMAIL PROTECTED]> 
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: dpkg-buildpackage and fakeroot

2007-07-14 Thread Matthew Palmer
On Sat, Jul 14, 2007 at 12:50:32AM -0500, Manoj Srivastava wrote:
> On Tue, 10 Jul 2007 11:46:13 -0700, Steve Langasek <[EMAIL PROTECTED]> said: 
> 
> > 'fakeroot dpkg-buildpackage' runs the build target under fakeroot,
> > which is undesirable primarily because Debian 'build' targets are
> > required to not depend on root privileges, and running them under
> > fakeroot can hide bugs of this nature.
> 
> I also vaguely recall some actions which work as an ordinary
>  user but fail under fakeroot; due to a difference in behaviour.  I no
>  longer can recall the details, though, so I could be mistaken.

The bzr test suite, for one.

- Matt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: dpkg-buildpackage and fakeroot

2007-07-17 Thread Ondrej Certik

> I also vaguely recall some actions which work as an ordinary
>  user but fail under fakeroot; due to a difference in behaviour.  I no
>  longer can recall the details, though, so I could be mistaken.

The bzr test suite, for one.


Or libslepc2.3.2 configure refuses to configure tha package under
fakeroot, so one must use:

dpkg-buildpackage -rfakeroot

Ondrej


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: dpkg-buildpackage and fakeroot

2007-07-18 Thread Manoj Srivastava
On Tue, 17 Jul 2007 19:06:44 +0200, Ondrej Certik <[EMAIL PROTECTED]> said: 

>> > I also vaguely recall some actions which work as an
>> > ordinary
>> >  user but fail under fakeroot; due to a difference in behaviour.  I
>> >  no longer can recall the details, though, so I could be mistaken.
>> 
>> The bzr test suite, for one.

> Or libslepc2.3.2 configure refuses to configure tha package under
> fakeroot, 

Do you know why it does that? I'm curious about exactly what
 fails.  mailagent, for example, has checks to see if some files are
 (correctly) unreadable, which would fail if the check was run as
 root. I actually check to see if the check is being run as root, and,
 if so, su to nobody to run the test suite.

manoj
-- 
A hammer sometimes misses its mark - a bouquet never.
Manoj Srivastava <[EMAIL PROTECTED]> 
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: dpkg-buildpackage and fakeroot

2007-07-27 Thread Ondrej Certik
> Do you know why it does that? I'm curious about exactly what
>  fails.  mailagent, for example, has checks to see if some files are
>  (correctly) unreadable, which would fail if the check was run as
>  root. I actually check to see if the check is being run as root, and,
>  if so, su to nobody to run the test suite.

I think just to prevent the user from harming himself.

Ondrej


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]