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

buildpackage as non-root (was: Re: architecture specific upload announcements)

> >   Nightly some machines (i386, alpha, m68k, sparc, ppc) fetch the
> >   source out of the incoming directory and compile them.  The resulting
> >   .deb is automatically uploaded into another directory (or into hte
> >   unstable tree at once) and the source archive finds its way into
> >   the archive, too.
> the only reason, why i don't like it : i don't want to run such a
> mechanism on my machine as root. but building packages only works as
> root... if a developer is doing something wrong, he can create a
> desaster on all these machines.
> any solution to this problem ? 

Well, if you setup a path ensures a modified tar[1],  chown, chgrp,
install are found before the default ones, then all you need to do is:
  - write chown, chgrp, install programmes that don't change the
    owner of a file (as they usually do), but rather append info about
    the supposed owner to, say the file $OWNERS.
  - write a tar that does excactly the same as the normal one, except that
    it reads the file $OWNERS and sets the file owners in the .tar file

Now, I believe that you should be able to run dpkg-buildpackage as
ordinary user, and create a .deb without root-access.

I don't think writing those modified versions is too much work, it's just
that I haven't found time to do it.

[1] This is assuming dpkg uses the ordinary tar command, no ta builtin one.
    But I think it does do that.

joost witteveen, joostje@debian.org
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1

Reply to: