Answer the question
In order to leave comments, you need to log in
Why is fakeroot needed when building a deb package?
Why is it written in the manuals like this: fakeroot dpkg-deb --build ./path
but this also works: dpkg-deb --build ./path
Why is fakeroot needed here? Changes permissions to "read-only"? And for what?
Answer the question
In order to leave comments, you need to log in
fakeroot makes it so that an application that is not rooted but expects to be rooted does not crash due to lack of permissions when performing some functions, but continues to run. Those. it "swallows" errors caused by lack of privileges.
For example, a normal user cannot do chowh root:root
for a file he owns:
$ chown root:root test ; echo $?
chown: changing ownership of 'test': Operation not permitted
1
$ fakeroot chown root:root test ; echo $?
0
$ ls -la test
-rw-rw-r--. 1 jcmvbkbc jcmvbkbc 1709 Jun 1 2011 test
make install
similar scripts that change the rights of the files they install in the system do not end after the first error when launched under an unprivileged user, but work through to the end. The correctness of the owners and permissions set on the files must be ensured by other means.Why do the manuals write like this:
fakeroot dpkg-deb --build ./path
but it also works like this:
dpkg-deb --build ./path
in short and simple:
fakeroot does not let the collector into the outside world of the
sandbox
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question