[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#2091: creating packages requires root privileges

> If you're creating a Debian package you need to be root on the system
> you're going to install it on to test it.  Even if you're using some
> shared environment in which you don't have root on the main
> development machine, is it really that problematic to make the
> `binary' target on the test machine?

It isn't _that_ problematic, but it is inconvenient, and technically
not necessary.  It isn't that problematic to transfer a few files
using FTP, but it is often a lot more convenient to use NFS :-).

Besides, it is generally recommended to do most things as an ordinary
user, and use root only if really necessary.

> A tool which could adjust permissions and ownership of the contents of
> a tar file shouldn't be hard to write; you'd still have to get the tar
> file back into the deb archive, of course.

Or modify dpkg-deb to read a file (part of the source package) which
specifies permissions of all files, and modify the intermediate tar
archive while creating the package.

I'm not sure about dpkg internals...  Even if there is no intermediate
tar file (output from tar is piped to gzip), it should still be possible
to write a filter that reads a tar archive from stdin, changes the
permissions to these specifed in the permissions file, and writes the
modified tar archive to stdout (pipe to gzip in this case).  Tar files
are, by their nature (tape archive), sequential - no random read/write
access should be required to do this.

The package-specific permissions file could also be installed somewhere
in /var/lib/dpkg/... and later used to verify that the permissions are
correct, and fix them without reinstalling if they ever get messed up.

Probably the biggest problem: find someone to write the program to change
permissions inside tar files.  Any tar file format experts out there?


Reply to: