[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fossil-users
Subject:    Re: [fossil-users] `fossil ui` problems in Haiku
From:       Stephan Beal <sgbeal () googlemail ! com>
Date:       2014-04-30 17:22:34
Message-ID: CAKd4nAgJPEeugLkTfKkvBMPPcQkXBH2gLMCbxF0LWSZM3pNXnw () mail ! gmail ! com
[Download RAW message or body]

On Wed, Apr 30, 2014 at 7:08 PM, Joseph Prostko <joe.prostko@gmail.com>wrote:

> Thanks again for all of the help, Stephan and Andy, as now I can use
> Fossil to its full potential in Haiku.  :)
>

A minor amendment...

a) the fix is actually not Haiku-specific, it turns out.

b) the credit goes to Andy B. for the fix and Joe for his support in
finding it.

c) here's Andy B's report of the root of the problem:


On Wed, Apr 30, 2014 at 9:09 AM, Andy Bradford <amb-fossil@bradfords.org>
 wrote:

> Here's  what  I've   found  so  far.  Assume  that   the  repository  is
> /tmp/new.fossil and  I run  fossil ui  from an  open directory  for that
> fossil.
>
> enter_chroot_jail  is  called,  it  closes  the open  db,  and  then  it
> successfully does a  chroot into /tmp, and returns  "/new.fossil" as the
> new g.zRepositoryName  (relative to the  chroot). This is fine.  Then we
> get into process_one_web_page and this is where the mischief happens:
>
> zRepo = zToFree = mprintf("%s%.*s.fossil",g.zRepositoryName,i,zPathInfo);
>
>
> http://www.fossil-scm.org/index.html/artifact/2b4c706ab0a6a03694a6017733d53211d95d8c67?ln=1319,1368
>
> Basically,  zPathInfo  is  /  (because that's  what  fossil  ui  directs
> the browser  to e.g.  http://localhost:8080/), and  g.zRepositoryName is
> "/new.fossil" so it combines them into zRepo:
>
> zRepo = zToFree = "/new.fossil/.fossil"
>
> Then the rest is  history. It tries to open that and  read the size, but
> fails because that  doesn't exist. It then tries  to open "/new.fossil/"
> as a directory and fails.



-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[Attachment #3 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 30, 2014 \
at 7:08 PM, Joseph Prostko <span dir="ltr">&lt;<a href="mailto:joe.prostko@gmail.com" \
target="_blank">joe.prostko@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Thanks \
again for all of the help, Stephan and Andy, as now I can use<br>

Fossil to its full potential in Haiku.   :)<br></blockquote><div><br></div><div>A \
minor amendment...</div><div><br></div><div>a) the fix is actually not \
Haiku-specific, it turns out.</div><div><br></div><div>b) the credit goes to Andy B. \
for the fix and Joe for his support in finding it.</div> <div><br></div><div>c) \
here&#39;s Andy B&#39;s report of the root of the \
problem:</div><div><br></div><div><br class="">On Wed, Apr 30, 2014 at 9:09 AM, Andy \
Bradford  <span dir="ltr">&lt;<a href="mailto:amb-fossil@bradfords.org" \
target="_blank">amb-fossil@bradfords.org</a>&gt;</span>  wrote:<br> <blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Here&#39;s \
                what   I&#39;ve    found   so   far.   Assume   that    the   \
                repository   is<br>
/tmp/new.fossil and   I run   fossil ui   from an   open directory   for \
that<br>fossil.<br><br>enter_chroot_jail   is   called,   it   closes   the open   \
db,   and   then   it<br>successfully does a   chroot into /tmp, and returns   \
&quot;/new.fossil&quot; as the<br> new g.zRepositoryName   (relative to the   \
chroot). This is fine.   Then we<br>get into process_one_web_page and this is where \
the mischief happens:<br><br>zRepo = zToFree = \
mprintf(&quot;%s%.*s.fossil&quot;,g.zRepositoryName,i,zPathInfo);<br> <br><a \
href="http://www.fossil-scm.org/index.html/artifact/2b4c706ab0a6a03694a6017733d53211d95d8c67?ln=1319,1368" \
target="_blank">http://www.fossil-scm.org/index.html/artifact/2b4c706ab0a6a03694a6017733d53211d95d8c67?ln=1319,1368</a><br>
 <br>Basically,   zPathInfo   is   /   (because that&#39;s   what   fossil   ui   \
directs<br>the browser   to e.g.   <a href="http://localhost:8080/" \
target="_blank">http://localhost:8080/</a>), and   g.zRepositoryName \
is<br>&quot;/new.fossil&quot; so it combines them into zRepo:<br> <br>zRepo = zToFree \
= &quot;/new.fossil/.fossil&quot;<br><br>Then the rest is   history. It tries to open \
that and   read the size, but<br>fails because that   doesn&#39;t exist. It then \
tries   to open &quot;/new.fossil/&quot;<br> as a directory and \
fails.</blockquote></div></div><div><br></div><div><br></div><div>--  <br></div><div \
dir="ltr">----- stephan beal<br><a href="http://wanderinghorse.net/home/stephan/" \
target="_blank">http://wanderinghorse.net/home/stephan/</a><div> <a \
href="http://gplus.to/sgbeal" \
target="_blank">http://gplus.to/sgbeal</a></div><div>&quot;Freedom is sloppy. But \
since tyranny&#39;s the only guaranteed byproduct of those who insist on a perfect \
world, freedom will have to do.&quot; -- Bigby Wolf</div> </div>
</div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic