-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On Mon, 2016-02-22 at 15:26 +0530, Ritesh Raj Sarraf wrote: > > Please fix upo the permissions and make sure that the user > > running the build can indeed wrte to ./debian/* and fakeroot can > > indeed > > change permissions. > > > > I have been building kernels with the current make-kpkg, and > > using fakeroot, consistently, and there have been no other reports > > about problems with fakeroot. > > Since you've confirmed that it works for you, let me spend some more > time to validate if it is a local bug. If not so, only then, I'll re- > open the bug.
It seems the problem is with the install command, that is defined in: debian/ruleset/common/install_cmds.mk Take this example: rrs@learner:~$ install -p -d /tmp/manoj/abc 2016-11-11 / 15:17:12 ♒♒♒ ☺ rrs@learner:~$ install -p -o root -g root -d /tmp/manoj/root install: cannot change owner and permissions of ‘/tmp/manoj/root’: Operation not permitted 2016-11-11 / 15:17:29 ♒♒♒ ☹ => 1 rrs@learner:~$ fakeroot install -p -o root -g root -d /tmp/manoj/fakeroot 2016-11-11 / 15:17:58 ♒♒♒ ☺ rrs@learner:~$ ls -l /tmp/manoj/ total 0 drwxr-xr-x 2 rrs rrs 40 Nov 11 15:17 abc/ drwxr-xr-x 2 rrs rrs 40 Nov 11 15:17 fakeroot/ drwx------ 2 rrs rrs 40 Nov 11 15:17 root/ 2016-11-11 / 15:18:03 ♒♒♒ ☺ If you pass root attributes as a normal user, it fails to create. With fakeroot, it does create, but the attributes are still that of the user. And if you look at the kernel-package error, it seems to be complaining about the same. make[1]: Entering directory '/home/rrs/Community/linux' ====== making target debian/stamp/install/linux-image-4.8.7brk0+-dbg [new prereqs: ]====== This is kernel package version 13.018. rm -rf /home/rrs/Community/linux/debian/linux-image-4.8.7brk0+- dbg install -p -d -o root -g root -m 755 /home/rrs/Community/linux/debian/linux- image-4.8.7brk0+- dbg/usr/share/doc/linux-image-4.8.7brk0+-dbg ====== making target debian/stamp/install/linux-headers-4.8.7brk0+ [new prereqs: ]====== This is kernel package version 13.018. rm -rf /home/rrs/Community/linux/debian/linux-headers-4.8.7brk0+ install -p -d -o root -g root -m 755 /home/rrs/Community/linux/debian/linux- headers-4.8.7brk0 +/usr/src/linux-headers-4.8.7brk0+ ====== making target debian/stamp/install/linux-image-4.8.7brk0+ [new prereqs: ]====== This is kernel package version 13.018. install: cannot change owner and permissions of _/home/rrs/Community/linux/debian/linux-headers - -4.8.7brk0+/usr/src/linux-headers-4.8.7brk0+_: Operation not permitted install: cannot change owner and permissions of _/home/rrs/Community/linux/debian/linux-image-4 .8.7brk0+-dbg/usr/share/doc/linux-image-4.8.7brk0+-dbg_: Operation not permitted debian/ruleset/targets/headers.mk:40: recipe for target 'debian/stamp/install/linux-headers-4.8 .7brk0+' failed make[1]: *** [debian/stamp/install/linux-headers-4.8.7brk0+] Error 1 make[1]: Leaving directory '/home/rrs/Community/linux' debian/ruleset/targets/debug.mk:32: recipe for target 'debian/stamp/install/linux-image-4.8.7br k0+-dbg' failed make[1]: *** [debian/stamp/install/linux-image-4.8.7brk0+-dbg] Error 1 rm -f -r .//home/rrs/Community/linux/debian/linux-image-4.8.7brk0+ .//home/rrs/Community/linux/ debian/linux-image-4.8.7brk0+.deb make[1]: Leaving directory '/home/rrs/Community/linux' debian/ruleset/local.mk:102: recipe for target 'kernel_headers' failed make: *** [kernel_headers] Error 2 make: *** Waiting for unfinished jobs.... debian/ruleset/local.mk:108: recipe for target 'kernel_debug' failed make: *** [kernel_debug] Error 2 install -p -d -o root -g root -m 755 /home/rrs/Community/linux/debian/linux- image-4.8.7brk0+/ etc/kernel/postinst.d /home/rrs/Community/linux/debian/linux-image- 4.8.7brk0+/etc/kernel/preins t.d \ /home/rrs/Community/linux/debian/linux-image- 4.8.7brk0+/etc/kernel/postrm.d / home/rrs/Community/linux/debian/linux-image-4.8.7brk0+/etc/kernel/prerm.d It is just that the error message was misleading to believe that there is a permission problem, where as, it actually is a failure from the install command. - From the install (coreutils) man page: - -o is a super-user only switch. - -- Ritesh Raj Sarraf | http://people.debian.org/~rrs Debian - The Universal Operating System -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAlgllaMACgkQpjpYo/Lh dWmKQw/+ME8rf5KI6O4bZnrNME+pLrAhYftwopC7Rjz5QM2COBjm7rBCq6kQOcly OZlLloHQIpoeSMbl27F/bxqxLghFsjNvhF3RZEtRJcGKGxdkF/HohC40pFZjQjX9 +scVRL6x370mllVJkbrodrC+RB3N1FXsyrCPog7bLuQ8UY6H15VmWyBmY5xqtlpQ ZDApF5+qnvZbet5BAv29vC1+O3VP5xLb3tsDwKYGDA8Yzg7Kk0c9eAwmSwXm5LDT T61K6pe2koipUibg7xg4i1jufSZTJA86F7NHkMHb2gTVou0jHMS/8TLat0SriJQp 4ioW9C9CawolRGv6i4T3GECbWetAizsVo6XoMSyhx0EcLPYMPS+N+VuMO+Ba9JZn 8lFHAC0X3poMfibBm8699yp8+Iqza0FwqLl9BjVYsCsfqZlX3b8vlXPg2+ZQvEAg MyVQvQ5Dfw+WKbd4aEZRS1398zDBbf3eB5ogC2qZFzxweqtJ4A2CApRZd5Of0wEg W20h0kB/ZqnIS09EYV7xuHTRp3848WUKn3jHCDYoJL7p3Oih8FVduQ2fj14bu9FP ne2gL2ilymmwMasOgI5lz5TDueS6KVLgPFOQnNRRBTbDFEDsyc3jm6cUi4ijaYc1 t4/NEB2/srOo2rQ3CCcguWm9BqxwgQKln96P/xyrp6439glTPHA= =XD8j -----END PGP SIGNATURE-----

