<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.28">
<TITLE>RE: [Haifux] Announcing a new project - fakeroot-ng</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi,<BR>
<BR>
&gt;The real issue here, however, is testing embedded setups.<BR>
<BR>
&gt;With fakeroot I can run the entire build script as a regular user, &gt;which is great<BR>
<BR>
Most embedded Linux-based I encountered are working as root and do not have such a thing as a regular user. It seems to me that this is usually so, but again I could be wrong.<BR>
<BR>
Did you encounter any embedded setups where it is<BR>
different ?<BR>
<BR>
Regards,<BR>
Yossi Arbel<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: haifux-bounces@haifux.org on behalf of Shachar Shemesh<BR>
Sent: Mon 12/31/2007 7:01 AM<BR>
To: alon@8ln.org<BR>
Cc: Haifa Linux Club<BR>
Subject: Re: [Haifux] Announcing a new project - fakeroot-ng<BR>
<BR>
alon@8ln.org wrote:<BR>
<BR>
&gt; That being said, I don't really know why fake a chroot jail within<BR>
&gt; fakeroot. I can understand why you'd like a userspace chroot jail, but<BR>
&gt; you won't usually need to fake root at the time.<BR>
&gt;&nbsp;&nbsp;<BR>
<BR>
Actually, the two really come together. You use the same technology for<BR>
both chroot and fakeroot.<BR>
<BR>
The real issue here, however, is testing embedded setups. I have a<BR>
script that builds a directory structure (with different owners and<BR>
device files), that then gets automatically compressed into a SQUASHFS<BR>
image and saved. When you boot from it, it turns into a real<BR>
environment. It's real useful, however, to test whether this environment<BR>
has all the devices, libraries and mounts that are required to, say, run<BR>
a certain program. The obvious solution is to chroot into it, and try<BR>
running the program.<BR>
<BR>
With fakeroot I can run the entire build script as a regular user, which<BR>
is great because I don't want to compile a whole system as root, I don't<BR>
want to leave a passwordless sudo on my machines, the script runs for so<BR>
long (ever times compiling of wxWidgets or glibc? They take a LONG time<BR>
to compile) that a sudo with password expires, and that's before I start<BR>
talking about bugs in the DESTDIR mechanism, which, if run as real root,<BR>
may hose your entire system. fakeroot is ideal for those cases. I had to<BR>
write a whole set of wrapper scripts around fakeroot to make it store<BR>
its state (i.e. - the lies it tells the programs) between runs in a<BR>
reliable way (and let me tell you, that stretches fakeroot's abilities<BR>
to the limit).<BR>
<BR>
However, once the environment is set up using fakeroot two things<BR>
happen. The first is that you don't want to use a real root in order to<BR>
chroot into it. You get used to good things :-). The second, and more<BR>
important one, is that you cannot use a real root. All the files there<BR>
have the wrong owners and none of the device files are actual devices.<BR>
Sometimes it doesn't matter. Sometimes it does.<BR>
<BR>
And that, actually, is the real reason fakeroot-ng was written.<BR>
<BR>
Shachar<BR>
_______________________________________________<BR>
Haifux mailing list<BR>
Haifux@haifux.org<BR>
<A HREF="http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux">http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux</A><BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>