chiark / gitweb /
makebuildserver: set defaults in script so it can run without config
authorHans-Christoph Steiner <hans@eds.org>
Wed, 20 Jan 2016 20:00:16 +0000 (21:00 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Thu, 21 Jan 2016 14:34:55 +0000 (15:34 +0100)
This makes it so that ./makebuildserver will run without any config file,
using the defaults that are embedded in the script itself.  This is like
how `fdroid` works.

examples/makebuildserver.config.py
makebuildserver

index f2c846d5e23cd45d91930f2044b5e218430a80bd..9795bf765004ef9ffffb7d8d96724752d1a69f41 100644 (file)
@@ -3,13 +3,14 @@
 # You may want to alter these before running ./makebuildserver
 
 # Name of the base box to use
-basebox = "jessie32"
+basebox = "jessie32"
 
 # Location where testing32.box can be found, if you don't already have
 # it. For security reasons, it's recommended that you make your own
 # in a secure environment using trusted media (see the manual) but
 # you can use this default if you like...
-baseboxurl = "https://f-droid.org/jessie32.box"
+# baseboxurl = "https://f-droid.org/jessie32.box"
+#
 # or if you have a cached local copy, you can use that first:
 # baseboxurl = ["file:///home/fdroid/fdroidserver/cache/jessie32.box", "https://f-droid.org/jessie32.box"]
 
@@ -20,13 +21,13 @@ baseboxurl = "https://f-droid.org/jessie32.box"
 # debian_mirror = 'http://ftp.uk.debian.org/debian/'
 
 # The amount of RAM the build server will have
-memory = 3584
+memory = 3584
 
 # The number of CPUs the build server will have
-cpus = 1
+cpus = 1
 
-# Debian package proxy server - if you have one, e.g. "http://192.168.0.19:8000"
-aptproxy = None
+# Debian package proxy server - if you have one
+# aptproxy = "http://192.168.0.19:8000"
 
 # Set to True if your base box is 64 bit (e.g. testing32.box isn't)
-arch64 = False
+# arch64 = True
index 4fc9a28dbd8816584c658d9f426cc3226c4b43b9..ebd998b2719a2d3539345b6f816cc5190ceec87c 100755 (executable)
@@ -45,7 +45,14 @@ parser.add_option("--debian-mirror", default="http://http.debian.net/debian/",
                   help="Use the specified Debian mirror in the box's /etc/apt/sources.list.")
 options, args = parser.parse_args()
 
-config = {}
+# set up default config
+config = {
+    'arch64': False,
+    'basebox': 'jessie32',
+    'baseboxurl': 'https://f-droid.org/jessie32.box',
+    'cpus': 1,
+    'memory': 3584,
+}
 
 # load config file, if present
 if os.path.exists('makebuildserver.config.py'):