Re: [fossil-users] Bug Report: Cloning with --private Fails

2017-11-02 Thread BRUCE KAPITO
Will you please take me off your lists.
 

On Thursday, November 2, 2017, 9:48:37 PM EDT, Andy Bradford 
 wrote:  
 
 Thus said Martin Vahi on Wed, 01 Nov 2017 17:06:00 +0200:

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

You did not tell Fossil that there  is a remote user associated with the
repository. This  information is  in the clone  URL. From  ``fossil help
clone'' you get the following information:

Usage: ./fossil clone ?OPTIONS? URI FILENAME

Make a clone of a repository specified by URI in the local
file named FILENAME.

URI may be one of the following form: ([...] mean optional)
  HTTP/HTTPS protocol:
    http[s]://[userid[:password]@]host[:port][/path]

Notice  here that  the userid  is  part of  the URL,  however, when  you
cloned, you used:

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

But you need to use:

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

The --admin-user  option to clone  defines a  *local* admin user,  not a
remote user.

Andy
-- 
TAI64 timestamp: 400059fbcb10


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


Re: [fossil-users] Bug Report: Cloning with --private Fails

2017-11-02 Thread Andy Bradford
Thus said Martin Vahi on Wed, 01 Nov 2017 17:06:00 +0200:

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

You did not tell Fossil that there  is a remote user associated with the
repository. This  information is  in the clone  URL. From  ``fossil help
clone'' you get the following information:

Usage: ./fossil clone ?OPTIONS? URI FILENAME

Make a clone of a repository specified by URI in the local
file named FILENAME.

URI may be one of the following form: ([...] mean optional)
  HTTP/HTTPS protocol:
http[s]://[userid[:password]@]host[:port][/path]

Notice  here that  the userid  is  part of  the URL,  however, when  you
cloned, you used:

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

But you need to use:

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

The --admin-user  option to clone  defines a  *local* admin user,  not a
remote user.

Andy
-- 
TAI64 timestamp: 400059fbcb10


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


Re: [fossil-users] Bug Report: Cloning with --private Fails

2017-11-01 Thread Martin Vahi
>...
> Date: Tue, 24 Oct 2017 09:14:59 -0400
> From: Karn Kallio 
> 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" 
> To: "Martin Vahi" 
> 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$
c

Re: [fossil-users] Bug Report: Cloning with --private Fails

2017-10-24 Thread Karn Kallio

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 only marks the rid as private when also adding a
phantom.

However while this corrects the private branch push error I do not know
whether it causes other errors, violates invariants, etc.


diff -Naur fossil-2.3-upstream/src/content.c fossil-2.3/src/content.c
--- fossil-2.3-upstream/src/content.c   2017-07-20
23:19:30.0 -0400 +++ fossil-2.3/src/content.c   2017-08-08
22:46:11.690063606 -0400 @@ -598,10 +598,10 @@
 if( !pBlob ){
   db_multi_exec("INSERT OR IGNORE INTO phantom VALUES(%d)", rid);
 }
-  }
-  if( g.markPrivate || isPrivate ){
-db_multi_exec("INSERT INTO private VALUES(%d)", rid);
-markAsUnclustered = 0;
+if( g.markPrivate || isPrivate ){
+  db_multi_exec("INSERT INTO private VALUES(%d)", rid);
+  markAsUnclustered = 0;
+}
   }
   if( nBlob==0 ) blob_reset(&cmpr);
 


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


Re: [fossil-users] Bug Report: Cloning with --private Fails

2017-10-23 Thread Andy Bradford
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
-- 
TAI64 timestamp: 400059ee9711


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


Re: [fossil-users] Bug Report: Cloning with --private Fails

2017-10-23 Thread Stephan Beal
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.

- stephan
Sent from a mobile device, possibly from bed. Please excuse brevity, typos,
and top-posting.

On Oct 23, 2017 10:27, "Martin Vahi"  wrote:

>
> It doesn't even prompt for a password.
> Both, client side and server side, Fossil binaries
> are of version 2.3
>
> ---citation--start-
> 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: 683  received: 65921513  ip: 185.7.252.74
> server returned an error - clone aborted
>
> real1m31.898s
> user0m5.254s
> sys 0m2.647s
> ts2@linux-0fiz:~/Projektid/progremise_infrastruktuur/andmevahetustarkvara/
> rakendusvõrgud/silktorrent/publitseerimishoidla$
> ---citation--end
>
>
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Bug Report: Cloning with --private Fails

2017-10-23 Thread Martin Vahi

It doesn't even prompt for a password.
Both, client side and server side, Fossil binaries
are of version 2.3

---citation--start-
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: 683  received: 65921513  ip: 185.7.252.74
server returned an error - clone aborted

real1m31.898s
user0m5.254s
sys 0m2.647s
ts2@linux-0fiz:~/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/publitseerimishoidla$
---citation--end


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