Re: Bug#2091: creating packages requires root privileges

1996-01-05 Thread Ian Jackson
Marek Michalkiewicz writes (Bug#2091: creating packages requires root 
privileges):
 To create a binary *.deb package, root privileges are required.  This
 is because you must create a complete directory structure with proper
 ownerships and permissions first, and then use dpkg-deb to create
 a package from it.

Unfortunately there's not much that can be done about this, because
most packages are created by running the package's own Makefile to
install the files.  This doesn't work (or fails to DTRT) if you're not
root.

I have no plans to improve this situatioon; I think the simplest
solution would be a way to mount a part of a filesystem in a way that
means user uid is root for here.  You'd want to mount it with
nosuid,nodev of course.  Then the filesystem could be used to record
the chmod's c done by the package build Makefiles and get them into
the .deb file.

If someone else wants to write a program that makes .deb files some
other way then they should feel free.  They'll probably want to make
the `new format' archives the default - see the dpkg-deb source for
details.

I'm closing this bug report.

Ian.



Bug#2091: creating packages requires root privileges

1996-01-04 Thread Richard Kettlewell
Package: dpkg

To create a binary *.deb package, root privileges are required.  This
is because you must create a complete directory structure with proper
ownerships and permissions first, and then use dpkg-deb to create
a package from it.

But this should't really be necessary.  A tar file is a tar file, and
you can set any permissions inside it if you can write to it.  The
only thing that is necessary is a program to set permissions inside
tar files.

This looks more like a suggestion than a bug report to me...

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?

However, I haven't tried to build Debian packages in that sort of
environment, so there may be gotchas I'm missing.

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.

--
Richard Kettlewell  [EMAIL PROTECTED]  http://www.elmail.co.uk/staff/richard/



Bug#2091: creating packages requires root privileges

1996-01-04 Thread Marek Michalkiewicz
 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?

Marek