I realize that setting up pbuilder requires root privileges, but does each invocation really require root privileges?
Is there any way of running pbuilder as a standard user?
I realize that setting up pbuilder requires root privileges, but does each invocation really require root privileges?
Is there any way of running pbuilder as a standard user?
Yes, copied from: pbuilder.
It is possible to use user-mode-linux by invoking pbuilder-user-mode-linux instead of pbuilder. pbuilder-user-mode-linux doesn't require root privileges, and it uses the copy-on-write (COW) disk access method of User-mode-linux which typically makes it much faster than the traditional pbuilder.
User-mode-linux is a somewhat less proven platform than the standard Unix tools which pbuilder relies on (chroot, tar, and gzip) but mature enough to support pbuilder-user-mode-linux since its version 0.59. And since then, pbuilder-user-mode-linux has seen a rapid evolution.
The configuration of pbuilder-user-mode-linux goes in three steps:
Configuration of user-mode-linux
user-mode-linux isn't completely trivial to set up. It would probably be useful to acquaint yourself with it a bit before attempting to use rootstrap or pbuilder-user-mode-linux. For details, read /usr/share/doc/uml-utilities/README.Debian and the user-mode-linux documentation. (It's in a separate package, user-mode-linux-doc.)
user-mode-linux requires the user to be in the uml-net group in order to configure the network unless you are using slirp.
If you compile your own kernel, you may want to verify that you enable TUN/TAP support, and you might want to consider the SKAS patch.
rootstrap is a wrapper around debootstrap. It creates a Debian disk image for use with UML. To configure rootstrap, there are several requirements.
adduser dancer uml-netSet up /etc/rootstrap/rootstrap.conf. For example, if the current host is 192.168.1.2, changing following entries to something like this seems to work.
transport=tuntap interface=eth0 gateway=192.168.1.1 mirror=http://192.168.1.2:8081/debian host=192.168.1.198 uml=192.168.1.199 netmask=255.255.255.0
Some experimentation with configuration and running rootstrap ~/test.uml to actually test it would be handy.
Using slirp requires less configuration. The default configuration comes with a working example.
The following needs to happen:
pbuilder-uml package.Set up the configuration file /etc/pbuilder/pbuilder-uml.conf in the following manner. It will be different for slirp.
MY_ETH0=tuntap,,,192.168.1.198 UML_IP=192.168.1.199 UML_NETMASK=255.255.255.0 UML_NETWORK=192.168.1.0 UML_BROADCAST=255.255.255.255 UML_GATEWAY=192.168.1.1 PBUILDER_UML_IMAGE="/home/dancer/uml-image"
It needs to match the rootstrap configuration.
pbuilder-user-mode-linux create --distribution sid to create the image.Extra comments in the link:
pbuilder-user-mode-linux emulates most of pbuilder, but there are some differences.
To run pbuilder-user-mode-linux in parallel on a system, there are a few things to bear in mind.
untested