Bug#485956: FTBFS: uses chown inappropriately

2008-08-17 Thread Jon Marler


On Jun 15, 2008, at 4:23 AM, Raphael Hertzog wrote:


On Thu, 12 Jun 2008, Jon Marler wrote:

If you use fakeroot to call dpkg-buildpackage, it works prefectly.

Something is wrong with the way that dpkg-buildpackage is calling
fakeroot.  The chown calls work perfect, and you can build the  
package

using a different syntax.


There's nothing wrong in dpkg-buildpackage. The build target is  
called
_without_ root rights. Only the clean and binary target are supposed  
to

have root rights.

However your build target depends on binary-src and binary-src  
contains

the call chown -R root.root $(TMPSRC).

You should arrange your build system to have the operations that  
require

root to be called when debian/rules binary is called and not when
debian/rules build is called.


I've been digging around in this, and have found something extremely  
peculiar.


This odd behavior only appears when trying to build release -45, but  
not -44.  As far as I can tell, the differences between the two are  
very minor.  I can't figure out what broke between -44 and -45 that  
has caused dpkg-buildpackage to fail.  The rules file is the same in  
both releases, yet one builds and the other fails.


Do you have any ideas why that might be?

This bug is the last bug holding me back from uploading a new qmail- 
src for lenny.


Any help you could provide would be appreciated.

Cheers!

Jon




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



Bug#485956: FTBFS: uses chown inappropriately

2008-06-15 Thread Raphael Hertzog
On Thu, 12 Jun 2008, Jon Marler wrote:
 If you use fakeroot to call dpkg-buildpackage, it works prefectly.

 Something is wrong with the way that dpkg-buildpackage is calling  
 fakeroot.  The chown calls work perfect, and you can build the package  
 using a different syntax.

There's nothing wrong in dpkg-buildpackage. The build target is called
_without_ root rights. Only the clean and binary target are supposed to
have root rights.

However your build target depends on binary-src and binary-src contains
the call chown -R root.root $(TMPSRC).

You should arrange your build system to have the operations that require
root to be called when debian/rules binary is called and not when
debian/rules build is called.

Cheers,
-- 
Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/



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



Bug#485956: FTBFS: uses chown inappropriately

2008-06-12 Thread Dominic Hargreaves
Package: qmail
Version: 1.03-45
Severity: serious
Justification: fails to build from source

On both etch and sid systems

apt-get source qmail
cd qmail...
dpkg-buildpackage -rfakeroot -uc -us

results in:

# Install debconf files
#cp debian/qmail-src.config debian/tmp-src/DEBIAN/config
#cp debian/qmail-src.templates debian/tmp-src/DEBIAN/templates
dpkg-gencontrol -isp -pqmail-src -Pdebian/tmp-src
chown -R root.root debian/tmp-src
chown: changing ownership of `debian/tmp-src/usr/share/doc/qmail-src/changelog.D
ebian.gz': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/share/doc/qmail-src/copyright':
 Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/share/doc/qmail-src/README.Debi
an.gz': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/share/doc/qmail-src': Operation
 not permitted
chown: changing ownership of `debian/tmp-src/usr/share/doc': Operation not permi
tted
chown: changing ownership of `debian/tmp-src/usr/share': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/bin/build-qmail': Operation not
 permitted
chown: changing ownership of `debian/tmp-src/usr/bin': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/src/qmail-src/qmail_1.03-45.dsc
': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/src/qmail-src/qmail_1.03.orig.t
ar.gz': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/src/qmail-src/qmail_1.03-45.dif
f.gz': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/src/qmail-src': Operation not p
ermitted
chown: changing ownership of `debian/tmp-src/usr/src': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr': Operation not permitted
chown: changing ownership of `debian/tmp-src/DEBIAN/control': Operation not perm
itted
chown: changing ownership of `debian/tmp-src/DEBIAN/prerm': Operation not permit
ted
chown: changing ownership of `debian/tmp-src/DEBIAN/postinst': Operation not per
mitted
chown: changing ownership of `debian/tmp-src/DEBIAN/postrm': Operation not permi
tted
chown: changing ownership of `debian/tmp-src/DEBIAN': Operation not permitted
chown: changing ownership of `debian/tmp-src': Operation not permitted
make: *** [binary-src] Error 1
dpkg-buildpackage: failure: debian/rules build gave error exit status 2



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



Bug#485956: FTBFS: uses chown inappropriately

2008-06-12 Thread Jon Marler

If you use fakeroot to call dpkg-buildpackage, it works prefectly.

Something is wrong with the way that dpkg-buildpackage is calling  
fakeroot.  The chown calls work perfect, and you can build the package  
using a different syntax.


Not sure what you need done here.

Jon


On Jun 12, 2008, at 10:47 AM, Dominic Hargreaves wrote:


Package: qmail
Version: 1.03-45
Severity: serious
Justification: fails to build from source

On both etch and sid systems

apt-get source qmail
cd qmail...
dpkg-buildpackage -rfakeroot -uc -us

results in:

# Install debconf files
#cp debian/qmail-src.config debian/tmp-src/DEBIAN/config
#cp debian/qmail-src.templates debian/tmp-src/DEBIAN/templates
dpkg-gencontrol -isp -pqmail-src -Pdebian/tmp-src
chown -R root.root debian/tmp-src
chown: changing ownership of `debian/tmp-src/usr/share/doc/qmail-src/ 
changelog.D

ebian.gz': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/share/doc/qmail-src/ 
copyright':

Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/share/doc/qmail-src/ 
README.Debi

an.gz': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/share/doc/qmail- 
src': Operation

not permitted
chown: changing ownership of `debian/tmp-src/usr/share/doc':  
Operation not permi

tted
chown: changing ownership of `debian/tmp-src/usr/share': Operation  
not permitted
chown: changing ownership of `debian/tmp-src/usr/bin/build-qmail':  
Operation not

permitted
chown: changing ownership of `debian/tmp-src/usr/bin': Operation not  
permitted
chown: changing ownership of `debian/tmp-src/usr/src/qmail-src/ 
qmail_1.03-45.dsc

': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/src/qmail-src/ 
qmail_1.03.orig.t

ar.gz': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/src/qmail-src/ 
qmail_1.03-45.dif

f.gz': Operation not permitted
chown: changing ownership of `debian/tmp-src/usr/src/qmail-src':  
Operation not p

ermitted
chown: changing ownership of `debian/tmp-src/usr/src': Operation not  
permitted
chown: changing ownership of `debian/tmp-src/usr': Operation not  
permitted
chown: changing ownership of `debian/tmp-src/DEBIAN/control':  
Operation not perm

itted
chown: changing ownership of `debian/tmp-src/DEBIAN/prerm':  
Operation not permit

ted
chown: changing ownership of `debian/tmp-src/DEBIAN/postinst':  
Operation not per

mitted
chown: changing ownership of `debian/tmp-src/DEBIAN/postrm':  
Operation not permi

tted
chown: changing ownership of `debian/tmp-src/DEBIAN': Operation not  
permitted

chown: changing ownership of `debian/tmp-src': Operation not permitted
make: *** [binary-src] Error 1
dpkg-buildpackage: failure: debian/rules build gave error exit  
status 2








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



Bug#485956: FTBFS: uses chown inappropriately

2008-06-12 Thread Dominic Hargreaves
On Thu, Jun 12, 2008 at 06:07:38PM -0500, Jon Marler wrote:
 If you use fakeroot to call dpkg-buildpackage, it works prefectly.
 
 Something is wrong with the way that dpkg-buildpackage is calling  
 fakeroot.  The chown calls work perfect, and you can build the package  
 using a different syntax.
 
 Not sure what you need done here.

dpkg-buildpackage only uses fakeroot et al for the clean and binary
targets, not the build target; your binary-src target is depended upon
by your build target, which gets run without fakeroot (before the binary
targets).

I believe this done specifically as compiling software often doesn't
work too well with fakeroot.

From inspection, it look like if you simply remove the 'binary-src'
dependency from your build target, dpkg-buildpackage will work happily,
but I haven't tested this.

Cheers,
Dominic.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)



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



Bug#485956: FTBFS: uses chown inappropriately

2008-06-12 Thread Dominic Hargreaves
On Fri, Jun 13, 2008 at 12:26:30AM +0100, Dominic Hargreaves wrote:

 dpkg-buildpackage only uses fakeroot et al for the clean and binary
 targets, not the build target; your binary-src target is depended upon
 by your build target, which gets run without fakeroot (before the binary
 targets).
 
 I believe this done specifically as compiling software often doesn't
 work too well with fakeroot.
 
 From inspection, it look like if you simply remove the 'binary-src'
 dependency from your build target, dpkg-buildpackage will work happily,
 but I haven't tested this.

Just noticed how Ubuntu fixes this:

http://patches.ubuntu.com/q/qmail/qmail_1.03-45ubuntu1.patch

I think this is an incorrect fix; the rules file shouldn't be invoking
fakeroot itself! May be worth pointing this out to them if you fix this.

Cheers,
Dominic.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)



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