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

Re: Usage of dpkg under cygwin

--- Paul Baker <pbaker@where2getit.com> wrote:
> On Wednesday, October 9, 2002, at 01:43 AM, Robert Collins wrote:
> > The *real* solution is to fix dpkg. Checking for being root is a
> broken
> > test. Checking if the current user has the appropriate access is a
> more
> > flexible and portable test.
> NO NO NO NO NO!!! It is absolutely needed. You don't get it. It is 
> needed during the final packaging stages because when the built 
> binaries are tar'd up, THEY HAVE TO BE OWNED BY ROOT because this tar

I understand that this is standard under GNU/Linux. What about under
win95, win2k? The standard packages under windows have a msi, and are
only installable by Adminstrator, unix like packages can be installed
by anyone. The packages I am porting are for windows only.

The uids dont mean much under cygwin, under raw windows they mean
nothing really at all.

> is then extracted directly into the filesystem when that package is 
> installed later on someone's machine. You do not want programs being 
> installed into /usr/bin owned by some random user that had the same
> uid  as some random developer. THEY HAVE TO BE OWNED BY ROOT!

Under linux, what about under windows 95? 98? Me?

> There are several ways to accomplish this:
> 1. do the whole build as root. This of course carries with it the
> issue  that you will be running all the steps of the package build
> as 
> root which some would say is a bad thing:
>     $ su
>     % dpkg-buildpackage
You are forgetting that the standard user under cygwin is adminstrator
uid=500, which is root. If we are installing on native windows, there
is not any root at all.

> 2. tell dpkg-buildpackage to use sudo during the stages that require 
> it. this is better because it means that most of the work is done as
> an 
> unprivileged user. the threat is that if something screws up during
> the 
> root required part, it's screwing up as root.
>     $ dpkg-buildpackage -rsudo

I will look into porting sudo to cygwin, we will see how hard it is...

> 3. use fakeroot because it kicks ass! fakeroot is a magical utility 
> that fakes out the glibc into thinking you are running as root
> without 
> actually letting you do anything that root can do. read the fakeroot 
> manpage.
>     $ dpkg-buildpackage -rfakeroot
Well fakeroot is crashing as I have said. It is overkill for a simple
problem : If I am building for cygwin, uid 500 (the standard) is ok,
isn't it?

> Once again, dpkg does NOT need to be fixed. Nothing needs to be fixed
> but your understanding of the debian package building process. Have
> you 
> read the debian policy yet?

Yes, I have read this if not every letter. Please consider my situation
as given. I understand that this might be of importance under Debian
GNU/Linux but what about under Windows 95?

Please, lets get on the same page here, we are talking about the debian
windows here, the only thing we have is dpkg that has been kindly
ported  to cygwin. Lets assume for one minute we are trying to make a
nice windows package for the windows me os? These arguments dont make
much sense at all on a OS that has no security at all.


James Michael DuPont

Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More

Reply to: