X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=phase1%2Fmaster.cfg;h=6030def4622d8117b90af1329f8795ba437c2be3;hb=55be88aaeca4e0e6cd2d0d8de1eeb58e6da07a29;hp=2c3e42eebdc8508c015cc1f74c242739c742a2a2;hpb=ccf2e87d6c393d1d0f3a8c8389fd219c90e85108;p=buildbot.git diff --git a/phase1/master.cfg b/phase1/master.cfg index 2c3e42e..6030def 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -48,6 +48,10 @@ c['mergeRequests'] = True ####### CHANGESOURCES home_dir = os.path.abspath(ini.get("general", "homedir")) +tree_expire = 0 + +if ini.has_option("general", "expire"): + tree_expire = ini.getint("general", "expire") repo_url = ini.get("repo", "url") @@ -78,6 +82,9 @@ if ini.has_option("gpg", "passfile"): # find targets targets = [ ] +if not os.path.isdir(home_dir+'/source.git'): + subprocess.call(["git", "clone", "--depth=1", repo_url, home_dir+'/source.git']) + findtargets = subprocess.Popen([home_dir+'/dumpinfo.pl', 'targets'], stdout = subprocess.PIPE, cwd = home_dir+'/source.git') @@ -152,50 +159,6 @@ def IsAffected(pattern): return False return CheckAffected -def isPathBuiltin(path): - incl = {} - pkgs = {} - conf = open(".config", "r") - - while True: - line = conf.readline() - if line == '': - break - m = re.match("^(CONFIG_PACKAGE_.+?)=y", line) - if m: - incl[m.group(1)] = True - - conf.close() - - deps = open("tmp/.packagedeps", "r") - - while True: - line = deps.readline() - if line == '': - break - m = re.match("^package-\$\((CONFIG_PACKAGE_.+?)\) \+= (\S+)", line) - if m and incl.get(m.group(1)) == True: - pkgs["package/%s" % m.group(2)] = True - - deps.close() - - while path != '': - if pkgs.get(path) == True: - return True - path = os.path.dirname(path) - - return False - -def isChangeBuiltin(change): - return True -# for request in change.build.requests: -# for source in request.sources: -# for change in source.changes: -# for file in change.files: -# if isPathBuiltin(file): -# return True -# return False - c['builders'] = [] @@ -271,6 +234,21 @@ for target in targets: description = "Finding number of CPUs", command = ["nproc"])) + # expire tree if needed + if tree_expire > 0: + factory.addStep(FileDownload( + mastersrc = "expire.sh", + slavedest = "../expire.sh", + mode = 0755)) + + factory.addStep(ShellCommand( + name = "expire", + description = "Checking for build tree expiry", + command = ["./expire.sh", str(tree_expire)], + workdir = ".", + haltOnFailure = True, + timeout = 2400)) + # check out the source factory.addStep(Git(repourl=repo_url, mode='update')) @@ -285,6 +263,12 @@ for target in targets: # description = "Copy the feeds.conf", # command='''cp ~/feeds.conf ./feeds.conf''' )) + # feed + factory.addStep(ShellCommand( + name = "rmfeedlinks", + description = "Remove feed symlinks", + command=["rm", "-rf", "package/feeds/"])) + # feed factory.addStep(ShellCommand( name = "updatefeeds", @@ -314,6 +298,9 @@ CONFIG_SIGNED_PACKAGES=y # CONFIG_PER_FEED_REPO_ADD_COMMENTED is not set CONFIG_KERNEL_KALLSYMS=y CONFIG_COLLECT_KERNEL_DEBUG=y +CONFIG_TARGET_ALL_PROFILES=y +CONFIG_TARGET_MULTI_PROFILE=y +CONFIG_TARGET_PER_DEVICE_ROOTFS=y EOT''' %(ts[0], ts[0], ts[1]) )) factory.addStep(ShellCommand( @@ -418,7 +405,6 @@ EOT''' %(ts[0], ts[0], ts[1]) )) name = "pkginstall", description = "Installing packages", command=["make", WithProperties("-j%(nproc:~4)s"), "package/install", "V=s"], - doStepIf = isChangeBuiltin, haltOnFailure = True )) @@ -433,8 +419,14 @@ EOT''' %(ts[0], ts[0], ts[1]) )) factory.addStep(ShellCommand( name = "images", description = "Building images", - command=["make", "-j1", "target/install", "V=s"], - doStepIf = isChangeBuiltin, + command=["make", WithProperties("-j%(nproc:~4)s"), "target/install", "V=s"], + haltOnFailure = True + )) + + factory.addStep(ShellCommand( + name = "checksums", + description = "Calculating checksums", + command=["make", "-j1", "checksum", "V=s"], haltOnFailure = True )) @@ -493,7 +485,7 @@ EOT''' %(ts[0], ts[0], ts[1]) )) factory.addStep(ShellCommand( name = "targetupload", description = "Uploading target files", - command=["rsync", "--delete", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1]), "-avz", WithProperties("bin/targets/%s/%s%%(libc)s/" %(ts[0], ts[1])), "%s/targets/%s/%s/" %(rsync_bin_url, ts[0], ts[1])], + command=["rsync", "--delete", "--checksum", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1]), "-avz", WithProperties("bin/targets/%s/%s%%(libc)s/" %(ts[0], ts[1])), "%s/targets/%s/%s/" %(rsync_bin_url, ts[0], ts[1])], env={'RSYNC_PASSWORD': rsync_bin_key}, haltOnFailure = True, logEnviron = False @@ -503,7 +495,7 @@ EOT''' %(ts[0], ts[0], ts[1]) )) factory.addStep(ShellCommand( name = "sourceupload", description = "Uploading source archives", - command=["rsync", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1]), "-avz", "dl/", "%s/" %(rsync_src_url)], + command=["rsync", "--checksum", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1]), "-avz", "dl/", "%s/" %(rsync_src_url)], env={'RSYNC_PASSWORD': rsync_src_key}, haltOnFailure = True, logEnviron = False