aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2010-03-13 00:39:23 +0000
committerRob Austein <sra@hactrn.net>2010-03-13 00:39:23 +0000
commitda17226e65ffe1321662e243ce670d205bb0c9b6 (patch)
treed9c3b62b8416a2e5835808f86d12e27ae1078bdc
parent2334c030842a07fc350493d495237ce57380b132 (diff)
Rework rsync URI construction per mailing list discussion.
svn path=/myrpki.rototill/examples/myrpki.conf; revision=3079
-rw-r--r--myrpki.rototill/examples/myrpki.conf14
-rw-r--r--myrpki.rototill/myrpki.py16
-rw-r--r--myrpki.rototill/yamltest.py4
3 files changed, 16 insertions, 18 deletions
diff --git a/myrpki.rototill/examples/myrpki.conf b/myrpki.rototill/examples/myrpki.conf
index d091cde2..3321e2ed 100644
--- a/myrpki.rototill/examples/myrpki.conf
+++ b/myrpki.rototill/examples/myrpki.conf
@@ -103,15 +103,11 @@ rootd_server_port = 4401
publication_base_directory = publication/
-# rsyncd module name corresponding to publication_base_directory, or
-# empty string if you want publication_base_directory to correspond to
-# the parent of multiple rsyncd modules populated by pubd. The latter
-# is "multimodule mode" and is useful if you have strong opinions
-# about what the rsync URLs should look like; it requires the rsyncd
-# module definitions to line up with the directory names under
-# publication_base_directory.
-
-publication_rsync_module = ${myrpki::handle}
+# rsyncd module name corresponding to publication_base_directory.
+# This has to match the module you configured into rsyncd.conf.
+# Leave this alone unless you have some need to change it.
+
+publication_rsync_module = rpki
# Hostname and optional port number for rsync:// URIs. In most cases
# this should just be the same value as pubd_server_name.
diff --git a/myrpki.rototill/myrpki.py b/myrpki.rototill/myrpki.py
index 83d032ac..93f82a03 100644
--- a/myrpki.rototill/myrpki.py
+++ b/myrpki.rototill/myrpki.py
@@ -1117,14 +1117,16 @@ class main(rpki.cli.Cmd):
# For the moment we cheat egregiously, no crypto, blind trust of
# what we're sent, while I focus on the basic semantics.
- if sia_base is None and c.get("proposed_sia_base"):
- sia_base = c.get("proposed_sia_base")
- elif sia_base is None and c.get("handle") == self.handle:
- sia_base = "rsync://%s/%s/" % (self.rsync_server, self.rsync_module)
- else:
- sia_base = "rsync://%s/%s/%s/" % (self.rsync_server, self.rsync_module, c.get("handle"))
+ if sia_base is None:
+
+ if c.get("proposed_sia_base"):
+ sia_base = c.get("proposed_sia_base")
+ else:
+ sia_base = "rsync://%s/%s/%s/" % (self.rsync_server, self.rsync_module, self.handle)
+ if c.get("handle") != self.handle:
+ sia_base += c.get("handle") + "/"
- client_handle = "/".join(sia_base.rstrip("/").split("/")[3:])
+ client_handle = "/".join(sia_base.rstrip("/").split("/")[4:])
parent_handle = c.get("parent_handle")
diff --git a/myrpki.rototill/yamltest.py b/myrpki.rototill/yamltest.py
index 601d3dcb..e5bc3155 100644
--- a/myrpki.rototill/yamltest.py
+++ b/myrpki.rototill/yamltest.py
@@ -122,7 +122,7 @@ class allocation_db(list):
for a in self:
if a.sia_base is None:
if a.runs_pubd():
- base = "rsync://localhost:%d/" % a.rsync_port
+ base = "rsync://localhost:%d/rpki/" % a.rsync_port
else:
base = a.parent.sia_base
a.sia_base = base + a.name + "/"
@@ -447,7 +447,7 @@ class allocation(object):
("# Automatically generated, do not edit",
"port = %d" % self.rsync_port,
"address = localhost",
- "[%s]" % self.name,
+ "[rpki]",
"log file = rsyncd.log",
"read only = yes",
"use chroot = no",