extras-buildsys/client CONFIG.py,1.3,1.4 buildclient.py,1.10,1.11

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Wed Jun 15 05:01:35 UTC 2005


Author: dcbw

Update of /cvs/fedora/extras-buildsys/client
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24633/client

Modified Files:
	CONFIG.py buildclient.py 
Log Message:
Put a fileserver_port option config file to easily allow more than one build client on a machine


Index: CONFIG.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/client/CONFIG.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CONFIG.py	12 Jun 2005 08:23:37 -0000	1.3
+++ CONFIG.py	15 Jun 2005 05:01:31 -0000	1.4
@@ -4,6 +4,7 @@
 config_opts['builder_cmd'] = "/usr/bin/mock"
 config_opts['distro_name'] = "fedora"
 config_opts['repo_name'] = "core"
+config_opts['fileserver_port'] = 8889
 
 CLIENT_DIR = "/work/fedora-cvs/extras-buildsys/client"
 
@@ -18,6 +19,9 @@
 # WARNING: this directory is world-readable via HTTP!
 config_opts['client_work_dir'] = "/tmp/build_client_work"
 
+
+####################################################################################
+
 def get(key):
     if config_opts.has_key(key):
         return config_opts[key]


Index: buildclient.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/client/buildclient.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- buildclient.py	15 Jun 2005 04:53:24 -0000	1.10
+++ buildclient.py	15 Jun 2005 05:01:33 -0000	1.11
@@ -57,7 +57,8 @@
     if not file_path.startswith(CONFIG.get("client_work_dir")):
         return None
     file_part = file_path[len(CONFIG.get("client_work_dir")) + 1:]
-    full_url = "https://" + g_our_hostname + ":8889/" + file_part
+    port = "%s" % CONFIG.get('fileserver_port')
+    full_url = "https://" + g_our_hostname + ":" + port + "/" + file_part
     return urllib.quote(full_url)
 
 
@@ -363,7 +364,8 @@
     # Start up the HTTP server thread which the build server
     # pulls completed RPMs from
     work_dir = CONFIG.get('client_work_dir')
-    http_server = SimpleHTTPSServer.SimpleHTTPSServer(certs, (g_our_hostname, 8889), work_dir)
+    port = CONFIG.get('fileserver_port')
+    http_server = SimpleHTTPSServer.SimpleHTTPSServer(certs, (g_our_hostname, port), work_dir)
     http_server.start()
 
     last_time = time.time()




More information about the fedora-extras-commits mailing list