MagicPoulp wrote:Can anyone else confirm if dpkg can give total sudo access to the creator of a deb package using post-preinstalled scripts?
It seems strange. But I did not check the internals of dpkg myself.
A chroot will not give sudo access to your real root folder but to a fake one.
You seem to be missing some basic concepts.
What does "sudo access" mean?
Using a chroot is indeed giving you full access to the filesystem you are chrooting into.
The package installation procedure must have root privileges to install system files, set owner and group permissions etc and run the install scripts to add users/groups and such and set up other environment requirements for the software being installed.
By adding a repo and installing packages you are handing control of your system to whoever can put code in that repo.
The Debian repo's have systems in place to ensure provided binaries match the source code, which is all reviewable and provides a chain of trust that is verifiable.
Closed source binaries (and random 'third party' repo's) do not - use at your own risk.