Greg Novak <[EMAIL PROTECTED]> wrote:

> On Tue, 9 Sep 2003 Jerry Talkington wrote:
> 
> > Unfortunately there doesn't seem to any desire among the maintainers to
> > make fink a more user mode environment, which is a big mistake, IMHO.
> > An application shouldn't request root privileges until absolutely
> > necessary.  A poorly patched or configured package, or even a typop,
> > could wreak havoc on a system.
> 
> I agree completely.  That is, after all, one of the the points of
> admin/root accounts: to keep you from accidentally doing something dumb.
> In a perfect world no one would need it b/c no one would do anything dumb,
> but reality is less rosy.
> 
> Anyway, for all who are interested: The fix is extremely easy.
> 
> 1) In the file (pathname from memory, may not be correct)
> /sw/share/perl5/Fink/Engine.pm, comment the line
> containing "rerun_as_root(...);"  The function call only appears in one
> place in the file.
> 
> 2) Then make /sw/src writable by users with:
> sudo chmod 777 /sw/src
> 
> Now, commands like fink rebuild package will compile and build with fink
> running as a user.  You can inspect the output, look for places where the
> install tried to write files it shouldn't have, and make sure that
> everything in /sw/src/root-package is where it's supposed to be.  Fink
> will die with an error when it tries to actually create the .deb file, but
> that's exactly what I want it to do: build the package in a "sandbox" and
> don't do anything permanent.
> 

Greg,

You've hit the nail on the head with your last comment here.

Fink relies on the Debian tools, dpkg in particular, for all of its
deb-handling tasks.  And unfortunately, those tools insist on being
run as root.

So while your modification is great for all but the next-to-last step that
a developer takes, it's not practical for most users of Fink, who want
to go ahead and build the deb, or take a pre-built deb and install it.

The Fink developers who monitor the package submissions are pretty careful
about checking the integrity of the installs done by the submitted
packages, so there is rarely a problem experienced by users who install
things from the Fink tree.

For budding Fink developers, though, I understand that this can be a
problem.  In fact, I have frequently had this problem of a package under
construction installing things directly to /sw instead of into the
destination directory.  So long as the installs happen in /sw, though, you
are in good shape... you can detect the problem by examing the .deb file
after you've built it ("dpkg --contents foo.deb"), and if you notice that a
bunch of stuff which should have been installed isn't listed there, you can
be pretty certain that it was installed directly to /sw by mistake.  The
good thing is, once you've fixed the problem, simply installing and then
removing the .deb file will clear out the cruft.

I am open to suggestions about how to modify Fink so that its only runs as
root when it needs to, but I don't know a practical way of doing that at
the moment.

  Best,
  Dave



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to