When I invoke 'apt-build -y world' it fails on packages contains files
with suid bit. (For example the package base-passwd). It seems, the
program dpkg-deb do a permission check, and it fails.
My solution:
I add an extra option to the dpkg-deb: --nocheckperm
and I add a config file to the dpkg-deb: /etc/dpkg/dpkg-deb.cfg
(similarly to the dpkg).
I wrote the 'nocheckperm' to the dpkg-deb.cfg and it seems works fine.
The patch against the dpkg package:
--------------------------------------
diff -d -r dpkg-1.10.9/dpkg-deb/build.c dpkg-1.10.9-new/dpkg-deb/build.c
297,302c297,303
< strcpy(controlfile, directory);
< strcat(controlfile, "/" BUILDCONTROLDIR "/");
< if (lstat(controlfile,&mscriptstab)) ohshite("unable to stat
control directory");
< if (!S_ISDIR(mscriptstab.st_mode)) ohshit("control directory is
not a directory");
< if ((mscriptstab.st_mode & 07757) != 0755)
< ohshit(_("control directory has bad permissions %03lo (must be
---
control directory");
not a directory");
303a305
diff -d -r dpkg-1.10.9/dpkg-deb/dpkg-deb.1
dpkg-1.10.9-new/dpkg-deb/dpkg-deb.1
73c73,74
< .B dpkg\-deb
---
217a219,221
diff -d -r dpkg-1.10.9/dpkg-deb/dpkg-deb.h
dpkg-1.10.9-new/dpkg-deb/dpkg-deb.h
30c30
< extern int debugflag, nocheckflag, oldformatflag;
---
44a45
diff -d -r dpkg-1.10.9/dpkg-deb/main.c dpkg-1.10.9-new/dpkg-deb/main.c
79a80
101c102
< int debugflag=0, nocheckflag=0, oldformatflag=BUILDOLDPKGFORMAT;
---
oldformatflag=BUILDOLDPKGFORMAT;
145a147
168c170
< standard_startup(&ejbuf, argc, &argv, NULL, 0, cmdinfos);
---