From 3bd8ef2c8c49fd77108d8d3885fd6e66e4a38e73 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 20 Jan 2016 21:00:16 +0100 Subject: [PATCH] makebuildserver: set defaults in script so it can run without config 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 | 15 ++++++++------- makebuildserver | 9 ++++++++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/examples/makebuildserver.config.py b/examples/makebuildserver.config.py index f2c846d5..9795bf76 100644 --- a/examples/makebuildserver.config.py +++ b/examples/makebuildserver.config.py @@ -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 diff --git a/makebuildserver b/makebuildserver index 4fc9a28d..ebd998b2 100755 --- a/makebuildserver +++ b/makebuildserver @@ -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'): -- 2.30.2