>...
> Date: Tue, 24 Oct 2017 09:14:59 -0400
> From: Karn Kallio <tierplusplusli...@skami.org>
> To: fossil-users@lists.fossil-scm.org
> Subject: Re: [fossil-users] Bug Report: Cloning with --private Fails
> Message-ID: <20171024091459.3053205e@eka>
> ...
> 
> Also, with fossil 2.3 after cloning a private branch you will likely
> encounter errors when trying to synchronize it, such as this :
> 
> Error: Database error: UNIQUE constraint failed: private.rid: {INSERT
> INTO private VALUES(4)}
> 
> Inspecting the source, it seems that in the function content_put_ex in
> the file content.c that only a new rid should be marked as private,
> since a rid that adds data to a phantom will already have had the
> private marking done when the phantom was added.
> 
> The following patch ...
>...



>...
> Date: 23 Oct 2017 19:27:08 -0600
> From: "Andy Bradford" <amb-fos...@bradfords.org>
> To: "Martin Vahi" <martin.v...@softf1.com>
> Cc: fossil-users@lists.fossil-scm.org
> Subject: Re: [fossil-users] Bug Report: Cloning with --private Fails
> Message-ID: <20171023192708.22275.qm...@angmar.bradfordfamily.org>
> ...
>
> Thus said Martin Vahi on Mon, 23 Oct 2017 11:27:03 +0300:
>
>> It doesn't even prompt for a password.
>
> You didn't give it a username for which it should prompt.
>
> Try:
>
> time nice -n18 fossil clone --unversioned --private --admin-user
https://usern...@www.softf1.com/cgi-bin/tree1/technology/flaws/silktorrent.bash/
./repository_storage.fossil
>
> Where username  is your username  that you want  to clone with.  Or, you
> need to give the nobody user the right to clone private content.
>
> Andy
>...

Thank You (all) for the kind answers and help, but,
unfortunately I suspect that there is still some work to be done.
Either I am misusing the Fossil, which I tend to do, or
the "--private" triggers some kind of a flaw/bug.


The failing command line with the key phrase
"server returned an error - clone aborted":

    ----citation---start--------------

ts2@linux-0fiz:~/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/publitseerimishoidla$
SQLITE_TMPDIR=`pwd`/tmp_  time nice -n18 fossil clone --unversioned
--private --admin-user martin_vahi
https://www.softf1.com/cgi-bin/tree1/technology/flaws/silktorrent.bash/
./repository_storage.fossil
    Round-trips: 2   Artifacts sent: 0  received: 238
    Error: not authorized to sync private content
    Round-trips: 2   Artifacts sent: 0  received: 238
    Clone done, sent: 681  received: 65921513  ip: 185.7.252.74
    server returned an error - clone aborted
    3.31user 2.32system 7:36.38elapsed 1%CPU (0avgtext+0avgdata
49660maxresident)k
    280inputs+56208outputs (2major+24160minor)pagefaults 0swaps

ts2@linux-0fiz:~/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/publitseerimishoidla$
uname -a
    Linux linux-0fiz 3.16.7-53-desktop #1 SMP PREEMPT Fri Dec 2 13:19:28
UTC 2016 (7b4a1f9) x86_64 x86_64 x86_64 GNU/Linux

ts2@linux-0fiz:~/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/publitseerimishoidla$
date
    Wed Nov  1 01:56:01 EET 2017

ts2@linux-0fiz:~/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/publitseerimishoidla$
fossil version
    This is fossil version 2.3 [f7914bfdfa] 2017-07-21 03:19:30 UTC

ts2@linux-0fiz:~/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/publitseerimishoidla$
    ----citation---end----------------


The same command line, but without the "--private" works:

    ----citation---start--------------

ts2@linux-0fiz:~/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/publitseerimishoidla$
SQLITE_TMPDIR=`pwd`/tmp_  time nice -n18 fossil clone --unversioned
--admin-user martin_vahi
https://www.softf1.com/cgi-bin/tree1/technology/flaws/silktorrent.bash/
./repository_storage.fossil
    Round-trips: 51   Artifacts sent: 0  received: 54802
    Clone done, sent: 15611  received: 4764758194  ip: 185.7.252.74
    Rebuilding repository meta-data...
      100.0% complete...
    Extra delta compression...
    Vacuuming the database...
    project-id: 26101fc480a34b3b993c8c83b7511840ab9d0c17
    server-id:  5787d7cb7d0db19d65cdab01054d02366bb2ad1c
    admin-user: martin_vahi (password is "c16a98")
    457.41user 431.44system 5:26:04elapsed 4%CPU (0avgtext+0avgdata
2337020maxresident)k
    48059520inputs+55060832outputs (45122major+4770331minor)pagefaults
0swaps

ts2@linux-0fiz:~/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/publitseerimishoidla$
fossil version
    This is fossil version 2.3 [f7914bfdfa] 2017-07-21 03:19:30 UTC

ts2@linux-0fiz:~/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/publitseerimishoidla$
    ----citation---end----------------


Neither of the command lines prompted for the password
of the user martin_vahi, which is the admin username at the
remote repository.


> ...
> Date: Mon, 23 Oct 2017 12:51:20 +0200
> From: Stephan Beal <sgb...@googlemail.com>
> To: fossil-users <fossil-users@lists.fossil-scm.org>
> Subject: Re: [fossil-users] Bug Report: Cloning with --private Fails
> Message-ID:
>       <cakd4nah8ege0jbw3fzp2s51n3bl3ta39bgv72v6k--61wqp...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> An unrelated tip: with that url, anyone can download your whole repo via
> your web server, bypassing fossil's login. It's far safer to store your
> repo db in a path unreachable by your web server so that the db can
only be
> accessed via fossil.
> ...

Thank You for the warning, thank You for pointing that out.
I like the approach that it's better to be safe than sorry and
I like to receive tips like that. However, this time I got
lucky and got it right from the very start: the fossil repository
has been outside of the web root from the very start and the actual
content of the silktorrent.bash at the

    https://www.softf1.com/cgi-bin/tree1/technology/flaws/silktorrent.bash

is

    ----citation---start--------------
    #!/usr/local/bin/bash

    # pwd ===
/www/apache/domains/www.softf1.com/htdocs/cgi-bin/tree1/technology/flaws
    S_FP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

    source $S_FP_DIR/../../business/flaws/bonnet/gateway_common_part_1.bash

    #----------------------------------------------------
    FLAWCCOUNTANCY_PROJECT_ID="silktorrent"

    source $FLAWCCOUNTANCY_PRIVATE/bonnet/cgi_entry_common.bash
    ----citation---end----------------

It doesn't directly show it from here, but in the end
the call to a "CGI program"
ends up being a call to a Fossil binary with
the right command line arguments, including the repository file path.
The Fossil binary reads the rest out from the CGI
related environment variables. That trick also seems to
work, when a PHP program calls a "command line utility",
which happens to be the Fossil binary with the right
command line arguments. The CGI related environment variables
have been set up for the PHP anyway, so when the PHP program
calls some command line program, then the environment
variables are also available for that command line program.
That is to say, any web hosting service that runs PHP and
allows the uploading of a Fossil binary that fits with the
operating system of the web hosting server is
good enough for hosting a Fossil repository online,
provided that the user account of the web hosting service
has at least some folder that resides outside of the web root :-)


Thank You for reading my comment.


_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to