From beae39afe042f1070e1cd1a9782cca21b5c9c438 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Am=C3=A9lia=20Coutard-Sander?= <git@ameliathe1st.gay>
Date: Tue, 26 Nov 2024 23:54:40 +0100
Subject: [PATCH] Removed gns handling: this should probably be done by the
 user since the record can be used by many repos.

---
 README.txt     |  7 ++++---
 run-daemons.sh | 16 ++++++----------
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/README.txt b/README.txt
index 4d722d5..a35a8db 100644
--- a/README.txt
+++ b/README.txt
@@ -10,8 +10,9 @@ Client:
 	The URL to give to git is gnunet://<location of the repo>/<name of the repo>.
 Server:
 	- To run the server on a repo, simply copy the two .sh files to its root, and run
-		`./run-daemons.sh <ego> <gns-name> <repo-name>`.
-	- This will open the repo for pulling on the url `gnunet://<gns-name>.<ego>/<repo-name>`.
+		`./run-daemons.sh <repo-name>`.
+	- You should also add a gns TXT record containing the peerid serving your repos to your zone.
+	- This will open the repo for pulling on the url `gnunet://<gns-record-name>/<repo-name>`.
 
 Features:
 	- Clone repo !
@@ -32,7 +33,7 @@ TODO:
 How it works:
 Client:
 	- Uses a git remote helper to give git the ability to interpet the gnunet:// scheme.
-	- Gets the TXT record associated with the GNS name given after the gnunet://<gns-name>/<repo-name>.
+	- Gets the TXT record associated with the GNS name given in gnunet://<gns-name>/<repo-name>.
 	- This TXT record is a <peer-id>.
 	- To run a specific git command on repo <repo> and get its inputs and outputs, connect via cadet
 		to the peer id <peer-id>, via the port git.<repo-name>-<command>.
diff --git a/run-daemons.sh b/run-daemons.sh
index 2173c78..db1302d 100755
--- a/run-daemons.sh
+++ b/run-daemons.sh
@@ -1,18 +1,14 @@
 #!/usr/bin/env bash
 
-if test -z $1 || test -z $2 || test -z $3 || ! test -z $4; then
-	echo >&2 "Usage: $0 <ego> <name> <repo-name>"
+if test -z $1 || ! test -z $2; then
+	echo >&2 "Usage: $0 <repo-name>"
 	exit 1
 fi
 
-ego="$1"
-name="$2"
-repo_name="$3"
+name="$1"
 
-echo >&2 "Running pullable repo $repo_name as \`$name.$ego'."
-gnunet-namestore -a -t TXT -e 1d -n "$name" -V "$(gnunet-core -i | sed 's/.*: //')" -z "$ego" -p
+echo >&2 "Running pullable repo $name."
 
-./daemon.sh upload-pack "$repo_name"
+./daemon.sh upload-pack "$name"
 
-gnunet-namestore -d -n "$name" -z "$ego"
-echo >&2 "Terminating pullable repo $repo_name in ego $ego."
+echo >&2 "Terminating pullable repo $name."
-- 
2.46.0